:root {
  color-scheme: light;
  --accent: #0f766e;
  --accent-hover: #115e59;
  --on-accent: #fff;
  --accent-soft: #e3f3ee;
  --active-ink: #0b6259;
  --page: #f1f5f4;
  --surface: #fff;
  --surface-hover: #f5f8f7;
  --ink: #172b29;
  --muted: #526763;
  --line: #dce6e3;
  --field-line: #a0b3af;
  --focus: #0f766e;
  --shadow: 0 1px 2px #0b342808;
  --intake: #9daec0;
  --planning: #6f91c7;
  --documents: #38a399;
  --submitted: #52bc87;
  --offer: #a6ba63;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-synthesis: none;
}
[data-theme="dark"] {
  color-scheme: dark;
  --accent: #5eead4;
  --accent-hover: #99f6e4;
  --on-accent: #073833;
  --accent-soft: #173d36;
  --active-ink: #85e9d4;
  --page: #111b1a;
  --surface: #172524;
  --surface-hover: #20322f;
  --ink: #e7f2f0;
  --muted: #a7bbb7;
  --line: #2b403c;
  --field-line: #617c76;
  --focus: #5eead4;
  --shadow: 0 1px 3px #0003;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: var(--page); color: var(--ink); font-size: 1rem; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .65; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.22; }
[hidden] { display: none !important; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 3; top: 10px; left: 10px; padding: 10px 15px; border-radius: 8px; background: var(--surface); }
.icon { display: block; width: 20px; height: 20px; flex: none; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.rail { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); padding: 27px 17px 17px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; width: fit-content; }
.brand-mark { display: block; width: 42px; height: 42px; flex: none; }
.brand strong, .brand small, .profile strong, .profile small { display: block; }
.brand strong { font-size: .99rem; letter-spacing: -.035em; white-space: nowrap; }
.brand small { margin-top: 3px; font-size: .77rem; letter-spacing: .035em; color: var(--muted); }
.navigation { display: grid; gap: 6px; margin-top: 46px; }
.nav-label { padding: 0 12px 4px; color: var(--muted); font-size: .78rem; font-weight: 650; letter-spacing: .12em; }
.navigation a, .rail-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 9px; color: var(--muted); font-size: .92rem; }
.navigation a:hover, .rail-link:hover, .profile:hover { background: var(--surface-hover); color: var(--ink); }
.navigation a[aria-current] { color: var(--active-ink); background: var(--accent-soft); font-weight: 700; }
.nav-count { margin-left: auto; min-width: 21px; padding: 2px 5px; border-radius: 6px; background: var(--surface); text-align: center; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.rail-bottom { margin-top: auto; padding-top: 18px; }
.rail-link { min-height: 39px; }
.profile { display: flex; align-items: center; gap: 11px; position: relative; width: 100%; background: transparent; color: var(--ink); border: 0; border-top: 1px solid var(--line); text-align: left; padding: 13px 8px 4px; margin-top: 12px; }
.profile strong { font-size: .93rem; }
.profile small { margin-top: 2px; color: var(--muted); font-size: .77rem; }
.profile-avatar { width: 35px; height: 35px; display: grid; place-items: center; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--active-ink); font-weight: 700; }
.profile-help { margin-left: auto; color: var(--muted); }
.workspace {
  --workspace-max: 1540px;
  --workspace-padding: clamp(24px, 3vw, 52px);
  --workspace-edge: calc(var(--workspace-padding) + max(0px, (100% - var(--workspace-max)) / 2));
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 66px; padding: 10px var(--workspace-edge); gap: 15px; background: var(--surface); border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; gap: 9px; align-items: baseline; font-size: .89rem; }
.crumb-parent { color: var(--muted); }
.crumb-parent span { margin-left: 7px; opacity: .7; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.demo-status { display: inline-flex; white-space: nowrap; gap: 7px; align-items: center; margin-right: 6px; color: var(--muted); font-size: .82rem; }
.demo-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.icon-button { padding: 0; border: 1px solid var(--line); width: 39px; height: 39px; border-radius: 9px; background: var(--surface); color: var(--muted); display: grid; place-items: center; flex: none; }
.icon-button:hover { color: var(--active-ink); background: var(--surface-hover); }
.icon-button .icon { width: 18px; height: 18px; }
.content { padding: 25px var(--workspace-padding) 24px; width: 100%; max-width: var(--workspace-max); margin: 0 auto; flex: 1; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px 18px; border-top: 1px solid var(--line); padding: 16px var(--workspace-edge); color: var(--muted); font-size: .79rem; }
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 222px; border: 1px solid #1f5a53; border-radius: 17px; background: linear-gradient(106deg, #102f2d 0%, #104740 66%, #165d51 100%); color: #f4fffb; padding: 25px 29px; display: flex; align-items: center; }
.hero-copy { position: relative; z-index: 1; }
.hero h1 { margin: 11px 0 8px; font-size: clamp(2.05rem, 4vw, 3.15rem); letter-spacing: -.04em; }
.hero p { color: #ceebe3; margin-bottom: 18px; line-height: 1.6; }
.hero .primary { background: #a5eed6; color: #0d3933; }
.hero .primary:hover { background: #c7faeb; }
.hero .button:focus-visible { outline-color: #b8f9e6; }
.hero-motif { position: absolute; z-index: -1; right: -33px; top: 50%; transform: translateY(-50%) rotate(-26deg); width: min(46%, 527px); height: 340px; pointer-events: none; }
.hero-motif span { position: absolute; inset: 10% 0; border: 1px solid #a1e4c469; border-radius: 52% 48% 49% 51%; }
.hero-motif span:nth-child(2) { inset: 18% 10%; background: #80e0b90c; }
.hero-motif span:nth-child(3) { inset: 26% 20%; background: #80e0b910; }
.hero-motif i, .hero-motif b { position: absolute; display: block; border-radius: 50%; background: #a8efd3; }
.hero-motif i { width: 12px; height: 12px; top: 15%; left: 26%; box-shadow: 0 0 0 7px #9aebcb33; }
.hero-motif b { width: 7px; height: 7px; bottom: 18%; left: 72%; background: #d8f0a5; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 7px 14px; border-radius: 8px; border: 1px solid transparent; font-size: .89rem; font-weight: 700; white-space: nowrap; }
.button .icon { width: 18px; height: 18px; }
.primary { background: var(--accent); color: var(--on-accent); }
.primary:hover { background: var(--accent-hover); }
.secondary { border-color: var(--field-line); color: var(--ink); background: var(--surface); }
.secondary:hover { background: var(--surface-hover); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stat, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.stat { padding: 15px 18px; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.stat-icon { width: 41px; height: 41px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--active-ink); }
.stat:last-child .stat-icon { background: #fbedda; color: #77461b; }
[data-theme="dark"] .stat:last-child .stat-icon { background: #493421; color: #ffd6a7; }
.stat p { color: var(--muted); font-size: .87rem; font-weight: 650; }
.stat strong { display: block; font-size: 2rem; line-height: 1.28; font-variant-numeric: tabular-nums; }
.stat small { font-size: .76rem; color: var(--muted); }
.pipeline { container-type: inline-size; padding-bottom: 19px; background: linear-gradient(126deg, #123633, #164c45); border-color: #24534c; color: #f2fdf9; }
[data-theme="dark"] .pipeline { background: linear-gradient(126deg, #153732, #19423b); }
.section-head { padding: 15px 18px 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-head h2, .assistant-card h2 { font-size: 1.12rem; }
.pipeline-bar { display: flex; overflow: hidden; height: 11px; margin: 3px 18px 14px; gap: 3px; border-radius: 5px; background: #ffffff21; }
.bar-intake { background: var(--intake); }
.bar-planning { background: var(--planning); }
.bar-documents { background: var(--documents); }
.bar-submitted { background: var(--submitted); }
.bar-offer { background: var(--offer); }
.pipeline-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 9px; margin: 0 18px; padding: 0; list-style: none; }
.pipeline-legend li { display: flex; align-items: center; gap: 4px; font-size: .78rem; color: #c9e3db; }
.pipeline-legend i { width: 8px; height: 8px; flex: none; border-radius: 2px; }
.pipeline-legend strong { color: #fff; font-variant-numeric: tabular-nums; }
@container (min-width: 435px) {
  .pipeline-legend { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.64fr) minmax(268px, 1fr); align-items: start; gap: 15px; margin-top: 17px; }
.overview-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 18px; margin: 4px 0 20px; }
.overview-heading h1 { margin-top: 8px; font-size: clamp(2rem, 3.1vw, 3rem); letter-spacing: -.045em; }
.overview-date { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .88rem; font-weight: 600; }
.overview-date .icon { width: 17px; height: 17px; color: var(--active-ink); }
.overview-heading .button { margin-bottom: 3px; padding-inline: 16px; }
.load-state { padding: 22px; }
.load-state h1 { margin-bottom: 8px; font-size: 1.42rem; }
.load-state p { color: var(--muted); line-height: 1.6; }
.overview-grid {
  grid-template-areas: "recent pipeline" "recent agenda";
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr);
}
.overview-grid .recent { grid-area: recent; }
.overview-grid .agenda-panel { grid-area: agenda; }
.overview-grid .pipeline { grid-area: pipeline; }
.overview-grid .section-head { min-height: 57px; }
.overview-grid .table-wrap { border-radius: 0 0 13px 13px; }
.overview-grid .student-table { font-size: .92rem; }
.overview-grid .student-table th { font-size: .81rem; }
.overview-grid .student-table tbody tr:hover { background: var(--surface-hover); }
.overview-grid .student-table td { padding-block: 12px; }
.text-link { color: var(--active-ink); white-space: nowrap; padding: 6px 0; font-size: .84rem; font-weight: 700; }
.text-link:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; }
.student-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .88rem; }
.student-table :is(th, td) { padding: 9px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.student-table :is(th, td):first-child { padding-left: 17px; }
.student-table :is(th, td):last-child { padding-right: 17px; }
.student-table th { background: var(--surface-hover); color: var(--muted); font-weight: 650; white-space: nowrap; }
.student-table td strong { font-weight: 650; }
.student-table td .mobile-date { display: none; }
.student-table td small, .agenda-record small { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; }
.record-btn { display: flex; align-items: center; gap: 8px; text-align: left; min-height: 37px; padding: 0; background: transparent; border: 0; color: var(--ink); border-radius: 7px; white-space: nowrap; }
.record-btn:hover strong, .agenda-record:hover strong { color: var(--active-ink); text-decoration: underline; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 8px; font-weight: 700; }
.tone-0 { background: #ddf4ed; color: #225b4e; }
.tone-1 { background: #e7edf9; color: #344e79; }
.tone-2 { background: #f3e8f5; color: #663b72; }
.tone-3 { background: #f9eee0; color: #745221; }
.stage-pill, .date-pill { display: inline-block; padding: 3px 7px; border-radius: 5px; white-space: nowrap; font-size: .77rem; font-weight: 650; }
.stage-intake { color: #364d65; background: #e6edf4; }
.stage-planning { color: #254d81; background: #e7eefc; }
.stage-documents { color: #0b6259; background: #def4ee; }
.stage-submitted { color: #145c4a; background: #dcefe4; }
.stage-offer { color: #435719; background: #ebf2d9; }
[data-theme="dark"] .stage-intake { color: #c0d2e5; background: #293a4a; }
[data-theme="dark"] .stage-planning { color: #c2d9ff; background: #253c60; }
[data-theme="dark"] .stage-documents { color: #a9efdf; background: #214a43; }
[data-theme="dark"] .stage-submitted { color: #9be9cd; background: #22493e; }
[data-theme="dark"] .stage-offer { color: #d8eead; background: #39462a; }
.muted { color: var(--muted); }
.agenda-list { list-style: none; margin: 0; padding: 0; }
.agenda-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 60px; padding: 7px 13px; border-top: 1px solid var(--line); }
.task-check { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--field-line); border-radius: 7px; background: transparent; color: var(--active-ink); }
.task-check:hover, .is-done .task-check { background: var(--accent-soft); }
.task-check .icon { width: 17px; height: 17px; }
.agenda-record { color: var(--ink); min-width: 0; min-height: 42px; border: 0; border-radius: 6px; background: transparent; text-align: left; padding: 4px 2px; font-size: .88rem; overflow-wrap: anywhere; }
.date-pill { background: var(--surface-hover); color: var(--muted); }
.date-pill.due { color: #77461b; background: #fbedda; }
[data-theme="dark"] .date-pill.due { color: #ffd6a7; background: #493421; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; margin: 8px 0 25px; }
.page-heading h1 { font-size: clamp(1.75rem, 4vw, 2.45rem); }
.page-heading p, .assistant-card p { color: var(--muted); margin-top: 8px; line-height: 1.6; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 17px; }
.filters .muted { font-size: .85rem; }
.search-field { display: flex; align-items: center; border: 1px solid var(--field-line); color: var(--muted); padding-left: 9px; border-radius: 8px; }
.search-field:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.search-field input { border: 0; outline: none; width: min(265px, 100%); }
.search-field .icon { width: 17px; height: 17px; }
input, select, textarea { background: var(--surface); color: var(--ink); min-width: 0; min-height: 42px; border: 1px solid var(--field-line); border-radius: 8px; padding: 8px 10px; }
input::placeholder { color: var(--muted); }
textarea { resize: vertical; }
.empty { color: var(--muted); padding: 22px 17px !important; }
.segmented { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 8px; background: var(--surface-hover); }
.segmented button { background: transparent; color: var(--muted); font-size: .86rem; font-weight: 650; border: 1px solid transparent; border-radius: 6px; padding: 6px 10px; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--active-ink); border-color: var(--line); }
.assistant-card { padding: 17px; }
.assistant-card h2 { margin-top: 10px; }
.assistant-card p { font-size: .91rem; }
.dialog { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; max-width: min(580px, calc(100vw - 30px)); width: 100%; max-height: calc(100dvh - 28px); padding: 22px; box-shadow: 0 16px 65px #061c1a4d; }
.dialog::backdrop { background: #051c1a7a; }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 17px; }
.dialog-header h2, .welcome-dialog h2 { font-size: 1.42rem; overflow-wrap: anywhere; }
.dialog-header p, .welcome-dialog p, .welcome-dialog li { color: var(--muted); margin-top: 5px; line-height: 1.55; font-size: .91rem; }
.welcome-dialog li + li { margin-top: 6px; }
.welcome-dialog .brand-mark { width: 49px; height: 49px; }
.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid label, .draft-area label { display: grid; gap: 6px; align-content: start; font-size: .9rem; font-weight: 650; }
.form-grid :is(input, select, textarea), .draft-area textarea { width: 100%; font-weight: 400; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.draft-area { margin-top: 13px; padding: 11px; background: var(--surface-hover); border: 1px solid var(--line); border-radius: 9px; }
.draft-head, .draft-actions, .draft-head strong { display: flex; align-items: center; gap: 8px; }
.draft-head { justify-content: space-between; flex-wrap: wrap; }
.draft-head strong { font-size: .91rem; color: var(--active-ink); }
.draft-head .icon { width: 17px; height: 17px; }
.draft-area label { margin-top: 12px; }
.draft-actions { margin-top: 8px; font-size: .85rem; }
.toast { position: fixed; z-index: 4; bottom: 18px; left: 50%; transform: translateX(-50%); pointer-events: none; max-width: calc(100% - 24px); width: max-content; border-radius: 8px; padding: 10px 15px; background: var(--ink); color: var(--surface); opacity: 0; }
.toast.visible { opacity: 1; }
@media (min-width: 761px) {
  .rail {
    --surface: #102c2a;
    --surface-hover: #183e39;
    --ink: #f3fcf9;
    --muted: #b3cec8;
    --line: #2a4944;
    --accent-soft: #204841;
    --active-ink: #c9f1e5;
    --focus: #86e5c8;
    color: var(--ink);
  }
  .rail .brand { padding-inline: 2px; }
}
@media (max-width: 1120px) {
  .shell { grid-template-columns: 217px minmax(0, 1fr); }
  .rail { padding-right: 11px; padding-left: 11px; }
}
@media (max-width: 992px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .overview-grid { grid-template-areas: "pipeline" "recent" "agenda"; }
}
