/* Self-hosted fonts keep production compatible with the app's `font-src 'self'` CSP. */
@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url("../fonts/dm-sans-normal-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url("../fonts/dm-sans-normal-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "DM Sans";
    font-style: italic;
    font-weight: 100 1000;
    font-display: swap;
    src: url("../fonts/dm-sans-italic-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "DM Sans";
    font-style: italic;
    font-weight: 100 1000;
    font-display: swap;
    src: url("../fonts/dm-sans-italic-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/manrope-normal-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/manrope-normal-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Inconsolata";
    font-style: normal;
    font-weight: 200 900;
    font-stretch: 100%;
    font-display: swap;
    src: url("../fonts/inconsolata-normal-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Inconsolata";
    font-style: normal;
    font-weight: 200 900;
    font-stretch: 100%;
    font-display: swap;
    src: url("../fonts/inconsolata-normal-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
    --ink: #10243e;
    --muted: #63758b;
    --line: #dbe7f3;
    --surface: #ffffff;
    --canvas: #f3f8fd;
    --sidebar: #072f52;
    --sidebar-soft: #0d4775;
    --primary: #0879c9;
    --primary-dark: #05639f;
    --primary-soft: #e2f1fc;
    --orange: #00a7c4;
    --orange-soft: #e2f8fc;
    --blue: #2f6fd4;
    --blue-soft: #e8f0ff;
    --violet: #5267c9;
    --violet-soft: #ebefff;
    --danger: #c94d52;
    --danger-soft: #fde9e9;
    --success: #14898f;
    --success-soft: #e1f5f6;
    --shadow: 0 12px 34px rgba(15, 64, 105, 0.09);
    --radius: 18px;
    --radius-sm: 11px;
}

* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
}

:focus-visible {
    outline: 3px solid rgba(8, 121, 201, 0.35);
    outline-offset: 2px;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: "DM Sans", "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h1,
h2,
h3,
h4 {
    font-family: "Manrope", "DM Sans", "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.2;
}

code {
    color: #245b86;
    font-family: "Inconsolata", Consolas, "Courier New", monospace;
    font-size: 12px;
    font-weight: 700;
}

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

.sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    display: flex;
    width: 250px;
    flex-direction: column;
    color: #e8f4ff;
    background:
        radial-gradient(circle at 10% 5%, rgba(31, 145, 220, 0.3), transparent 30%),
        linear-gradient(180deg, #093a62 0%, #052844 100%);
    transition: transform 0.25s ease;
}

.brand,
.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    min-height: 145px;
    justify-content: center;
    padding: 10px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo {
    display: block;
    width: 125px;
    height: auto;
    border-radius: 16px;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    color: #07365d;
    background: #cbeaff;
    border-radius: 13px 13px 13px 5px;
    font-family: "Manrope", sans-serif;
    font-size: 22px;
    font-weight: 800;
}

.brand strong,
.auth-brand strong {
    display: block;
    font-family: "Manrope", sans-serif;
    font-size: 17px;
}

.brand small,
.auth-brand small {
    display: block;
    margin-top: 1px;
    color: rgba(232, 244, 255, 0.62);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.main-nav {
    flex: 1;
    overflow-y: auto;
    padding: 18px 14px;
}

.nav-label {
    margin: 13px 12px 8px;
    color: rgba(232, 244, 255, 0.42);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    padding: 11px 13px;
    color: rgba(237, 247, 255, 0.78);
    border-radius: 10px;
    font-weight: 600;
    transition: 0.18s ease;
}

.main-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

.main-nav a.active {
    color: #fff;
    background: var(--sidebar-soft);
    box-shadow: inset 3px 0 0 #62c7ff;
}

.nav-icon,
.metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-icon {
    width: 20px;
    height: 20px;
}

.nav-icon svg,
.metric-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 17px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.avatar,
.header-avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    max-width: 38px;
    max-height: 38px;
    aspect-ratio: 1 / 1;
    flex: 0 0 38px;
    color: #08395f;
    background: #bfe5ff;
    border-radius: 999px;
    font-weight: 800;
    overflow: hidden;
}

.avatar.has-image,
.header-avatar.has-image {
    background: #dcecf8;
}

.avatar img,
.header-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    border-radius: inherit;
    object-fit: cover;
}

.avatar.large {
    width: 54px;
    height: 54px;
    min-width: 54px;
    min-height: 54px;
    max-width: 54px;
    max-height: 54px;
    flex: 0 0 54px;
    font-size: 18px;
}

.profile-copy {
    min-width: 0;
    flex: 1;
}

.profile-copy strong,
.profile-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-copy strong {
    color: #fff;
    font-size: 13px;
}

.profile-copy small {
    color: rgba(232, 244, 255, 0.56);
    font-size: 11px;
}

.logout-link {
    color: rgba(232, 244, 255, 0.64);
    font-size: 18px;
}

.logout-form {
    margin: 0;
}

button.logout-link {
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.main-content {
    min-width: 0;
    width: calc(100% - 250px);
    margin-left: 250px;
}

.topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    min-height: 91px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 17px 30px;
    background: rgba(255, 255, 255, 0.93);
    border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.topbar h1 {
    margin: 3px 0 0;
    font-size: 24px;
}

.eyebrow {
    margin-bottom: 3px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topbar-actions,
.header-controls,
.filters,
.form-actions,
.table-actions,
.followup-card-footer > div,
.chart-legend {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-add {
    padding: 10px 15px;
    color: #fff;
    background: var(--primary);
    border-radius: 10px;
    font-weight: 700;
}

.quick-add:hover,
.btn-primary:hover {
    background: var(--primary-dark);
}

.header-avatar {
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    max-width: 52px;
    max-height: 52px;
    flex: 0 0 52px;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px var(--line);
}

.mobile-menu {
    display: none;
    padding: 7px;
    color: var(--ink);
    background: transparent;
    border: 0;
    font-size: 22px;
}

.page-content {
    max-width: 1540px;
    margin: 0 auto;
    padding: 25px 30px 40px;
}

.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: var(--radius-sm);
}

.alert button {
    color: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 20px;
}

.alert-success {
    color: #137278;
    background: var(--success-soft);
    border-color: #b9e3e5;
}

.alert-warning {
    color: #08718a;
    background: var(--orange-soft);
    border-color: #abe5ef;
}

.alert-danger {
    color: #a43d42;
    background: var(--danger-soft);
    border-color: #f2c3c5;
}

.welcome-banner {
    position: relative;
    display: flex;
    min-height: 170px;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    overflow: hidden;
    margin-bottom: 20px;
    padding: 30px 38px;
    color: #eaf6ff;
    background:
        radial-gradient(circle at 78% 26%, rgba(78, 185, 255, 0.22), transparent 25%),
        linear-gradient(105deg, rgba(5, 52, 91, 0.99), rgba(8, 121, 201, 0.94)),
        #075b99;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.welcome-banner::after {
    position: absolute;
    right: 10%;
    bottom: -110px;
    width: 310px;
    height: 310px;
    background: rgba(127, 205, 255, 0.1);
    border: 1px solid rgba(190, 229, 255, 0.16);
    border-radius: 50%;
    content: "";
}

.welcome-banner .eyebrow {
    color: #9ed9ff;
}

.welcome-banner h2 {
    margin-bottom: 8px;
    color: #fff;
    font-size: 29px;
}

.welcome-banner p:last-child {
    max-width: 620px;
    margin: 0;
    color: rgba(234, 246, 255, 0.76);
}

.banner-orb {
    position: relative;
    z-index: 1;
    display: grid;
    width: 118px;
    height: 118px;
    flex: 0 0 118px;
    place-content: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    backdrop-filter: blur(6px);
}

.banner-orb span {
    font-family: "Manrope", sans-serif;
    font-size: 34px;
    font-weight: 800;
}

.banner-orb small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    text-transform: uppercase;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.metric-card,
.simple-metric {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.metric-card {
    display: grid;
    grid-template-columns: 47px 1fr;
    gap: 13px;
    padding: 20px;
}

.metric-icon {
    width: 47px;
    height: 47px;
    padding: 12px;
    border-radius: 14px;
}

.metric-teal .metric-icon { color: var(--primary); background: var(--primary-soft); }
.metric-orange .metric-icon { color: var(--orange); background: var(--orange-soft); }
.metric-blue .metric-icon { color: var(--blue); background: var(--blue-soft); }
.metric-violet .metric-icon { color: var(--violet); background: var(--violet-soft); }

.metric-card span,
.simple-metric span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.metric-card strong {
    display: block;
    margin-top: 4px;
    font-family: "Manrope", sans-serif;
    font-size: 23px;
}

.metric-card a {
    grid-column: 1 / -1;
    padding-top: 12px;
    color: var(--primary);
    border-top: 1px solid var(--line);
    font-size: 11px;
    font-weight: 700;
}

.compact-metrics .simple-metric {
    padding: 19px 21px;
}

.compact-metrics .simple-metric strong {
    display: block;
    margin-top: 5px;
    font-family: "Manrope", sans-serif;
    font-size: 25px;
}

.simple-metric.danger { border-left: 4px solid var(--danger); }
.simple-metric.info { border-left: 4px solid var(--blue); }
.simple-metric.success { border-left: 4px solid var(--success); }

.compact-metrics.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-grid,
.report-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.88fr);
    gap: 20px;
}

.staff-dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 20px;
}

.staff-dashboard-grid > .dashboard-panel {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.staff-dashboard-grid .dashboard-enquiries-panel .table-wrap,
.staff-dashboard-grid .dashboard-followups-panel .followup-list {
    flex: 1;
}

.staff-dashboard-grid .dashboard-enquiries-panel .table-wrap {
    overflow-x: auto;
}

.staff-dashboard-grid .dashboard-enquiries-table {
    table-layout: auto;
    white-space: normal;
}

.staff-dashboard-grid .dashboard-enquiries-table th,
.staff-dashboard-grid .dashboard-enquiries-table td {
    min-width: 0;
    padding-right: 10px;
    padding-left: 10px;
    overflow-wrap: anywhere;
}

.staff-dashboard-grid .dashboard-enquiries-table th {
    font-size: 10px;
}

.staff-dashboard-grid .dashboard-enquiries-table td {
    font-size: 12px;
    white-space: normal;
}

.staff-dashboard-grid .dashboard-enquiries-table th:nth-child(1) { width: 23%; }
.staff-dashboard-grid .dashboard-enquiries-table th:nth-child(2) { width: 25%; }
.staff-dashboard-grid .dashboard-enquiries-table th:nth-child(3) { width: 15%; }
.staff-dashboard-grid .dashboard-enquiries-table th:nth-child(4) { width: 20%; }
.staff-dashboard-grid .dashboard-enquiries-table th:nth-child(5) { width: 17%; }

.staff-dashboard-grid .dashboard-enquiries-table .badge {
    max-width: 100%;
    white-space: normal;
    text-align: center;
}

.panel {
    min-width: 0;
    margin-bottom: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel-header {
    display: flex;
    min-height: 74px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 21px;
    border-bottom: 1px solid var(--line);
}

.panel-header h3 {
    margin: 2px 0 0;
    font-size: 17px;
}

.panel-header-wrap:has(.student-mode-tabs) {
    align-items: flex-start;
    flex-direction: column;
}

.panel-header-wrap:has(.student-mode-tabs) .header-controls {
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.text-link {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.sort-link {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.sort-link:hover,
.sort-link:focus-visible {
    color: var(--primary);
}

.pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 20px 20px;
}

.pagination span {
    color: var(--muted);
    font-size: 0.9rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th {
    padding: 12px 15px;
    color: #73817f;
    background: #f7fafe;
    border-bottom: 1px solid var(--line);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
}

td {
    padding: 14px 15px;
    border-bottom: 1px solid #e8f0f7;
    color: #40546a;
    font-size: 12px;
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: #fbfdff;
}

.payment-history-row {
    cursor: pointer;
}

.payment-history-row:focus {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.payment-history-row.is-selected {
    background: #eef8ff;
}

.history-toggle-row {
    cursor: pointer;
}

.history-toggle-row:focus {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.history-toggle-row.is-selected {
    background: #eef8ff;
}

.history-detail-row > td {
    padding: 0;
    background: #f8fbfd;
}

.history-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 240ms ease, opacity 180ms ease;
}

.history-panel-inner {
    padding: 18px 22px 20px;
    border-top: 1px solid var(--border);
}

.history-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.history-panel h4 {
    margin: 0 0 12px;
    font-size: 15px;
}

.history-timeline {
    display: grid;
    gap: 10px;
}

.history-entry {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.history-entry time,
.history-entry small {
    color: var(--muted);
    font-size: 11px;
}

.history-entry strong {
    color: var(--ink);
    font-size: 13px;
}

.history-entry span {
    color: var(--muted);
    font-size: 12px;
}

.embedded-history {
    margin: 0 21px 21px;
    padding: 16px;
    background: #f8fbfd;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.embedded-history h4 {
    margin: 0 0 12px;
    font-size: 15px;
}

.student-payment-link {
    color: var(--ink);
}

.student-payment-link:hover {
    color: var(--primary);
}

.panel-subtitle {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.student-payment-total {
    min-width: 130px;
    text-align: right;
}

.student-payment-total span,
.student-payment-total strong {
    display: block;
}

.student-payment-total span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.student-payment-total strong {
    margin-top: 2px;
    color: var(--success);
    font-family: "Manrope", sans-serif;
    font-size: 16px;
}

td strong,
td small {
    display: block;
}

td strong {
    color: var(--ink);
    font-size: 12px;
}

td small {
    max-width: 280px;
    overflow: hidden;
    margin-top: 3px;
    color: #8392a2;
    font-size: 10px;
    text-overflow: ellipsis;
}

tfoot td {
    background: #f7fafe;
    border-top: 2px solid var(--line);
    border-bottom: 0;
}

.badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.badge-success { color: #0b7379; background: var(--success-soft); }
.badge-info { color: #245daf; background: var(--blue-soft); }
.badge-warning { color: #08778e; background: var(--orange-soft); }
.badge-danger { color: #aa3e43; background: var(--danger-soft); }
.badge-neutral { color: #64758a; background: #edf3f8; }

.empty-cell {
    padding: 35px;
    color: var(--muted);
    text-align: center;
}

.fee-ring {
    display: grid;
    width: 170px;
    height: 170px;
    margin: 25px auto 20px;
    padding: 18px;
    place-items: center;
    background: conic-gradient(var(--primary) var(--progress), #e4edf5 0);
    border-radius: 50%;
}

.fee-ring > div {
    display: grid;
    width: 100%;
    height: 100%;
    padding: 10px;
    place-content: center;
    text-align: center;
    background: #fff;
    border-radius: 50%;
}

.fee-ring strong {
    font-family: "Manrope", sans-serif;
    font-size: 17px;
}

.fee-ring span {
    color: var(--muted);
    font-size: 10px;
}

.fee-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 21px;
    color: var(--muted);
    border-top: 1px solid #eaf1f7;
    font-size: 11px;
}

.fee-summary-row strong {
    color: var(--ink);
}

.dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 50%;
}

.dot-green { background: var(--primary); }
.dot-orange { background: var(--orange); }

.panel > .btn-block {
    width: auto;
    margin: 16px 21px 21px;
}

.followup-list {
    padding: 0 21px 9px;
}

.followup-item {
    display: grid;
    grid-template-columns: 44px minmax(150px, 1fr) minmax(115px, auto) 32px;
    gap: 13px;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid #e8f0f7;
}

.followup-item:last-child {
    border-bottom: 0;
}

.date-chip {
    padding: 5px;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 9px;
    text-align: center;
}

.date-chip.overdue {
    color: var(--danger);
    background: var(--danger-soft);
}

.date-chip strong,
.date-chip span {
    display: block;
    line-height: 1.1;
}

.date-chip strong {
    font-size: 16px;
}

.date-chip span {
    margin-top: 2px;
    font-size: 9px;
    text-transform: uppercase;
}

.followup-copy strong,
.followup-copy span,
.followup-contact strong,
.followup-contact span {
    display: block;
}

.followup-copy span,
.followup-contact span {
    color: var(--muted);
    font-size: 10px;
}

.followup-contact {
    text-align: right;
}

.icon-button {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    border: 0;
    border-radius: 9px;
    font-weight: 800;
}

.mini-chart {
    display: flex;
    height: 230px;
    align-items: flex-end;
    justify-content: space-around;
    gap: 8px;
    padding: 28px 21px 14px;
}

.bar-column {
    display: flex;
    height: 100%;
    flex: 1;
    flex-direction: column;
    justify-content: flex-end;
    text-align: center;
}

.bar {
    width: min(26px, 70%);
    min-height: 8px;
    margin: 0 auto;
    background: linear-gradient(180deg, #50baf4, var(--primary));
    border-radius: 8px 8px 3px 3px;
}

.bar-column span {
    margin-top: 8px;
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
}

.summary-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin-bottom: 20px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.summary-strip > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 17px 18px;
    background: #fff;
}

.summary-strip span {
    color: var(--muted);
    font-size: 11px;
}

.summary-strip strong {
    font-family: "Manrope", sans-serif;
    font-size: 19px;
}

.status-summary-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 10px;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.status-summary-grid > div {
    min-height: 46px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

.status-summary-grid span {
    min-width: 0;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.status-summary-grid strong {
    flex: 0 0 auto;
    font-size: 18px;
    line-height: 1;
}

.form-panel {
    border-top: 4px solid var(--primary);
}

.narrow-form {
    max-width: 820px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
    padding: 22px;
}

.form-span {
    grid-column: 1 / -1;
}

.form-group {
    display: block;
}

.form-group > span,
.report-toolbar label > span {
    display: block;
    margin-bottom: 6px;
    color: #41566e;
    font-size: 11px;
    font-weight: 700;
}

.form-group > small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 10px;
}

.readonly-detail {
    padding: 14px 16px;
    background: #f8fbfe;
    border: 1px solid #cbdbea;
    border-radius: 9px;
}

.readonly-detail strong {
    display: block;
    color: var(--ink);
    font-size: 14px;
}

.course-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    padding: 10px;
    background: #f8fbfe;
    border: 1px solid #cbdbea;
    border-radius: 9px;
}

.course-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 10px;
    color: #41566e;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}

.course-choice input {
    width: auto;
    margin: 0;
    accent-color: var(--primary);
}

.course-choice:has(input:checked) {
    color: var(--primary);
    background: #eef8ff;
    border-color: #8bc8ee;
}

.segmented-control {
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    background: #edf4fa;
    border: 1px solid var(--line);
    border-radius: 9px;
}

.segmented-control label {
    position: relative;
    display: block;
}

.segmented-control input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.segmented-control label > span {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    color: var(--muted);
    border-radius: 7px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.segmented-control input:checked + span {
    color: var(--primary);
    background: #fff;
    box-shadow: 0 2px 8px rgba(24, 67, 104, 0.09);
}

.payment-section[hidden] {
    display: none !important;
}

.payment-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
}

.installment-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.installment-toolbar strong {
    color: #27465f;
    font-size: 12px;
}

.installment-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.installment-total {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.installment-list {
    display: grid;
    gap: 12px;
}

.installment-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    background: #f8fbfe;
    border: 1px solid var(--line);
    border-radius: 9px;
}

.installment-row-title {
    display: flex;
    grid-column: 1 / -1;
    min-height: 22px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.installment-row-title strong {
    color: #27465f;
    font-size: 12px;
}

.installment-row .form-group:last-child {
    grid-column: 1 / -1;
}

.profile-upload {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px;
    background: #f3f8fd;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.profile-upload .profile-preview {
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px;
    max-width: 72px;
    max-height: 72px;
    flex: 0 0 72px;
    font-size: 24px;
}

.profile-upload .form-group {
    flex: 1;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #cbdbea;
    border-radius: 9px;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #4da9e5;
    box-shadow: 0 0 0 3px rgba(8, 121, 201, 0.12);
}

input[readonly] {
    color: #5b6f84;
    background: #f0f5fa;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    transition: 0.18s ease;
}

.btn-primary {
    color: #fff;
    background: var(--primary);
}

.btn-secondary {
    color: #304f6d;
    background: #fff;
    border-color: #c9d9e8;
}

.btn-secondary:hover {
    background: #f2f7fc;
    border-color: #adc5d9;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-icon,
.btn-icon svg {
    display: block;
    width: 14px;
    height: 14px;
}

.btn-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.form-actions {
    justify-content: flex-end;
    padding-top: 4px;
}

.filters input,
.filters select {
    width: auto;
    min-width: 145px;
}

.print-month-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.print-month-field > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.fee-print-dialog {
    width: min(1080px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 35, 55, 0.28);
}

.fee-print-dialog::backdrop {
    background: rgba(15, 35, 55, 0.62);
    backdrop-filter: blur(3px);
}

.fee-print-modal-header,
.fee-print-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: #fff;
}

.fee-print-modal-header {
    border-bottom: 1px solid var(--border);
}

.fee-print-modal-header h3,
.fee-print-modal-header p {
    margin: 0;
}

.fee-print-filters {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(150px, 1fr) auto;
    align-items: end;
    gap: 14px;
    padding: 16px 22px;
    background: #f6f9fc;
    border-bottom: 1px solid var(--border);
}

.fee-print-preview {
    max-height: calc(100vh - 285px);
    padding: 22px;
    overflow: auto;
    background: #e8eef4;
}

.fee-print-preview .print-report {
    display: block;
    width: min(210mm, 100%);
    min-height: 250mm;
    margin: 0 auto;
    padding: 12mm 10mm;
    background: #fff;
    box-shadow: 0 5px 24px rgba(15, 35, 55, 0.14);
}

.fee-print-preview .print-report-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid #25384b;
}

.fee-print-preview .print-report-header img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.fee-print-preview .print-report-header h2 {
    margin: 0 0 5px;
}

.fee-print-preview .print-report-header p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.fee-print-preview .print-report-table {
    width: 100%;
    border-collapse: collapse;
}

.fee-print-preview .print-report-table th,
.fee-print-preview .print-report-table td {
    padding: 9px 8px;
    border: 1px solid #c6d0da;
    font-size: 12px;
}

.fee-print-preview .print-report-table thead th,
.fee-print-preview .print-report-table tfoot th,
.fee-print-preview .print-report-table tfoot td {
    background: #eef3f7;
}

.fee-print-modal-actions {
    justify-content: flex-end;
    border-top: 1px solid var(--border);
}

.table-actions {
    justify-content: flex-start;
    white-space: nowrap;
}

td.table-actions {
    display: table-cell;
}

.table-actions form {
    display: inline;
}

.small-action {
    padding: 0;
    color: var(--primary);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.icon-action,
.invoice-action {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.action-icon,
.action-icon svg {
    display: block;
    width: 16px;
    height: 16px;
}

.action-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

td .small-action + .small-action,
td .small-action + form,
td form + .small-action {
    margin-left: 10px;
}

.danger-link,
.amount-negative {
    color: var(--danger) !important;
}

.success-link,
.amount-positive {
    color: var(--success) !important;
}

.tabs {
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    background: #edf4fa;
    border-radius: 9px;
}

.tabs a {
    padding: 7px 10px;
    color: var(--muted);
    border-radius: 7px;
    font-size: 10px;
    font-weight: 800;
}

.tabs a.active {
    color: var(--primary);
    background: #fff;
    box-shadow: 0 2px 8px rgba(24, 67, 104, 0.09);
}

.student-mode-tabs {
    flex: 0 0 auto;
    justify-content: flex-start;
    align-self: flex-start;
    order: -1;
    margin-right: auto;
    padding: 5px;
    gap: 5px;
    background: #e9f1f7;
    border: 1px solid #d8e5ee;
    border-radius: 12px;
}

.student-mode-tabs a {
    min-height: 42px;
    padding: 11px 18px;
    font-size: 13px;
    line-height: 1.2;
    border-radius: 9px;
    white-space: nowrap;
}

.student-mode-tabs a.active {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 6px 14px rgba(24, 67, 104, 0.16);
}

.followup-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 20px;
}

.followup-card {
    padding: 17px;
    background: #fbfdff;
    border: 1px solid var(--line);
    border-radius: 13px;
}

.followup-card.is-overdue {
    border-left: 4px solid var(--danger);
}

.followup-card-top,
.followup-card-footer,
.user-card-top,
.user-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.followup-card-top > span:last-child {
    color: var(--muted);
    font-size: 10px;
}

.followup-card h4 {
    margin: 16px 0 3px;
    font-size: 15px;
}

.followup-card p {
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 11px;
}

.followup-card .remarks {
    min-height: 40px;
    margin: 13px 0;
    padding: 9px;
    background: #f0f5fa;
    border-radius: 8px;
}

.phone-link {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.followup-card-footer {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.followup-card-footer small {
    color: var(--muted);
    font-size: 9px;
}

.empty-state {
    grid-column: 1 / -1;
    display: grid;
    min-height: 150px;
    place-content: center;
    color: var(--muted);
    text-align: center;
}

.empty-state strong,
.empty-state span {
    display: block;
}

.empty-state strong {
    margin-bottom: 4px;
    color: var(--ink);
}

.empty-state.compact {
    min-height: 100px;
}

.progress {
    width: 105px;
    height: 5px;
    overflow: hidden;
    margin-top: 6px;
    background: #e4edf5;
    border-radius: 5px;
}

.progress span {
    display: block;
    height: 100%;
    background: var(--primary);
    border-radius: inherit;
}

.report-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 20px;
}

.report-toolbar h3 {
    margin: 3px 0 0;
}

.report-toolbar .filters label {
    min-width: 145px;
}

.report-toolbar .filters label > span {
    margin-bottom: 2px;
    font-size: 9px;
}

.report-chart {
    display: flex;
    height: 340px;
    align-items: flex-end;
    gap: 18px;
    padding: 35px 28px 22px;
    background:
        repeating-linear-gradient(to top, transparent 0, transparent 67px, #eaf1f7 68px),
        #fff;
}

.report-bar-group {
    display: flex;
    height: 100%;
    min-width: 48px;
    flex: 1;
    flex-direction: column;
    justify-content: flex-end;
    text-align: center;
}

.report-bars {
    display: flex;
    height: calc(100% - 42px);
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
}

.report-bar {
    width: min(20px, 38%);
    min-height: 4px;
    border-radius: 5px 5px 2px 2px;
}

.report-bar.admission {
    background: #8ed1f7;
}

.report-bar.revenue {
    background: var(--primary);
}

.report-bar-group > strong {
    margin-top: 6px;
    font-size: 10px;
}

.report-bar-group > span {
    color: var(--muted);
    font-size: 9px;
}

.chart-legend {
    color: var(--muted);
    font-size: 9px;
}

.chart-legend i {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 4px;
    border-radius: 2px;
}

.legend-admission { background: #8ed1f7; }
.legend-revenue { background: var(--primary); }

.mode-list {
    padding: 18px 21px;
}

.mode-row {
    margin-bottom: 20px;
}

.mode-row > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 7px;
    font-size: 11px;
}

.mode-row .progress {
    width: 100%;
    height: 8px;
}

.user-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
    padding: 20px;
}

.user-card {
    padding: 19px;
    background: #fbfdff;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.user-card h3 {
    margin: 16px 0 4px;
    font-size: 16px;
}

.user-card > p {
    overflow: hidden;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
}

.role-label {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.user-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 18px 0;
}

.user-stats span {
    padding: 10px;
    color: var(--muted);
    background: #edf5fb;
    border-radius: 9px;
    font-size: 9px;
    text-align: center;
}

.user-stats strong {
    display: block;
    color: var(--ink);
    font-size: 16px;
}

.user-card-footer {
    padding-top: 13px;
    border-top: 1px solid var(--line);
}

.user-card-footer small {
    color: var(--muted);
    font-size: 9px;
}

.user-actions,
.user-actions form {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.auth-page {
    background: #edf5fb;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(420px, 1.1fr) minmax(420px, 0.9fr);
}

.auth-showcase {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: 46px clamp(42px, 7vw, 100px);
    color: #eaf6ff;
    background:
        radial-gradient(circle at 80% 20%, rgba(96, 196, 255, 0.24), transparent 27%),
        linear-gradient(145deg, #052c4c, #0879c9);
}

.auth-showcase .auth-brand small {
    color: rgba(232, 244, 255, 0.62);
}

.auth-logo-wrap {
    width: fit-content;
}

.auth-logo {
    display: block;
    width: clamp(150px, 15vw, 210px);
    height: auto;
    border-radius: 18px;
}

.showcase-copy {
    max-width: 650px;
}

.pill {
    display: inline-block;
    margin-bottom: 20px;
    padding: 7px 12px;
    color: #bde7ff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.showcase-copy h1 {
    margin-bottom: 18px;
    color: #fff;
    font-size: clamp(38px, 5vw, 65px);
    letter-spacing: -0.045em;
}

.showcase-copy p {
    max-width: 530px;
    color: rgba(232, 246, 255, 0.72);
    font-size: 16px;
}

.showcase-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 620px;
}

.showcase-stats div {
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.showcase-stats strong,
.showcase-stats span {
    display: block;
}

.showcase-stats strong {
    color: #fff;
    font-family: "Manrope", sans-serif;
    font-size: 21px;
}

.showcase-stats span {
    color: rgba(232, 246, 255, 0.58);
    font-size: 10px;
}

.auth-form-panel {
    display: grid;
    padding: 45px;
    place-items: center;
}

.auth-form {
    width: min(100%, 430px);
}

.auth-form h2 {
    margin: 4px 0 8px;
    font-size: 29px;
}

.form-intro {
    margin-bottom: 28px;
    color: var(--muted);
}

.auth-form .form-group {
    margin-bottom: 17px;
}

.auth-form input {
    padding: 13px 14px;
}

.password-wrap {
    position: relative;
    display: block;
}

.password-wrap input {
    padding-right: 60px;
}

.password-wrap button {
    position: absolute;
    top: 50%;
    right: 10px;
    padding: 5px;
    color: var(--primary);
    background: transparent;
    border: 0;
    cursor: pointer;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 800;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: -2px 0 16px;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
}

.auth-form .remember-option input {
    width: 17px;
    height: 17px;
    margin: 0;
    padding: 0;
    accent-color: var(--primary);
}

.auth-form .btn {
    min-height: 48px;
    margin-top: 6px;
}

.demo-credentials {
    display: grid;
    margin-top: 22px;
    padding: 14px;
    color: var(--muted);
    background: #e4f0f8;
    border-radius: 10px;
    font-size: 10px;
}

.demo-credentials strong {
    margin-bottom: 3px;
    color: var(--ink);
}

.setup-link {
    display: block;
    margin-top: 18px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.mobile-auth-brand {
    display: none;
}

.setup-page {
    display: grid;
    min-height: 100vh;
    padding: 25px;
    place-items: center;
    background: #e9f3fa;
}

.setup-card {
    width: min(100%, 590px);
    padding: 34px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.setup-card .auth-brand {
    justify-content: center;
    margin-bottom: 30px;
}

.setup-logo {
    width: 180px;
}

.setup-card .auth-brand small {
    color: var(--muted);
}

.setup-card h1 {
    font-size: 27px;
}

.connection-list {
    margin: 25px 0;
    border: 1px solid var(--line);
    border-radius: 11px;
}

.connection-list div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
}

.connection-list div:last-child {
    border-bottom: 0;
}

.connection-list dt {
    color: var(--muted);
}

.connection-list dd {
    margin: 0;
    font-weight: 700;
}

.setup-note {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.sidebar-backdrop {
    display: none;
}

.print-only {
    display: none;
}

.print-report {
    display: none;
}

.print-heading {
    padding: 20px 15px 10px;
    border-bottom: 1px solid var(--line);
}

.print-heading h2 {
    margin-bottom: 4px;
}

.print-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 1180px) {
    .report-toolbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .report-toolbar .filters {
        flex: 1 1 100%;
        flex-wrap: wrap;
    }

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

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

    .summary-strip {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

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

    .staff-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .staff-dashboard-grid > .dashboard-panel {
        height: auto;
    }
}

@media (max-width: 950px) {
    .sidebar {
        transform: translateX(-100%);
    }

    body.menu-open .sidebar {
        transform: translateX(0);
    }

    body.menu-open .sidebar-backdrop {
        position: fixed;
        z-index: 25;
        inset: 0;
        display: block;
        background: rgba(4, 27, 47, 0.5);
        border: 0;
        cursor: pointer;
    }

    body.menu-open {
        overflow: hidden;
    }

    .main-content {
        width: 100%;
        margin-left: 0;
    }

    .mobile-menu {
        display: block;
    }

    .topbar {
        justify-content: flex-start;
    }

    .topbar-actions {
        margin-left: auto;
    }

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

    .dashboard-grid,
    .report-grid {
        grid-template-columns: 1fr;
    }

    .report-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .report-toolbar .filters {
        width: 100%;
        flex-wrap: wrap;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-showcase {
        display: none;
    }

    .mobile-auth-brand {
        display: flex;
        align-items: center;
        margin-bottom: 45px;
    }

    .mobile-auth-brand .auth-logo {
        width: 145px;
    }
}

@media (max-width: 720px) {
    .sidebar {
        width: min(300px, calc(100vw - 44px));
    }
    .topbar {
        min-height: 76px;
        padding: 12px 16px;
    }

    .topbar h1 {
        font-size: 19px;
    }

    .topbar .eyebrow,
    .quick-add {
        display: none;
    }

    .page-content {
        padding: 16px;
    }

    .small-action.icon-action,
    .invoice-action {
        width: 40px;
        height: 40px;
        margin: -8px 0;
    }

    .welcome-banner {
        min-height: 190px;
        padding: 25px;
    }

    .welcome-banner h2 {
        font-size: 24px;
    }

    .banner-orb {
        display: none;
    }

    .metric-grid,
    .compact-metrics.three,
    .form-grid,
    .followup-board,
    .user-grid {
        grid-template-columns: 1fr;
    }

    .metric-card {
        grid-template-columns: 43px 1fr;
        padding: 16px;
    }

    .metric-icon {
        width: 43px;
        height: 43px;
    }

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

    .summary-strip > div:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .status-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .status-summary-grid > div {
        min-height: 48px;
        padding: 10px 12px;
    }

    .status-summary-grid > div:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .dashboard-enquiries-table,
    .dashboard-enquiries-table tbody {
        display: block;
        width: 100%;
        white-space: normal;
    }

    .dashboard-enquiries-table thead {
        display: none;
    }

    .dashboard-enquiries-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 9px 10px;
        border-bottom: 1px solid var(--line);
    }

    .dashboard-enquiries-table tbody tr:last-child {
        border-bottom: 0;
    }

    .dashboard-enquiries-table td {
        display: block;
        min-width: 0;
        padding: 8px;
        border: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .dashboard-enquiries-table td::before {
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        content: attr(data-label);
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .dashboard-enquiries-table td:nth-child(1),
    .dashboard-enquiries-table td:nth-child(2),
    .dashboard-enquiries-table td:nth-child(5),
    .dashboard-enquiries-table .empty-cell {
        grid-column: 1 / -1;
    }

    .dashboard-enquiries-table .empty-cell {
        text-align: center;
    }

    .dashboard-enquiries-table .empty-cell::before {
        display: none;
    }

    .enquiries-table,
    .enquiries-table tbody {
        display: block;
        width: 100%;
    }

    .enquiries-table thead {
        display: none;
    }

    .enquiries-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 9px 10px;
        border-bottom: 1px solid var(--line);
    }

    .enquiries-table tbody tr:last-child {
        border-bottom: 0;
    }

    .enquiries-table td,
    .enquiries-table td.table-actions {
        display: block;
        min-width: 0;
        padding: 8px;
        border: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .enquiries-table td::before {
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        content: attr(data-label);
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .enquiries-table td:nth-child(2),
    .enquiries-table td:nth-child(5),
    .enquiries-table td.table-actions,
    .enquiries-table .empty-cell {
        grid-column: 1 / -1;
    }

    .enquiries-table td.table-actions .small-action,
    .enquiries-table td.table-actions form {
        display: inline-flex;
        vertical-align: middle;
    }

    .enquiries-table .empty-cell {
        text-align: center;
    }

    .enquiries-table .empty-cell::before {
        display: none;
    }

    .form-span {
        grid-column: auto;
    }

    .payment-fields-grid,
    .installment-row {
        grid-template-columns: 1fr;
    }

    .installment-row-title,
    .installment-row .form-group:last-child {
        grid-column: auto;
    }

    .installment-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .installment-toolbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .segmented-control {
        width: 100%;
    }

    .segmented-control label {
        flex: 1;
    }

    .segmented-control label > span {
        padding-right: 8px;
        padding-left: 8px;
        text-align: center;
    }

    .panel-header-wrap,
    .report-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-controls,
    .filters {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .filters input,
    .filters select,
    .print-month-field,
    .report-toolbar .filters label {
        width: 100%;
    }

    .print-month-field {
        align-items: stretch;
        flex-direction: column;
    }

    .header-controls .tabs {
        width: 100%;
        overflow-x: auto;
    }

    .header-controls .student-mode-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow-x: visible;
    }

    .student-mode-tabs a {
        justify-content: center;
        min-height: 44px;
        padding-right: 10px;
        padding-left: 10px;
        text-align: center;
    }

    .followup-item {
        grid-template-columns: 40px 1fr 30px;
    }

    .followup-contact {
        display: none;
    }

    .report-chart {
        gap: 7px;
        padding: 25px 12px 18px;
    }

    .report-bar-group {
        min-width: 33px;
    }

    .auth-form-panel {
        padding: 30px 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 15mm 11mm 18mm;

        @bottom-center {
            content: "Page " counter(page) " of " counter(pages);
            color: #536273;
            font: 9pt Arial, sans-serif;
        }
    }

    .sidebar,
    .topbar,
    .sidebar-backdrop,
    .page-content > *:not(.print-report):not(.fee-print-dialog) {
        display: none !important;
    }

    .print-report {
        display: block !important;
    }

    .fee-print-dialog {
        position: static !important;
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .fee-print-modal-header,
    .fee-print-filters,
    .fee-print-modal-actions {
        display: none !important;
    }

    .fee-print-preview {
        max-height: none !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }

    .fee-print-preview .print-report {
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    html,
    body,
    .app-shell,
    .main-content,
    .page-content,
    .print-report {
        display: block !important;
        width: 100%;
        min-width: 0;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0;
        overflow: visible !important;
        background: #fff;
        color: #182534;
    }

    .page-content {
        max-width: none;
        padding: 0;
    }

    .print-report-header {
        display: flex;
        align-items: center;
        gap: 14px;
        margin: 0 0 8mm;
        padding: 0 0 4mm;
        border-bottom: 1.5px solid #25384b;
    }

    .print-report-header img {
        width: 27mm;
        height: 27mm;
        object-fit: contain;
        object-position: left center;
    }

    .print-report-header h2 {
        margin: 0 0 2mm;
        color: #172536;
        font: 700 16pt Arial, sans-serif;
    }

    .print-report-header p {
        margin: 0;
        color: #536273;
        font: 9pt Arial, sans-serif;
    }

    .print-report-header p + p {
        margin-top: 1mm;
    }

    .print-report-table {
        width: 100%;
        border-collapse: collapse;
        table-layout: fixed;
        white-space: normal;
        font-family: Arial, sans-serif;
        break-inside: auto;
        page-break-inside: auto;
    }

    .print-report-table thead {
        display: table-header-group;
    }

    .print-report-table tfoot {
        display: table-row-group;
    }

    .print-report-table tbody {
        display: table-row-group;
    }

    .print-report-table tr {
        break-inside: avoid-page;
        page-break-inside: avoid;
        page-break-after: auto;
    }

    .print-report-table th,
    .print-report-table td {
        break-inside: avoid-page;
        page-break-inside: avoid;
        padding: 2.4mm 2mm;
        border: 0.25mm solid #aab5c0;
        color: #243447;
        font-size: 8.5pt;
        line-height: 1.3;
        overflow-wrap: anywhere;
        vertical-align: top;
    }

    .print-report-table tbody tr:last-child th,
    .print-report-table tbody tr:last-child td {
        border-bottom: 0.35mm solid #aab5c0 !important;
    }

    .print-report-table thead th {
        background: #eaf0f5 !important;
        color: #172536;
        font-size: 8pt;
        letter-spacing: 0;
        text-transform: none;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-report-table .numeric {
        text-align: right;
        white-space: nowrap;
    }

    .print-report-table tfoot th,
    .print-report-table tfoot td {
        background: #eef3f7 !important;
        color: #172536;
        font-weight: 700;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-fee-table th:nth-child(1) { width: 18%; }
    .print-fee-table th:nth-child(2) { width: 21%; }
    .print-fee-table th:nth-child(3) { width: 15%; }
    .print-fee-table th:nth-child(4) { width: 14%; }
    .print-fee-table th:nth-child(5) { width: 15%; }
    .print-fee-table th:nth-child(6) { width: 17%; }

    .print-admissions-table th:nth-child(1) { width: 12%; }
    .print-admissions-table th:nth-child(2) { width: 16%; }
    .print-admissions-table th:nth-child(3) { width: 13%; }
    .print-admissions-table th:nth-child(4) { width: 12%; }
    .print-admissions-table th:nth-child(5) { width: 15%; }
    .print-admissions-table th:nth-child(6) { width: 11%; }
    .print-admissions-table th:nth-child(7) { width: 11%; }
    .print-admissions-table th:nth-child(8) { width: 10%; }

    .print-pending-fees-table th:nth-child(1) { width: 13%; }
    .print-pending-fees-table th:nth-child(2) { width: 18%; }
    .print-pending-fees-table th:nth-child(3) { width: 18%; }
    .print-pending-fees-table th:nth-child(4) { width: 14%; }
    .print-pending-fees-table th:nth-child(5) { width: 13%; }
    .print-pending-fees-table th:nth-child(6) { width: 12%; }
    .print-pending-fees-table th:nth-child(7) { width: 12%; }

    .print-monthly-report-table th:nth-child(1) { width: 20%; }
    .print-monthly-report-table th:nth-child(2) { width: 14%; }
    .print-monthly-report-table th:nth-child(3) { width: 23%; }
    .print-monthly-report-table th:nth-child(4) { width: 23%; }
    .print-monthly-report-table th:nth-child(5) { width: 20%; }

    .print-report-table .empty-cell {
        padding: 8mm;
        text-align: center;
    }
}
