:root {
    --brand: #232176;
    --brand-dark: #18165c;
    --brand-soft: #eef0fb;
    --accent: #ffcb0a;
    --text: #1e293b;
    --muted: #64748b;
    --line: #e8ecf3;
    --bg: #f3f5fb;
    --sidebar: 268px;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(35, 33, 118, 0.08);
}

* { box-sizing: border-box; }

body {
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar);
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.2rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-weight: 800;
}

.sidebar-brand small {
    display: block;
    color: rgba(255,255,255,0.65);
    font-size: 0.72rem;
}

.sidebar .nav-label {
    color: var(--accent);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 1rem 1.2rem 0.35rem;
}

.sidebar a.nav-link {
    color: rgba(255,255,255,0.78);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 1rem;
    margin: 0 0.7rem;
    border-radius: 10px;
}

.sidebar a.nav-link i {
    width: 18px;
    text-align: center;
}

.sidebar a.nav-link:hover,
.sidebar a.nav-link.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.app-main {
    min-width: 0;
    flex: 1;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem 1rem;
}

.topbar .quick-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: .35rem;
    flex: 1 1 240px;
    min-width: 0;
    overflow-x: auto;
    padding: .1rem 0;
    scrollbar-width: thin;
}
.topbar .quick-nav a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    white-space: nowrap;
    padding: .38rem .8rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    color: #232176;
    background: #f3f4fb;
    text-decoration: none;
    border: 1px solid #e4e6f4;
}
.topbar .quick-nav a i {
    font-size: .78rem;
}
.topbar .quick-nav a:hover,
.topbar .quick-nav a.active {
    background: #232176;
    border-color: #232176;
    color: #fff;
}
.topbar .quick-nav a.quick-nav-primary:not(.active) {
    background: #ffcb0a;
    border-color: #ffcb0a;
    color: #232176;
}
.topbar .quick-nav a.quick-nav-primary:not(.active):hover {
    background: #e6b609;
    border-color: #e6b609;
}
.portal-nav .quick-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    overflow: visible;
}
.portal-nav .quick-nav a i {
    font-size: .78rem;
}
.topbar-search {
    display: flex;
    align-items: center;
    gap: .45rem;
    background: #f3f4fb;
    border: 1px solid #e4e6f4;
    border-radius: 999px;
    padding: .28rem .7rem .28rem .8rem;
    min-width: 170px;
    max-width: 240px;
}
.topbar-search button {
    border: 0;
    background: transparent;
    color: #232176;
    padding: 0;
    line-height: 1;
    cursor: pointer;
}
.topbar-search i {
    color: #232176;
    font-size: .78rem;
}
.topbar-search input {
    border: 0;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: .82rem;
    color: var(--text);
}
.topbar-search input::placeholder {
    color: var(--muted);
}

.page-wrap {
    padding: 1.25rem;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.page-head h1 {
    font-size: 1.35rem;
    font-weight: 750;
    margin: 0;
}

.page-head p {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.btn-brand {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    padding: 0.5rem 1rem;
}

.btn-brand:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}

.card-soft {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card {
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
}

.table-modern {
    margin: 0;
}

.table-modern thead th {
    background: #f8f9fd;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.table-modern tbody td {
    vertical-align: middle;
    border-color: var(--line);
}

.table-modern tbody tr:hover {
    background: #fafbff;
}

.student-table tbody td {
    padding: 0.7rem 0.75rem;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
}

.student-row {
    cursor: default;
}

.student-photo-cell {
    display: none;
}

.student-name-block {
    min-width: 0;
}

.student-subname,
.cell-text {
    color: var(--muted);
    font-size: 0.86rem;
}

.student-actions {
    display: inline-flex;
    gap: 0.35rem;
    justify-content: flex-start;
}

.student-table .col-actions {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fff;
    min-width: 132px;
    box-shadow: 8px 0 10px -8px rgba(35, 33, 118, .12);
}

.student-table thead th.col-actions {
    background: #f8f9fd;
    z-index: 4;
}

.student-table tbody tr:hover td.col-actions {
    background: #fafbff;
}

.student-table tbody td[data-col="id"] {
    user-select: text;
}

.id-chip-copy {
    gap: 0.35rem;
    border: 0;
    cursor: pointer;
}

.id-chip-copy i {
    font-size: 0.7rem;
    color: #ffcb0a;
}

.id-chip-copy:hover,
.id-chip-copy.is-copied {
    background: #ffcb0a;
    color: #232176;
}

.id-chip-copy:hover i,
.id-chip-copy.is-copied i {
    color: #232176;
}

.btn-icon-edit {
    background: #fff7d6;
    color: #92400e;
}

.btn-icon-edit:hover {
    background: #f59e0b;
    color: #fff;
}

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.45);
}

.page-loader[hidden] {
    display: none;
}

.page-loader-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    text-align: center;
    box-shadow: var(--shadow);
    min-width: 220px;
}

.page-loader-spin {
    width: 42px;
    height: 42px;
    margin: 0 auto 0.85rem;
    border: 4px solid #e8ecf3;
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: page-spin 0.7s linear infinite;
}

@keyframes page-spin {
    to { transform: rotate(360deg); }
}

.list-toolbar,
.list-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1rem;
}

.list-pager {
    border-top: 1px solid var(--line);
}

.student-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 220px;
}

.student-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(160deg, var(--brand), #3b38a8);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.student-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
}

.student-portrait {
    width: 128px;
    height: 128px;
    border-radius: 16px;
    border: 4px solid #fff;
    box-shadow: 0 0 0 2px #232176, 0 8px 20px rgba(35, 33, 118, .12);
    background: #e8eaf6;
    font-size: 0;
    flex-shrink: 0;
}

.student-name {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.student-name:hover {
    color: var(--brand);
}

.id-chip,
.meta-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.12rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.id-chip {
    background: var(--brand);
    color: #fff;
}

.meta-chip {
    background: #f1f4fb;
    color: var(--muted);
}

.guardian-line strong {
    display: block;
    font-size: 0.9rem;
}

.guardian-phone {
    font-size: 0.8rem;
    color: var(--brand);
    text-decoration: none;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
    text-decoration: none;
    cursor: pointer;
}

.btn-icon:hover {
    background: var(--brand);
    color: #fff;
}

.btn-icon-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.btn-icon-danger:hover {
    background: #b91c1c;
    color: #fff;
}

.roll-input {
    width: 72px;
    text-align: center;
    padding: 0.35rem 0.4rem;
    user-select: text;
}

.roll-input.is-saved {
    border-color: #16a34a;
    box-shadow: 0 0 0 0.15rem rgba(22, 163, 74, 0.18);
}

.student-toast {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1080;
    background: #166534;
    color: #fff;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.student-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.student-toast.error {
    background: #991b1b;
}

.badge-male {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-female {
    background: #fce7f3;
    color: #be185d;
}

.badge-soft {
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 600;
}

.badge-ok {
    background: #dcfce7;
    color: #166534;
}

.badge-off {
    background: #fee2e2;
    color: #991b1b;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 650;
    color: #334155;
}

.form-control,
.form-select {
    border-radius: 10px;
    border-color: #d7dce7;
    padding: 0.6rem 0.8rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(35, 33, 118, 0.12);
}

.section-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--line);
}

.chart-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: 0;
    padding: 0.95rem 1rem;
    font-weight: 700;
    color: var(--text);
}

.chart-toggle-icon {
    color: var(--muted);
    transition: transform 0.2s ease;
}

.chart-toggle:not(.collapsed) .chart-toggle-icon {
    transform: rotate(180deg);
}

.chart-wrap {
    height: 280px;
    position: relative;
}

.chart-wrap-sm {
    height: 240px;
}

.page-item.active .page-link {
    background: var(--brand);
    border-color: var(--brand);
}

.page-link {
    color: var(--brand);
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--muted);
}
.card-soft .empty-state {
    min-height: 180px;
    display: grid;
    place-items: center;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: auto;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-weight: 700;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

.login-hero {
    background: linear-gradient(160deg, var(--brand) 0%, #3b38a8 70%, #1a185c 100%);
    color: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-form-wrap {
    display: grid;
    place-items: center;
    padding: 2rem 1.25rem;
    background: #fff;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.role-hint {
    background: #f8f9fd;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.crumb {
    color: var(--muted);
    font-size: 0.8rem;
}

@media (max-width: 991.98px) {
    .sidebar { display: none; }
    .login-page { grid-template-columns: 1fr; }
    .login-hero { display: none; }
    .page-head { flex-direction: column; }
    .page-wrap { padding: 1rem; }
}

@media (min-width: 992px) {
    .offcanvas-lg { position: static !important; visibility: visible !important; transform: none !important; }
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.student-table {
    min-width: 1480px;
}

.student-list-card {
    overflow: hidden;
}

.print-only {
    display: none;
}

.print-pad-header,
.print-pad-footer {
    display: none;
}

@media print {
    @page {
        size: landscape;
        margin: 32mm 10mm 22mm 10mm;
    }

    body {
        background: #fff;
        color: #111;
    }

    .no-print,
    .sidebar,
    .topbar,
    .offcanvas,
    .sf-toolbar,
    .sf-minitoolbar {
        display: none !important;
    }

    .print-only,
    .print-pad-header,
    .print-pad-footer {
        display: block !important;
    }

    .print-hide-col {
        display: none !important;
    }

    .print-pad-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding: 0 0 8px;
        border-bottom: 2px solid #232176;
        background: #fff;
    }

    .print-pad-brand {
        text-align: center;
    }

    .print-pad-logo {
        display: block;
        max-height: 58px;
        max-width: 520px;
        margin: 0 auto 4px;
        object-fit: contain;
    }

    .print-pad-name {
        font-size: 20px;
        font-weight: 800;
        color: #232176;
        line-height: 1.2;
    }

    .print-pad-name-bn {
        font-size: 13px;
        color: #334155;
    }

    .print-pad-campus {
        font-size: 12px;
        font-weight: 700;
        margin-top: 2px;
    }

    .print-pad-address {
        font-size: 11px;
        color: #475569;
    }

    .print-pad-meta {
        display: flex;
        justify-content: space-between;
        margin-top: 6px;
        font-size: 11px;
        color: #334155;
    }

    .print-pad-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding-top: 6px;
        border-top: 2px solid #232176;
        background: #fff;
        font-size: 10px;
        color: #334155;
    }

    .print-pad-contacts {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 14px;
        justify-content: center;
    }

    .print-pad-footnote {
        text-align: center;
        margin-top: 3px;
        color: #64748b;
    }

    .app-shell,
    .app-main,
    .page-wrap {
        display: block;
        padding: 0;
        margin: 0;
        background: #fff;
        min-height: 0;
    }

    .card-soft,
    .student-list-card {
        box-shadow: none;
        border: 0;
    }

    .table-scroll {
        overflow: visible;
    }

    .student-table {
        min-width: 0 !important;
        font-size: 11px;
    }

    .roll-input {
        border: 0;
        background: transparent;
        padding: 0;
        width: auto;
        box-shadow: none;
    }

    .student-table thead th {
        background: #eef0fb !important;
        color: #232176 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .student-row {
        cursor: default;
    }

    .student-photo-cell {
        display: table-cell !important;
    }

    .student-identity .student-avatar {
        display: none;
    }

    .id-chip {
        background: #eee;
        color: #111;
    }

    .id-chip-copy i {
        display: none !important;
    }

    a {
        color: inherit !important;
        text-decoration: none !important;
    }
}

.people-table {
    min-width: 980px;
}

.people-table tbody td {
    white-space: nowrap;
    vertical-align: middle;
}

.attendance-pills {
    display: inline-flex;
    gap: 0.3rem;
}

.attendance-pill {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.attendance-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.attendance-pill span {
    display: inline-block;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: #f1f4fb;
    color: #64748b;
}

.attendance-pill input:checked + span {
    color: #fff;
}

.attendance-present input:checked + span { background: #16a34a; }
.attendance-absent input:checked + span { background: #dc2626; }
.attendance-late input:checked + span { background: #d97706; }
.attendance-leave input:checked + span { background: #2563eb; }

.routine-grid th,
.routine-grid td {
    min-width: 130px;
    vertical-align: top;
}

.routine-slot {
    background: var(--brand-soft);
    border-radius: 10px;
    padding: 0.45rem 0.55rem;
}

.portal-topbar {
    background: #232176;
}
.portal-topbar .navbar-toggler {
    border-color: rgba(255,255,255,.45);
}
.portal-topbar .navbar-toggler-icon {
    filter: invert(1);
}
.portal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .5rem 0;
}
.portal-nav a {
    color: rgba(255,255,255,.82);
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    padding: .4rem .7rem;
    border-radius: 999px;
}
.portal-nav a:hover,
.portal-nav a.active {
    background: rgba(255,255,255,.14);
    color: #fff;
}

.dash-hero {
    background: linear-gradient(135deg, #232176 0%, #3a3894 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 1.35rem 1.5rem;
    box-shadow: var(--shadow);
}
.dash-hero h1 {
    font-size: 1.55rem;
    font-weight: 800;
    margin: 0.15rem 0 0.35rem;
}
.dash-hero p {
    margin: 0;
    color: rgba(255,255,255,.78);
}
.dash-hero-date {
    color: #ffcb0a;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.dash-hero .student-avatar {
    box-shadow: 0 0 0 3px rgba(255,255,255,.22);
}
.dash-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .9rem;
}
.dash-chip {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    padding: .35rem .7rem;
    font-size: .82rem;
}
.dash-panel-title {
    font-weight: 700;
    margin-bottom: .85rem;
}
.dash-quick {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}
@media (min-width: 768px) {
    .dash-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.dash-quick a {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .85rem .9rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}
.dash-quick a:hover {
    border-color: #cfd4f0;
    background: var(--brand-soft);
    color: var(--brand);
}
.dash-quick i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
}
.stat-card .stat-foot {
    font-size: .78rem;
    color: var(--muted);
}

.report-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.report-tabs a {
    border-radius: 999px;
    padding: .4rem .9rem;
    font-weight: 700;
    font-size: .86rem;
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    background: #fff;
}
.report-tabs a:hover {
    border-color: #cfd4f0;
    background: var(--brand-soft);
    color: var(--brand);
}
.report-tabs a.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.att-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem 1rem;
    font-size: .8rem;
    color: var(--muted);
    font-weight: 600;
}
.att-legend b {
    color: var(--brand);
    margin-right: .15rem;
}
.att-dot {
    display: inline-block;
    width: .65rem;
    height: .65rem;
    border-radius: 50%;
    margin-right: .3rem;
    vertical-align: .05rem;
}
.att-dot-present { background: #16a34a; }
.att-dot-absent { background: #dc2626; }
.att-dot-late { background: #d97706; }
.att-dot-leave { background: #2563eb; }

.att-status {
    display: inline-block;
    min-width: 5.2rem;
    text-align: center;
    border-radius: 999px;
    padding: .22rem .55rem;
    font-size: .75rem;
    font-weight: 700;
}
.att-status-present { background: #e8f8ee; color: #15803d; }
.att-status-absent { background: #fdecec; color: #b91c1c; }
.att-status-late { background: #fff4e5; color: #b45309; }
.att-status-leave { background: #e8eefc; color: #1d4ed8; }
.att-status-open { background: #f1f4fb; color: #64748b; }

.att-bar {
    display: flex;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #eef0f6;
}
.att-bar span { display: block; height: 100%; }
.att-bar-present { background: #16a34a; }
.att-bar-absent { background: #dc2626; }
.att-bar-late { background: #d97706; }
.att-bar-leave { background: #2563eb; }

.att-register-wrap {
    overflow-x: auto;
}
.att-register {
    font-size: .78rem;
    min-width: 1080px;
}
.att-register th.day,
.att-register td.day {
    width: 26px;
    min-width: 26px;
    padding: .22rem 0;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.att-register th.weekend,
.att-register td.weekend {
    background: #f6f7fb;
}
.att-cell-P { color: #15803d; font-weight: 800; }
.att-cell-A { color: #b91c1c; font-weight: 800; }
.att-cell-L { color: #b45309; font-weight: 800; }
.att-cell-V { color: #1d4ed8; font-weight: 800; }
.att-register .att-sticky {
    position: sticky;
    background: #fff;
    z-index: 1;
}
.att-register thead .att-sticky {
    z-index: 2;
    background: #f8f9fd;
}
.att-sticky-id { left: 0; min-width: 92px; }
.att-sticky-name { left: 92px; min-width: 140px; box-shadow: 8px 0 10px -8px rgba(35, 33, 118, .12); }

@media print {
    .att-register {
        min-width: 0;
        font-size: 9px;
    }
    .att-register .att-sticky {
        position: static;
        box-shadow: none;
    }
    .att-status {
        min-width: 0;
        background: none !important;
        padding: 0;
    }
}

.insight-list {
    display: grid;
    gap: .75rem;
}
.insight-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: .85rem 1rem;
    background: #fff;
}
.insight-high {
    border-color: #f1c4c4;
    background: #fff8f8;
}
.insight-medium {
    border-color: #f1e2c4;
    background: #fffdf6;
}
.insight-item-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .35rem;
}
.insight-flag {
    display: inline-block;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 999px;
    padding: .15rem .55rem;
}
.insight-high .insight-flag {
    background: #fdecec;
    color: #b91c1c;
}
.insight-advice {
    margin: 0;
    font-size: .92rem;
    line-height: 1.45;
}
.insight-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    font-size: .82rem;
    font-weight: 700;
}
.insight-actions a {
    color: var(--brand);
    text-decoration: none;
}
.insight-actions a:hover {
    color: var(--brand-dark);
}

.btn-accent {
    background: var(--accent);
    color: var(--brand);
    border: 0;
    font-weight: 800;
    border-radius: 999px;
    padding: .55rem 1.15rem;
}
.btn-accent:hover {
    background: #ffd84a;
    color: var(--brand);
}
.site-body .btn-brand {
    border-radius: 999px;
    padding: .55rem 1.15rem;
    font-weight: 700;
}
.site-body .btn-outline-light {
    border-radius: 999px;
    padding: .55rem 1.15rem;
    font-weight: 700;
}

.site-body {
    background: #fff;
}
.site-body .container {
    max-width: 1140px;
}

.site-topbar {
    background: var(--brand);
    color: rgba(255,255,255,.86);
    font-size: .8rem;
    font-weight: 600;
}
.site-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 36px;
}
.site-topbar a {
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}
.site-topbar a:hover {
    color: #fff;
}
.site-topbar-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem 1.1rem;
    min-width: 0;
}
.site-topbar-meta a,
.site-topbar-meta span {
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.site-topbar-meta i {
    color: var(--accent);
    margin-right: .35rem;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #fff;
    box-shadow: 0 8px 24px rgba(35, 33, 118, .06);
    border-bottom: 3px solid var(--accent);
}
.site-nav.navbar {
    padding: 0;
}
.site-nav-inner {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 78px;
}
.site-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.site-brand img {
    height: 52px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}
.site-nav-toggle {
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .45rem .6rem;
}
.site-nav-toggle:focus {
    box-shadow: 0 0 0 3px rgba(35, 33, 118, .12);
}
.site-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .1rem;
    margin-left: auto;
}
.site-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: .86rem;
    padding: .42rem .72rem;
    border-radius: 999px;
}
.site-links a:hover,
.site-links a.active {
    background: var(--brand-soft);
    color: var(--brand);
}
.site-links a.site-login {
    background: var(--brand);
    color: #fff;
    margin-left: .45rem;
}
.site-links a.site-login:hover,
.site-links a.site-login.active {
    background: var(--brand-dark);
    color: #fff;
}

.site-hero,
.site-hero-plain {
    position: relative;
    background: var(--brand);
    color: #fff;
}
.site-hero .carousel-item {
    position: relative;
    height: min(70vh, 540px);
    overflow: hidden;
}
.site-hero img,
.site-hero-fallback {
    width: 100%;
    height: min(70vh, 540px);
    object-fit: cover;
    object-position: center;
}
.site-hero-fallback {
    background: linear-gradient(135deg, var(--brand) 0%, #3b38a8 100%);
}
.site-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(90deg, rgba(35, 33, 118, .88) 0%, rgba(35, 33, 118, .45) 55%, rgba(35, 33, 118, .12) 100%);
    padding: 3.2rem 0 3.6rem;
}
.site-hero-copy {
    max-width: 620px;
}
.site-hero h1,
.site-hero-plain h1 {
    font-weight: 800;
    letter-spacing: -.02em;
    font-size: clamp(1.85rem, 4vw, 3.1rem);
    line-height: 1.15;
    margin: .15rem 0 .55rem;
}
.site-hero-copy p,
.site-hero-plain p {
    font-size: 1.05rem;
    color: rgba(255,255,255,.88);
    margin-bottom: 1.1rem;
}
.site-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}
.site-hero .carousel-indicators {
    margin-bottom: 1rem;
}
.site-hero .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
}
.site-hero .carousel-indicators .active {
    background: var(--accent);
}
.site-hero-plain {
    padding: 5.2rem 0 4.2rem;
}

.site-kicker {
    display: inline-block;
    color: var(--accent);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: .4rem;
}
.site-section .site-kicker,
.site-section-soft .site-kicker {
    color: var(--brand);
}

.site-ticker {
    background: var(--brand);
    color: #fff;
    border-top: 1px solid rgba(255,255,255,.08);
}
.site-ticker-inner {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-height: 48px;
}
.site-ticker-label {
    background: var(--accent);
    color: var(--brand);
    font-size: .72rem;
    font-weight: 800;
    padding: .22rem .6rem;
    border-radius: 999px;
    flex-shrink: 0;
}
.site-ticker-track {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}
.site-ticker-move {
    display: flex;
    gap: 2.2rem;
    width: max-content;
    white-space: nowrap;
    animation: siteTicker 32s linear infinite;
}
.site-ticker-move a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}
.site-ticker-move a:hover {
    color: var(--accent);
}
.site-ticker-all {
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
    flex-shrink: 0;
    font-size: .84rem;
}
@keyframes siteTicker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .site-ticker-move {
        animation: none;
    }
}

.site-section {
    padding: 4.2rem 0;
}
.site-section-soft {
    background: #f5f6fc;
}
.site-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.6rem;
}
.site-section-head h2,
.site-section h2,
.site-page-hero h1 {
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--brand);
    margin: 0;
}
.site-page-hero h1 {
    color: #fff;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
}
.site-section-head a {
    font-weight: 700;
    color: var(--brand);
    text-decoration: none;
    white-space: nowrap;
}
.site-section-head a:hover {
    color: var(--brand-dark);
}
.site-lead {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #475569;
    max-width: 42rem;
}

.site-emblem {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: start;
    overflow: hidden;
}
.site-emblem img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
    margin: 0 auto;
}
.site-emblem-empty {
    background: var(--brand);
    color: var(--accent);
    font-size: 4rem;
    font-weight: 800;
}

.site-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2.4rem;
}
.site-stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: .95rem 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .85rem;
}
.site-stat i {
    color: var(--brand);
    background: var(--brand-soft);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin: 0;
    flex-shrink: 0;
}
.site-stat b {
    display: block;
    font-size: 1.45rem;
    color: var(--brand);
    line-height: 1.1;
    text-align: left;
}
.site-stat span {
    display: block;
    color: var(--muted);
    font-weight: 600;
    font-size: .82rem;
    text-align: left;
}

.site-person {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    height: 100%;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}
.site-person:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(35, 33, 118, .12);
}
.site-person-photo {
    background: var(--brand-soft);
    aspect-ratio: 4 / 5;
    overflow: hidden;
}
.site-person-photo img,
.site-person-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}
.site-person-fallback {
    display: grid;
    place-items: center;
    color: var(--brand);
    font-size: 2.4rem;
    font-weight: 800;
}
.site-person-body {
    padding: .9rem .85rem 1.05rem;
    text-align: center;
}
.site-person h3 {
    font-size: .98rem;
    font-weight: 800;
    margin: 0 0 .2rem;
    color: var(--brand);
}
.site-person p {
    margin: 0;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 600;
}

.site-campus-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.3rem 1.25rem 1.2rem;
    height: 100%;
    box-shadow: var(--shadow);
    transition: transform .18s ease;
}
.site-campus-card:hover {
    transform: translateY(-3px);
}
.site-campus-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--accent);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-weight: 800;
    margin-bottom: .85rem;
}
.site-campus-card h3 {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--brand);
    margin-bottom: .35rem;
}
.site-campus-card p {
    margin: 0;
    color: var(--muted);
}

.site-list-row {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: .95rem 1.05rem;
    margin-bottom: .7rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 16px rgba(35, 33, 118, .04);
}
a.site-list-row:hover {
    border-color: #cfd4f0;
    color: inherit;
}
.site-list-row span {
    display: block;
    font-size: .72rem;
    font-weight: 800;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.site-list-row strong {
    display: block;
    margin-top: .15rem;
}
.site-list-row p {
    color: var(--muted);
    margin-top: .2rem;
}

.site-gallery-mini,
.site-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .7rem;
}
.site-gallery {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.site-gallery-mini img,
.site-gallery img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 14px;
}
.site-gallery img {
    height: 190px;
}
.site-gallery figure {
    margin: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.site-gallery figure img {
    border-radius: 0;
}
.site-gallery figcaption {
    font-size: .84rem;
    font-weight: 700;
    padding: .65rem .8rem .8rem;
    color: var(--brand);
}

.site-id-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.4rem 1.4rem 1.3rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.4rem;
}
.site-id-form {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.2rem;
}
.site-id-copy h2 {
    margin: 0 0 .25rem;
    color: var(--brand);
}
.site-id-copy p {
    margin: 0;
    color: var(--muted);
}
.site-id-fields {
    display: flex;
    gap: .55rem;
    min-width: min(100%, 420px);
    flex: 1;
    max-width: 480px;
}
.site-id-fields .form-control {
    border-radius: 999px;
    padding: .65rem 1rem;
    border-color: #d5d9ee;
}
.site-id-fields .form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(35, 33, 118, .12);
}
.site-id-fields .btn {
    flex-shrink: 0;
}
.site-id-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.4rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.3rem;
    box-shadow: var(--shadow);
}
.site-id-photo {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 16px;
    overflow: hidden;
    background: var(--brand-soft);
}
.site-id-photo img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}
.site-id-photo span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--brand);
    font-size: 2.6rem;
    font-weight: 800;
}
.site-id-body h2 {
    margin: .45rem 0 .35rem;
    color: var(--brand);
}
.site-id-status {
    margin-bottom: .9rem;
}
.site-id-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem 1rem;
    margin: 0 0 1.1rem;
}
.site-id-facts div {
    background: #f7f8fd;
    border-radius: 12px;
    padding: .65rem .75rem;
}
.site-id-facts dt {
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0;
}
.site-id-facts dd {
    margin: .1rem 0 0;
    font-weight: 700;
    color: var(--brand);
}

@media (max-width: 991.98px) {
    .site-id-form {
        flex-direction: column;
        align-items: stretch;
    }
    .site-id-fields {
        max-width: none;
        min-width: 0;
    }
}

@media (max-width: 575.98px) {
    .site-id-card {
        grid-template-columns: 1fr;
    }
    .site-id-photo {
        max-width: 220px;
        margin: 0 auto;
    }
    .site-id-facts {
        grid-template-columns: 1fr;
    }
}

.site-cta {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    padding: 3.4rem 0;
}
.site-cta-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}
.site-cta h2 {
    font-weight: 800;
    margin-bottom: .35rem;
    color: #fff;
}
.site-cta p {
    margin: 0;
    color: rgba(255,255,255,.8);
}

.site-page-hero {
    background: linear-gradient(135deg, var(--brand) 0%, #34329a 100%);
    color: #fff;
    padding: 2.4rem 0 2rem;
    border-bottom: 3px solid var(--accent);
}
.site-page-hero p {
    margin: .45rem 0 0;
    color: rgba(255,255,255,.8);
    max-width: 38rem;
}
.site-back {
    display: inline-flex;
    align-items: center;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    margin-bottom: .55rem;
    font-size: .9rem;
}
.site-back:hover {
    color: #fff;
}

.site-article-list,
.site-article {
    max-width: 760px;
    margin: 0 auto;
}
.site-article-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.2rem;
    margin-bottom: .75rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
}
.site-article-card:hover {
    border-color: #cfd4f0;
    color: inherit;
}
.site-article-card h2 {
    font-size: 1.12rem;
    font-weight: 800;
    margin: .15rem 0 .25rem;
    color: var(--brand);
}
.site-article-card span {
    color: var(--brand);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.site-article-card p {
    margin: 0;
    color: var(--muted);
}
.site-article-card i {
    color: var(--brand);
    flex-shrink: 0;
}
.site-article-photo {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 1.3rem;
}
.site-prose {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #334155;
    max-width: 44rem;
}

.site-side-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.4rem 1.35rem;
    box-shadow: var(--shadow);
}
.site-side-card h3 {
    color: var(--brand);
    font-weight: 800;
    margin-bottom: .7rem;
}
.site-contact-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.1rem;
}
.site-contact-list li {
    display: flex;
    gap: .8rem;
    align-items: flex-start;
    padding: .7rem 0;
    border-bottom: 1px solid var(--line);
}
.site-contact-list li:last-child {
    border-bottom: 0;
}
.site-contact-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--brand);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.site-contact-list strong {
    display: block;
    font-size: .78rem;
    color: var(--muted);
    font-weight: 700;
}
.site-contact-list a,
.site-contact-list span {
    color: var(--text);
    text-decoration: none;
}

.site-empty {
    background: #f8f9fd;
    border: 1px dashed #d5d9ee;
    border-radius: 16px;
    padding: 2.4rem 1.2rem;
    text-align: center;
    color: var(--muted);
    font-weight: 600;
}

.site-footer {
    background: var(--brand-dark);
    color: rgba(255,255,255,.78);
    padding: 3.2rem 0 1.3rem;
}
.site-brand-footer img {
    height: 48px;
    background: #fff;
    border-radius: 10px;
    padding: .25rem .4rem;
}
.site-footer-lead {
    color: rgba(255,255,255,.72);
    font-size: .92rem;
    line-height: 1.55;
}
.site-footer h6 {
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-size: .75rem;
    margin-bottom: .85rem;
}
.site-footer a {
    display: block;
    color: rgba(255,255,255,.86);
    text-decoration: none;
    margin-bottom: .4rem;
}
.site-footer p a {
    display: inline;
}
.site-footer a:hover {
    color: var(--accent);
}
.site-footer .btn-accent {
    display: inline-block;
    margin-top: .2rem;
}
.site-copy {
    margin-top: 2.2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.12);
    font-size: .82rem;
}

.site-admin-thumb,
.site-admin-preview {
    width: 52px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
}
.site-admin-thumb-empty {
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 800;
}
.site-admin-preview {
    width: 88px;
    height: 64px;
}

@media (max-width: 991.98px) {
    .site-links {
        padding: .35rem 0 1rem;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }
    .site-links a {
        border-radius: 10px;
        padding: .7rem .85rem;
    }
    .site-links a.site-login {
        margin-left: 0;
        text-align: center;
        margin-top: .35rem;
    }
    .site-cta-inner,
    .site-section-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .site-stats {
        grid-template-columns: 1fr;
    }
    .site-hero .carousel-item,
    .site-hero img,
    .site-hero-fallback {
        height: min(62vh, 460px);
    }
    .site-hero-overlay {
        background: linear-gradient(180deg, rgba(35, 33, 118, .18) 0%, rgba(35, 33, 118, .88) 100%);
        padding: 1.4rem 0 2.4rem;
        align-items: flex-end;
    }
    .site-brand img {
        height: 44px;
        max-width: 170px;
    }
    .site-person h3 {
        font-size: .9rem;
    }
}

@media (max-width: 575.98px) {
    .site-section {
        padding: 3rem 0;
    }
    .site-gallery-mini {
        grid-template-columns: repeat(2, 1fr);
    }
    .site-topbar-inner {
        min-height: 34px;
    }
}

.nav-badge {
    display: inline-grid;
    place-items: center;
    min-width: 1.15rem;
    height: 1.15rem;
    margin-left: .35rem;
    padding: 0 .28rem;
    border-radius: 999px;
    background: #ffcb0a;
    color: #232176;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
    vertical-align: middle;
}
.inbox-list { display: grid; }
.inbox-row {
    display: block;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
}
.inbox-row:last-child { border-bottom: 0; }
.inbox-row:hover { background: var(--brand-soft); }
.inbox-row.is-unread { background: #fffbe8; }
.inbox-meta, .inbox-subject {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    align-items: baseline;
}
.inbox-who { font-weight: 700; color: #232176; }
.inbox-time, .inbox-preview { color: var(--muted); font-size: .86rem; }
.inbox-subject { font-weight: 600; margin: .2rem 0 .15rem; }
.inbox-channel {
    font-size: .72rem;
    font-weight: 700;
    color: #232176;
    background: var(--brand-soft);
    border-radius: 999px;
    padding: .15rem .55rem;
    white-space: nowrap;
}
.msg-thread {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    max-height: min(62vh, 560px);
    overflow: auto;
    padding-right: .25rem;
}
.msg-bubble {
    max-width: min(720px, 92%);
    padding: .8rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
}
.msg-bubble.is-mine {
    margin-left: auto;
    background: #232176;
    color: #fff;
    border-color: #232176;
}
.msg-bubble.is-theirs {
    background: #fff;
}
.msg-who {
    font-size: .75rem;
    font-weight: 700;
    margin-bottom: .25rem;
    opacity: .8;
}
.msg-body { white-space: pre-wrap; }

.family-panel {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1rem 1.1rem 1.2rem;
    background: #fff;
}
.family-panel-title {
    font-weight: 700;
    color: #232176;
    margin-bottom: .75rem;
}
.family-photo {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #f4f5fb;
}
.sibling-row + .sibling-row {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.profile-jump {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin: 0 0 1rem;
}
.profile-jump a {
    display: inline-flex;
    align-items: center;
    padding: .35rem .75rem;
    border-radius: 999px;
    background: #f4f3fb;
    color: #232176;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 600;
    border: 1px solid #d7d5f0;
}
.profile-jump a:hover {
    background: #232176;
    color: #fff;
    border-color: #232176;
}
.profile-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 1rem;
}
.profile-gallery-item {
    text-align: center;
}
.profile-gallery-frame {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #232176, #3a3894);
    color: #ffcb0a;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    font-weight: 800;
}
.profile-gallery-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.teacher-assign {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.teacher-assign-card {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8f9fd;
    color: inherit;
    text-decoration: none;
}
.teacher-assign-card:hover {
    border-color: #d7d5f0;
    background: #fff;
}
.pay-profile {
    display: flex;
    gap: 1.15rem;
    align-items: flex-start;
}
.pay-confirm-hero {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8f9fd;
    margin-bottom: 1rem;
}
.pay-confirm-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem 1rem;
}
.pay-confirm-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: .75rem;
    margin-top: 1rem;
    margin-bottom: .25rem;
}
.pay-confirm-stat {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: .75rem .85rem;
    background: #fff;
}
.pay-confirm-collect {
    background: #f4f3fb;
    border-color: #d7d5f0;
}
.pay-confirm-collect .fs-5 {
    color: #232176;
}
.pay-confirm-due {
    background: #fff6f6;
    border-color: #f1c4c4;
}
.pay-collect-results {
    position: relative;
    min-height: 72px;
    transition: opacity .15s ease;
}
.pay-collect-results.is-loading {
    opacity: .55;
    pointer-events: none;
}
.pay-collect-results.is-loading::after {
    content: '';
    position: absolute;
    top: 1.25rem;
    left: 50%;
    width: 28px;
    height: 28px;
    margin-left: -14px;
    border: 3px solid #e8ecf3;
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: page-spin 0.7s linear infinite;
    z-index: 2;
}
.pay-discount-row th,
.pay-discount-row td,
.pay-row-discount th,
.pay-row-discount td {
    background: #fff8db;
}
.pay-row-payable th,
.pay-row-payable td {
    background: #eef0fb;
}
.pay-row-paid th,
.pay-row-paid td {
    background: #e8f7ee;
}
.pay-row-due th,
.pay-row-due td {
    background: #fdecec;
}
.pay-row-payable input,
.pay-row-paid input,
.pay-row-due input,
.pay-row-discount input {
    font-weight: 700;
}
.btn-pay-load {
    background: #1f8a4c;
    color: #fff;
    border: 0;
    font-weight: 700;
}
.btn-pay-load:hover,
.btn-pay-load:focus {
    background: #176c3b;
    color: #fff;
}
#collectForm tr.is-skipped td {
    opacity: 0.45;
}
#collectForm tr.is-skipped td:not(:first-child) {
    text-decoration: line-through;
}
#collectForm tr.is-skipped .js-paid {
    text-decoration: none;
}

.money-receipt {
    display: flex;
    gap: 2%;
    align-items: stretch;
}

.money-receipt-copy {
    width: 49%;
    border: 1px solid #111;
    padding: 10px 12px 16px;
    background: #fff;
    color: #111;
    box-sizing: border-box;
}

.money-receipt-copy + .money-receipt-copy {
    position: relative;
}

.money-receipt-copy + .money-receipt-copy::before {
    content: '';
    position: absolute;
    left: -2%;
    top: 8px;
    bottom: 8px;
    border-left: 1px dashed #111;
}

.money-receipt-brand {
    text-align: center;
    margin-bottom: 6px;
}

.money-receipt-logo {
    display: block;
    max-height: 56px;
    max-width: 220px;
    margin: 0 auto 4px;
    object-fit: contain;
}

.money-receipt-name {
    font-size: 16px;
    font-weight: 800;
    color: #232176;
    line-height: 1.2;
}

.money-receipt-address {
    font-size: 11px;
    color: #334155;
}

.money-receipt-title {
    text-align: center;
    margin: 6px 0 8px;
}

.money-receipt-title strong {
    display: block;
    font-size: 15px;
}

.money-receipt-title small {
    font-size: 11px;
}

.money-receipt-meta,
.money-receipt-lines {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
    font-size: 11px;
}

.money-receipt-meta td,
.money-receipt-lines th,
.money-receipt-lines td {
    border: 1px solid #111;
    padding: 3px 5px;
    vertical-align: top;
}

.money-receipt-lines th {
    background: #f4f5fb;
}

.money-receipt-remarks {
    font-size: 11px;
    margin: 6px 0;
}

.money-receipt-sign {
    text-align: center;
    margin-top: 36px;
    font-size: 12px;
}

.money-receipt-sign span {
    border-top: 1px solid #111;
    padding-top: 4px;
    display: inline-block;
    min-width: 140px;
}
@media (max-width: 991.98px) {
    .money-receipt {
        flex-direction: column;
        gap: 1rem;
    }
    .money-receipt-copy {
        width: 100%;
    }
    .money-receipt-copy + .money-receipt-copy::before {
        display: none;
    }
}
@media (max-width: 767.98px) {
    .pay-confirm-meta,
    .pay-confirm-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.pay-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem 1rem;
}
.pay-stat-due .fs-4 {
    color: #c45c5c;
}
.pay-stat-due .stat-icon {
    background: #fdecec;
    color: #c45c5c;
}
.amount-due {
    color: #c45c5c;
    font-weight: 700;
}
.amount-paid {
    color: #1f8a4c;
    font-weight: 700;
}
@media (max-width: 991.98px) {
    .pay-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media print {
    .pay-collapse .collapse {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
        visibility: visible !important;
    }
    .pay-collapse .chart-toggle {
        display: none !important;
    }
    body.printing-receipt .print-pad-header,
    body.printing-receipt .print-pad-footer,
    body.printing-receipt .print-only {
        display: none !important;
    }
    body.printing-receipt .page-wrap > *:not(#receiptModal):not(#receiptPrint) {
        display: none !important;
    }
    body.printing-receipt #receiptModal,
    body.printing-receipt #receiptModal .modal-dialog,
    body.printing-receipt #receiptModal .modal-content,
    body.printing-receipt #receiptModal .modal-body,
    body.printing-receipt #receiptPrint {
        position: static !important;
        transform: none !important;
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
        background: #fff !important;
    }
    body.printing-receipt .modal-backdrop {
        display: none !important;
    }
    body.printing-receipt .money-receipt {
        display: flex !important;
        flex-direction: row !important;
        gap: 2%;
        page-break-inside: avoid;
    }
    body.printing-receipt .money-receipt-copy {
        width: 49% !important;
        page-break-inside: avoid;
    }
    body.printing-receipt .money-receipt-copy + .money-receipt-copy::before {
        display: block;
    }
}
