html:has(body.ts-body),
body.ts-body {
    overflow-x: hidden;
}

body.ts-body .topbar-inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-inline: 16px;
    box-sizing: border-box;
}

.ts-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 16px;
    box-sizing: border-box;
}

.ts-page .stats {
    grid-template-columns: repeat(4, 1fr);
}

.ts-page > .card {
    width: 100%;
    max-width: none;
    overflow: hidden;
}

.ts-page > .card > .card-body {
    min-width: 0;
    overflow: hidden;
}

.ts-scroller {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 230px);
    border: 1px solid #64748b;
    border-radius: 8px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.ts-grid {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed !important;
    width: max-content !important;
    max-width: none !important;
    font-size: 14px;
}

.ts-grid th,
.ts-grid td {
    box-sizing: border-box;
    border-bottom: 1px solid #64748b;
    border-inline-end: 1px solid #64748b;
    text-align: center;
    vertical-align: middle;
}

.ts-grid thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #0f2744;
    color: #fff;
    font-weight: 800;
    height: 56px;
}

.ts-grid .nm {
    position: sticky;
    inset-inline-start: 0;
    z-index: 4;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    text-align: start;
    padding: 8px 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #0f2744;
    color: #fff;
}

.ts-grid thead .nm {
    z-index: 6;
    background: #0b1c31;
}

.ts-grid tbody .nm {
    background: #f8fafc;
    color: #0f2744;
    z-index: 5;
    box-shadow: 6px 0 10px rgba(15, 39, 68, .12);
}

.ts-grid tbody tr:nth-child(even) .nm {
    background: #eef2f7;
}

.ts-grid .dy {
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    padding: 8px 4px;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    overflow: visible;
}

.ts-grid .dy .day-sub {
    display: block;
    font-size: 11px;
    opacity: .85;
    font-weight: 700;
}

.ts-grid tbody td.dy {
    height: 44px;
}

.ts-grid th.col-weekend { background: #6b1d3a; }
.ts-grid th.col-holiday { background: #7a4f0b; }

.ts-grid .cell-present { background: #dcfce7; color: #166534; }
.ts-grid .cell-late { background: #fef3c7; color: #92400e; }
.ts-grid .cell-absent { background: #fee2e2; color: #991b1b; }
.ts-grid .cell-weekend { background: #fce7f3; color: #9f1239; }
.ts-grid .cell-holiday { background: #fde68a; color: #92400e; }
.ts-grid .cell-leave { background: #dbeafe; color: #1e40af; }
.ts-grid .cell-future { background: #f8fafc; color: #94a3b8; }

@media (max-width: 980px) {
    .ts-page .stats {
        grid-template-columns: 1fr 1fr;
    }
}
