:root {
    --cream: #f7f2ea;
    --warm-white: #fffaf3;
    --sage: #7f9b8f;
    --sage-dark: #4f6f63;
    --gold: #c7a66a;
    --text-dark: #2f2a25;
    --text-muted: #6f665d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    background: linear-gradient(135deg, var(--cream), #efe4d3);
    color: var(--text-dark);
    min-height: 100vh;
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.card {
    width: 100%;
    max-width: 960px;
    background: rgba(255, 250, 243, 0.96);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(47, 42, 37, 0.16);
    overflow: hidden;
    border: 1px solid rgba(199, 166, 106, 0.35);
}

.hero {
    padding: 56px 36px 42px;
    text-align: center;
    background:
        linear-gradient(rgba(79, 111, 99, 0.82), rgba(79, 111, 99, 0.82)),
        radial-gradient(circle at top left, rgba(199, 166, 106, 0.45), transparent 35%);
    color: white;
}

.eyebrow {
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 13px;
    margin-bottom: 14px;
    color: #f2dfb3;
}

h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1;
    font-weight: 500;
}

.tagline {
    margin-top: 18px;
    font-size: clamp(20px, 3vw, 30px);
    color: #fff5df;
    font-style: italic;
}

.content {
    padding: 42px 36px 48px;
    text-align: center;
}

.content h2 {
    margin: 0 0 16px;
    font-size: clamp(26px, 4vw, 40px);
    color: var(--sage-dark);
    font-weight: 500;
}

.content p {
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-muted);
}

.actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 28px;
}

@media (max-width: 900px) {
    .actions {
        grid-template-columns: 1fr;
    }
}

.action-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    border: 1px solid #e7ddd3;
    box-shadow: 0 10px 24px rgba(47, 42, 37, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(47, 42, 37, 0.12);
}

.action-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.action-card span {
    display: block;
    line-height: 1.6;
    color: #5f544c;
}

.button-row {
    margin-top: 38px;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

a.button {
    display: inline-block;
    text-decoration: none;
    padding: 14px 26px;
    border-radius: 999px;
    font-size: 16px;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

a.primary-button {
    background: var(--gold);
    color: white;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(199, 166, 106, 0.28);
}

a.primary-button:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

a.secondary-button {
    background: var(--sage-dark);
    color: white;
}

a.secondary-button:hover {
    background: var(--sage);
}

.footer {
    margin-top: 32px;
    font-size: 14px;
    color: var(--text-muted);
}

@media (max-width: 760px) {
    .hero {
        padding: 42px 24px 34px;
    }

    .content {
        padding: 34px 24px 40px;
    }

    .actions {
        grid-template-columns: 1fr;
    }
}

.form-card {
    max-width: 1040px;
}

.form-content {
    text-align: left;
}

.form-content h2,
.form-content>p,
.form-content .footer {
    text-align: center;
}

.application-form {
    margin-top: 34px;
}

.application-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--sage-dark);
    font-size: 15px;
    font-weight: 600;
}

.application-form input,
.application-form select,
.application-form textarea {
    width: 100%;
    border: 1px solid rgba(127, 155, 143, 0.42);
    border-radius: 14px;
    padding: 13px 14px;
    font: inherit;
    color: var(--text-dark);
    background: #fffdf8;
}

.application-form textarea {
    resize: vertical;
}

.form-grid {
    display: grid;
    gap: 18px;
}

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

.three-columns {
    grid-template-columns: 1.2fr 1fr 0.8fr;
}

button.button {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

@media (max-width: 760px) {

    .two-columns,
    .three-columns {
        grid-template-columns: 1fr;
    }

    .form-content {
        text-align: left;
    }
}

.oauth-card {
    margin: 34px 0;
    padding: 24px;
    border-radius: 20px;
    background: #fbf6ee;
    border: 1px solid rgba(199, 166, 106, 0.45);
    text-align: center;
}

.oauth-card h3 {
    margin: 0 0 10px;
    color: var(--sage-dark);
    font-size: 22px;
    font-weight: 500;
}

.oauth-card p {
    margin-bottom: 20px;
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.dashboard-link {
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(47, 42, 37, 0.12);
}

.dashboard-content {
    text-align: left;
}

.dashboard-content h2,
.dashboard-content>p {
    text-align: center;
}

.dashboard-widget-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 34px;
}

.dashboard-widget {
    background: #ffffff;
    border-radius: 18px;
    padding: 22px;
    border: 1px solid #e7ddd3;
    box-shadow: 0 10px 24px rgba(47, 42, 37, 0.06);
}

.dashboard-widget h3 {
    margin: 0 0 14px;
    color: var(--sage-dark);
    font-size: 20px;
    font-weight: 500;
}

.metric-large {
    font-size: 38px;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 8px;
}

.widget-date {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.widget-note {
    display: block;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 14px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #efe4d3;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 16px;
}

.progress-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 999px;
}

.mini-stats {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    color: var(--text-muted);
    font-size: 14px;
}

.widget-list,
.checklist {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
    line-height: 1.8;
}

.checklist li.complete {
    color: var(--sage-dark);
}

.wide-widget {
    grid-column: span 2;
}

.announcement p {
    margin: 8px 0 0;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .dashboard-widget-grid {
        grid-template-columns: 1fr;
    }

    .wide-widget {
        grid-column: span 1;
    }

    .mini-stats {
        flex-direction: column;
    }
}

.qr-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 24px;
}

.qr-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 24px;
}

.qr-panel h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.qr-result {
    margin-top: 32px;
    text-align: center;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.data-table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

@media (max-width: 900px) {
    .qr-layout {
        grid-template-columns: 1fr;
    }
}

/* Shared button styling */
.button,
a.button,
button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 14px 26px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
    min-height: 48px;
}

.primary-button,
a.primary-button,
button.primary-button {
    background: var(--gold);
    color: white;
    box-shadow: 0 10px 24px rgba(199, 166, 106, 0.28);
}

.primary-button:hover,
a.primary-button:hover,
button.primary-button:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

.secondary-button,
a.secondary-button,
button.secondary-button {
    background: var(--sage-dark);
    color: white;
}

.secondary-button:hover,
a.secondary-button:hover,
button.secondary-button:hover {
    background: var(--sage);
}

.button-row {
    margin-top: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Cohort schedule review */
.schedule-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 24px;
    border-radius: 999px;
    background: #d9e9df;
    color: #3f6958;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.publish-button,
button.publish-button {
    background: var(--sage-dark);
    color: white;
}

.publish-button:hover,
button.publish-button:hover {
    background: var(--sage);
    transform: translateY(-2px);
}

.schedule-status {
    text-align: center;
    color: var(--text-muted);
    font-size: 18px;
    margin-bottom: 18px;
}

.schedule-week {
    margin-top: 50px;
    padding-top: 28px;
    border-top: 1px solid #d8d0c7;
}

.week-title {
    font-size: clamp(38px, 5vw, 54px);
    color: var(--sage-dark);
    margin-bottom: 12px;
    text-align: left;
}

.week-hours {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #5d544d;
    text-align: left;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 20px;
}

.day-column {
    background: #f5f1ea;
    border: 1px solid #ddd3c7;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.day-header {
    background: var(--sage-dark);
    color: white;
    padding: 20px;
    text-align: center;
}

.day-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.day-date {
    margin-top: 8px;
    font-size: 16px;
    opacity: 0.95;
}

.day-sessions {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 420px;
}

.session-card {
    background: white;
    border: 1px solid #e4dbcf;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.session-time {
    color: #44695d;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.session-course {
    font-size: 18px;
    line-height: 1.35;
    color: #2d2925;
    margin-bottom: 12px;
}

.session-hours {
    text-align: right;
    font-size: 15px;
    font-weight: 700;
    color: #7a5b21;
}

@media (max-width: 1200px) {
    .days-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .days-grid {
        grid-template-columns: 1fr;
    }

    .schedule-actions {
        flex-direction: column;
    }

    .schedule-actions .button,
    .schedule-actions .status-badge {
        width: 100%;
    }
}

.student-toolbar {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    align-items: center;
}

.student-toolbar .form-input {
    min-width: 220px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #c8c0b4;
    background: #f7f3ec;
    color: #4e6a60;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.student-toolbar .form-input:focus {
    border-color: #6f8b7f;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
}

.data-table thead th {
    text-align: left;
    padding: 14px 10px;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    color: #6f675d;
    border-bottom: 1px solid #d9d1c5;
}

.data-table tbody td {
    padding: 18px 10px;
    border-bottom: 1px solid #ece4d8;
    vertical-align: top;
    color: #3f3a35;
}

.data-table tbody tr:hover {
    background: rgba(111, 139, 127, 0.06);
}

.pagination-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.page-info {
    color: var(--text-muted);
    font-weight: 700;
    min-width: 100px;
    text-align: center;
}

.page-size-select {
    min-width: 150px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #c8c0b4;
    background: #f7f3ec;
    color: #4e6a60;
    font-size: 0.95rem;
    font-family: inherit;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 28px;
}

.detail-section {
    background: #fffdf8;
    border: 1px solid #e4dbcf;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 22px rgba(47, 42, 37, 0.06);
}

.detail-section h2 {
    margin: 0 0 20px;
    color: var(--sage-dark);
    font-size: 24px;
    text-align: left;
}

.detail-row {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #eee5da;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 14px;
}

.detail-value {
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.4;
}

.student-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    padding: 0 24px;
    border-radius: 999px;
    background: #d9e9df;
    color: #3f6958;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-sizing: border-box;
    line-height: 1;
}

@media (max-width: 900px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

.clickable-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.clickable-row:hover {
    background: rgba(111, 139, 127, 0.12) !important;
}

.status-update-toolbar {
    display: flex;
    align-items: flex;
    gap: 14px;
    margin: 18px 0 32px;
    flex-wrap: wrap;
}

.status-update-toolbar select.form-input {
    min-width: 220px;
    padding: 13px 16px;
    border-radius: 999px;
    border: 1px solid #c8c0b4;
    background: #fffdf8;
    color: var(--sage-dark);
    font-size: 15px;
    font-family: inherit;
    font-weight: 700;
}

.status-update-toolbar .button {
    border-radius: 999px;
    padding: 13px 24px;
    min-width: 170px;
}

.student-status-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    box-sizing: border-box;
}

.status-update-toolbar>* {
    width: 220px;
}

.student-status-badge {
    width: 220px;
}

.status-update-toolbar .button {
    width: 220px;
}

.status-update-toolbar select.form-input {
    width: 220px;
}

.table-link {
    color: var(--sage-dark);
    font-weight: 700;
    text-decoration: none;
}

.table-link:hover {
    text-decoration: underline;
}

.notice-card {
    background: rgba(122, 143, 122, 0.12);
    border: 1px solid rgba(122, 143, 122, 0.25);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 22px;
    color: var(--sage-dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

.checkbox-group {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.checkbox-row {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 12px;
    align-items: start;
    color: var(--text-dark);
    line-height: 1.5;
}

.checkbox-row input {
    margin-top: 4px;
}

.signature-placeholder {
    margin-top: 24px;
    padding: 18px;
    border: 1px dashed #c8c0b4;
    border-radius: 14px;
    background: #fffdf8;
    color: var(--text-muted);
    font-style: italic;
}

.process-hero-image-container {
    margin-top: 24px;
    margin-bottom: 36px;
}

.process-hero-image {
    width: 100%;
    display: block;
    border-radius: 22px;
    border: 1px solid #d8d2c7;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.inline-initials-input {
    width: 110px;
    padding: 8px 10px;
    margin: 0 6px;
    border-radius: 10px;
    border: 1px solid #cfc7ba;
    background: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
}

.inline-initials-input:focus {
    outline: none;
    border-color: var(--sage-dark);
    box-shadow: 0 0 0 3px rgba(122, 143, 122, 0.15);
}

.button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button:disabled:hover {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.agreement-requirement-status {
    margin-bottom: 18px;
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(122, 143, 122, 0.08);
    border: 1px solid rgba(122, 143, 122, 0.18);
    display: grid;
    gap: 10px;
    line-height: 1.5;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.policy-document-content {
    margin-top: 18px;
    color: #5d544c;
    line-height: 1.8;
    text-align: left;
}

.policy-document-content p {
    margin: 0 0 18px 0;
    text-align: left;
}

.policy-document-content ul,
.policy-document-content ol {
    margin: 0 0 18px 0;
    padding-left: 0;
    list-style-position: inside;
    text-align: left;
}

.policy-document-content li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #5d544c;
    text-align: left;
}

.policy-document-content p {
    max-width: none;
    width: 100%;
}

.policy-document-content ul,
.policy-document-content ol {
    max-width: none;
    width: 100%;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(39, 45, 41, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 999;
}

.modal-overlay.hidden {
    display: none;
}

.modal-card {
    width: min(720px, 100%);
    background: #fffdf8;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.modal-description {
    max-width: none;
    margin-bottom: 24px;
}

.modal-card {
    position: relative;
}

.modal-close-button {
    position: absolute;
    top: 18px;
    right: 22px;
    border: none;
    background: transparent;
    color: var(--sage-dark);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.questionnaire-review-content {
  text-align: left;
}

.questionnaire-review-content h2 {
  text-align: center;
}

.questionnaire-review-content h3 {
  text-align: left;
  margin-top: 1.75rem;
}

.questionnaire-review-content p {
  text-align: left;
  max-width: 900px;
  margin-left: 0;
  margin-right: 0;
  line-height: 1.7;
}

.questionnaire-review-content .student-summary {
  max-width: 700px;
  margin: 0 auto 2rem auto;
  text-align: left;
}

.questionnaire-review-content .student-summary p {
  text-align: left;
}

/* ════════════════ NCMS-90: app-shell for functional pages ════════════════
   Functional admin / faculty / forms pages wrap content in `.card.form-card`.
   The base .page/.card/.hero/.content shell is the CENTERED MARKETING-CARD look
   — right for the public landing page, but it makes functional pages feel
   narrow and boxed. This block gives `.form-card` pages the full-width,
   left-aligned "app" treatment that matches the student dashboard, while leaving
   marketing pages (`.card` WITHOUT `.form-card`, e.g. landing.html) centered.
   Entirely scoped to `.form-card`. (:has() is supported in all current
   browsers; where it isn't, the page simply keeps the old centered look.) */

.page:has(.form-card) {
    display: block;
    align-items: stretch;
    justify-content: flex-start;
    padding: 1.5rem 1rem 3rem;
}

/* The marketing white card dissolves into the cream "app" canvas, so the hero
   and content float as their own rounded surfaces — exactly like /student.
   Printable invoices/receipts keep their white document card (they carry their
   own print layout), so they are excluded here. */
.card.form-card:not(.receipt-page):not(.invoice-page) {
    max-width: 1180px;
    margin: 0 auto;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: #2f2a25;
}

/* Tall centered marketing hero → the /student sage gradient hero-strip. */
.card.form-card .hero {
    text-align: left;
    padding: 1.4rem 1.6rem;
    background: linear-gradient(135deg, #4f6f63, #6a8a7d);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(47, 42, 37, 0.14);
    margin-bottom: 1rem;
}
.card.form-card .hero h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 1.95rem);
    line-height: 1.1;
    margin: 0;
    color: #fff;
}
.card.form-card .eyebrow {
    margin-bottom: 0.35rem;
    color: rgba(255, 255, 255, 0.8);
}
.card.form-card .tagline {
    margin-top: 0.3rem;
    font-style: normal;
    font-size: clamp(0.95rem, 1.4vw, 1.08rem);
    color: rgba(255, 255, 255, 0.88);
}

/* Content column → a clean white rounded panel like /student. */
.card.form-card .content {
    text-align: left;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(47, 42, 37, 0.06);
    border: 1px solid rgba(127, 155, 143, 0.18);
    padding: 1.5rem 1.7rem 1.8rem;
}
.card.form-card .content p {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* ════════════════ NCMS-90 (iteration 2): shared "app shell" components ═══════
   Iteration 1 widened the `.form-card` frame. This block ports the actual
   student-dashboard look (`/student`) into the SHARED stylesheet so every
   functional page can render the same way: a sage gradient hero-strip, a row of
   white stat cards, and clean white rounded `.panel` sections — all left-aligned
   in a 1180px frame. Class definitions are lifted verbatim from the inline CSS
   of renderStudentPortalHomeHtml() so the two stay visually identical; the
   student page keeps its own inline copy (zero-risk duplication, DRY later).
   Pages opt in by wrapping content in `<div class="app-shell">`. */

.page:has(.app-shell) {
    display: block;
    align-items: stretch;
    justify-content: flex-start;
    padding: 1.5rem 1rem 3rem;
}
.app-shell {
    max-width: 1180px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: #2f2a25;
}

/* Hero strip — the sage gradient page header (replaces the tall centered hero). */
.hero-strip { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem 1.6rem; background: linear-gradient(135deg, #4f6f63, #6a8a7d); color: white; border-radius: 18px; box-shadow: 0 8px 24px rgba(47,42,37,0.14); margin-bottom: 1rem; }
.hero-strip h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: 1.8rem; margin: 0; color: white; line-height: 1.1; }
.hero-eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; font-weight: 700; color: rgba(255,255,255,0.78); margin-bottom: 0.35rem; }
.hero-sub { color: rgba(255,255,255,0.88); font-size: 0.95rem; margin-top: 0.3rem; }
.hero-status { background: rgba(255,255,255,0.18); color: white; padding: 0.4rem 0.85rem; border-radius: 999px; font-size: 0.82rem; font-weight: 600; backdrop-filter: blur(4px); white-space: nowrap; }
@media (max-width: 760px) { .hero-strip { flex-wrap: wrap; } .hero-strip h1 { font-size: 1.4rem; } }

/* Stat cards — the row of white metric tiles. */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
@media (max-width: 760px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: white; border-radius: 14px; padding: 0.95rem 1.1rem; box-shadow: 0 2px 8px rgba(47,42,37,0.06); border: 1px solid rgba(127,155,143,0.18); display: block; color: inherit; text-decoration: none; }
a.stat-link { transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease; cursor: pointer; }
a.stat-link:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(47,42,37,0.1); border-color: rgba(127,155,143,0.4); }
.stat-label { font-size: 0.72rem; font-weight: 700; color: #6f665d; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-num { font-size: 2.1rem; font-weight: 700; color: #2f2a25; line-height: 1.05; margin-top: 0.3rem; font-variant-numeric: tabular-nums; }
.stat-of { font-size: 0.95rem; color: #8a8278; font-weight: 400; }
.stat-sub { font-size: 0.76rem; color: #6f665d; margin-top: 0.4rem; }

/* Panels — white rounded section cards, optionally in a responsive grid. */
.panel { background: white; border-radius: 16px; padding: 1.1rem 1.3rem; box-shadow: 0 2px 8px rgba(47,42,37,0.06); border: 1px solid rgba(127,155,143,0.18); margin-bottom: 1rem; }
.panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.panel-grid .panel { margin-bottom: 0; }
.panel-wide { grid-column: 1 / -1; }
@media (max-width: 950px) { .panel-grid { grid-template-columns: 1fr; } }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.panel > h2, .panel > h3, .panel-head h2 { margin: 0 0 0.4rem; font-family: Georgia, serif; font-weight: 500; font-size: 1.2rem; color: #4f6f63; }
.panel > p { margin-top: 0; margin-bottom: 1rem; color: #6f665d; }
.pill { background: rgba(127,155,143,0.16); color: #4f6f63; padding: 0.22rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.pill.good { background: rgba(60,128,80,0.16); color: #2f6b43; }
.pill.warn { background: rgba(199,166,106,0.28); color: #7a5a1e; }

/* ════════════════ NCMS-123: UI/UX review follow-up (NCMS-90 polish) ═════════
   From the ui-ux-reviewer pass. CSS-only, scoped to the NCMS-90 app-shell.
   (1) a11y: hero-strip small text failed WCAG AA on the gradient's light end —
   deepen the light stop + use full white so small text clears 4.5:1 (the large
   H1 already passed). (2) finance/dashboard pages: stop white-on-white nesting.
   (3) left-align headings that still centered inside the left-aligned panels.
   (4) focus-visible + contrast. (5) 1-col stat cards on narrow phones. */

/* (1) Accessible hero — deepen the gradient's light stop, full-white small text. */
.card.form-card .hero,
.hero-strip {
    background: linear-gradient(135deg, #4f6f63, #577a68);
}
.card.form-card .eyebrow,
.hero-eyebrow { color: #ffffff; }
.card.form-card .tagline,
.hero-sub { color: #ffffff; }
.hero-status { background: rgba(31, 42, 37, 0.30); color: #ffffff; }

/* (2) Finance/historical dashboard pages: the .dashboard-content wrapper is a
   transparent layout container so its own white .dashboard-widget cards become
   the surfaces (matches /student) instead of nesting white-on-white. */
.card.form-card .content.dashboard-content {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* (3) Headings/intro left-align inside the app-shell panels (they used to center
   over left-aligned body text — e.g. the signed enrollment document). */
.card.form-card .form-content h2,
.card.form-card .form-content > p,
.card.form-card .dashboard-content h2,
.card.form-card .dashboard-content > p {
    text-align: left;
}

/* (4) Keyboard focus ring on the stat-card links; darken the borderline stat-of. */
a.stat-link:focus-visible {
    outline: 2px solid #4f6f63;
    outline-offset: 2px;
}
.stat-of { color: #6f665d; }

/* (5) Narrow phones: stat cards stack to a single column. */
@media (max-width: 480px) {
    .stat-row { grid-template-columns: 1fr; }
}

/* ════════════════ NCMS-133: faculty by-aggregate ⇄ by-student view switch ════
   A small segmented control on the Daily Attendance + Gradebook-landing pages
   that frames each as one of two views and links to the per-student hub
   (/faculty/transcripts), so "check one student" has an obvious path. Mirrors
   the cross-portal nav switcher styling. */
.view-switch { display: inline-flex; align-items: center; gap: 2px; margin: 0.25rem 0 1.1rem; background: rgba(127,155,143,0.12); border: 1px solid rgba(127,155,143,0.28); border-radius: 999px; padding: 2px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
.view-switch > * { padding: 0.32rem 0.8rem; border-radius: 999px; font-size: 0.82rem; font-weight: 700; white-space: nowrap; }
.view-switch a { color: #4a443d; text-decoration: none; transition: background 0.12s, color 0.12s; }
.view-switch a:hover { color: #1d3a4a; background: rgba(255,255,255,0.65); }
.view-switch .vs-current { background: #1d3a4a; color: #fff; }
