/* Visual-only theme: preserve all application behavior and status meanings. */
:root {
  --ink: #1d1d1f;
  --muted: #68686d;
  --line: #dedee3;
  --paper: #fff;
  --canvas: #f5f5f7;
  --brand: #0066cc;
  --brand-2: #0055ad;
  --primary: #0066cc;
  --gold: #a8771c;
  --gold-soft: #fff4d9;
  --danger: #b43b46;
  --success: #257348;
  --shadow: 0 8px 28px rgba(30,40,65,.05);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}
body { line-height: 1.55; }
button, input, select, textarea { font-family: inherit; }
.site-header { height: 70px; padding-inline: max(24px,calc((100vw - 1360px)/2)); background: #f9f9fb; border-bottom-color: rgba(60,60,67,.14); }
.brand { gap: 10px; }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; box-shadow: none; font-family: inherit; font-size: 19px; }
.brand-logo { width: 36px; height: 36px; border-radius: 9px; }
.brand strong { letter-spacing: .025em; }
/* 品牌名配色：深色衬线 + 红橙斜体（参考 Rebelliously Optimistic.）*/
#school-brand-name .brand-name-primary,
#school-brand-name .brand-name-accent { font-family: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif; font-weight: 700; }
#school-brand-name .brand-name-primary { color: #2e2126; }
#school-brand-name .brand-name-accent { color: #b05247; font-style: italic; margin-left: 1px; }
nav a, .ghost-button { color: #596171; border-radius: 7px; }
nav a:hover, .ghost-button:hover { background: #eef2fc; color: var(--brand); }
main { width: min(1360px,calc(100% - 48px)); padding-top: 30px; }
main[tabindex="-1"]:focus { outline: none; }
.page-heading { margin-bottom: 24px; }
.page-heading h1 { font-family: inherit; font-size: clamp(25px,2.6vw,34px); font-weight: 650; letter-spacing: -.025em; line-height: 1.3; }
.page-heading .eyebrow { color: var(--muted); letter-spacing: .06em; font-size: 12px; margin-bottom: 8px; }
.page-heading > div > span { font-size: 14px; }
.identity-chip { border-radius: 10px; padding: 10px 13px; box-shadow: none; }
.identity-chip i { background: #edf1ff; color: var(--brand); border-radius: 8px; }
.staff-layout { gap: 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 32px rgba(0,0,0,.04); }
.staff-content { padding: 24px; }
.staff-heading { margin-bottom: 18px; }
.staff-heading h1 { font-size: 26px; }
.staff-sidebar nav section > p { margin: 16px 10px 6px; color: #68686d; font-size: 12px; font-weight: 600; }
.staff-sidebar nav section:first-child > p { margin-top: 4px; }
.staff-sidebar nav button { min-height: 36px; padding-block: 8px; }
.management-metrics { grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); }
.management-metrics .metric-card { min-height: 118px; padding: 16px; }
.management-metrics .metric-card strong { margin-block: 8px; font-size: 28px; }
#analytics-filter { gap: 0 14px; }
#analytics-filter .field input, #analytics-filter .field select { height: 40px; }
#analytics-result { margin-top: 16px; }
#analytics-result .card-body > p { font-size: 14px; color: #55555c; line-height: 1.65; }
.section-tabs { background: #ededf0; border-radius: 9px; padding: 4px; }
.section-tabs button { border-radius: 6px; }
.section-tabs button.active { color: var(--ink); background: white; box-shadow: 0 1px 4px #00000016; }
@media (min-width: 1200px) {
  #analytics-filter { grid-template-columns: repeat(4,minmax(0,1fr)); }
  #analytics-filter > .row-actions { grid-column: 1 / -1; }
}
.staff-sidebar { top: 92px; padding: 18px 12px; border: 0; border-right: 1px solid var(--line); border-radius: 15px 0 0 15px; background: #ededf0; box-shadow: none; }
.staff-sidebar > p { color: #6e6e73; font-size: 12px; }
.staff-sidebar nav button { padding: 11px 12px; border-radius: 7px; color: #505968; font-size: 14px; }
.staff-sidebar nav button:hover { background: #e1e1e6; color: var(--ink); }
.staff-sidebar nav button.active { background: var(--brand); color: white; font-weight: 600; box-shadow: 0 1px 2px rgba(0,60,130,.12); }
.agent-layout { display: grid; grid-template-columns: minmax(0,1fr) 210px; gap: 20px; align-items: start; }
.agent-content { min-width: 0; }
.agent-sidebar nav { display: grid; gap: 4px; }
.agent-sidebar nav a { display: block; padding: 11px 12px; border-radius: 7px; color: #505968; font-size: 14px; text-decoration: none; }
.agent-sidebar nav a:hover { background: #e1e1e6; color: var(--ink); }
.agent-sidebar nav a.active { background: var(--brand); color: #fff; font-weight: 600; }
.agent-content .agent-navigation { display: none; }
.agent-link-pages { justify-content: center; align-items: center; margin-top: 18px; }
.management-heading h2 { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.management-heading p { font-size: 14px; }
.management-heading { flex-wrap: wrap; }
.management-heading > div:first-child { flex: 1 1 300px; min-width: 0; }
.management-heading > .row-actions { flex: 0 0 auto; }
.row-actions { align-items: center; flex-wrap: wrap; gap: 8px; }
.row-actions > button, .action-menu > summary { white-space: nowrap; }
form[data-search].row-actions { align-items: end; margin: 18px 0; }
form[data-search] > .field { margin-bottom: 0; flex: 0 1 300px; }
form[data-search] > button { min-height: 48px; }
.action-menu > summary { border-radius: 8px; padding: 10px; }
.action-menu > summary:hover { background: #e8eef8; }
.action-menu[open] > button { margin-top: 6px; }
.card, .summary-strip, .metric-card { border-radius: 12px; box-shadow: none; }
.card-header { padding: 18px 22px; }
.card-header h2 { font-size: 17px; font-weight: 650; }
.card-body { padding: 22px; }
.summary-strip span { font-size: 13px; }
.summary-strip strong { font-variant-numeric: tabular-nums; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 14px; }
.detail-grid > div { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fafafb; }
.detail-grid span, .detail-grid strong { display: block; }
.detail-grid span { color: var(--muted); font-size: 12px; }
.detail-grid strong { margin-top: 7px; overflow-wrap: anywhere; font-size: 14px; }
.workspace-choice-shell { max-width: 980px; margin: 0 auto; }
.workspace-choice-heading { align-items: center; }
.workspace-choice-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 18px; margin-bottom: 22px; }
.workspace-choice-card { display: flex; gap: 16px; min-height: 170px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: white; box-shadow: 0 8px 28px rgba(30,40,65,.05); text-decoration: none; }
.workspace-choice-card:hover { border-color: #a9bde5; background: #f8faff; transform: translateY(-1px); }
.workspace-choice-card > i { display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 12px; color: white; background: var(--brand); font-style: normal; font-size: 19px; font-weight: 700; }
.workspace-choice-card h2 { margin: 0 0 8px; font-size: 19px; }
.workspace-choice-card p { margin: 0 0 18px; color: var(--muted); line-height: 1.7; }
.workspace-choice-card span { color: var(--brand); font-size: 14px; font-weight: 650; }
.primary-button, .secondary-button, .danger-button { border-radius: 8px; font-size: 14px; font-weight: 600; transition: background-color .15s; }
.primary-button:hover { transform: none; }
.secondary-button { background: linear-gradient(#fff,#fafafa); color: #343438; border: 1px solid #d4d4da; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.secondary-button:hover { background: #f4f6fa; }
.danger-button { background: #fff0f1; color: var(--danger); }
.table-action { border: 1px solid #dce3f5; border-radius: 7px; background: #f2f5ff; color: #3458bd; font-size: 13px; font-weight: 600; }
.table-action:hover { background: #e6edff; }
.field > span { color: #465060; font-size: 14px; font-weight: 600; }
.field input, .field select { border-color: #d8dde6; border-radius: 8px; }
.field input:focus, .field select:focus { border-color: #6784e2; box-shadow: 0 0 0 3px #edf1ff; }
textarea { border-color: #d8dde6; border-radius: 8px; color: var(--ink); }
:where(button,a,summary,input,select,textarea):focus-visible { outline: 2px solid #5073da; outline-offset: 3px; }
.data-table { font-size: 14px; }
.data-table th { color: #68686d; font-size: 14px; font-weight: 600; background: #f7f7f9; padding-top: 12px; }
.data-table td { padding-block: 17px; border-bottom-color: #eef0f4; }
.data-table tbody tr:nth-child(even) { background: #fafafb; }
.data-table tbody tr:hover { background: #edf4fc; }
.data-table td strong { font-weight: 600; }
.status-pill { border-radius: 6px; font-size: 14px; font-weight: 600; }
.status-pill.good { color: #286342; background: #eaf5ee; }
.status-pill.bad { color: #a43843; background: #fdecee; }
.status-pill.waiting { color: #876514; background: #fff4d9; }
.modal-backdrop { background: rgba(29,36,53,.38); }
.modal, .acquisition-dialog { border-radius: 14px; color: var(--ink); box-shadow: 0 20px 70px rgba(25,35,60,.18); }
.management-modal { max-height: calc(100dvh - 40px); overflow-y: auto; }
form.modal { max-height: calc(100dvh - 40px); overflow-y: auto; }
form.management-modal { display: flex; flex-direction: column; overflow: hidden; }
form.management-modal > h2, form.management-modal > p, form.management-modal > .modal-actions, form.management-modal > .error-box { flex-shrink: 0; }
form.management-modal > .modal-fields { min-height: 0; overflow-y: auto; padding-right: 6px; }
form.management-modal > .modal-actions { flex-shrink: 0; }
.toast-region { pointer-events: none; }
@media (max-width: 720px) {
  .toast-region { top: max(12px, env(safe-area-inset-top)); bottom: auto; left: 12px; right: 12px; }
}
.acquisition-dialog::backdrop { background: rgba(29,36,53,.38); }
.action-menu > div { border-radius: 9px; box-shadow: 0 8px 24px rgba(25,35,60,.1); }
.material-item, .notification-item, .channel-options { border-color: var(--line); border-radius: 10px; }
.material-upload, .material-item img { background: #f5f6fa; }
.source-tag { color: #4962a2; background: #f0f3fc; border-color: #dfe5f6; font-weight: 600; }
/* Full pastel fills; existing text labels retain non-color status cues. */
.crm-card-grid { gap: 18px; }
.crm-lead-card { border-width: 1px; border-radius: 12px; padding: 20px; color: #293343; box-shadow: 0 2px 4px rgba(30,40,65,.025); }
.crm-lead-card h3 { font-size: 18px; font-weight: 650; }
.crm-lead-card p { line-height: 1.7; }
.crm-lead-card .row-actions { gap: 8px; }
.crm-lead-card.BLUE, .crm-chip.BLUE { background: #eaf3ff; border-color: #b7d2f3; }
.crm-lead-card.GREEN, .crm-chip.GREEN { background: #eaf6ed; border-color: #badbc5; }
.crm-lead-card.RED, .crm-chip.RED { background: #ffeded; border-color: #ebbdc2; }
.crm-lead-card.YELLOW, .crm-chip.YELLOW { background: #fff5d7; border-color: #e4d298; }
.crm-lead-card.BLUE .crm-status { color: #315e96; }
.crm-lead-card.GREEN .crm-status { color: #326a45; }
.crm-lead-card.RED .crm-status { color: #a43e49; }
.crm-lead-card.YELLOW .crm-status { color: #84621b; }
.crm-chip { border-radius: 6px; padding: 5px 10px; }
.crm-lead-card .secondary-button { background: rgba(255,255,255,.8); border-color: rgba(67,84,116,.2); }
.auth-layout { border-radius: 16px; }
.auth-story { background: #eef1f6; color: var(--ink); }
.auth-story h1 { font-family: inherit; font-weight: 650; letter-spacing: -.025em; }
.auth-story .eyebrow { color: var(--brand); }
.auth-story > p:not(.eyebrow) { color: #505057; }
.story-points div { color: #34343b; }
.story-points i { color: #0055ad; background: #dce9fa; }
.auth-story::after { content: none; }
.auth-form > .eyebrow { color: #68686d; }
.metric-card, .metric-card:nth-child(2), .metric-card:nth-child(3), .metric-card:nth-child(4) { color: var(--ink); background: #fff; border: 1px solid var(--line); }
.metric-card span, .metric-card small { opacity: 1; color: var(--muted); }
.metric-card strong { font-family: inherit; color: var(--brand); font-variant-numeric: tabular-nums; }
.link-item { background: #f8f8fa; border-color: var(--line); }
.registration-banner { background: #edf2f9; color: var(--ink); }
.registration-banner h1 { font-family: inherit; }
.registration-banner > span { color: #505057; }
.registration-banner .eyebrow { color: var(--brand); }
/* Blur is limited to navigation chrome, never lead text or financial data. */
@supports (backdrop-filter: blur(16px)) {
  .site-header { background: rgba(249,249,251,.88); backdrop-filter: blur(16px); }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: #f9f9fb; backdrop-filter: none; }
}
@media (max-width: 900px) {
  .agent-layout { grid-template-columns: 1fr; }
  .agent-sidebar { grid-row: 1; position: static; }
  .agent-sidebar nav { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .agent-sidebar nav a { text-align: center; }
  .staff-sidebar { position: static; border-right: 0; border-bottom: 1px solid var(--line); border-radius: 15px 15px 0 0; }
  .staff-sidebar nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); overflow: visible; gap: 8px; }
  .staff-sidebar nav section { min-width: 0; }
  .staff-sidebar nav button { width: 100%; white-space: normal; text-align: left; }
  .staff-content { padding: 20px; }
}
@media (max-width: 640px) {
  .agent-sidebar nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .site-header { height: auto; min-height: 68px; padding: 10px 16px; }
  .site-header { flex-wrap: wrap; gap: 8px; }
  .site-header .brand { flex-shrink: 0; }
  .site-header > nav { width: 100%; flex-wrap: wrap; gap: 4px; }
  .site-header > nav a, .site-header > nav button { white-space: nowrap; padding: 8px; }
  .staff-sidebar nav { align-items: start; }
  main { width: calc(100% - 24px); padding-top: 22px; }
  .card-header, .card-body, .crm-lead-card { padding: 16px; }
  .page-heading h1 { font-size: 26px; }
  .staff-content { padding: 14px; }
}
