:root {
    --bg: #ffffff;
    --bg-strong: #f7f4fb;
    --panel: rgba(255, 255, 255, 0.96);
    --panel-strong: #ffffff;
    --ink: #111111;
    --muted: #5f5a68;
    --line: rgba(79, 41, 108, 0.12);
    --brand: #6f3295;
    --brand-deep: #4b1f67;
    --accent: #8d56b1;
    --present: #138a5f;
    --absent: #d62839;
    --late: #d98e04;
    --weekend: #8b9094;
    --unknown: #6b7280;
    --shadow: 0 18px 45px rgba(34, 41, 47, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

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

code,
pre {
    font-family: "Consolas", "Courier New", monospace;
}

.page-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 40px;
}

.page-content {
    display: grid;
    gap: 24px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 248, 239, 0.78);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong,
h1,
h2,
h3 {
    font-family: Georgia, "Times New Roman", serif;
}

.brand-copy small,
.muted-dot,
.student-card-footer,
.panel p,
.inline-note,
.summary-list dt,
.legend-pill,
.metric-chip span,
.kpi-card span,
.feature-list,
.topnav,
table {
    color: var(--muted);
}

.topnav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.nav-link.is-active,
.nav-link:hover {
    border-color: rgba(111, 50, 149, 0.16);
    background: rgba(111, 50, 149, 0.08);
    color: var(--brand-deep);
}

.hero-panel,
.panel,
.setup-panel,
.auth-panel,
.search-panel,
.empty-panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 24px;
    padding: 32px;
}

.hero-copy h1,
.profile-hero h1,
.setup-panel h1,
.auth-panel h1 {
    margin: 10px 0 12px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.05;
}

.hero-copy p,
.setup-panel p,
.auth-panel p {
    max-width: 60ch;
    font-size: 1.02rem;
    line-height: 1.6;
    color: var(--muted);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.12);
    color: #9b5a03;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-metrics,
.kpi-grid,
.student-grid,
.admin-grid,
.content-grid {
    display: grid;
    gap: 18px;
}

.hero-metrics {
    align-content: stretch;
}

.metric-chip,
.kpi-card,
.student-card,
.option-card {
    border: 1px solid rgba(111, 50, 149, 0.1);
    border-radius: 22px;
    background: var(--panel-strong);
}

.metric-chip {
    padding: 18px 20px;
}

.metric-chip strong,
.kpi-card strong,
.score-pill {
    display: block;
    margin-top: 6px;
    color: var(--brand-deep);
    font-size: 1.8rem;
    font-weight: 700;
}

.search-panel,
.panel,
.setup-panel,
.auth-panel,
.empty-panel {
    padding: 24px;
}

.search-form,
.stack-form {
    display: grid;
    gap: 14px;
}

.search-row,
.split-fields,
.profile-hero {
    display: grid;
    gap: 14px;
}

.search-row {
    grid-template-columns: 1fr auto;
}

input,
select,
button {
    font: inherit;
}

input,
select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(30, 41, 48, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
}

input:focus,
select:focus {
    outline: 2px solid rgba(111, 50, 149, 0.22);
    border-color: rgba(111, 50, 149, 0.4);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 18px;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
}

.button-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
    color: #fff;
    box-shadow: 0 12px 22px rgba(89, 32, 126, 0.22);
}

.results-section {
    display: grid;
    gap: 18px;
}

.section-heading,
.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.section-heading h2,
.panel-heading h2 {
    margin: 8px 0 0;
    font-size: 1.55rem;
}

.student-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.student-card {
    display: grid;
    gap: 16px;
    padding: 20px;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.student-card-button {
    width: 100%;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.student-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px rgba(111, 50, 149, 0.1);
    border-color: rgba(111, 50, 149, 0.24);
}

.student-card-top,
.student-card-footer,
.legend-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.student-card h3 {
    margin: 8px 0 0;
    font-size: 1.35rem;
}

.student-card-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.student-card-metrics div,
.summary-list div {
    padding: 14px;
    border-radius: 18px;
    background: rgba(111, 50, 149, 0.04);
}

.student-card-metrics strong {
    display: block;
    margin-top: 6px;
    color: var(--ink);
    font-size: 1.2rem;
}

.profile-hero,
.admin-grid,
.content-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
}

.profile-filter {
    align-self: end;
}

.ghost-link {
    color: var(--brand);
    font-weight: 700;
}

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

.kpi-card {
    padding: 18px 20px;
}

.kpi-card small {
    display: block;
    margin-top: 8px;
    color: var(--accent);
    font-weight: 700;
}

.inline-note,
.flash {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
}

.flash {
    margin-bottom: 22px;
}

.flash-success {
    background: rgba(19, 138, 95, 0.1);
    border-color: rgba(19, 138, 95, 0.18);
}

.flash-warning {
    background: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.18);
}

.flash-danger {
    background: rgba(214, 40, 57, 0.1);
    border-color: rgba(214, 40, 57, 0.18);
}

.flash-info,
.inline-note {
    background: rgba(111, 50, 149, 0.08);
    border-color: rgba(111, 50, 149, 0.16);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.calendar-head,
.calendar-cell {
    min-height: 96px;
    padding: 12px;
    border-radius: 16px;
}

.calendar-head {
    display: grid;
    place-items: center;
    min-height: auto;
    background: rgba(30, 41, 48, 0.05);
    font-weight: 700;
}

.calendar-cell {
    display: grid;
    align-content: space-between;
    gap: 8px;
    border: 1px solid rgba(30, 41, 48, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.calendar-cell strong {
    font-size: 1rem;
}

.calendar-cell span,
.calendar-cell small {
    color: var(--muted);
}

.calendar-cell-empty {
    border: 0;
    background: transparent;
}

.legend-pill,
.option-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.legend-pill {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(30, 41, 48, 0.05);
    color: var(--ink);
}

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

.summary-list div {
    display: grid;
    gap: 6px;
}

.summary-list dt {
    font-size: 0.9rem;
}

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

.notes-box {
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
}

.notes-box h3 {
    margin-top: 0;
}

.notes-box pre {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.55;
}

.notes-modal[hidden] {
    display: none;
}

.notes-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 20px;
}

.notes-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(21, 28, 35, 0.55);
    backdrop-filter: blur(6px);
}

.notes-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: min(82vh, 720px);
    display: grid;
    gap: 16px;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid rgba(30, 41, 48, 0.12);
    background: #fffaf2;
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.18);
}

.notes-modal-dialog h2 {
    margin: 0;
    font-size: 1.7rem;
}

.notes-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(30, 41, 48, 0.08);
    color: var(--ink);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.notes-modal-body {
    overflow-y: auto;
    max-height: min(48vh, 420px);
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(111, 50, 149, 0.05);
    white-space: pre-wrap;
    line-height: 1.65;
    color: var(--ink);
}

.notes-modal-footer {
    display: flex;
    justify-content: flex-end;
}

body.modal-open {
    overflow: hidden;
}

.report-notes-button {
    width: 100%;
    margin-top: 18px;
}

.student-report-page {
    background: #ffffff;
    color: #171323;
}

.student-report-page .page-shell {
    width: min(1280px, calc(100% - 32px));
}

.student-report-page .topbar {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 30px rgba(61, 33, 91, 0.12);
}

.student-report-page .brand-mark,
.student-report-page .button-primary {
    background: #744086;
}

.student-report-page .nav-link.is-active,
.student-report-page .nav-link:hover {
    border-color: rgba(116, 64, 134, 0.22);
    background: rgba(116, 64, 134, 0.08);
    color: #5b2d6d;
}

.report-title-block {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 4px 0 12px;
    text-align: center;
}

.report-title-block > span {
    color: #6c287f;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.report-title-block h1 {
    margin: 0;
    color: #171323;
    font-size: clamp(2rem, 4vw, 3.05rem);
    line-height: 1.05;
}

.student-report-page .ghost-link {
    justify-self: start;
    color: #744086;
}

.report-period-filter {
    width: min(360px, 100%);
    margin-top: 8px;
}

.report-period-filter label {
    display: block;
    margin-bottom: 6px;
    color: #756d7d;
    font-size: 0.8rem;
    font-weight: 700;
}

.report-period-filter select {
    border-color: rgba(116, 64, 134, 0.22);
    background: rgba(255, 255, 255, 0.86);
}

.report-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.report-kpi {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    min-height: 138px;
    padding: 24px 24px 20px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 18px rgba(61, 33, 91, 0.08);
}

.report-kpi-present {
    border-color: rgba(0, 168, 116, 0.32);
}

.report-kpi-absent {
    border-color: rgba(223, 62, 62, 0.28);
}

.report-kpi-late {
    border-color: rgba(226, 160, 32, 0.36);
}

.report-kpi-overall {
    border-color: rgba(116, 64, 134, 0.3);
}

.report-kpi .report-kpi-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 900;
}

.report-kpi-present .report-kpi-icon {
    background: rgba(0, 168, 116, 0.1);
    color: #00a874;
}

.report-kpi-absent .report-kpi-icon {
    background: rgba(223, 62, 62, 0.1);
    color: #df3e3e;
}

.report-kpi-late .report-kpi-icon {
    background: rgba(226, 160, 32, 0.12);
    color: #e29a00;
}

.report-kpi-overall .report-kpi-icon {
    background: rgba(116, 64, 134, 0.12);
    color: #744086;
}

.report-kpi span:not(.report-kpi-icon) {
    color: #5f6170;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.report-kpi strong {
    margin-top: 20px;
    color: #050917;
    font-size: 2rem;
    line-height: 1;
}

.report-kpi small {
    margin-top: 10px;
    color: #9a91a2;
    font-size: 0.76rem;
}

.report-dashboard-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    align-items: start;
    gap: 26px;
}

.report-calendar-panel,
.report-profile-card {
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 24px rgba(35, 26, 20, 0.13);
}

.report-calendar-panel {
    padding: clamp(20px, 3vw, 28px);
}

.report-panel-heading {
    margin-bottom: 22px;
}

.report-panel-heading > div {
    display: grid;
    grid-template-columns: 38px 1fr;
    column-gap: 14px;
    align-items: center;
}

.report-panel-icon {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #744086;
    color: #fff;
    font-size: 0.92rem;
}

.report-panel-heading h2 {
    margin: 0;
    color: #111827;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    font-size: 1.08rem;
}

.report-panel-heading p {
    grid-column: 2;
    margin: 2px 0 0;
    color: #8b8291;
    font-size: 0.78rem;
}

.report-panel-heading > strong {
    color: #744086;
    font-size: 1.35rem;
    text-align: right;
}

.report-panel-heading > strong span {
    display: block;
    margin-top: 3px;
    color: #8b8291;
    font-size: 0.76rem;
    font-weight: 500;
}

.student-report-page .calendar-grid {
    gap: 5px;
}

.student-report-page .calendar-head {
    min-height: 34px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #9a94a3;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.student-report-page .calendar-cell {
    position: relative;
    min-height: 92px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    color: #12201b;
    text-align: center;
}

.student-report-page .calendar-cell strong {
    font-size: 0.92rem;
    line-height: 1;
}

.student-report-page .calendar-cell span {
    width: 6px;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    color: transparent;
}

.student-report-page .calendar-cell small {
    max-width: 100%;
    overflow: hidden;
    color: rgba(17, 24, 39, 0.6);
    font-size: 0.66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-report-page .calendar-cell-empty {
    background: transparent;
}

.student-report-page .status-present {
    background: #c8f7de;
    color: #008d66;
}

.student-report-page .status-present span,
.student-report-page .report-legend .status-present::before {
    background: #00a874;
}

.student-report-page .status-absent {
    background: #fad8d8;
    color: #e33434;
}

.student-report-page .status-absent span,
.student-report-page .report-legend .status-absent::before {
    background: #e33434;
}

.student-report-page .status-late {
    background: #fff1bd;
    color: #e29400;
}

.student-report-page .status-late span,
.student-report-page .report-legend .status-late::before {
    background: #e29400;
}

.student-report-page .status-weekend {
    background: #efdff4;
    color: #bd7bd3;
}

.student-report-page .status-weekend span,
.student-report-page .report-legend .status-weekend::before {
    background: #c47dda;
}

.student-report-page .status-unknown {
    background: #edf1f7;
    color: #8e98aa;
}

.student-report-page .status-unknown span,
.student-report-page .report-legend .status-unknown::before {
    background: #9aa5b4;
}

.student-report-page .status-holiday {
    background: #dbeafe;
    color: #3b82f6;
}

.student-report-page .report-legend .status-holiday::before {
    background: #3b82f6;
}

.report-legend {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(20, 16, 28, 0.08);
}

.report-legend .legend-pill {
    gap: 7px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #706878;
    font-size: 0.75rem;
}

.report-legend .legend-pill::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 999px;
}

.report-progress-card {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding: 16px 14px;
    border-radius: 8px;
    background: #fbfafc;
}

.report-progress-card div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #5e5769;
    font-size: 0.86rem;
}

.report-progress-card strong {
    color: #744086;
}

.report-overview-panel {
    padding: clamp(20px, 3vw, 28px);
}

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

.report-overview-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 12px;
    background: #f8f5fb;
}

.report-overview-card span {
    color: #5f6170;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.report-overview-card strong {
    color: #111827;
    font-size: 1.7rem;
    line-height: 1;
}

.report-overview-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.report-progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e6e1ea;
}

.report-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #744086;
}

.report-profile-card {
    display: grid;
    gap: 22px;
    padding: 30px;
    background: #744086;
    color: #fff;
}

.report-profile-heading {
    display: flex;
    align-items: center;
    gap: 14px;
}

.report-profile-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    font-weight: 900;
}

.report-profile-heading h2,
.report-profile-name h3 {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.report-profile-heading p,
.report-profile-name span,
.report-profile-name small {
    margin: 3px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
}

.report-avatar-wrap {
    position: relative;
    justify-self: center;
}

.report-avatar {
    display: grid;
    place-items: center;
    width: 94px;
    height: 94px;
    border-radius: 999px;
    border: 5px solid rgba(255, 255, 255, 0.28);
    background: linear-gradient(135deg, #f2d7ff, #9c69b3);
    color: #fff;
    font-size: 2rem;
    font-weight: 900;
    box-shadow: 0 14px 24px rgba(34, 10, 45, 0.24);
}

.report-avatar-check {
    position: absolute;
    right: -2px;
    bottom: 8px;
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 999px;
    background: #00b77b;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 900;
}

.report-profile-name {
    display: grid;
    justify-items: center;
    gap: 2px;
    text-align: center;
}

.report-ring {
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    justify-self: center;
    align-content: center;
    border-radius: 999px;
    background:
        radial-gradient(circle at center, #744086 0 55%, transparent 56%),
        conic-gradient(#fff calc(var(--score) * 1%), rgba(255, 255, 255, 0.2) 0);
}

.report-ring strong {
    color: #fff;
    font-size: 1.45rem;
    line-height: 1;
}

.report-ring span {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.72rem;
}

.report-profile-card .summary-list div {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.report-profile-card .summary-list dt {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.82rem;
}

.report-profile-card .summary-list dd {
    color: #fff;
    font-size: 0.86rem;
    text-align: right;
}

.report-status-pill {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #00a874;
    color: #fff;
    font-size: 0.72rem;
}

.report-profile-card .notes-box {
    background: rgba(255, 255, 255, 0.1);
}

.report-profile-card .notes-box pre,
.report-profile-card .notes-box h3 {
    color: #fff;
}

.public-landing {
    background: #ffffff;
    color: #21182f;
}

.public-landing .page-shell {
    width: min(1280px, calc(100% - 40px));
    padding: 20px 0 30px;
}

.public-landing .topbar {
    position: sticky;
    top: 16px;
    z-index: 10;
    margin-bottom: 10px;
    padding: 18px 24px;
    border: 1px solid rgba(101, 55, 122, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 36px rgba(62, 34, 94, 0.08);
    backdrop-filter: blur(18px);
    color: #2b2036;
}

.public-landing .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #7b45a0 0%, #53256f 100%);
    box-shadow: 0 12px 26px rgba(70, 26, 113, 0.18);
    font-size: 1rem;
}

.public-landing .brand-copy strong {
    font-family: "Outfit", "Manrope", sans-serif;
    font-size: 1rem;
    color: #5a2b72;
    text-shadow: none;
}

.public-landing .brand-copy small {
    display: block;
    color: #83778e;
}

.public-landing .topnav {
    align-items: center;
    color: #6b6277;
    font-size: 0.84rem;
    font-weight: 700;
    gap: 8px;
}

.public-landing .nav-link {
    padding: 9px 12px;
    border-radius: 999px;
}

.public-landing .nav-link.is-active,
.public-landing .nav-link:hover {
    border-color: rgba(101, 55, 122, 0.16);
    background: rgba(101, 55, 122, 0.08);
    color: #522867;
}

.public-landing .page-content {
    gap: 32px;
}

.portal-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(101, 55, 122, 0.08);
    color: #5f2f75;
    font-weight: 800;
}

.landing-callout-panel {
    width: min(620px, 100%);
    display: grid;
    gap: 10px;
    padding: 22px 24px;
    border: 1px solid rgba(111, 50, 149, 0.12);
    border-radius: 20px;
    background: #f8f5fb;
}

.landing-callout-panel strong {
    font-family: "Outfit", "Manrope", sans-serif;
    font-size: 1.05rem;
    color: #1f1728;
}

.landing-callout-panel p {
    margin: 0;
    color: #5f5a68;
    line-height: 1.7;
}

.landing-hero-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 36px;
    align-items: stretch;
    padding: 18px 0 6px;
}

.landing-hero-copy {
    display: grid;
    align-content: center;
    gap: 18px;
    padding: 22px 0;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(101, 55, 122, 0.08);
    border: 1px solid rgba(101, 55, 122, 0.16);
    color: #5a2b72;
    font-size: 0.84rem;
    font-weight: 700;
}

.landing-hero-copy h1 {
    max-width: 10ch;
    margin: 0;
    color: #1f1728;
    font-family: "Outfit", "Manrope", sans-serif;
    font-size: clamp(3.5rem, 6vw, 5.1rem);
    line-height: 0.94;
    letter-spacing: -0.05em;
}

.landing-hero-copy p {
    max-width: 60ch;
    margin: 0;
    color: #6b6277;
    font-size: 1.02rem;
    line-height: 1.7;
}

.landing-search-panel {
    width: min(620px, 100%);
    display: grid;
    gap: 12px;
    padding: 20px;
    border: 1px solid rgba(101, 55, 122, 0.12);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 35px rgba(61, 33, 91, 0.08);
}

.landing-search-row {
    display: grid;
    grid-template-columns: 1fr 156px;
    gap: 12px;
}

.landing-search-panel label {
    color: #6b6277;
    font-size: 0.9rem;
    font-weight: 700;
}

.landing-search-row input {
    min-height: 58px;
    border: 1px solid rgba(101, 55, 122, 0.14);
    border-radius: 12px;
    background: rgba(101, 55, 122, 0.05);
    color: #2b2036;
    box-shadow: none;
}

.landing-search-row input::placeholder {
    color: #8b8198;
}

.landing-search-row input:focus {
    border-color: rgba(101, 55, 122, 0.32);
    outline: 3px solid rgba(101, 55, 122, 0.1);
}

.landing-search-row .button-primary {
    min-height: 58px;
    border-radius: 12px;
    background: #64337e;
    box-shadow: 0 18px 36px rgba(64, 26, 91, 0.28);
    font-weight: 800;
}

.landing-search-help {
    margin: 0;
    color: #7c7288;
    font-size: 0.92rem;
}

.landing-hero-visual {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 16px;
    align-content: start;
    padding: 24px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(172, 123, 214, 0.55), transparent 32%),
        linear-gradient(165deg, #5e3678 0%, #4b295f 42%, #2f173d 100%);
    color: #f7f2fb;
    min-height: 520px;
}

.landing-hero-glow {
    position: absolute;
    inset: auto -40px -60px auto;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 70%);
    filter: blur(12px);
}

.landing-preview-card {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

.landing-preview-primary {
    margin-top: 54px;
}

.landing-preview-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1.3rem;
}

.landing-preview-card strong,
.landing-stat-row strong {
    font-family: "Outfit", "Manrope", sans-serif;
    font-size: 1.08rem;
}

.landing-preview-card p {
    margin: 0;
    color: rgba(247, 242, 251, 0.78);
    line-height: 1.55;
}

.landing-stat-row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: auto;
}

.landing-stat-row div {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.landing-stat-row span {
    color: rgba(247, 242, 251, 0.74);
    font-size: 0.88rem;
}

.landing-database-alert {
    width: min(620px, 100%);
    display: grid;
    gap: 12px;
    padding: 22px;
    border: 1px solid rgba(101, 55, 122, 0.18);
    border-radius: 18px;
    background: rgba(101, 55, 122, 0.06);
    color: #4f2a61;
}

.landing-results {
    padding: 0 0 24px;
}

.student-grid-simple {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.student-grid-simple .student-card {
    min-height: 96px;
    align-items: center;
    padding: 22px 20px;
}

.student-grid-simple .student-card h3 {
    margin: 0;
    color: #111111;
    font-family: "Outfit", "Trebuchet MS", sans-serif;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.35;
}

.public-landing .eyebrow {
    background: rgba(129, 67, 158, 0.1);
    color: #7a3f9f;
}

.public-landing .section-heading h2 {
    font-family: "Outfit", "Manrope", sans-serif;
    color: #25182f;
    font-size: 2rem;
}

.landing-empty-strip {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 28px 30px;
    border-radius: 24px;
    background: #f8f5fb;
}

.landing-empty-strip-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: #f3e8f7;
    color: #7a3f9f;
}

.landing-empty-strip h2 {
    margin: 0 0 6px;
    font-family: "Outfit", "Manrope", sans-serif;
    font-size: 1.55rem;
}

.landing-empty-strip p {
    margin: 0;
    color: #6c6572;
    line-height: 1.7;
}

.public-landing .student-card {
    border-color: rgba(126, 60, 168, 0.14);
    background: #fff;
    box-shadow: 0 18px 45px rgba(48, 32, 68, 0.08);
}

.public-landing .student-card:hover {
    border-color: rgba(126, 60, 168, 0.32);
    box-shadow: 0 24px 50px rgba(79, 42, 124, 0.14);
}

.public-landing .metric-chip strong,
.public-landing .table-link,
.public-landing .ghost-link {
    color: #6f3295;
}

.landing-footer {
    margin-top: 10px;
    padding: 34px 0 8px;
    border-top: 1px solid rgba(35, 24, 47, 0.08);
    color: #5f5968;
}

.landing-footer-main,
.landing-footer-bottom {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.landing-footer-main {
    padding-bottom: 24px;
}

.landing-footer-brand {
    max-width: 420px;
    display: grid;
    gap: 16px;
}

.landing-footer-brandline {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.landing-footer-brand strong {
    display: block;
    margin-bottom: 10px;
    font-family: "Outfit", "Manrope", sans-serif;
    font-size: 1.15rem;
    color: #25182f;
}

.landing-footer-brand p,
.landing-footer-bottom p {
    max-width: 400px;
    margin: 0;
    line-height: 1.7;
}

.landing-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #6f3295;
    font-weight: 700;
}

.landing-footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.landing-footer-links div {
    display: grid;
    gap: 12px;
    align-content: start;
}

.landing-footer-links strong {
    font-family: "Outfit", "Manrope", sans-serif;
    color: #25182f;
}

.landing-footer-links a {
    color: #746d7d;
}

.landing-footer-links a:hover {
    color: #6f3295;
}

.landing-footer-bottom {
    align-items: center;
    padding-top: 18px;
    border-top: 1px solid rgba(101, 55, 122, 0.1);
}

.landing-socials {
    display: inline-flex;
    gap: 10px;
}

.landing-socials a {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(101, 55, 122, 0.08);
    color: #6f3295;
}

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

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

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(30, 41, 48, 0.08);
    text-align: left;
}

th {
    color: var(--ink);
}

.table-link {
    color: var(--brand);
    font-weight: 700;
}

.feature-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding-left: 18px;
}

.auth-panel,
.setup-panel {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.source-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.option-card {
    display: grid;
    align-items: start;
    gap: 6px;
    padding: 16px;
}

.option-card input {
    width: auto;
    margin: 0;
}

.status-present {
    background: rgba(19, 138, 95, 0.12);
}

.status-absent {
    background: rgba(214, 40, 57, 0.12);
}

.status-late {
    background: rgba(217, 142, 4, 0.14);
}

.status-weekend {
    background: rgba(139, 144, 148, 0.14);
}

.status-unknown {
    background: rgba(107, 114, 128, 0.12);
}

@media (max-width: 960px) {
    .hero-panel,
    .profile-hero,
    .admin-grid,
    .content-grid,
    .auth-panel,
    .setup-panel {
        grid-template-columns: 1fr;
    }

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

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

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

    .landing-footer {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .page-shell {
        width: min(100% - 18px, 1200px);
    }

    .topbar,
    .section-heading,
    .panel-heading,
    .student-card-top,
    .student-card-footer,
    .legend-row,
    .profile-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-row,
    .split-fields,
    .source-options,
    .kpi-grid,
    .student-card-metrics {
        grid-template-columns: 1fr;
    }

    .calendar-grid {
        gap: 8px;
    }

    .calendar-head,
    .calendar-cell {
        min-height: 82px;
        padding: 10px;
    }

    .student-report-page .page-shell {
        width: min(100% - 18px, 1280px);
    }

    .student-report-page .topbar {
        border-radius: 14px;
    }

    .report-title-block {
        justify-items: start;
        text-align: left;
    }

    .report-kpi-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .report-kpi {
        min-height: auto;
    }

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

    .report-panel-heading > strong {
        text-align: left;
    }

    .student-report-page .calendar-grid {
        gap: 3px;
    }

    .student-report-page .calendar-head {
        min-height: 28px;
        font-size: 0.62rem;
    }

    .student-report-page .calendar-cell {
        min-height: clamp(48px, 13vw, 68px);
        padding: 6px;
    }

    .student-report-page .calendar-cell small {
        display: none;
    }

    .report-progress-card div {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .report-profile-card {
        padding: 24px;
    }

    .public-landing .topbar {
        top: 14px;
        width: min(100% - 24px, 1160px);
        align-items: center;
        flex-direction: row;
    }

    .public-landing .brand {
        gap: 9px;
    }

    .public-landing .brand-copy strong {
        font-size: 0.9rem;
    }

    .public-landing .topnav {
        justify-content: flex-end;
        gap: 4px;
    }

    .public-landing .nav-link {
        padding: 8px 9px;
        font-size: 0.76rem;
    }

    .landing-hero {
        min-height: 570px;
        padding: 96px 16px 82px;
    }

    .landing-hero h1 {
        font-size: clamp(2.75rem, 13vw, 4.2rem);
    }

    .landing-hero p {
        font-size: 0.95rem;
    }

    .landing-search-row {
        grid-template-columns: 1fr;
    }

    .landing-results,
    .landing-footer {
        width: min(100% - 24px, 1120px);
    }

    .landing-footer-links {
        grid-template-columns: 1fr;
    }
}
