/* App layout & components */

.app-body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at top right, rgba(184, 165, 106, 0.18), transparent 50%),
        linear-gradient(180deg, var(--color-cream) 0%, var(--color-cream-dark) 100%);
}

/* Auth */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        linear-gradient(145deg, var(--color-primary) 0%, var(--color-primary-dark) 45%, #2a1a15 100%);
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: var(--color-cream);
    border-radius: calc(var(--radius) + 4px);
    padding: 2rem 1.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(184, 165, 106, 0.35);
}

.auth-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
    letter-spacing: 0.02em;
}

.auth-subtitle {
    color: var(--color-gold-dark);
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
    font-weight: 500;
}

.auth-location {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-primary);
    opacity: 0.8;
}

/* Navbar */
.app-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: var(--color-primary);
    color: var(--color-cream);
    z-index: 1030;
    box-shadow: 0 2px 12px rgba(42, 26, 21, 0.25);
}

.app-navbar-inner {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    gap: 1rem;
}

.navbar-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
    margin-right: 0.6rem;
}

.navbar-brand-text {
    font-weight: 650;
    font-size: 1.05rem;
    color: var(--color-cream);
    letter-spacing: 0.01em;
    line-height: 1.15;
    display: block;
}

.navbar-brand-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.navbar-brand-location {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(246, 242, 233, 0.78);
    letter-spacing: 0.04em;
    text-transform: none;
    line-height: 1.2;
    margin-top: 0.1rem;
}

.app-navbar-brand {
    display: flex;
    align-items: center;
}

.user-menu-btn {
    border-color: rgba(246, 242, 233, 0.45) !important;
    color: var(--color-cream) !important;
}

.user-menu-btn:hover {
    background: rgba(184, 165, 106, 0.25) !important;
    border-color: var(--color-gold) !important;
}

.sidebar-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 0.4rem 0.45rem;
    text-decoration: none;
    border: 0;
    background: transparent;
    margin-right: 0.35rem;
    flex-shrink: 0;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus {
    opacity: 0.85;
}

.sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-cream);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

body.sidebar-collapsed .sidebar-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

body.sidebar-collapsed .sidebar-toggle span:nth-child(2) {
    opacity: 0;
}

body.sidebar-collapsed .sidebar-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Sidebar */
.app-sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--color-white);
    border-right: 1px solid var(--color-border);
    z-index: 1020;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow-y: auto;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem 0.75rem;
}

.sidebar-nav .nav-link {
    color: var(--color-text-muted);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.sidebar-nav .nav-link:hover {
    background: var(--color-cream);
    color: var(--color-primary);
}

.sidebar-nav .nav-link.active {
    background: rgba(90, 55, 44, 0.08);
    color: var(--color-primary);
    font-weight: 650;
    border-left: 3px solid var(--color-gold);
}

.nav-group {
    margin-top: 0.35rem;
    list-style: none;
}

.nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-group-toggle:hover {
    background: var(--color-cream);
    color: var(--color-primary);
}

.nav-group.is-open > .nav-group-toggle {
    color: var(--color-primary);
}

.nav-group-chevron {
    width: 0.5rem;
    height: 0.5rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
    opacity: 0.7;
}

.nav-group.is-open > .nav-group-toggle .nav-group-chevron {
    transform: rotate(45deg);
}

.nav-group-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 0.15rem 0.35rem;
    display: none;
    border-left: 2px solid rgba(184, 165, 106, 0.35);
    margin-left: 0.9rem;
}

.nav-group.is-open > .nav-group-menu {
    display: block;
}

.nav-group-menu .nav-link {
    padding: 0.42rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.sidebar-footer {
    margin-top: auto;
    padding: 0.75rem 0.9rem;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(44, 36, 30, 0.45);
    z-index: 1010;
}

.sidebar-backdrop.show {
    display: block;
}

/* Main content */
.app-main {
    margin-left: var(--sidebar-width);
    margin-top: var(--navbar-height);
    min-height: calc(100vh - var(--navbar-height));
    padding: 1.5rem;
    transition: margin-left 0.25s ease;
}

/* Desktop collapsed */
@media (min-width: 992px) {
    body.sidebar-collapsed .app-sidebar {
        transform: translateX(-100%);
        pointer-events: none;
    }

    body.sidebar-collapsed .app-main {
        margin-left: 0;
    }

    body.sidebar-collapsed .sidebar-backdrop {
        display: none !important;
    }
}

/* Mobile */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    .app-sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-md);
        pointer-events: auto;
    }

    .app-main {
        margin-left: 0;
    }

    /* Ignore desktop collapse icon on mobile */
    body.sidebar-collapsed .sidebar-toggle span:nth-child(1),
    body.sidebar-collapsed .sidebar-toggle span:nth-child(3) {
        transform: none;
    }

    body.sidebar-collapsed .sidebar-toggle span:nth-child(2) {
        opacity: 1;
    }

    body.sidebar-mobile-open .sidebar-toggle span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    body.sidebar-mobile-open .sidebar-toggle span:nth-child(2) {
        opacity: 0;
    }

    body.sidebar-mobile-open .sidebar-toggle span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 0.25rem;
}

.page-header p {
    margin: 0;
    color: var(--color-text-muted);
}

.panel {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.panel-title {
    font-size: 1rem;
    font-weight: 650;
    color: var(--color-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--color-border);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--color-text-muted);
}

.empty-state .accent {
    color: var(--color-gold-dark);
    font-weight: 600;
}

/* DataTables / Select2 soft theming */
table.dataTable thead th {
    background: var(--color-cream) !important;
    color: var(--color-primary);
    border-bottom-color: var(--color-border) !important;
}

.select2-container--bootstrap-5 .select2-selection--single:focus,
.select2-container--bootstrap-5.select2-container--focus .select2-selection {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 0.2rem rgba(184, 165, 106, 0.25);
}

/* ===== Dashboard ===== */
.dash-kpi-row {
    margin-bottom: 0.25rem;
}

.dash-card {
    position: relative;
    border-radius: var(--radius);
    padding: 1.1rem 1.15rem 1rem;
    min-height: 118px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
    height: 100%;
}

.dash-card::after {
    content: "";
    position: absolute;
    right: -18px;
    bottom: -24px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    opacity: 0.18;
    background: currentColor;
    pointer-events: none;
}

.dash-card--primary {
    background: linear-gradient(145deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-cream);
    border-color: rgba(184, 165, 106, 0.25);
}

.dash-card--gold {
    background: linear-gradient(145deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    color: var(--color-primary-dark);
    border-color: rgba(90, 55, 44, 0.12);
}

.dash-card--warn {
    background: linear-gradient(145deg, #F6F2E9 0%, #EDE6D6 100%);
    color: var(--color-primary);
    border-color: var(--color-gold);
}

.dash-card--warn .dash-card__value {
    color: var(--color-warning);
}

.dash-card--alert {
    background: linear-gradient(145deg, #FBF6F0 0%, #F0E4D8 100%);
    color: var(--color-primary);
    border-color: rgba(179, 58, 58, 0.35);
}

.dash-card--alert .dash-card__value {
    color: var(--color-danger);
}

.dash-card__label {
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 0.35rem;
}

.dash-card__value {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.dash-card__meta {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    opacity: 0.8;
}

.dash-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.75rem;
    min-height: 480px;
    height: calc(100vh - 22rem);
}

.dash-cell {
    min-height: 0;
    display: flex;
}

.dash-cell--collection {
    grid-column: 1;
    grid-row: 1;
}

.dash-cell--expenses {
    grid-column: 1;
    grid-row: 2;
}

.dash-cell--activity {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.dash-chart-wrap {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-height: 160px;
    overflow: hidden;
}

.dash-chart-wrap canvas {
    display: block;
}

.dash-panel--equal {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.dash-panel--equal .panel-title {
    flex-shrink: 0;
}

.dash-panel--equal .dash-body {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
}

.dash-activity-scroll {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.35rem;
    margin-right: -0.15rem;
}

.dash-panel--activity .empty-state {
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

@media (max-width: 991.98px) {
    .dash-main-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 240px 240px 320px;
        height: auto;
        min-height: 0;
    }

    .dash-cell--collection,
    .dash-cell--expenses,
    .dash-cell--activity {
        grid-column: 1;
        grid-row: auto;
    }
}

.dash-activity-scroll::-webkit-scrollbar {
    width: 6px;
}

.dash-activity-scroll::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--color-primary) 35%, transparent);
    border-radius: 999px;
}

.dash-activity__item {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--color-border);
}

.dash-activity__item:last-child {
    border-bottom: 0;
}

.dash-activity__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.dash-activity__action {
    font-weight: 650;
    color: var(--color-primary);
    font-size: 0.85rem;
    line-height: 1.3;
}

.dash-activity__time {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--color-gold-dark);
    white-space: nowrap;
}

.dash-activity__desc {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    margin-top: 0.1rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-activity__user {
    margin-top: 0.1rem;
    font-size: 0.72rem;
    color: var(--color-gold-dark);
}

/* Fee tracker cells */
.fee-cell {
    display: inline-block;
    min-width: 2.4rem;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 650;
    text-align: center;
    white-space: nowrap;
}

.fee-cell--paid {
    background: rgba(46, 125, 50, 0.12);
    color: #1b5e20;
}

.fee-cell--partial {
    background: rgba(184, 165, 106, 0.25);
    color: var(--color-primary);
}

.fee-cell--due,
.fee-cell--na {
    color: var(--color-text-muted);
    font-weight: 500;
}

#trackerTable th.fee-col-month,
#trackerTable th.fee-col-term {
    font-size: 0.75rem;
    white-space: nowrap;
}

#trackerTable td {
    vertical-align: middle;
}

/* ===== Modals — scrollable on small screens =====
   Bootstrap modal-dialog-scrollable expects header/body/footer as direct
   children of .modal-content. Our forms wrap those, so we recreate the
   flex + scroll behaviour so footers (Save) stay visible. */
.modal {
    padding-right: 0 !important;
}

.modal-dialog {
    margin: 0.5rem auto;
    max-height: calc(100dvh - 1rem);
    display: flex;
}

.modal-dialog .modal-content {
    max-height: calc(100dvh - 1rem);
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-dialog .modal-content > form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

.modal-dialog .modal-header,
.modal-dialog .modal-footer {
    flex-shrink: 0;
}

.modal-dialog .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* Full-height on phones for tall forms */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0.35rem;
        max-width: calc(100% - 0.7rem);
        max-height: calc(100dvh - 0.7rem);
    }

    .modal-dialog .modal-content {
        max-height: calc(100dvh - 0.7rem);
    }

    .modal-dialog.modal-fullscreen-sm-down {
        margin: 0;
        max-width: 100%;
        max-height: 100dvh;
        height: 100%;
    }

    .modal-dialog.modal-fullscreen-sm-down .modal-content {
        max-height: 100dvh;
        height: 100%;
        border-radius: 0;
    }

    .app-main {
        padding: 1rem 0.75rem;
    }

    .page-header {
        gap: 0.75rem;
    }

    .page-header > .d-flex,
    .page-header .d-flex.gap-2,
    .page-header .d-flex.flex-wrap {
        width: 100%;
        flex-direction: column;
        align-items: stretch !important;
    }

    .page-header .btn {
        width: 100%;
    }

    .panel {
        padding: 1rem;
    }
}

@media (max-width: 991.98px) {
    .table-responsive {
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    .dataTables_wrapper .row {
        --bs-gutter-x: 0.75rem;
    }

    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length {
        text-align: left !important;
        margin-bottom: 0.5rem;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100% !important;
        margin-left: 0 !important;
        display: block;
        margin-top: 0.35rem;
    }
}

/* ===== Attendance sheet ===== */
.att-working-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    justify-content: flex-end;
    text-align: right;
}

.att-working-stat {
    min-width: 7.5rem;
}

.att-working-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--color-muted, #6c757d);
    margin-bottom: 0.15rem;
}

.att-working-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-primary);
}

.att-panel {
    padding-bottom: 0.75rem;
}

.att-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem 0.85rem;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
    padding: 0.65rem 0.85rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-cream);
    border-radius: var(--radius);
    text-align: center;
}

.att-title-text {
    flex: 1 1 auto;
    min-width: 0;
}

.att-lock-btn {
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.att-lock-btn:active {
    transform: scale(0.97);
}

.att-lock-btn--unlock {
    background: #2e7d32;
}

.att-lock-btn--unlock:hover,
.att-lock-btn--unlock:focus {
    background: #1b5e20;
    color: #fff;
}

.att-lock-btn--lock {
    background: #b33a3a;
}

.att-lock-btn--lock:hover,
.att-lock-btn--lock:focus {
    background: #8b1e1e;
    color: #fff;
}

.att-panel--locked .att-day:not(.att-day--disabled) {
    cursor: default;
}

.att-panel--locked .att-day:not(.att-day--disabled):hover {
    outline: none;
}

.att-table--locked .att-day:not(.att-day--disabled) {
    opacity: 0.92;
}

.att-scroll {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-x pan-y;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    max-height: calc(100vh - 14rem);
    max-height: calc(100dvh - 14rem);
}

.att-table {
    width: max-content;
    min-width: 100%;
    margin-bottom: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
}

.att-table th,
.att-table td {
    white-space: nowrap;
    vertical-align: middle;
    border-top: 0 !important;
    border-left: 1px solid rgba(90, 55, 44, 0.22) !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(90, 55, 44, 0.28) !important;
}

.att-table th:last-child,
.att-table td:last-child {
    border-right: 1px solid rgba(90, 55, 44, 0.22) !important;
}

.att-table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: var(--color-primary);
    color: var(--color-cream);
    font-size: 0.72rem;
    font-weight: 650;
    text-align: center;
    border-bottom: 2px solid rgba(90, 55, 44, 0.45) !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.att-sticky {
    position: sticky;
    z-index: 3;
    background: #fff;
}

.att-table thead .att-sticky {
    z-index: 5;
    background: var(--color-primary);
}

.att-sticky--sr {
    left: 0;
    min-width: 3rem;
    max-width: 3rem;
    text-align: center;
}

.att-sticky--class {
    left: 3rem;
    min-width: 3.5rem;
    max-width: 4.5rem;
    text-align: center;
    font-weight: 650;
    color: var(--color-primary);
}

.att-table--all .att-sticky--name {
    left: 6.5rem;
}

.att-sticky--name {
    left: 3rem;
    min-width: 12rem;
    max-width: 16rem;
    text-align: left !important;
    box-shadow: 2px 0 4px rgba(90, 55, 44, 0.08);
}

.att-student-name {
    line-height: 1.25;
}

.att-student-adm {
    line-height: 1.2;
}

.att-day-head {
    min-width: 2.4rem;
    max-width: 2.6rem;
    height: 5.5rem;
    padding: 0.35rem 0.15rem !important;
    vertical-align: bottom !important;
}

.att-day-head span {
    display: inline-block;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.7rem;
    line-height: 1.1;
    white-space: nowrap;
}

.att-day-head--off,
.att-day-head--future {
    opacity: 0.55;
}

.att-day {
    min-width: 2.4rem;
    max-width: 2.6rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: default;
    user-select: none;
}

.att-day:not(.att-day--disabled) {
    cursor: pointer;
    touch-action: pan-x pan-y;
    -webkit-tap-highlight-color: rgba(184, 165, 106, 0.35);
}

.att-day:not(.att-day--disabled):hover,
.att-day:not(.att-day--disabled):focus {
    outline: 2px solid var(--color-gold);
    outline-offset: -2px;
}

.att-table td.att-day--empty {
    background: #fff !important;
    color: transparent !important;
}

.att-table td.att-day--p {
    background: rgba(46, 125, 50, 0.16) !important;
    color: #1b5e20 !important;
}

.att-table td.att-day--a {
    background: rgba(198, 40, 40, 0.14) !important;
    color: #b71c1c !important;
}

.att-table td.att-day--h {
    background: rgba(33, 150, 243, 0.14) !important;
    color: #1565c0 !important;
}

.att-table td.att-day--disabled {
    background: #f3efe8 !important;
    color: #b0a79c !important;
    cursor: not-allowed;
}

.att-day--today:not(.att-day--disabled) {
    outline: 2px solid var(--color-gold);
    outline-offset: -2px;
}

.att-day--saving {
    opacity: 0.55;
}

.att-sum {
    min-width: 5.5rem;
    background: var(--color-primary) !important;
}

.att-sum--p,
.att-sum-val--p,
.att-sum--tp,
.att-sum-val--tp {
    background: #2e7d32 !important;
    color: #fff !important;
}

.att-sum--a,
.att-sum-val--a,
.att-sum--ta,
.att-sum-val--ta {
    background: #b33a3a !important;
    color: #fff !important;
}

.att-sum-val {
    text-align: center;
    font-weight: 700;
    min-width: 5.5rem;
}

.att-table tbody tr:nth-child(even) .att-sum-val--p,
.att-table tbody tr:nth-child(even) .att-sum-val--tp {
    background: #276a2b !important;
}

.att-table tbody tr:nth-child(even) .att-sum-val--a,
.att-table tbody tr:nth-child(even) .att-sum-val--ta {
    background: #9a3030 !important;
}

.att-table tbody tr:hover .att-sum-val--p,
.att-table tbody tr:hover .att-sum-val--tp {
    background: #1b5e20 !important;
}

.att-table tbody tr:hover .att-sum-val--a,
.att-table tbody tr:hover .att-sum-val--ta {
    background: #8b1e1e !important;
}

.att-table tbody tr:nth-child(even) .att-sticky {
    background: #faf8f4;
}

.att-table tbody tr:hover .att-sticky {
    background: #f3ebe3;
}

@media (max-width: 767.98px) {
    .att-panel {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }

    .att-scroll {
        max-height: calc(100vh - 11rem);
        max-height: calc(100dvh - 11rem);
        border-radius: 0;
    }

    .att-table thead th {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
    }

    .att-sticky--sr {
        min-width: 2.25rem;
        max-width: 2.25rem;
        left: 0;
    }

    .att-sticky--class {
        left: 2.25rem;
        min-width: 2.75rem;
        max-width: 3.25rem;
    }

    .att-sticky--name {
        left: 2.25rem;
        min-width: 7.25rem;
        max-width: 8.5rem;
        white-space: normal !important;
        vertical-align: top !important;
        padding-top: 0.4rem !important;
        padding-bottom: 0.4rem !important;
        font-size: 0.8rem;
    }

    .att-table--all .att-sticky--name {
        left: 5rem;
    }

    .att-sticky--name .att-student-name {
        white-space: normal;
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        word-break: break-word;
        overflow-wrap: anywhere;
        max-height: 2.5em;
        font-size: 0.78rem;
        font-weight: 650;
    }

    .att-sticky--name .att-student-adm {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-top: 0.1rem;
        font-size: 0.68rem;
    }

    .att-day {
        min-width: 2.6rem;
        max-width: 2.75rem;
        min-height: 2.6rem;
        padding: 0.35rem 0.1rem !important;
        font-size: 0.9rem;
    }

    .att-day-head {
        min-width: 2.6rem;
        max-width: 2.75rem;
        height: 4.5rem;
    }

    .att-day-head span {
        font-size: 0.65rem;
    }
}

