:root {
  color-scheme: light;
  --ink: #14231f;
  --muted: #68756f;
  --line: #dce5df;
  --paper: #ffffff;
  --canvas: #f2f5f1;
  --brand: #123f35;
  --brand-2: #1f6655;
  --gold: #c89b4b;
  --gold-soft: #f5ead2;
  --danger: #a33a35;
  --success: #167454;
  --shadow: 0 18px 50px rgba(22, 47, 39, 0.09);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); color: var(--ink); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.site-header {
  height: 76px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: flex;
  align-items: center; justify-content: space-between; background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.school-brand-wrap { position: relative; flex: 0 0 auto; }
.school-brand { border: 0; padding: 4px 7px 4px 4px; color: inherit; background: transparent; font: inherit; text-align: left; cursor: default; border-radius: 10px; }
.school-brand.can-switch { cursor: pointer; }
.school-brand.can-switch:hover, .school-brand.can-switch[aria-expanded="true"] { background: #edf2ef; }
.school-brand-caret { margin-left: 2px; color: var(--muted); font-size: 18px; line-height: 1; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; color: white; background: var(--brand); border-radius: 12px; font: 700 21px serif; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.brand-logo { width: 42px; height: 42px; display: block; border-radius: 10px; object-fit: contain; background: white; border: 1px solid var(--line); }
.brand-logo.brand-logo-default { background: transparent; border: 0; border-radius: 12px; object-fit: contain; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: .08em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; }
nav { display: flex; align-items: center; gap: 8px; }
nav a, .ghost-button { padding: 10px 13px; border-radius: 9px; color: #43504b; font-size: 14px; }
nav a:hover, .ghost-button:hover { background: #edf2ef; color: var(--brand); }
.ghost-button { border: 0; background: transparent; cursor: pointer; }
.hidden { display: none !important; }

main { width: min(1180px, calc(100% - 40px)); min-height: calc(100vh - 134px); margin: 0 auto; padding: 42px 0 70px; }
.loading-card { min-height: 52vh; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid #dbe4df; border-top-color: var(--brand-2); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-layout { display: grid; grid-template-columns: 1.15fr .85fr; min-height: 620px; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.auth-story { padding: 70px 64px; color: white; background: radial-gradient(circle at 82% 15%, rgba(200,155,75,.3), transparent 26%), linear-gradient(145deg, #0e3029, #184c40 70%, #225d4f); position: relative; }
.auth-story::after { content: ""; width: 260px; height: 260px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; position: absolute; right: -85px; bottom: -115px; box-shadow: 0 0 0 50px rgba(255,255,255,.025), 0 0 0 100px rgba(255,255,255,.018); }
.eyebrow { margin: 0 0 16px; color: #d6bd8b; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.auth-story h1 { margin: 0; max-width: 500px; font: 600 clamp(34px, 4vw, 56px)/1.18 Georgia, "Microsoft YaHei", serif; letter-spacing: -.04em; }
.auth-story > p:not(.eyebrow) { max-width: 470px; margin: 26px 0 42px; color: rgba(255,255,255,.72); line-height: 1.9; }
.story-points { display: grid; gap: 14px; }
.story-points div { display: flex; gap: 14px; align-items: center; color: rgba(255,255,255,.86); font-size: 14px; }
.story-points i { width: 26px; height: 26px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: rgba(255,255,255,.1); color: #e9ca8a; font-style: normal; }
.auth-panel { display: grid; place-items: center; padding: 54px; }
.auth-form { width: min(100%, 380px); }
.auth-form h2 { margin: 0; font-size: 28px; }
.auth-form > p { margin: 12px 0 30px; color: var(--muted); line-height: 1.7; }

.field { display: grid; gap: 8px; margin-bottom: 17px; }
.field > span { color: #48554f; font-size: 13px; font-weight: 700; }
.field input, .field select { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #cfd9d3; border-radius: 10px; background: white; color: var(--ink); outline: none; transition: .18s; }
.field input:focus, .field select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(31,102,85,.1); }
.field small { color: var(--muted); line-height: 1.5; }
.primary-button, .secondary-button, .danger-button { min-height: 44px; padding: 0 18px; border-radius: 10px; border: 0; cursor: pointer; font-weight: 700; transition: transform .15s, opacity .15s; }
.primary-button { color: white; background: var(--brand); }
.primary-button:hover { background: var(--brand-2); transform: translateY(-1px); }
.secondary-button { color: var(--brand); background: #e8f0ec; }
.danger-button { color: var(--danger); background: #f7e9e8; }
button:disabled { cursor: wait; opacity: .58; transform: none !important; }
.wide { width: 100%; }
.form-error { padding: 11px 13px; margin: 0 0 18px; border-radius: 9px; background: #faecea; color: var(--danger); font-size: 13px; line-height: 1.5; }

.page-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 28px; }
.page-heading h1 { margin: 5px 0 8px; font: 600 clamp(30px, 4vw, 46px)/1.15 Georgia, "Microsoft YaHei", serif; letter-spacing: -.035em; }
.page-heading > div > span { color: var(--muted); }
.identity-chip { display: flex; align-items: center; gap: 11px; min-width: 190px; padding: 12px 15px; border-radius: 12px; background: white; border: 1px solid var(--line); }
.identity-chip i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--brand-2); font-style: normal; }
.identity-chip strong, .identity-chip small { display: block; }
.identity-chip small { margin-top: 3px; color: var(--muted); }
.header-school-switcher { display: flex; align-items: center; gap: 7px; min-width: 190px; }
.header-school-switcher span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.header-school-switcher select { min-width: 120px; max-width: 220px; height: 36px; padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); }
.header-school-switcher select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(31,102,85,.1); outline: none; }
.school-brand-menu { position: absolute; z-index: 80; top: calc(100% + 8px); left: 0; min-width: 280px; max-width: min(380px,calc(100vw - 24px)); padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 18px 45px rgba(25,40,36,.16); }
.school-brand-menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.school-brand-menu button:hover { background: #edf2ef; }
.school-brand-menu button:disabled { cursor: default; opacity: .66; }
.school-brand-menu img, .school-brand-menu i { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: white; font-style: normal; font-weight: 800; }
.school-brand-menu strong, .school-brand-menu small { display: block; }
.school-brand-menu small { margin-top: 2px; color: var(--muted); }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 25px; }
.metric-card { min-height: 142px; padding: 23px; border-radius: 16px; color: white; background: var(--brand); position: relative; overflow: hidden; }
.metric-card:nth-child(2) { background: #2e6455; }
.metric-card:nth-child(3) { color: var(--ink); background: var(--gold-soft); }
.metric-card:nth-child(4) { color: var(--ink); background: white; border: 1px solid var(--line); }
.metric-card span { display: block; font-size: 13px; opacity: .72; }
.metric-card strong { display: block; margin: 14px 0 8px; font: 600 32px Georgia, serif; }
.metric-card small { opacity: .66; }

.content-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.card { background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 30px rgba(22,47,39,.04); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 21px 23px; border-bottom: 1px solid var(--line); }
.card-header h2 { margin: 0; font-size: 18px; }
.card-header span { color: var(--muted); font-size: 13px; }
.card-body { padding: 22px; }
.link-list { display: grid; gap: 12px; }
.link-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 16px; background: #f7f9f7; border: 1px solid #e5ebe7; border-radius: 12px; }
.link-item strong, .link-item span, .link-item small { display: block; }
.link-item span { max-width: 560px; margin: 6px 0; color: var(--brand-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-item small { color: var(--muted); }
.link-actions { display: flex; gap: 7px; }
.link-status { display: inline-flex; margin-left: 6px; padding: 3px 6px; border-radius: 999px; color: var(--muted); background: #e7ebe8; font: 700 10px/1 sans-serif; font-style: normal; vertical-align: 2px; }
.link-status.active { color: var(--success); background: #dff0e8; }
.empty-state { padding: 38px 20px; text-align: center; color: var(--muted); border: 1px dashed #cad6cf; border-radius: 12px; }
.side-note { margin-top: 16px; padding: 15px; border-radius: 10px; color: #6d562e; background: var(--gold-soft); font-size: 13px; line-height: 1.7; }

.registration-shell { max-width: 940px; margin: 0 auto; }
.registration-banner { padding: 38px 42px; border-radius: 20px 20px 0 0; color: white; background: linear-gradient(135deg, #10352d, #246250); }
.registration-banner h1 { margin: 5px 0 13px; font: 600 38px Georgia, "Microsoft YaHei", serif; }
.registration-banner > span { color: rgba(255,255,255,.72); }
.referral-badge { display: inline-flex; gap: 8px; align-items: center; margin-top: 24px; padding: 9px 12px; border-radius: 9px; background: rgba(255,255,255,.1); font-size: 13px; }
.registration-card { padding: 36px 42px; background: white; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 20px 20px; box-shadow: var(--shadow); }
.consultation-content { padding: 28px 42px 8px; background: #f7f9fc; border-inline: 1px solid var(--line); }
.consultation-resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.consultation-resource { display: grid; align-content: start; gap: 9px; min-height: 210px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.consultation-resource span { color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.consultation-resource h3, .consultation-resource p { margin: 0; }
.consultation-resource p { color: var(--muted); line-height: 1.65; }
.consultation-resource button { align-self: end; justify-self: start; }
.wechat-entry { margin: 18px 0; }
.consultation-card { border-top: 1px solid var(--line); }
.choice-field { padding: 0; border: 0; }
.choice-field legend { margin-bottom: 8px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.program-choice { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; min-height: 54px; padding: 10px 14px; border: 1px solid #cfd9d3; border-radius: 10px; }
.program-choice select { border: 0; padding: 0; height: auto; }
.program-price { color: var(--brand); font-weight: 800; white-space: nowrap; }

.order-list { display: grid; gap: 15px; }
.order-card { padding: 20px; border: 1px solid var(--line); border-radius: 13px; }
.order-top { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.order-top h3 { margin: 0 0 7px; }
.order-top p { margin: 0; color: var(--muted); font-size: 13px; }
.status { display: inline-flex; padding: 6px 9px; border-radius: 999px; color: #6d562e; background: var(--gold-soft); font-size: 12px; font-weight: 700; }
.status.paid, .status.active { color: var(--success); background: #e6f3ed; }
.order-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.order-meta div { padding: 12px; background: #f6f8f6; border-radius: 9px; }
.order-meta span, .order-meta strong { display: block; }
.order-meta span { color: var(--muted); font-size: 12px; }
.order-meta strong { margin-top: 7px; font-size: 14px; }

.success-panel { padding: 48px 28px; text-align: center; }
.success-mark { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 22px; border-radius: 50%; color: white; background: var(--success); font-size: 28px; }
.success-mark.warning { background: #b2873f; }
.success-panel h2 { font-size: 28px; margin: 0 0 12px; }
.success-panel p { color: var(--muted); line-height: 1.8; }
.success-detail { max-width: 480px; margin: 25px auto; padding: 18px; border-radius: 12px; background: #f2f6f3; text-align: left; }
.success-detail div { display: flex; justify-content: space-between; gap: 18px; padding: 7px 0; }
.credential-card { max-width: 480px; margin: 0 auto 20px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fffaf0; text-align: left; }
.credential-card p { margin: 6px 0 12px; font-size: 13px; }
.student-temporary-password { min-height: 54px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.centered-actions { justify-content: center; flex-wrap: wrap; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(9,28,23,.56); }
.modal { width: min(500px, 100%); padding: 28px; border-radius: 18px; background: white; box-shadow: 0 30px 80px rgba(0,0,0,.24); }
.modal h2 { margin: 0 0 8px; }
.modal > p { margin: 0 0 24px; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 80; display: grid; gap: 9px; }
.toast { max-width: 380px; padding: 13px 16px; border-radius: 10px; color: white; background: var(--brand); box-shadow: var(--shadow); animation: toast-in .2s ease-out; }
.toast.error { background: var(--danger); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

.staff-heading { align-items: center; }
.staff-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: start; }
.staff-sidebar { position: sticky; top: 98px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 10px 30px rgba(22,47,39,.04); }
.staff-sidebar > p { margin: 2px 9px 11px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.staff-sidebar nav { display: grid; gap: 4px; }
.staff-sidebar nav button { width: 100%; padding: 11px 12px; border: 0; border-radius: 9px; color: #48554f; background: transparent; cursor: pointer; text-align: left; }
.staff-sidebar nav button:hover { background: #edf3ef; color: var(--brand); }
.staff-sidebar nav button.active { color: white; background: var(--brand); font-weight: 700; }
.scope-note { display: grid; gap: 6px; margin-top: 16px; padding: 13px 11px; border-top: 1px solid var(--line); }
.scope-note strong { font-size: 12px; }
.scope-note span { color: var(--muted); font-size: 12px; line-height: 1.55; }
.staff-content { min-width: 0; }
.loading-card.compact { min-height: 360px; }
.management-heading { min-height: 58px; display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 18px; }
.management-heading h2 { margin: 0 0 7px; font-size: 25px; }
.management-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.management-metrics { grid-template-columns: repeat(4, 1fr); }
.management-metrics .metric-card { min-height: 125px; }
.summary-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin: 0 0 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }
.summary-strip div { padding: 18px 20px; background: white; }
.summary-strip span, .summary-strip strong { display: block; }
.summary-strip span { color: var(--muted); font-size: 12px; }
.summary-strip strong { margin-top: 8px; font-size: 20px; }
.management-card { box-shadow: none; }
.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 13px; }
.data-table th { padding: 0 14px 12px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; text-align: left; }
.data-table td { padding: 15px 14px; border-bottom: 1px solid #edf1ee; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafcfb; }
.data-table td strong, .data-table td small { display: block; }
.data-table td small { max-width: 260px; margin-top: 5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.status-pill { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-pill.good { color: var(--success); background: #e6f3ed; }
.status-pill.bad { color: var(--danger); background: #f8e9e7; }
.status-pill.waiting { color: #7b5a1d; background: var(--gold-soft); }
.table-action { padding: 7px 9px; border: 0; border-radius: 7px; color: var(--brand); background: #e8f0ec; cursor: pointer; font-size: 12px; font-weight: 700; }
.school-logo-thumb, .school-logo-fallback { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; object-fit: contain; background: white; }
.school-logo-fallback { color: white; background: var(--brand); font-weight: 800; }
.table-action.danger { color: var(--danger); background: #f8e9e7; }
.table-link { padding: 0; border: 0; color: var(--primary); background: transparent; cursor: pointer; font: inherit; font-weight: 700; text-align: left; }
.table-link:hover { text-decoration: underline; }
.crm-detail-panel { min-height: 260px; }
.enrollment-blocker { margin-bottom: 18px; }
.row-actions { display: flex; gap: 6px; }
.error-text { color: var(--danger) !important; }
.management-modal { max-height: min(760px, calc(100vh - 40px)); overflow-y: auto; }
.credential-value { width: 100%; resize: vertical; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.modal-fields .form-grid { gap: 0 12px; }
.agent-detail-grid { display: grid; gap: 20px; margin-top: 20px; }
.agent-detail-grid .card-header > strong { color: var(--brand); font-size: 13px; }
.positive-money { color: var(--success); }
.negative-money { color: var(--danger); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.pagination > div { display: flex; gap: 8px; }
.pagination button { min-height: 36px; }
.wide-modal { width: min(920px, 100%); }
.detail-title { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.detail-title h2 { margin: 0 0 7px; }
.detail-title p { margin: 0; color: var(--muted); }
.compact-summary { margin: 22px 0; }
.compact-summary strong { font-size: 14px; }
.detail-section-title { margin: 24px 0 12px; font-size: 15px; }
.report-scope { margin: 20px 0 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf9; }
.report-actions { margin-top: 18px; }
.learning-section { margin-top: 20px; }
.course-description, .access-note { margin: 14px 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.access-note { padding: 10px 12px; border-radius: 9px; background: #f4f6f5; }

footer { min-height: 58px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #7a8680; border-top: 1px solid var(--line); font-size: 12px; }
.icp-filing { color: inherit; text-decoration: none; opacity: 0.75; }
.icp-filing:hover { text-decoration: underline; opacity: 1; }

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-story { padding: 44px 38px; }
  .auth-panel { padding: 40px 32px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .staff-layout { grid-template-columns: 1fr; }
  .staff-sidebar { position: static; }
  .staff-sidebar nav { display: flex; overflow-x: auto; }
  .staff-sidebar nav button { width: auto; flex: 0 0 auto; }
  .scope-note { display: none; }
  .report-scope { display: grid; }
  .management-metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-header { height: auto; min-height: 68px; padding: 10px 16px; }
  .brand small { display: none; }
  nav { gap: 0; }
  nav a, .ghost-button { padding: 9px; font-size: 13px; }
  main { width: min(100% - 24px, 1180px); padding-top: 22px; }
  .auth-story { padding: 34px 26px; }
  .auth-story h1 { font-size: 35px; }
  .auth-panel { padding: 34px 24px; }
  .page-heading { align-items: start; flex-direction: column; }
  .identity-chip { width: 100%; }
  .header-school-switcher { width: 100%; }
  .header-school-switcher select { flex: 1; max-width: none; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { min-height: 124px; padding: 18px; }
  .metric-card strong { font-size: 25px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .registration-banner, .registration-card { padding: 28px 22px; }
  .consultation-content { padding: 22px; }
  .consultation-resource-grid { grid-template-columns: 1fr; }
  .link-item { grid-template-columns: 1fr; }
  .link-actions { justify-content: stretch; }
  .link-actions button { flex: 1; }
  .order-meta { grid-template-columns: 1fr; }
  .management-heading { align-items: stretch; flex-direction: column; }
  .management-heading .primary-button { width: 100%; }
  .summary-strip { grid-template-columns: 1fr; }
  footer { padding: 16px 20px; flex-direction: column; align-items: start; }
}
.section-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.section-tabs button {
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.section-tabs button.active {
  color: #fff;
  background: var(--brand);
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
}

.action-menu {
  position: relative;
}

.action-menu summary {
  padding: 6px 10px;
  color: var(--brand);
  list-style: none;
  cursor: pointer;
}

.action-menu summary::-webkit-details-marker { display: none; }

.action-menu > div {
  position: absolute;
  z-index: 20;
  right: 0;
  display: grid;
  min-width: 140px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(24, 35, 55, .14);
}

.analytics-detail { margin-bottom: 18px; }
.analytics-detail > summary {
  padding: 16px 20px;
  font-weight: 700;
  cursor: pointer;
}

.channel-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.channel-options label { display: flex; gap: 6px; align-items: center; }

.notification-unread { background: rgba(31, 111, 235, .045); }
.notification-list { display: grid; gap: 10px; }
.notification-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.notification-item.unread { border-left: 4px solid var(--primary); }
.notification-item p { margin: 6px 0; color: var(--muted); }
.agent-finance-grid, .student-service-grid { margin-top: 18px; }

.source-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 9px;
  border: 1px solid rgba(31, 111, 235, .2);
  border-radius: 999px;
  color: #1659ad;
  background: rgba(31, 111, 235, .08);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
:root { --acquisition-dialog-width: 960px; }
.acquisition-dialog { border: 0; border-radius: 18px; padding: 0; width: min(var(--acquisition-dialog-width), 94vw); max-height: 90vh; color: #102f28; }
.acquisition-dialog::backdrop { background: #102f2899; }
.acquisition-dialog .dialog-error { padding: 0 24px; }
.intake-details { margin: 18px 0; }
.intake-details summary { cursor: pointer; margin-bottom: 14px; }
.material-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin: 20px 0; }
.material-item { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px; border: 1px solid #dbe5df; border-radius: 12px; overflow-wrap: anywhere; }
.material-item img { width: 100%; height: 170px; object-fit: contain; background: #f3f6f4; }
.poster-preview { display: block; max-width: 100%; max-height: 60vh; margin: 0 auto 18px; object-fit: contain; }
.referral-qr { width: 130px; height: 130px; object-fit: contain; }
.material-upload { padding: 16px; background: #f3f6f4; border-radius: 12px; }
.lead-library .card { margin-bottom: 1.25rem; }
.library-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: end; }
.library-filters .row-actions { grid-column: 1 / -1; }
.library-metrics { margin-top: 1.25rem; }
.library-cost-hint { font-size: .875rem; line-height: 1.65; margin: 1rem 0; }
.library-details td { max-width: 19rem; overflow-wrap: anywhere; }
.lead-library input[type="checkbox"], .library-confirm input { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; cursor: pointer; }
.library-confirm { display: flex; align-items: start; gap: .75rem; margin-top: 1rem; font-size: .875rem; }
.library-definitions { padding: 1.25rem; font-size: .875rem; line-height: 1.7; }
.library-definitions summary { cursor: pointer; font-weight: 600; }
@media (max-width: 760px) { .library-filters { grid-template-columns: 1fr 1fr; } .lead-library .card-header { flex-wrap: wrap; gap: .75rem; } }
@media (max-width: 480px) { .library-filters { grid-template-columns: 1fr; } }
.project-navigation { margin-bottom: 1.25rem; }
.agent-navigation{display:flex;gap:8px;align-items:center;overflow-x:auto;padding:8px;margin:0 0 20px;border:1px solid var(--line);border-radius:14px;background:var(--paper)}
.agent-navigation a{display:inline-flex;align-items:center;min-height:40px;padding:0 15px;border-radius:10px;color:var(--muted);font-weight:650;white-space:nowrap;text-decoration:none}
.agent-navigation a:hover,.agent-navigation a.active{background:var(--primary);color:#fff}
.compact-filter{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.compact-filter .field{min-width:min(100%,260px);margin:0;flex:1}
.project-qr { margin-top: 1.25rem; }
.project-qr summary { cursor: pointer; margin-bottom: 1rem; }
.project-url { overflow-wrap: anywhere; max-width: 38rem; }
/* CRM working cards: color plus readable status labels. */
.crm-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:16px;margin:20px 0}
.crm-lead-card{border:2px solid;border-radius:12px;padding:18px;min-width:0;color:#172b40}
.crm-lead-card header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.crm-lead-card h3{margin:0;font-size:1.125rem;overflow-wrap:anywhere}
.crm-lead-card p{font-size:1rem;margin:12px 0;overflow-wrap:anywhere}
.crm-lead-card .row-actions{flex-wrap:wrap}
.crm-note{white-space:pre-wrap}
.crm-status{font-size:.875rem;font-weight:600}
.crm-lead-card.BLUE,.crm-chip.BLUE{background:#edf7ff;border-color:#5ca8dc}
.crm-lead-card.GREEN,.crm-chip.GREEN{background:#edf9f0;border-color:#51a76b}
.crm-lead-card.RED,.crm-chip.RED{background:#fff0f0;border-color:#d45d5d}
.crm-lead-card.YELLOW,.crm-chip.YELLOW{background:#fff9db;border-color:#bd9718}
.crm-legend{display:flex;gap:8px;flex-wrap:wrap}
.crm-chip{display:inline-block;border:1px solid;border-radius:6px;padding:6px 10px;color:#172b40;font-size:.875rem}
