/* Falah soft pop: warm surfaces, pastel accents, and clear reading contrast.
   Screen-only decoration keeps school reports clean when printed. */
:root {
  --ink: #2e4545;
  --text: #5c6d70;
  --paper: #faf8f5;
  --green: #246f60;
  --line: #e4e8e5;
  --peach: #fff0e5;
  --mint: #e9f4ed;
  --sky: #eaf3fb;
  --lavender: #f0edfa;
  --amber: #fff4d9;
  --radius: 24px;
  --shadow-soft: 0 4px 6px -5px #30494412, 0 14px 36px -24px #30494435;
  --shadow-lift: 0 8px 12px -8px #30494418, 0 22px 44px -25px #30494435;
}

/* Shared component geometry and readable type. */
body { -webkit-font-smoothing: antialiased; }
::selection { color: #2e4545; background: #f4ddaf; }
h1, h2, h3 { letter-spacing: -.035em; }
p, h1, h2, h3, strong { overflow-wrap: anywhere; }
.button { border-radius: 14px; min-height: 46px; font-size: 13px; padding: 12px 18px; }
.button, .icon-button, .quick-grid > button {
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.primary { background: var(--green); box-shadow: 0 4px 0 #1c574d, 0 7px 15px -7px #246f6033; }
.primary:hover { background: #1e6255; }
.primary:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 #1c574d; }
.secondary { border-color: #dce4de; box-shadow: 0 3px 0 #e9eeea; }
.secondary:hover { background: #f6faf7; }
.button:disabled { box-shadow: none; }
.icon-button { width: 42px; height: 42px; border-radius: 14px; }
.mobile-nav-close { display: none; }
.badge { border-radius: 999px; font-size: 11px; padding: 5px 11px; }
.link { font-size: 13px; }
.brand-mark { border-radius: 17px 17px 21px 10px; background: #e6f1e8; }
.avatar { color: #365f54; background: #e8f2eb; border-radius: 16px; }
.small-avatar { border-radius: 50%; }
.tile-icon { border-radius: 16px; }
.tile-icon.peach { color: #955539; }
.tile-icon.sky { color: #456b90; }
.tile-icon.lavender { color: #6c5994; }
.tile-icon.mint { color: #39725a; }
.page-heading h1 { font-size: clamp(26px, 2.4vw, 33px); }
.page-heading p, .panel-heading p { font-size: 13px; }
.page-heading .eyebrow, .modal-heading .eyebrow { font-size: 10px; letter-spacing: 1.6px; }
.panel-heading h2 { font-size: 20px; }
.panel, .application-card, .student-card, .stat-card, .quick-grid > button {
  border-color: var(--line); box-shadow: var(--shadow-soft);
}
.application-card, .student-card { border-radius: var(--radius); }
.application-card p, .student-card p, .content-card > p, .announcement p { font-size: 13px; }
.card-footer small { font-size: 11px; }
.content-card .due, .content-card .card-top small { font-size: 12px; }
.card-top { flex-wrap: wrap; }
.panel-heading, .card-footer { flex-wrap: wrap; }
.portal-grid > *, .stats-grid > *, .student-grid > *, .content-grid > *,
.form-grid > *, .status-layout > *, .topbar-left, .topbar-right { min-width: 0; }

/* Login: an airy editorial story beside a quiet sign-in surface. */
@media screen {
  .login-layout { padding: 18px; gap: 18px; background: var(--paper); }
  .login-story {
    padding: clamp(28px, 3.7vw, 58px); gap: 30px;
    background: #edf3e9; border: 1px solid #dfe9dc; border-radius: 32px;
  }
  .login-story:before { background: #f6e7c8; opacity: .8; }
  .login-story > .brand { position: relative; }
  .story-copy h1 em { color: #37765e; }
  .login-photo { border: 6px solid #fff; border-radius: 26px; box-shadow: var(--shadow-lift); transform: rotate(-1deg); }
  .login-photo img { height: clamp(180px, 22vw, 300px); }
  .login-photo > span { padding: 14px 18px; background: #fffaf0; color: #4f7162; }
  .story-highlights { display: flex; flex-wrap: wrap; gap: 12px 24px; position: relative; }
  .story-highlights > span { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; color: #4b6b59; }
  .story-highlights .icon { width: 17px; height: 17px; }
  .login-panel { padding: clamp(24px, 3vw, 48px); }
  .login-box { max-width: 430px; }
  .login-box > h2 { font-size: clamp(27px, 2.6vw, 35px); }
  .login-box > p { font-size: 14px; line-height: 1.85; }
  .login-box > .micro { font-size: 12px; }
  .demo-box { padding: 24px; border: 1px solid #e2e5ed; border-radius: 22px; background: #f1f1fa; }
  .demo-box label { font-size: 13px; }
  .demo-box .eyebrow { color: #66547e; }
  .demo-box .micro { font-size: 12px; }

  /* Rounded sidebar; the reading surface stays calm across data-heavy pages. */
  .app-shell { background: radial-gradient(ellipse at 100% 0, #edf2ed 0, transparent 38%), var(--paper); }
  .sidebar { top: 12px; bottom: 12px; left: 12px; width: 246px; border: 1px solid var(--line); border-radius: 25px; box-shadow: var(--shadow-soft); }
  .sidebar > .brand { padding: 28px 22px; }
  .nav-caption { color: #6a7a72; font-size: 10px; }
  .sidebar nav { padding-inline: 12px; }
  .sidebar nav > a { font-size: 12px; min-height: 45px; border-radius: 13px; color: #586b66; margin-bottom: 4px; }
  .sidebar nav > a:hover { background: #f5f8f3; }
  .sidebar nav > a.active { background: #eaf3e8; color: #285c4a; box-shadow: inset 3px 0 #76a789; }
  .sidebar nav > a[aria-disabled=true] { opacity: 1; color: #737e7b; }
  .sidebar-bottom { margin: 0 8px 8px; padding: 15px 8px 8px; }
  .sidebar-bottom strong { font-size: 11px; }
  .sidebar-bottom small { font-size: 10px; }
  .app-main { margin-left: 270px; width: calc(100% - 270px); }
  .topbar { border-bottom-color: #e3e8e1; background: #faf8f5ed; }
  .breadcrumb { font-size: 12px; color: #61736e; }
  .topbar-right > .badge { font-size: 10px; color: #795e2b; }
  .workspace { padding-top: 32px; }
  .welcome-banner { border: 1px solid #dce7d8; background: #edf4e7; border-radius: 27px; padding: 27px 32px; }
  .welcome-banner h2 { font-size: clamp(23px, 2vw, 29px); }
  .welcome-banner p { font-size: 13px; }
  .welcome-banner > div:first-child { position: relative; z-index: 1; }
  .welcome-art { width: 142px; height: 112px; border-radius: 60px 60px 30px 30px; background: #fff8e9; border: 7px solid #fff9; transform: rotate(7deg); box-shadow: 7px 8px 0 #dfead7; flex-shrink: 0; margin-left: 24px; }
  .welcome-art > .icon { color: #659077; width: 61px; height: 61px; }
  .welcome-art > span { color: #b77735; font-size: 34px; }

  /* Two distinct destinations, with explicit access state instead of opacity. */
  .portal-grid { gap: 22px; }
  .portal-card { padding: 27px; border-radius: 27px; border: 1px solid; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; }
  .spmb-card { background: #fff3e9; border-color: #f0dfcf; }
  .school-card { background: #ecf4fc; border-color: #dbe6f0; }
  .portal-card:hover:not(:disabled) { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
  .portal-card:disabled { opacity: 1; }
  .portal-card:disabled:hover { transform: none; box-shadow: var(--shadow-soft); }
  .portal-card:disabled .card-bottom { color: #5f6e70; }
  .portal-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
  .portal-card-top > .tile-icon { width: 54px; height: 54px; background: #fffc; border: 1px solid #fff; box-shadow: 0 4px 0 #2e454507; border-radius: 18px; }
  .portal-state { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #62757a26; color: #5b6d70; background: #ffffffa6; border-radius: 999px; padding: 6px 10px; font-size: 11px; font-weight: 650; }
  .portal-state.available { color: #31684e; border-color: #cbded0; }
  .portal-state .icon { width: 14px; height: 14px; }
  .card-kicker { position: static; color: #6b716d; font-size: 10px; letter-spacing: 1.4px; display: block; margin-bottom: 7px; }
  .portal-card h2 { font-size: 34px; }
  .portal-card p { font-size: 14px; max-width: 390px; margin: 12px 0 24px; line-height: 1.85; flex: 1; }
  .card-bottom { width: 100%; gap: 15px; margin-top: auto; padding-top: 18px; border-color: #63746d26; font-size: 13px; }
  .card-bottom > .icon { background: #fff; border-radius: 50%; width: 35px; height: 35px; padding: 8px; box-shadow: 0 2px 0 #2e454509; }
  .stats-grid { gap: 15px; }
  .stat-card { border-radius: 21px; gap: 12px; padding: 20px; }
  .stat-card > .icon { padding: 9px; width: 39px; height: 39px; border-radius: 13px; color: #49795f; background: var(--mint); }
  .stat-card:nth-child(2) > .icon { background: var(--sky); color: #476b91; }
  .stat-card:nth-child(3) > .icon { background: var(--peach); color: #955b3f; }
  .stat-card:nth-child(4) > .icon { background: var(--lavender); color: #746094; }
  .stat-card > span { font-size: 12px; line-height: 1.7; }
  .stat-card > strong { font-size: 30px; letter-spacing: -.04em; }
  .section-banner { border: 1px solid #65736d14; border-radius: 24px; }
  .section-banner p { font-size: 13px; }
  .funnel > div { border-radius: 17px; background: #fffdf9; }
  .funnel span { font-size: 11px; }
  .funnel > div:nth-child(3n + 2) { background: #f3f7fc; }
  .funnel > div:nth-child(3n) { background: #f3f0fa; }
  .quick-grid > button { border-radius: 19px; min-height: 81px; }
  .quick-grid > button:hover { border-color: #b7cdbd; transform: translateY(-2px); box-shadow: var(--shadow-lift); }
  .quick-grid strong { font-size: 13px; }
  .quick-grid .tile-icon { width: 42px; height: 42px; border-radius: 13px; }
  .quick-grid > button:nth-child(3n) .tile-icon { background: var(--mint); color: #49795f; }
  .quick-grid > button:nth-child(3n + 1) .tile-icon { background: var(--sky); color: #476b91; }

  /* Form and table surfaces: restrained accents, generous targets, clear focus. */
  input:not([type=checkbox]):not([type=file]), select, textarea { border-radius: 13px; border-color: #dbe3dd; min-height: 46px; background: #fff; font-size: 14px; }
  input::placeholder, textarea::placeholder { color: #768382; }
  input:focus, select:focus, textarea:focus { border-color: #6c9b86; }
  .form-grid label { font-size: 13px; }
  .form-footer p, .document-row p, .notice p { font-size: 12px; }
  .document-row strong, .notice strong, .notification-row strong { font-size: 13px; }
  .notification-row p { font-size: 12px; }
  .notification-row small { font-size: 11px; }
  .notification-row:hover { background: #fafcf9; }
  .search { border-radius: 14px; border-color: #dbe3dd; box-shadow: 0 2px 4px #30494404; }
  .search input { font-size: 14px !important; }
  .toolbar select { font-size: 13px; }
  .result-count { font-size: 12px; }
  .tabs { padding: 5px; gap: 5px; border: 1px solid var(--line); border-radius: 17px; background: #f2f5f1; }
  .tabs button { font-size: 12px; min-height: 43px; border: 0; border-radius: 12px; }
  .tabs button.active { color: #285f4e; background: #fff; box-shadow: 0 2px 5px #324b4510; }
  .stepper strong { font-size: 11px; }
  .stepper .current span { background: var(--green); border-color: var(--green); }
  .progress-track { height: 6px; background: #edf2ed; }
  .progress-track > span { background: #6d9e84; }
  .data-table { font-size: 13px; }
  .data-table th { background: #f3f6f1; color: #546b60; font-size: 11px; }
  .data-table td { border-color: #edf0eb; }
  .data-table tbody tr:nth-child(even) { background: #fcfdfb; }
  .data-table tbody tr:hover { background: #f1f7f0; }
  .table-wrap { padding: 0; }
  .notice { background: #f2f5f7; border: 1px solid #e3e9ee; border-radius: 17px; }
  .alert { border-radius: 17px; }
  .alert.error { color: #92433c; background: #fff0eb; }
  .next-step { border: 1px solid #dbe8dd; border-radius: 20px; background: #f0f6ed; }
  .empty > .icon { width: 64px; height: 64px; padding: 16px; border-radius: 22px; color: #648773; background: var(--mint); }
  .empty p { font-size: 13px; }
  .toast { color: #305d46; border-radius: 18px; box-shadow: var(--shadow-lift); font-size: 13px; }
  .modal-overlay { background: #344b4859; }
  .modal { border: 1px solid #e1e8df; border-radius: 27px; box-shadow: 0 24px 80px #2b42452b; }
  .modal-heading { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
  .app-footer { font-size: 11px; color: #6c7b75; }
}

@media screen and (min-width: 1600px) {
  .portal-card { padding: 32px; }
}
@media screen and (min-width: 901px) and (max-width: 1150px) {
  .sidebar { width: 220px; }
  .app-main { margin-left: 244px; width: calc(100% - 244px); }
  .sidebar nav > a { font-size: 11px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-card { padding: 23px; }
}
@media screen and (max-width: 900px) {
  body.drawer-open { overflow: hidden; }
  .mobile-nav-close { display: grid; position: absolute; right: 12px; top: 18px; }
  .sidebar { width: 270px; max-width: calc(100vw - 24px); transform: translateX(calc(-100% - 24px)); }
  .sidebar.open { transform: translateX(0); }
  .sidebar nav > a { font-size: 13px; min-height: 46px; }
  .sidebar-scrim { background: #344b4859; }
  .app-main { width: 100%; margin-left: 0; }
  .workspace { padding: 27px 22px 15px; }
  .login-layout { padding: 12px; gap: 4px; }
  .login-story { padding: 26px; border-radius: 26px; }
  .login-photo > span { font-size: 13px; }
  .login-panel { padding: 26px; }
}
@media screen and (max-width: 650px) {
  .login-layout { padding: 10px; }
  .login-story { padding: 25px; gap: 20px; border-radius: 24px; }
  .login-story > .brand { transform: none; }
  .login-story .brand-mark { width: 38px; height: 40px; font-size: 28px; }
  .login-story .brand > span:last-child { font-size: 31px; }
  .story-copy h1 { font-size: 31px; }
  .story-copy p { font-size: 13px; }
  .story-highlights { gap: 10px 20px; }
  .story-highlights > span { font-size: 11px; }
  .login-panel { padding: 29px 16px; }
  .demo-box { padding: 20px; }
  .workspace { padding: 24px 16px 12px; }
  .topbar { padding-inline: 16px; }
  .topbar-left { gap: 9px; }
  .topbar-right > .badge { display: none; }
  .breadcrumb { font-size: 11px; }
  .page-heading h1 { font-size: 26px; }
  .page-heading p { font-size: 13px; }
  .welcome-banner { padding: 23px; border-radius: 24px; }
  .welcome-banner h2 { font-size: 23px; }
  .welcome-banner .badge { font-size: 10px; white-space: normal; }
  .portal-grid { gap: 17px; }
  .portal-card { padding: 23px; border-radius: 24px; }
  .portal-card h2 { font-size: 32px; }
  .portal-card p { font-size: 14px; }
  .portal-card-top { margin-bottom: 21px; }
  .card-kicker { font-size: 10px; }
  .card-bottom { font-size: 13px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat-card { padding: 17px; gap: 10px; }
  .stat-card > .icon { grid-column: 1; grid-row: 1; width: 36px; height: 36px; padding: 8px; }
  .stat-card > span { grid-column: 1 / -1; grid-row: 2; font-size: 11px; }
  .stat-card > strong { grid-column: 1 / -1; grid-row: 3; font-size: 29px; }
  .panel { border-radius: 21px; }
  .panel-heading h2 { font-size: 19px; }
  .panel-heading > .link { font-size: 12px; }
  .funnel { gap: 8px; }
  .funnel > div { padding: 14px 10px; }
  .funnel span { font-size: 10px; overflow-wrap: anywhere; }
  .quick-grid strong { font-size: 12px; }
  input:not([type=checkbox]):not([type=file]), select, textarea { font-size: 16px; }
  .toolbar select { font-size: 16px; }
  .form-tabs { margin-inline: -3px; }
  .stepper strong { font-size: 10px; }
  .modal { padding: 23px 20px; border-radius: 24px; max-height: calc(100dvh - 24px); }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions > .button { white-space: normal; }
  .app-footer { font-size: 10px; }
  .table-wrap { padding: 0; }
}
@media screen and (max-width: 360px) {
  .portal-card { padding: 20px; }
  .portal-state { font-size: 10px; padding: 6px 8px; }
  .heading-actions { flex-wrap: wrap; }
  .panel-heading { gap: 10px; }
  .button { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; }
}
@media print {
  .panel, .student-card, .application-card, .stat-card, .button { box-shadow: none; }
  .report-sheet { border-radius: 0; }
}
