@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
    --student-bg: #f3f6fb;
    --student-surface: #ffffff;
    --student-ink: #071d3c;
    --student-muted: #5e6b80;
    --student-line: #d8e0ed;
    --student-blue: #073f82;
    --student-blue-2: #1269d3;
    --student-purple: #65319a;
    --student-amber: #ffb51d;
    --student-orange: #ff8f1f;
    --student-green: #0fbf13;
    --student-red: #cc2d2d;
    --student-soft: #e8edf5;
    --student-shadow: 0 18px 46px rgba(7, 29, 60, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--student-bg);
    color: var(--student-ink);
    font-family: 'DM Sans', Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

a {
    color: inherit;
}

.student-login-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 28px 14px 62px;
    background:
        linear-gradient(135deg, rgba(7, 63, 130, 0.08), rgba(255, 181, 29, 0.1)),
        var(--student-bg);
}

.student-login-wrap {
    width: min(460px, 100%);
}

.student-login-card,
.student-panel,
.student-profile-card,
.student-side-card,
.download-tile,
.student-stat-card,
.note-card,
.fee-slip {
    border: 1px solid var(--student-line);
    border-radius: 8px;
    background: var(--student-surface);
    box-shadow: var(--student-shadow);
}

.student-login-card {
    padding: 28px;
}

.student-login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.student-login-logo img {
    width: min(270px, 80%);
    height: auto;
}

.login-kicker,
.student-page-head span,
.hero-panel span,
.student-stat-card span,
.course-block span,
.fees-snapshot span,
.fee-slip-header span,
.slip-meta-grid span,
.slip-summary span,
.payment-confirm-card span,
.gateway-checklist span {
    color: var(--student-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.student-login-card h1 {
    margin: 0 0 8px;
    font-size: 34px;
    line-height: 1.08;
}

.student-login-card p {
    margin: 0 0 20px;
    color: var(--student-muted);
    font-weight: 600;
}

.field {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
}

.field label {
    font-size: 13px;
    font-weight: 900;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #b9c7dc;
    border-radius: 8px;
    background: #ffffff;
    color: var(--student-ink);
    font: inherit;
    font-weight: 700;
    padding: 0 12px;
    outline: none;
}

textarea {
    min-height: 96px;
    padding: 10px 12px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--student-orange);
    box-shadow: 0 0 0 4px rgba(255, 143, 31, 0.16);
}

.student-captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.student-captcha-row img {
    width: 180px;
    height: 58px;
    flex: 0 0 auto;
    border: 1px solid var(--student-line);
    border-radius: 8px;
    background: #f8fbff;
}

.student-captcha-row .student-secondary-button {
    flex: 1 1 auto;
}

.student-primary-button,
.student-secondary-button,
.logout-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0 16px;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.student-primary-button {
    background: var(--student-orange);
    color: #ffffff;
}

.student-primary-button:hover,
.student-primary-button:focus {
    background: #e77908;
}

.student-primary-button:disabled {
    background: #c8ced8;
    color: #6a7280;
    cursor: not-allowed;
}

.student-secondary-button {
    border-color: #c7d2e5;
    background: #f5f8fc;
    color: var(--student-blue);
}

.student-primary-button.compact,
.student-secondary-button.compact {
    min-height: 34px;
    padding: 0 12px;
}

.student-login-help {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    color: var(--student-muted);
    font-size: 12px;
    font-weight: 700;
}

.student-login-help a {
    color: var(--student-blue);
    font-weight: 900;
    text-decoration: none;
}

.student-reset-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}

.student-auth-footer,
.student-footer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    overflow: hidden;
    background: var(--student-orange);
    color: #ffffff;
    white-space: nowrap;
}

.student-auth-footer span,
.student-footer span {
    display: inline-block;
    min-width: 100%;
    padding: 8px 0;
    font-size: 12px;
    font-weight: 900;
    animation: student-marquee 18s linear infinite;
}

@keyframes student-marquee {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(-100%);
    }
}

.student-notice {
    margin: 0 0 16px;
    border: 1px solid #c9d7ea;
    border-radius: 8px;
    background: #eef5ff;
    color: var(--student-blue);
    padding: 13px 14px;
    font-weight: 800;
}

.student-notice.success {
    border-color: rgba(15, 150, 92, 0.3);
    background: #edfbf3;
    color: #0c7650;
}

.student-notice.error {
    border-color: rgba(204, 45, 45, 0.3);
    background: #fff0ef;
    color: var(--student-red);
}

.student-notice.warning {
    border-color: rgba(255, 143, 31, 0.4);
    background: #fff7eb;
    color: #995500;
}

.student-local-otp {
    display: grid;
    gap: 8px;
}

.local-otp-code {
    display: inline-grid;
    width: fit-content;
    min-height: 34px;
    align-items: center;
    border-radius: 8px;
    background: #ffffff;
    color: var(--student-blue);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 6px;
    padding: 4px 12px;
}

.otp-boxes {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.otp-boxes input {
    width: 100%;
    min-width: 0;
    height: 58px;
    min-height: 58px;
    padding: 0;
    border: 1px solid #b9c7dc;
    border-radius: 8px;
    background: #ffffff;
    color: var(--student-blue);
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.otp-boxes input:focus {
    border-color: var(--student-orange);
    box-shadow: 0 0 0 4px rgba(255, 143, 31, 0.16);
}

.field-note {
    display: block;
    margin-top: 8px;
    color: var(--student-muted);
    font-size: 13px;
    font-weight: 700;
}

.student-otp-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.student-resend-form {
    margin-top: 16px;
    text-align: center;
}

.student-link-button {
    border: 0;
    background: transparent;
    color: var(--student-blue);
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.student-link-button:disabled {
    color: var(--student-muted);
    cursor: not-allowed;
}

.student-shell {
    min-height: 100vh;
    padding-left: 58px;
}

.student-rail {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    display: grid;
    width: 58px;
    align-content: start;
    background: linear-gradient(180deg, #6965cf, #756ed4);
    color: #ffffff;
    box-shadow: 8px 0 24px rgba(7, 29, 60, 0.16);
}

.student-rail a {
    display: grid;
    height: 53px;
    place-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    text-decoration: none;
}

.student-rail a span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
}

.student-rail a.active,
.student-rail a:hover,
.student-rail a:focus {
    background: rgba(255, 255, 255, 0.16);
}

.rail-logo {
    height: 58px;
    background: #ffffff;
}

.rail-logo img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.student-main {
    min-height: 100vh;
    padding-bottom: 62px;
}

.student-topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: minmax(240px, auto) 1fr auto;
    align-items: center;
    gap: 18px;
    min-height: 52px;
    background: var(--student-blue);
    color: #ffffff;
    padding: 0 18px;
    box-shadow: 0 10px 30px rgba(7, 29, 60, 0.16);
}

.student-brand,
.student-actions,
.student-nav,
.student-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.student-brand img {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #ffffff;
    object-fit: contain;
}

.student-brand strong {
    font-size: 16px;
}

.portal-notifications {
    position: relative;
    z-index: 140;
}

.portal-notification-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 0 8px;
    list-style: none;
    cursor: pointer;
}

.portal-notification-trigger::-webkit-details-marker {
    display: none;
}

.portal-notification-label {
    display: none;
}

.portal-notification-icon {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 9px 9px 6px 6px;
}

.portal-notification-icon::before,
.portal-notification-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: currentColor;
}

.portal-notification-icon::before {
    top: -5px;
    width: 7px;
    height: 4px;
    border-radius: 8px 8px 0 0;
}

.portal-notification-icon::after {
    bottom: -6px;
    width: 7px;
    height: 3px;
    border-radius: 999px;
}

.portal-notification-badge {
    display: inline-grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.portal-notification-badge.has-count {
    background: var(--student-amber);
    color: #1a2440;
}

.portal-notification-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: min(370px, calc(100vw - 24px));
    overflow: hidden;
    border: 1px solid #ccd9ea;
    border-radius: 8px;
    background: #ffffff;
    color: var(--student-ink);
    box-shadow: 0 24px 54px rgba(7, 29, 60, 0.26);
}

.student-actions .portal-notification-menu {
    right: 0;
    left: auto;
}

.portal-notification-menu-head,
.portal-notification-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--student-line);
    padding: 12px 14px;
}

.portal-notification-menu-head strong,
.portal-notification-panel-head h2 {
    margin: 0;
    color: var(--student-ink);
    font-size: 16px;
}

.portal-notification-panel-head p {
    margin: 4px 0 0;
    color: var(--student-muted);
    font-size: 13px;
    font-weight: 700;
}

.portal-notification-menu-head button {
    border: 0;
    background: transparent;
    color: var(--student-orange);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.portal-notification-menu-list {
    display: grid;
    max-height: 330px;
    overflow: auto;
}

.portal-notification-item,
.portal-notification-row {
    display: grid;
    width: 100%;
    gap: 4px;
    border: 0;
    border-bottom: 1px solid #edf2f8;
    background: #ffffff;
    color: inherit;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
}

.portal-notification-item.is-unread,
.portal-notification-row.is-unread {
    background: #fff8ef;
}

.portal-notification-item:hover,
.portal-notification-item:focus,
.portal-notification-row:hover,
.portal-notification-row:focus {
    background: #eef5ff;
}

.portal-notification-item-title,
.portal-notification-row strong {
    color: var(--student-blue);
    font-size: 13px;
    font-weight: 900;
}

.portal-notification-item-message,
.portal-notification-row em {
    color: #4e617a;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.35;
}

.portal-notification-item small,
.portal-notification-row small {
    color: var(--student-muted);
    font-size: 11px;
    font-weight: 800;
}

.portal-notification-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    background: #f5f8fc;
    color: var(--student-blue);
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

.portal-notification-dashboard {
    margin-bottom: 0;
}

.portal-notification-list {
    display: grid;
}

.portal-notification-row {
    grid-template-columns: 62px minmax(140px, 0.9fr) minmax(220px, 1.4fr) 140px;
    align-items: center;
}

.portal-notification-status {
    display: inline-grid;
    width: fit-content;
    min-height: 24px;
    place-items: center;
    border-radius: 999px;
    background: #e8eef7;
    color: var(--student-muted);
    padding: 0 10px;
    font-size: 11px;
    font-weight: 900;
}

.portal-notification-row.is-unread .portal-notification-status {
    background: var(--student-orange);
    color: #ffffff;
}

.portal-notification-empty {
    padding: 16px;
    color: var(--student-muted);
    font-weight: 800;
}

.student-menu-button {
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
}

.student-menu-button span,
.student-menu-button span::before,
.student-menu-button span::after {
    display: block;
    width: 16px;
    height: 2px;
    margin: auto;
    border-radius: 99px;
    background: currentColor;
}

.student-menu-button span {
    position: relative;
}

.student-menu-button span::before,
.student-menu-button span::after {
    content: '';
    position: absolute;
    left: 0;
}

.student-menu-button span::before {
    top: -5px;
}

.student-menu-button span::after {
    top: 5px;
}

.student-nav a {
    min-height: 34px;
    border-bottom: 2px solid transparent;
    color: rgba(255, 255, 255, 0.82);
    padding: 9px 6px 7px;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.student-nav a.active,
.student-nav a:hover,
.student-nav a:focus {
    border-color: var(--student-amber);
    color: #ffffff;
}

.version-pill,
.logout-pill {
    min-height: 30px;
    border-radius: 999px;
    background: #2a8cff;
    color: #ffe2e2;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 900;
}

.logout-pill {
    background: var(--student-amber);
    color: #1a2440;
}

.student-actions input {
    width: 220px;
    min-height: 36px;
    border-color: transparent;
    border-radius: 999px;
    font-size: 12px;
}

.avatar {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 3px solid #cfe2ff;
    border-radius: 999px;
    background: #ffffff;
    color: var(--student-blue);
    font-weight: 900;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.student-breadcrumb {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 38px;
    border-bottom: 2px solid #6e35b1;
    background: #160814;
    color: #ffffff;
    padding: 0 18px;
    font-weight: 900;
}

.student-breadcrumb span,
.student-breadcrumb small {
    color: #ffe38f;
}

.student-dashboard,
.student-page-head,
.notes-grid,
.student-payment-layout,
.ticket-layout {
    width: min(100%, 1840px);
    margin: 0 auto;
    padding: 20px 22px 0;
}

.student-dashboard {
    display: grid;
    grid-template-columns: 424px minmax(0, 1fr);
    gap: 28px;
}

.student-left-stack,
.student-content-stack {
    display: grid;
    align-content: start;
    gap: 20px;
}

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

.student-profile-head {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 18px 16px;
    border-bottom: 1px solid var(--student-line);
}

.profile-photo {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 8px;
    background: #f2f6fd;
    color: var(--student-blue);
    font-size: 22px;
    font-weight: 900;
    overflow: hidden;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-profile-head h2 {
    margin: 7px 0 0;
    font-size: 18px;
    line-height: 1.1;
}

.student-profile-head strong {
    color: var(--student-purple);
    font-size: 13px;
}

.student-status,
.payment-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 900;
}

.status-approved,
.payment-approved,
.payment-success {
    background: #dff8df;
    color: #008a0b;
}

.status-pending,
.payment-initiated,
.payment-pending_approval {
    background: #fff3d1;
    color: #9a5c00;
}

.status-rejected,
.payment-failed,
.payment-cancelled {
    background: #ffe6e6;
    color: var(--student-red);
}

.student-info-list,
.student-side-card {
    padding: 18px 20px;
}

.student-info-list h3,
.student-side-card h3 {
    margin: 0 0 14px;
    font-size: 14px;
}

.student-info-list div,
.contact-row,
.gateway-checklist div {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 12px;
    padding: 8px 0;
}

.student-info-list span,
.contact-row span {
    color: var(--student-ink);
    font-weight: 800;
}

.student-info-list strong,
.contact-row strong {
    overflow-wrap: anywhere;
    color: #1e2634;
    font-size: 13px;
}

.student-side-card h3,
.student-panel-title {
    color: var(--student-ink);
}

.download-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    padding: 18px 20px;
    text-decoration: none;
}

.download-tile span {
    color: var(--student-muted);
    font-weight: 900;
}

.download-tile strong {
    border-radius: 6px;
    background: #ffb04b;
    color: #522500;
    padding: 9px 14px;
}

.student-tabs {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    border-bottom: 1px solid var(--student-line);
}

.student-tabs a {
    min-height: 38px;
    border-bottom: 2px solid transparent;
    color: var(--student-ink);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.student-tabs a.active,
.student-tabs a:hover {
    border-color: #345bff;
    color: #345bff;
}

.hero-panel,
.student-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, #073f82, #6a33a0 58%, #ff941f);
    color: #ffffff;
    padding: 22px;
    box-shadow: var(--student-shadow);
}

.student-page-head {
    margin-top: 20px;
}

.hero-panel h1,
.student-page-head h1 {
    margin: 4px 0 6px;
    font-size: 28px;
    line-height: 1.1;
}

.hero-panel p,
.student-page-head p {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-weight: 700;
}

.progress-orbit {
    display: grid;
    width: 116px;
    height: 116px;
    place-items: center;
    border: 8px solid rgba(255, 255, 255, 0.28);
    border-top-color: var(--student-amber);
    border-radius: 999px;
    text-align: center;
}

.progress-orbit strong {
    font-size: 26px;
    line-height: 1;
}

.progress-orbit span {
    color: #ffffff;
    font-size: 11px;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.student-stat-card {
    min-height: 104px;
    padding: 18px;
}

.student-stat-card strong {
    display: block;
    margin-top: 10px;
    color: var(--student-blue);
    font-size: 24px;
}

.student-stat-card.warning strong {
    color: var(--student-orange);
}

.student-panel {
    overflow: hidden;
}

.student-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    border-bottom: 1px solid var(--student-line);
    padding: 0 12px;
}

.student-panel-title h2 {
    margin: 0;
    font-size: 20px;
}

.student-panel-title a {
    color: var(--student-blue-2);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.course-panel .student-panel-title {
    background: var(--student-purple);
    color: #ffffff;
}

.course-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 30px;
    padding: 4px;
}

.course-block {
    min-height: 78px;
    padding: 16px 20px;
}

.course-block strong {
    display: block;
    margin-top: 5px;
}

.course-block.soft {
    background: #e5eaf3;
}

.course-block.blue {
    background: #176bd2;
}

.course-block.green {
    background: #13bf11;
}

.course-block.yellow {
    background: #ffbe19;
}

.parents-grid {
    display: grid;
    gap: 14px;
    padding: 24px;
}

.parent-card {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    align-items: center;
    min-height: 70px;
    border-radius: 8px;
    background: #e8edf5;
    padding: 16px;
}

.parent-card strong {
    color: #006f1c;
}

.parent-card span {
    color: var(--student-purple);
    font-weight: 900;
}

.student-two-column,
.student-payment-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.note-list,
.document-grid,
.subject-list {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.note-item,
.document-row,
.subject-list div {
    display: grid;
    gap: 4px;
    border: 1px solid #e2e9f4;
    border-radius: 8px;
    background: #f8fbff;
    padding: 12px;
    text-decoration: none;
}

.note-item span,
.document-row span,
.subject-list span {
    color: var(--student-purple);
    font-size: 12px;
    font-weight: 900;
}

.note-item small,
.document-row small {
    color: var(--student-muted);
    font-weight: 700;
}

.fees-snapshot {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
}

.fees-snapshot div {
    border-radius: 8px;
    background: #f4f7fb;
    padding: 16px;
}

.fees-snapshot strong {
    display: block;
    margin-top: 8px;
    font-size: 20px;
}

.student-actions-row {
    justify-content: flex-end;
    padding: 0 16px 16px;
}

.student-table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid var(--student-line);
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f5f7fb;
    color: var(--student-ink);
    font-size: 12px;
    font-weight: 900;
}

td {
    font-weight: 700;
}

td small {
    display: block;
    margin-top: 2px;
    color: var(--student-muted);
}

.empty-state {
    border-radius: 8px;
    background: #f8fbff;
    color: var(--student-muted);
    padding: 18px;
    font-weight: 800;
}

.fee-reminder-backdrop {
    position: fixed;
    inset: 0;
    z-index: 320;
    display: grid;
    align-items: center;
    justify-items: center;
    overflow-y: auto;
    background: rgba(7, 29, 60, 0.62);
    padding: 24px;
}

.fee-reminder-backdrop[hidden] {
    display: none;
}

.fee-reminder-card {
    position: relative;
    width: min(780px, 100%);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.fee-reminder-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.fee-reminder-head {
    background: linear-gradient(135deg, var(--student-blue), #143f76 58%, var(--student-orange));
    color: #ffffff;
    padding: 22px 26px 20px;
}

.fee-reminder-head span {
    color: #ffd89c;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.fee-reminder-head h2 {
    margin: 4px 0 6px;
    font-size: 28px;
    line-height: 1.08;
}

.fee-reminder-head p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
}

.fee-reminder-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 16px 18px 6px;
}

.fee-reminder-summary div {
    border: 1px solid var(--student-line);
    border-radius: 8px;
    background: #f8fbff;
    padding: 12px;
}

.fee-reminder-summary .warning {
    border-color: #ffd3a8;
    background: #fff8f0;
}

.fee-reminder-summary span {
    display: block;
    color: var(--student-muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.fee-reminder-summary strong {
    display: block;
    margin-top: 5px;
    color: var(--student-blue);
    font-size: 18px;
}

.fee-reminder-summary .warning strong {
    color: #d85b00;
}

.fee-reminder-table-wrap {
    overflow-x: auto;
    padding: 12px 18px 0;
}

.fee-reminder-table {
    border: 1px solid var(--student-line);
    border-radius: 8px;
    overflow: hidden;
}

.fee-reminder-table th,
.fee-reminder-table td {
    padding: 9px 10px;
    white-space: nowrap;
}

.fee-reminder-table th:first-child,
.fee-reminder-table td:first-child {
    min-width: 180px;
    white-space: normal;
}

.fee-reminder-table small {
    display: block;
    color: var(--student-orange);
    font-size: 11px;
    font-weight: 900;
}

.fee-reminder-note {
    margin: 14px 18px 0;
    border-left: 4px solid var(--student-orange);
    border-radius: 8px;
    background: #fff8f0;
    color: #36445a;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
}

.fee-reminder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 18px 18px;
}

.portal-idle-backdrop {
    position: fixed;
    inset: 0;
    z-index: 340;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(7, 29, 60, 0.66);
    backdrop-filter: blur(8px);
}

.portal-idle-backdrop[hidden] {
    display: none;
}

.portal-idle-card {
    width: min(430px, 100%);
    border: 1px solid rgba(255, 143, 31, 0.3);
    border-radius: 10px;
    background: #ffffff;
    color: var(--student-ink);
    padding: 24px;
    text-align: center;
    box-shadow: 0 28px 70px rgba(7, 29, 60, 0.28);
}

.portal-idle-kicker {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border-radius: 999px;
    background: #fff3e8;
    color: #d76600;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.portal-idle-card h2 {
    margin: 12px 0 8px;
    font-size: 22px;
    line-height: 1.18;
}

.portal-idle-card p {
    margin: 0;
    color: var(--student-muted);
    font-weight: 800;
}

.portal-idle-count-ring {
    display: inline-grid;
    width: 96px;
    height: 96px;
    place-items: center;
    margin: 18px auto 4px;
    border: 8px solid #dbe8f8;
    border-top-color: var(--student-orange);
    border-radius: 999px;
    color: var(--student-blue);
    font-size: 30px;
    font-weight: 900;
}

.portal-idle-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.student-filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 220px auto auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
}

.student-filter-bar .field {
    margin: 0;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.note-card {
    display: grid;
    align-content: space-between;
    gap: 14px;
    min-height: 230px;
    padding: 18px;
}

.note-card-top,
.note-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--student-muted);
    font-size: 12px;
    font-weight: 900;
}

.note-card-top span {
    color: var(--student-purple);
}

.note-card h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
}

.note-card p {
    margin: 0;
    color: var(--student-muted);
    font-weight: 700;
}

.fees-head,
.payment-head {
    margin-bottom: 18px;
}

.student-payment-layout {
    align-items: start;
    grid-template-columns: 1fr;
}

.attendance-server-clock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 14px 16px 0;
    border: 1px solid #c9d7eb;
    border-left: 5px solid var(--student-orange);
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff, #fff7eb);
    padding: 14px 16px;
}

.attendance-server-clock span {
    color: var(--student-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.attendance-server-clock strong {
    color: var(--student-blue);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0;
    white-space: nowrap;
}

.attendance-server-clock small {
    color: #7b4300;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.attendance-gps-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 16px 0;
    border: 1px solid #b8cae4;
    border-radius: 8px;
    background: #eef6ff;
    padding: 12px 14px;
    color: #12305d;
}

.attendance-gps-notice span {
    color: var(--student-orange);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.attendance-gps-notice strong {
    color: #12305d;
    font-size: 13px;
    font-weight: 900;
    text-align: right;
}

.attendance-gps-notice.is-loading {
    border-color: #f8b94b;
    background: #fff7e6;
}

.attendance-gps-notice.is-success {
    border-color: #72c991;
    background: #ecfff3;
}

.attendance-gps-notice.is-error {
    border-color: #f2a7a7;
    background: #fff0f0;
}

.attendance-gps-notice.is-error strong {
    color: #b82020;
}

.attendance-gps-action {
    min-height: 32px;
    padding: 7px 12px;
    white-space: nowrap;
}

.attendance-action-grid,
.attendance-today-card {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.attendance-action-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.attendance-today-card {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--student-line);
}

.attendance-today-card div {
    border: 1px solid var(--student-line);
    border-radius: 8px;
    background: #f8fbff;
    padding: 12px;
}

.attendance-today-card span {
    display: block;
    color: var(--student-muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.attendance-today-card strong {
    display: block;
    margin-top: 5px;
    color: var(--student-blue);
    overflow-wrap: anywhere;
}

.attendance-location-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #bfd1ea;
    border-radius: 999px;
    background: #ffffff;
    padding: 6px 9px;
    color: var(--student-blue);
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.attendance-location-pill:hover {
    border-color: var(--student-orange);
    color: #8b4a00;
}

.attendance-location-stack {
    display: grid;
    gap: 6px;
    min-width: 170px;
}

.attendance-location-stack small {
    display: block;
    color: var(--student-muted);
    font-weight: 800;
}

.work-done-form {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.work-done-panel {
    position: relative;
    z-index: 20;
    overflow: visible;
}

.work-done-panel .work-done-form {
    overflow: visible;
}

.work-done-datebar {
    padding: 0;
}

.work-done-rows {
    display: grid;
    gap: 12px;
}

.work-done-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(220px, 1.25fr) 110px 132px minmax(180px, 1fr) minmax(160px, 1fr) minmax(220px, 1.4fr) auto;
    gap: 12px;
    align-items: end;
    border: 1px solid var(--student-line);
    border-radius: 10px;
    background: #f8fbff;
    padding: 12px;
    overflow: visible;
}

.work-done-row .field {
    display: grid;
    gap: 6px;
    margin: 0;
}

.work-done-row .wide {
    min-width: 0;
}

.work-done-period-picker {
    position: relative;
}

.work-done-period-picker.is-open {
    z-index: 300;
}

.work-done-period-button {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 32px;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    border: 1px solid #b9cbe5;
    border-radius: 7px;
    background: #ffffff;
    color: var(--student-blue);
    padding: 0 27px 0 10px;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
}

.work-done-period-button::after {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    content: "";
    transform: translateY(-70%) rotate(45deg);
}

.work-done-period-picker.is-open .work-done-period-button {
    border-color: var(--student-orange);
    box-shadow: 0 0 0 2px rgba(255, 145, 31, 0.12);
}

.work-done-period-menu {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    z-index: 500;
    display: grid;
    width: max(100%, 168px);
    overflow: hidden;
    border: 1px solid #c8d7ed;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(7, 29, 60, 0.18);
    padding: 3px;
}

.work-done-period-menu[hidden] {
    display: none !important;
}

.work-done-period-option {
    display: flex;
    min-height: 27px;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
    color: var(--student-blue);
    padding: 4px 7px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.work-done-period-option:hover {
    background: #edf5ff;
}

.work-done-period-option input {
    width: 14px;
    height: 14px;
    accent-color: var(--student-orange);
}

.work-done-period-option.is-disabled {
    color: #9aa8ba;
    cursor: not-allowed;
    opacity: 0.62;
}

.work-done-remove {
    align-self: end;
    min-height: 38px;
}

.work-done-actions {
    justify-content: flex-end;
    padding: 0 16px 16px;
}

.work-done-table {
    min-width: 1100px;
}

.inline-month-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.attendance-export-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.attendance-export-actions .inline-month-form {
    margin: 0;
}

.inline-month-form input {
    width: 170px;
    min-height: 34px;
}

.attendance-matrix-wrap,
.attendance-summary-table-wrap {
    overflow: auto;
    padding: 12px;
}

.attendance-matrix,
.attendance-summary-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}

.attendance-matrix th,
.attendance-matrix td,
.attendance-summary-table th,
.attendance-summary-table td {
    border-right: 1px solid #c8d4e4;
    border-bottom: 1px solid #c8d4e4;
    padding: 8px;
    vertical-align: middle;
}

.attendance-matrix thead th,
.attendance-summary-table thead th {
    background: #0f4f91;
    color: #ffffff;
    font-weight: 900;
    text-align: center;
}

.attendance-matrix thead tr:nth-child(2) th {
    background: #76bdf2;
    color: #051d3f;
}

.attendance-matrix .attendance-month-head {
    background: #0b63b6;
    color: #ffffff;
    font-size: 14px;
}

.attendance-person-head,
.attendance-person-cell {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 238px;
    min-width: 238px;
    max-width: 238px;
    background: #ffffff;
    text-align: left;
    white-space: normal;
}

.attendance-person-head {
    background: #073f82 !important;
    color: #ffffff;
}

.attendance-person-cell strong,
.attendance-person-cell span,
.attendance-person-cell small {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.attendance-person-cell span,
.attendance-person-cell small {
    color: var(--student-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
}

.attendance-matrix .is-weekend-head {
    background: #e6f4ff;
}

.attendance-day-cell {
    width: 72px;
    min-width: 72px;
    height: 64px;
    background: #f7f9fc;
    color: #061a38;
    text-align: center;
}

.attendance-day-cell span,
.attendance-day-cell strong,
.attendance-day-cell em {
    display: block;
}

.attendance-day-cell span {
    font-weight: 800;
    line-height: 1.2;
}

.attendance-day-cell strong {
    font-size: 13px;
    font-weight: 900;
}

.attendance-day-cell em {
    margin-top: 3px;
    color: #c21f30;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    line-height: 1.1;
}

.attendance-day-cell.is-off {
    background: #e5f3ff;
    color: #04456f;
}

.attendance-day-cell.is-absent {
    background: #ffd6d8;
    color: #9d0d19;
}

.attendance-day-cell.is-present {
    background: #f8fbff;
}

.attendance-day-cell.has-warning {
    background: #fff3bf;
    box-shadow: inset 0 0 0 2px rgba(194, 31, 48, 0.28);
}

.attendance-summary-table {
    min-width: 760px;
}

.attendance-summary-table td {
    background: #ffffff;
    font-weight: 800;
}

.ticket-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 340px;
    gap: 16px;
    align-items: start;
}

.ticket-list {
    display: grid;
    gap: 8px;
    max-height: 68vh;
    overflow: auto;
    padding: 12px;
}

.ticket-list a {
    display: grid;
    gap: 4px;
    border: 1px solid var(--student-line);
    border-radius: 8px;
    background: #f8fbff;
    padding: 11px;
    text-decoration: none;
}

.ticket-list a.active,
.ticket-list a:hover,
.ticket-list a:focus {
    border-color: var(--student-orange);
    background: #fff7eb;
}

.ticket-list strong {
    color: var(--student-blue);
    font-size: 12px;
}

.ticket-list span {
    font-weight: 900;
}

.ticket-list small {
    color: var(--student-muted);
    font-weight: 700;
}

.ticket-thread {
    display: grid;
    gap: 12px;
    max-height: 58vh;
    overflow: auto;
    padding: 16px;
    background: #f8fbff;
}

.ticket-message {
    width: min(76%, 720px);
    border: 1px solid var(--student-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
    box-shadow: 0 10px 24px rgba(7, 29, 60, 0.08);
}

.ticket-message.student {
    justify-self: end;
    border-color: rgba(255, 143, 31, 0.35);
    background: #fff9f0;
}

.ticket-message.teacher {
    border-color: rgba(7, 63, 130, 0.22);
}

.ticket-message.admin {
    justify-self: center;
    border-color: rgba(101, 49, 154, 0.22);
    background: #f7f2ff;
}

.ticket-message header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--student-muted);
    font-size: 12px;
    font-weight: 900;
}

.ticket-participant-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 0;
    color: var(--student-muted);
    font-size: 12px;
    font-weight: 800;
}

.ticket-participant-meta strong {
    color: var(--student-blue);
}

.ticket-message p {
    margin: 8px 0 0;
    font-weight: 700;
}

.ticket-attachment {
    display: inline-flex;
    width: fit-content;
    margin-top: 8px;
    border-radius: 999px;
    background: var(--student-blue);
    color: #ffffff;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

.ticket-compose {
    display: grid;
    gap: 10px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--student-line);
}

.ticket-close-form {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--student-line);
    background: #ffffff;
    padding: 10px 16px 14px;
}

.new-ticket-form {
    border-top: 0;
}

.payment-confirm-card {
    display: grid;
    gap: 14px;
    margin: 0 16px 16px;
    border: 1px solid #dfe8f6;
    border-radius: 8px;
    background: #f7fbff;
    padding: 18px;
}

.payment-confirm-card div,
.gateway-checklist div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.payment-confirm-card strong {
    color: var(--student-blue);
}

.payment-amount-box {
    display: grid;
    gap: 8px;
    border: 1px solid #ffc178;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff8ef, #ffffff);
    padding: 14px;
}

.payment-amount-box span {
    color: #7a3d00;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.payment-amount-box input {
    width: 100%;
    min-height: 54px;
    border: 2px solid #ff9b2f;
    border-radius: 8px;
    background: #ffffff;
    color: var(--student-blue);
    padding: 0 14px;
    font-size: 24px;
    font-weight: 900;
}

.payment-amount-box input:focus {
    outline: 3px solid rgba(255, 143, 31, 0.22);
}

.payment-amount-box small {
    color: #5d6d82;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.gateway-panel {
    padding-bottom: 16px;
}

.gateway-status {
    margin: 16px;
    border-radius: 8px;
    padding: 18px;
}

.gateway-status.pending {
    background: #fff7eb;
    color: #7c4500;
}

.gateway-status.ready {
    background: #edfbee;
    color: #006b13;
}

.gateway-status strong {
    display: block;
    margin: 7px 0;
    font-size: 20px;
}

.gateway-status p {
    margin: 0;
    font-weight: 700;
}

.gateway-checklist {
    display: grid;
    gap: 8px;
    padding: 0 16px;
}

.gateway-checklist div {
    border: 1px solid #e1e9f5;
    border-radius: 8px;
    background: #f8fbff;
    padding: 12px;
}

.slip-body {
    background: #e9eef6;
    padding: 22px 12px 42px;
}

.slip-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.fee-slip {
    width: min(900px, 100%);
    margin: 0 auto;
    padding: 22px;
}

.fee-slip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 3px solid var(--student-blue);
    padding-bottom: 14px;
}

.fee-slip-header img {
    width: 290px;
    max-width: 48%;
    height: auto;
}

.fee-slip-header h1 {
    margin: 2px 0 4px;
    font-size: 28px;
}

.fee-slip-header p {
    margin: 0;
    color: var(--student-muted);
    font-weight: 700;
}

.slip-meta-grid,
.slip-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 18px;
}

.slip-meta-grid div,
.slip-summary div {
    border: 1px solid var(--student-line);
    border-radius: 8px;
    background: #f8fbff;
    padding: 12px;
}

.slip-meta-grid strong,
.slip-summary strong {
    display: block;
    margin-top: 5px;
    overflow-wrap: anywhere;
}

.slip-summary div {
    background: #fff8ec;
}

.slip-section {
    margin-top: 18px;
}

.slip-section h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.slip-footer {
    display: grid;
    grid-template-columns: 1fr 230px;
    gap: 24px;
    margin-top: 24px;
}

.slip-footer p {
    margin: 6px 0 0;
    color: var(--student-muted);
    font-weight: 700;
}

.signature-box {
    display: grid;
    align-items: end;
    min-height: 84px;
    border-top: 1px solid var(--student-ink);
    text-align: center;
    font-weight: 900;
}

/* Global compact density pass for student and teacher portals. */
body {
    font-size: 13px;
}

.student-login-card {
    padding: 24px;
}

.student-login-logo {
    margin-bottom: 12px;
}

.student-login-card h1 {
    font-size: 30px;
}

.student-login-card p {
    margin-bottom: 14px;
}

.field {
    gap: 5px;
    margin-bottom: 10px;
}

.field label {
    font-size: 12px;
}

input,
select,
textarea {
    min-height: 36px;
    border-radius: 7px;
    padding: 0 10px;
    font-size: 13px;
}

textarea {
    min-height: 76px;
    padding: 8px 10px;
}

input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 143, 31, 0.14);
}

.student-primary-button,
.student-secondary-button,
.logout-pill {
    min-height: 34px;
    border-radius: 7px;
    padding: 0 12px;
    font-size: 12px;
}

.student-primary-button.compact,
.student-secondary-button.compact {
    min-height: 30px;
    padding: 0 10px;
}

.student-shell {
    padding-left: 52px;
}

.student-rail {
    width: 52px;
}

.student-rail a {
    height: 48px;
}

.rail-logo {
    height: 52px;
}

.rail-logo img {
    width: 38px;
    height: 38px;
}

.student-main {
    padding-bottom: 56px;
}

.student-topbar {
    grid-template-columns: minmax(210px, auto) 1fr auto;
    gap: 12px;
    min-height: 46px;
    padding: 0 14px;
}

.student-brand img,
.avatar {
    width: 36px;
    height: 36px;
}

.student-brand strong {
    font-size: 15px;
}

.student-nav a {
    min-height: 30px;
    padding: 7px 5px 5px;
    font-size: 12px;
}

.portal-notification-trigger {
    min-height: 32px;
}

.portal-notification-menu-head,
.portal-notification-panel-head,
.portal-notification-item,
.portal-notification-row {
    padding: 9px 11px;
}

.student-breadcrumb {
    min-height: 34px;
    gap: 12px;
    padding: 0 14px;
}

.student-dashboard,
.student-page-head,
.notes-grid,
.student-payment-layout,
.ticket-layout {
    padding: 14px 16px 0;
}

.student-dashboard {
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 16px;
}

.student-left-stack,
.student-content-stack {
    gap: 12px;
}

.hero-panel,
.student-page-head {
    gap: 14px;
    padding: 14px 16px;
}

.student-page-head {
    margin-top: 14px;
}

.hero-panel h1,
.student-page-head h1 {
    font-size: 24px;
}

.student-profile-head {
    padding: 12px 14px;
}

.profile-photo {
    width: 48px;
    height: 48px;
}

.student-profile-head h2 {
    font-size: 16px;
}

.student-info-list,
.student-side-card {
    padding: 12px 14px;
}

.student-info-list h3,
.student-side-card h3 {
    margin-bottom: 9px;
}

.student-info-list div,
.contact-row,
.gateway-checklist div {
    gap: 8px;
    padding: 5px 0;
}

.download-tile {
    min-height: 58px;
    padding: 12px 14px;
}

.download-tile strong {
    padding: 7px 10px;
}

.student-tabs {
    gap: 14px;
}

.student-tabs a {
    min-height: 32px;
    font-size: 12px;
}

.stat-row,
.course-grid,
.parents-grid,
.attendance-action-grid,
.attendance-today-card,
.ticket-layout {
    gap: 10px;
}

.student-stat-card {
    min-height: 82px;
    padding: 12px;
}

.student-stat-card strong {
    margin-top: 6px;
    font-size: 21px;
}

.student-panel-title {
    min-height: 36px;
    padding: 0 10px;
}

.student-panel-title h2 {
    font-size: 17px;
}

.course-grid {
    padding: 2px;
}

.course-block,
.parent-card,
.note-card,
.attendance-today-card div {
    padding: 11px 12px;
}

.course-block {
    min-height: 64px;
}

.student-actions-row {
    padding: 0 12px 12px;
}

th,
td {
    padding: 8px 9px;
}

th {
    font-size: 11px;
}

td {
    font-size: 12px;
}

.empty-state {
    padding: 12px;
}

.student-filter-bar {
    gap: 10px;
    padding: 12px;
}

.notes-grid {
    gap: 12px;
}

.note-card {
    gap: 10px;
    min-height: 180px;
}

.note-card h2 {
    font-size: 17px;
}

.fees-head,
.payment-head {
    margin-bottom: 12px;
}

.attendance-action-grid,
.attendance-today-card {
    gap: 10px;
    padding: 12px;
}

.attendance-server-clock {
    margin: 12px 12px 0;
    padding: 12px;
}

.attendance-gps-notice {
    margin: 10px 12px 0;
    padding: 11px 12px;
}

.attendance-server-clock strong {
    font-size: 22px;
}

.inline-month-form input {
    min-height: 30px;
}

.attendance-matrix-wrap,
.attendance-summary-table-wrap {
    padding: 8px;
}

.attendance-matrix,
.attendance-summary-table {
    font-size: 11px;
}

.attendance-matrix th,
.attendance-matrix td,
.attendance-summary-table th,
.attendance-summary-table td {
    padding: 6px;
}

.attendance-person-head,
.attendance-person-cell {
    width: 220px;
    min-width: 220px;
    max-width: 220px;
}

.attendance-day-cell {
    width: 64px;
    min-width: 64px;
    height: 54px;
}

.ticket-list,
.ticket-thread,
.ticket-compose,
.student-ticket-compose {
    padding: 10px;
}

.otp-boxes {
    gap: 7px;
}

.otp-boxes input {
    height: 52px;
    min-height: 52px;
    font-size: 24px;
}

.fee-slip {
    padding: 18px;
}

.slip-meta-grid,
.slip-summary {
    gap: 8px;
}

.attendance-export-report {
    display: contents;
}

.attendance-report-letterhead,
.attendance-report-title-card,
.attendance-report-footer {
    display: none;
}

@media print {
    body.attendance-print-mode {
        background: #ffffff !important;
        color: #000000;
        font-size: 9px;
    }

    body.attendance-print-mode * {
        visibility: hidden;
    }

    body.attendance-print-mode .attendance-export-report,
    body.attendance-print-mode .attendance-export-report * {
        visibility: visible;
    }

    body.attendance-print-mode .attendance-export-report {
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        display: block;
        width: 100%;
        padding: 0;
    }

    body.attendance-print-mode .attendance-report-letterhead {
        display: grid;
        grid-template-columns: 190px minmax(0, 1fr);
        gap: 14px;
        align-items: center;
        border-bottom: 3px solid #173f78;
        padding-bottom: 8px;
    }

    body.attendance-print-mode .attendance-report-letterhead img {
        width: 180px;
        max-height: 66px;
        object-fit: contain;
    }

    body.attendance-print-mode .attendance-report-letterhead h2,
    body.attendance-print-mode .attendance-report-title-card h1 {
        margin: 0;
        color: #061a38;
    }

    body.attendance-print-mode .attendance-report-letterhead p,
    body.attendance-print-mode .attendance-report-title-card p {
        margin: 2px 0 0;
        color: #24364f;
        font-weight: 700;
    }

    body.attendance-print-mode .attendance-report-title-card {
        display: block;
        margin: 8px 0 10px;
        border: 1px solid #9eb2ce;
        background: #f4f8ff !important;
        padding: 8px 10px;
        text-align: center;
    }

    body.attendance-print-mode .attendance-report-footer {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        border-top: 2px solid #173f78;
        margin-top: 10px;
        padding-top: 6px;
        color: #24364f;
        font-size: 9px;
        font-weight: 700;
    }

    body.attendance-print-mode .attendance-export-section {
        margin: 0 0 10px;
        border: 0;
        box-shadow: none;
        page-break-inside: avoid;
    }

    body.attendance-print-mode .attendance-export-section .student-panel-title {
        display: block;
        min-height: auto;
        border: 0;
        padding: 0 0 5px;
    }

    body.attendance-print-mode .attendance-matrix-wrap,
    body.attendance-print-mode .attendance-summary-table-wrap {
        overflow: visible;
        padding: 0;
    }

    body.attendance-print-mode .attendance-person-head,
    body.attendance-print-mode .attendance-person-cell {
        position: static;
        width: 150px;
        min-width: 150px;
        max-width: 150px;
    }

    body.attendance-print-mode .attendance-day-cell {
        width: 28px;
        min-width: 28px;
        height: auto;
    }
}

@media (max-width: 1200px) {
    .work-done-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .work-done-remove {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .work-done-form {
        padding: 12px;
    }

    .work-done-row {
        grid-template-columns: 1fr;
    }

    .work-done-actions {
        align-items: stretch;
        flex-direction: column;
        padding: 0 12px 12px;
    }
}

@media (max-width: 1200px) {
    .student-dashboard,
    .student-payment-layout,
    .student-two-column,
    .ticket-layout {
        grid-template-columns: 1fr;
    }

    .notes-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-topbar {
        grid-template-columns: 1fr auto;
    }

    .portal-notification-row {
        grid-template-columns: 1fr;
    }

    .student-nav {
        display: none;
    }

    .student-nav.is-open {
        position: absolute;
        top: 52px;
        right: 12px;
        left: 12px;
        z-index: 95;
        display: grid;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 8px;
        background: var(--student-blue);
        padding: 10px;
        box-shadow: var(--student-shadow);
    }

    .student-menu-button {
        display: inline-grid;
    }
}

@media (max-width: 760px) {
    .student-shell {
        padding-left: 0;
    }

    .student-rail {
        display: none;
    }

    .student-topbar {
        position: static;
        grid-template-columns: 1fr;
        padding: 10px 12px;
    }

    .student-actions {
        flex-wrap: wrap;
    }

    .portal-notification-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-notification-menu {
        width: min(360px, calc(100vw - 24px));
    }

    .student-actions input {
        width: 100%;
    }

    .student-breadcrumb {
        flex-wrap: wrap;
        padding: 8px 12px;
    }

    .student-dashboard,
    .student-page-head,
    .notes-grid,
    .student-payment-layout,
    .ticket-layout {
        padding: 14px;
    }

    .hero-panel,
    .student-page-head,
    .fees-head,
    .payment-head {
        align-items: stretch;
        flex-direction: column;
    }

    .stat-row,
    .attendance-action-grid,
    .attendance-today-card,
    .ticket-layout,
    .course-grid,
    .parents-grid,
    .fees-snapshot,
    .student-filter-bar,
    .notes-grid,
    .slip-meta-grid,
    .slip-summary,
    .slip-footer,
    .fee-reminder-summary {
        grid-template-columns: 1fr;
    }

    .attendance-server-clock {
        align-items: flex-start;
        flex-direction: column;
    }

    .attendance-gps-notice {
        align-items: flex-start;
        flex-direction: column;
    }

    .attendance-gps-notice strong {
        text-align: left;
    }

    .attendance-gps-action {
        width: 100%;
    }

    .attendance-server-clock strong {
        font-size: 20px;
        white-space: normal;
    }

    .fee-reminder-backdrop {
        align-items: start;
        padding: 12px;
    }

    .fee-reminder-head {
        padding: 18px;
    }

    .fee-reminder-head h2 {
        font-size: 24px;
    }

    .fee-reminder-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-idle-card {
        padding: 20px;
    }

    .portal-idle-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .parent-card,
    .student-info-list div,
    .contact-row {
        grid-template-columns: 1fr;
    }

    .student-actions-row {
        align-items: stretch;
        flex-direction: column;
    }

    .student-primary-button,
    .student-secondary-button {
        width: 100%;
    }

    .fee-slip {
        padding: 14px;
    }

    .fee-slip-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .fee-slip-header img {
        max-width: 100%;
    }
}

@page {
    size: A4;
    margin: 10mm;
}

@media print {
    body {
        background: #ffffff !important;
        color: #000000;
        font-size: 11px;
    }

    .no-print,
    .fee-reminder-backdrop,
    .portal-idle-backdrop,
    .student-footer,
    .student-auth-footer {
        display: none !important;
    }

    .fee-slip {
        width: 100%;
        border: 0;
        box-shadow: none;
        padding: 0;
    }

    .fee-slip-header img {
        width: 250px;
    }

    .fee-slip-header h1 {
        font-size: 22px;
    }

    .slip-meta-grid,
    .slip-summary {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        margin-top: 10px;
    }

    .slip-section {
        margin-top: 12px;
    }

    th,
    td {
        padding: 6px;
    }
}
