:root {
    --portal-border: #e4e5f3;
    --portal-muted: #606580;
    --portal-background: #fffcf5;
    --portal-sunshine: #ffd76a;
}

body {
    margin: 0;
    background: var(--portal-background);
}

.portal-appbar {
    background: linear-gradient(110deg, #2458b8, #7445b5);
    border-bottom: 3px solid var(--portal-sunshine);
}

.portal-brand { font-weight: 700; letter-spacing: .2px; }
.portal-appbar-caption { color: #f0edff; }
.portal-drawer { border-right: 1px solid var(--portal-border); }
.portal-nav-heading { display: flex; align-items: center; gap: 12px; padding: 28px 24px; }
.portal-nav-label { display: block; padding: 8px 24px; color: var(--portal-muted); letter-spacing: 1.6px; }
.portal-nav { padding: 0 12px; }
.portal-nav .mud-nav-link { border-radius: 10px; margin-bottom: 6px; padding: 14px 16px; }
.portal-nav .mud-nav-link.active { background: #edf2ff; font-weight: 600; }
.portal-main { min-height: 100vh; padding-top: 64px; background: var(--portal-background); }
.portal-content { padding-top: 32px; padding-bottom: 20px; }
.portal-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 28px 0 8px; color: var(--portal-muted); }

.page-hero {
    position: relative;
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    background: linear-gradient(115deg, #eaf3ff 0%, #f3ecff 60%, #fff3cc 100%);
}

.page-hero .mud-typography-h4 { font-weight: 700; letter-spacing: -.8px; line-height: 1.25; }
.page-eyebrow { display: block; color: var(--mud-palette-secondary); font-weight: 700; letter-spacing: 1.6px; margin-bottom: 8px; }
.page-description { color: var(--portal-muted); margin-top: 10px; max-width: 640px; }
.hero-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 60px; height: 60px; background: white; border: 1px solid var(--portal-border); border-radius: 16px; }
.portal-panel { padding: 28px; margin-bottom: 24px; border: 1px solid var(--portal-border); border-radius: 16px; background: white; box-shadow: 0 4px 20px rgba(76, 57, 130, .035); }
.section-description { color: var(--portal-muted); margin-bottom: 20px; }
.portal-search { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px; }
.admission-field { flex: 1 1 220px; max-width: 420px; }
.portal-search .mud-button-root { min-height: 48px; padding-inline: 24px; }
.portal-section-heading { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.quarter-options { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.fee-table { border: 1px solid var(--portal-border); border-radius: 12px; overflow: hidden; }
.fee-table .mud-table-root thead { background: #edf2ff; }
.fee-table .mud-table-root th { color: #354c7b; font-weight: 600; white-space: nowrap; }
.fee-table .mud-table-root td, .fee-table .mud-table-root th { padding: 14px 16px; }
.fee-table .mud-table-root td { font-variant-numeric: tabular-nums; }
.fee-table .fee-row { cursor: pointer; }
.fee-table .fee-row-selected { background: #edf9ef; }
.fee-table .fee-row-disabled { color: var(--portal-muted); background: #f8fafc; cursor: default; }
.fee-table .fee-total { font-weight: 700; background: #fff5d6; }
.payment-summary { padding: 24px; margin-top: 24px; background: linear-gradient(110deg, #2458b8, #7445b5); color: white; border-radius: 14px; }
.payment-summary-label { color: #f0edff; }
.payment-summary .mud-typography-h5 { color: white; font-weight: 700; font-variant-numeric: tabular-nums; }
.payment-actions { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.payment-summary .mud-button-filled-secondary { background: var(--portal-sunshine); color: #3c3155; }
.payment-summary .mud-button-filled-secondary:hover { background: #ffca3a; }
.fee-card { height: 100%; border: 1px solid var(--portal-border); border-radius: 16px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.fee-card:hover { transform: translateY(-4px); border-color: #b8a0de; box-shadow: 0 12px 28px rgba(76, 57, 130, .1); }
.fee-card .mud-card-content { padding: 28px 28px 16px; }
.fee-card .mud-card-actions { padding: 8px 20px 24px; }
.service-icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; background: #eaf2ff; color: var(--mud-palette-primary); border-radius: 14px; margin-bottom: 24px; }
.service-icon-support { background: #f2eaff; color: var(--mud-palette-secondary); }
.portal-tip { display: flex; gap: 12px; align-items: flex-start; padding: 20px 24px; border: 1px solid #f0dfa5; border-radius: 12px; background: #fff8df; color: var(--portal-muted); margin-top: 24px; }
.contact-panel { height: 100%; margin-bottom: 0; }
.contact-panel .mud-list-item { padding: 14px 0; }
.contact-panel .mud-list-item:not(:last-child) { border-bottom: 1px solid var(--portal-border); }
.contact-panel .mud-typography-body1 { overflow-wrap: anywhere; }
.support-hours { background: #f3edff; padding: 20px; border-radius: 12px; margin-top: 24px; }
.result-container { margin-top: 24px; }
.result-card { padding: 40px 32px; text-align: center; border: 1px solid var(--portal-border); border-radius: 20px; }
.result-icon { display: flex; align-items: center; justify-content: center; width: 88px; height: 88px; margin: 0 auto 24px; border-radius: 50%; background: #e8f5ee; }
.result-icon-error { background: #fff0ef; }
.result-icon .mud-icon-root { font-size: 48px; }
.result-card .mud-typography-h4 { font-weight: 700; }
.result-card .mud-table-root td { overflow-wrap: anywhere; }
.result-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 12px; justify-content: center; }

@media (max-width: 600px) {
    .portal-content { padding: 20px 16px; }
    .page-hero { padding: 24px 20px; }
    .page-hero .mud-typography-h4 { font-size: 1.7rem; }
    .hero-icon { width: 48px; height: 48px; }
    .portal-panel { padding: 20px 16px; }
    .portal-search { align-items: stretch; flex-direction: column; }
    .admission-field { flex: auto; max-width: none; width: 100%; }
    .payment-summary { padding: 20px; }
    .payment-actions .mud-button-root, .result-actions .mud-button-root { width: 100%; }
    .result-container { padding: 0; margin-top: 0; }
    .result-card { padding: 28px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .fee-card { transition: none; }
    .fee-card:hover { transform: none; }
}