:root {
  --ink: #183833;
  --muted: #6b7e79;
  --soft: #edf7f3;
  --surface: #ffffff;
  --canvas: #f7faf8;
  --line: #deebe6;
  --brand: #36b79f;
  --brand-2: #238e7a;
  --accent: #5bb6a1;
  --accent-soft: #e5f5f1;
  --danger: #a44f48;
  --danger-soft: #fae9e7;
  --success: #278f7a;
  --success-soft: #e8f6f2;
  --shadow: 0 18px 50px rgba(31, 82, 72, 0.07);
  --radius: 18px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 25px 18px 20px; background: #fff; color: var(--ink); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 5; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 30px; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #153f38; background: linear-gradient(145deg, #f6c48b, #d9924b); font-weight: 800; font-size: 18px; }
.chosen-brand { position: relative; display: block; }
.brand-logo-crop { position: relative; width: 185px; height: 32px; overflow: hidden; }
.brand-logo-crop img { position: absolute; left: 0; top: 0; width: 185px; height: auto; display: block; }
.brand-product { margin: 7px 0 0 39px; color: #7a8c87; font-size: 10px; letter-spacing: .18em; }
.nav-label { padding: 0 12px 9px; font-size: 9px; letter-spacing: .16em; color: #a0ada9; }
.nav { display: grid; gap: 5px; }
.nav-item { border: 0; color: #73847f; background: transparent; padding: 11px 12px; border-radius: 12px; display: flex; align-items: center; gap: 11px; text-align: left; transition: .18s ease; }
.nav-item:hover { background: #f2f8f5; color: var(--ink); }
.nav-item.active { color: #218c78; background: #e8f6f2; box-shadow: none; font-weight: 650; }
.nav-item svg { width: 18px; height: 18px; }
.nav-spacer { flex: 1; }
.profile { display: flex; align-items: center; gap: 10px; padding: 14px 8px 0; border-top: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #dff3ee; color: #218c78; font-weight: 700; font-size: 13px; }
.profile-name { font-size: 13px; font-weight: 600; }
.profile-role { color: #93a09c; font-size: 10px; margin-top: 2px; }
.profile-logout { width: 30px; height: 30px; flex: 0 0 auto; border: 0; border-radius: 8px; display: grid; place-items: center; color: rgba(255,255,255,.5); background: transparent; }
.profile-logout { color: #9aa7a3; }
.profile-logout:hover { color: var(--brand-2); background: var(--soft); }
.profile-logout svg { width: 15px; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, .9fr) minmax(520px, 1.1fr); background: #fff; }
.login-story { position: relative; overflow: hidden; padding: 42px 55px; color: var(--ink); background: #edf6f2; display: flex; flex-direction: column; }
.login-story::after { content: ""; position: absolute; left: -140px; bottom: -220px; width: 460px; height: 460px; border: 70px solid rgba(54,183,159,.055); border-radius: 50%; }
.login-brand { padding: 0; }
.login-logo { width: 220px; height: 38px; }
.login-logo img { width: 220px; }
.login-copy { position: relative; z-index: 2; margin: auto 0; max-width: 560px; }
.login-copy h1 { margin: 22px 0 18px; color: var(--ink); font-size: clamp(34px, 4vw, 55px); line-height: 1.28; letter-spacing: -.055em; }
.login-copy p { max-width: 285px; color: #647b75; font-size: 14px; line-height: 1.8; }
.login-proof { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 5px; padding-top: 20px; border-top: 1px solid rgba(38,106,93,.12); }
.login-proof strong { color: var(--brand-2); font-size: 11px; letter-spacing: .16em; }
.login-proof span { color: #80928d; font-size: 11px; }
.login-visual { position: absolute; z-index: 1; right: 5%; bottom: 15%; width: 280px; height: 300px; }
.login-visual .arch { position: absolute; bottom: 0; width: 160px; height: 255px; border-radius: 90px 90px 16px 16px; }
.login-visual .arch-back { right: 0; bottom: 35px; background: rgba(171,219,210,.33); }
.login-visual .arch-front { right: 90px; z-index: 2; display: grid; place-content: center; text-align: center; color: #fff; background: #5ab69f; box-shadow: 0 25px 45px rgba(45,132,114,.18); }
.login-visual .arch-front strong { font-size: 62px; font-weight: 350; line-height: 1; }
.login-visual .arch-front span { margin-top: 8px; font-size: 11px; }
.login-visual small { position: absolute; right: -4px; bottom: 42px; color: #337b6c; letter-spacing: .16em; font-size: 9px; line-height: 1.5; }
.login-panel { padding: 35px; display: grid; place-items: center; background: #fff; }
.login-box { width: min(430px, 100%); }
.login-box h2 { margin: 8px 0 7px; font-family: ui-serif, "Songti SC", serif; font-size: 29px; }
.login-box > p { margin-bottom: 24px; color: var(--muted); font-size: 12px; }
.login-box .field { margin-bottom: 15px; }
.login-submit { width: 100%; height: 45px; margin-top: 4px; }
.login-error { margin-bottom: 15px; padding: 10px 12px; border-radius: 9px; color: var(--danger); background: var(--danger-soft); font-size: 11px; }
.demo-divider { margin: 24px 0 13px; display: flex; align-items: center; gap: 10px; color: #929d99; font-size: 10px; }
.demo-divider::before, .demo-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.demo-accounts { display: grid; gap: 8px; }
.demo-account { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; display: flex; align-items: center; gap: 11px; text-align: left; background: #fff; transition: .17s ease; }
.demo-account:hover { border-color: #9ebbb5; transform: translateX(2px); box-shadow: 0 6px 16px rgba(24,49,43,.05); }
.demo-account strong, .demo-account small { display: block; }
.demo-account strong { color: var(--ink); font-size: 12px; }
.demo-account small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.demo-avatar { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: var(--brand); font-size: 12px; font-weight: 700; }
.demo-avatar.orange { background: #b97838; }
.demo-avatar.dark { background: #25312e; }
.demo-arrow { margin-left: auto; color: #9aa5a1; }
.login-note { margin-top: 16px; color: #99a39f; text-align: center; font-size: 9px; }

.main { min-width: 0; padding: 0 38px 48px; }
.topbar { height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.eyebrow { color: var(--muted); font-size: 12px; letter-spacing: .03em; }
h1 { margin: 5px 0 0; font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 27px; letter-spacing: -.035em; font-weight: 680; }
h2, h3, p { margin-top: 0; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.wrap-actions { flex-wrap: wrap; justify-content: flex-end; }
.row-actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.danger-link { color: var(--danger); }
.warning-box { padding: 13px 15px; border: 1px solid #efd3cf; border-radius: 10px; color: #83443e; background: var(--danger-soft); font-size: 12px; line-height: 1.6; }
.audit-table { max-height: 430px; overflow: auto; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: grid; place-items: center; color: var(--muted); }
.icon-button svg { width: 18px; }
.button { border: 0; border-radius: 11px; padding: 10px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; font-size: 13px; transition: .18s ease; }
.button svg { width: 17px; height: 17px; }
.button.primary { color: #fff; background: var(--brand); box-shadow: 0 8px 16px rgba(22,78,69,.15); }
.button.primary:hover { background: var(--brand-2); transform: translateY(-1px); }
.button.secondary { color: var(--brand); background: var(--success-soft); }
.button.ghost { color: var(--muted); background: transparent; border: 1px solid var(--line); }
.button.small { padding: 7px 10px; font-size: 12px; }
.button:disabled { opacity: .55; cursor: wait; transform: none; }

.page-enter { animation: pageIn .28s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(5px); } }
.hero { overflow: hidden; position: relative; padding: 32px 32px; color: var(--ink); background: #edf6f2; border-radius: 24px; box-shadow: none; border: 1px solid #e2efea; }
.hero::after { content: ""; position: absolute; right: 8%; top: 24px; width: 150px; height: 175px; background: rgba(84,181,158,.22); border-radius: 90px 90px 16px 16px; box-shadow: 95px 32px 0 rgba(189,225,217,.37); }
.hero-kicker { display: flex; align-items: center; gap: 8px; color: var(--brand-2); font-size: 11px; font-weight: 650; letter-spacing: .06em; }
.hero-kicker span { width: 6px; height: 6px; background: var(--brand); border-radius: 50%; box-shadow: 0 0 0 5px rgba(54,183,159,.12); }
.hero h2 { position: relative; z-index: 1; margin: 12px 0 8px; max-width: 650px; font-family: ui-serif, "Songti SC", serif; font-size: 25px; line-height: 1.4; font-weight: 600; }
.hero p { position: relative; z-index: 1; margin: 0; color: #71847e; font-size: 13px; }

.action-hero { min-height: 190px; padding: 30px 34px; display: grid; grid-template-columns: minmax(320px, 1fr) auto minmax(250px, .55fr); align-items: center; gap: 34px; color: #fff; background: linear-gradient(120deg, #153e37, #22685b); border-radius: 24px; box-shadow: 0 18px 42px rgba(24,79,68,.12); }
.action-hero .hero-kicker { color: #8edbc9; }
.action-hero-copy h2 { margin: 13px 0 8px; font-family: ui-serif, "Songti SC", serif; font-size: 27px; font-weight: 520; }
.action-hero-copy h2 strong { color: #f1bd84; font-size: 36px; }
.action-hero-copy p { margin: 0; color: rgba(255,255,255,.62); font-size: 12px; line-height: 1.7; }
.action-progress { padding: 0 24px; border-left: 1px solid rgba(255,255,255,.1); border-right: 1px solid rgba(255,255,255,.1); }
.progress-ring { width: 106px; height: 106px; padding: 8px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(#efb77d var(--progress), rgba(255,255,255,.1) 0); }
.progress-ring::before { content: ""; grid-area: 1 / 1; width: 90px; height: 90px; border-radius: 50%; background: #1b5147; }
.progress-ring > div { z-index: 1; grid-area: 1 / 1; text-align: center; }
.progress-ring strong, .progress-ring span { display: block; }
.progress-ring strong { font-size: 20px; }
.progress-ring span { margin-top: 4px; color: rgba(255,255,255,.5); font-size: 9px; }
.action-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.action-stats > div { min-width: 0; padding: 13px 12px; border-radius: 12px; background: rgba(255,255,255,.07); }
.action-stats span, .action-stats strong { display: block; }
.action-stats span { color: rgba(255,255,255,.5); font-size: 9px; white-space: nowrap; }
.action-stats strong { margin-top: 6px; font-size: 20px; }
.action-stats .high strong { color: #f2b779; }
.action-stats .quiet { opacity: .65; }
.registration-alert { margin-top: 14px; padding: 12px 15px; display: flex; align-items: center; gap: 11px; color: #7c4f26; background: #fff5e9; border: 1px solid #f1dfc8; border-radius: 13px; }
.registration-alert > svg { width: 19px; flex: 0 0 auto; }
.registration-alert > div { flex: 1; }
.registration-alert strong, .registration-alert span { display: block; }
.registration-alert strong { font-size: 11px; }
.registration-alert span { margin-top: 3px; color: #a27b55; font-size: 9px; }
.today-focus { margin-top: 18px; padding: 22px 24px; display: grid; grid-template-columns: auto minmax(150px, .65fr) minmax(280px, 1.4fr) auto; gap: 22px; align-items: center; border-color: #bddfd6; box-shadow: 0 13px 32px rgba(31, 91, 78, .08); }
.today-focus-label { align-self: stretch; padding-right: 20px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.today-focus-label span, .today-focus-label b { display: block; white-space: nowrap; }
.today-focus-label span { color: var(--brand-2); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.today-focus-label b { margin-top: 6px; color: #9a642f; font-size: 9px; }
.today-focus-person { display: flex; align-items: center; gap: 10px; }
.today-focus-person strong, .today-focus-person span { display: block; }
.today-focus-person strong { font-size: 14px; }
.today-focus-person span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.today-focus-person em { color: inherit; font-style: normal; }
.today-focus-person em.overdue { color: var(--danger); font-weight: 700; }
.today-focus-action > span { color: #a36b34; font-size: 9px; font-weight: 750; }
.today-focus-action > strong { display: block; margin-top: 5px; color: #2d403b; font-size: 13px; line-height: 1.55; }
.today-focus-action p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.today-focus-buttons { display: grid; gap: 7px; }
.today-clear { margin-top: 18px; padding: 20px 22px; display: flex; align-items: center; gap: 13px; }
.today-clear > svg { width: 23px; color: var(--brand-2); }
.today-clear > div { flex: 1; }
.today-clear strong, .today-clear span { display: block; }
.today-clear strong { font-size: 13px; }
.today-clear span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.action-layout { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 18px; align-items: start; }
.action-feed { display: grid; gap: 14px; }
.action-queue { margin-top: 18px; }
.action-group { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 17px; }
.action-group > summary { list-style: none; cursor: pointer; }
.action-group > summary::-webkit-details-marker { display: none; }
.action-group-head { min-height: 58px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.action-group-head > div { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 9px; }
.action-group-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 5px rgba(54,183,159,.1); }
.action-group.high .action-group-dot { background: #d88a4b; box-shadow: 0 0 0 5px rgba(216,138,75,.11); }
.action-group.defer .action-group-dot { background: #9ca8a4; box-shadow: 0 0 0 5px rgba(156,168,164,.1); }
.action-group-head strong { font-size: 13px; }
.action-group-head small { color: var(--muted); font-size: 10px; }
.action-group-head > b { min-width: 25px; height: 25px; padding: 0 7px; display: grid; place-items: center; color: var(--brand-2); background: var(--soft); border-radius: 8px; font-size: 11px; }
.action-cards { display: grid; }
.action-card { padding: 17px 18px; display: grid; grid-template-columns: minmax(160px, .8fr) minmax(200px, 1.15fr) minmax(250px, 1.45fr) auto; gap: 16px; align-items: center; border-bottom: 1px solid var(--line); }
.action-card:last-child { border-bottom: 0; }
.action-card.defer { opacity: .78; }
.action-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.action-score { margin-left: 5px; padding: 3px 5px; color: #9d6028; background: #fff0df; border-radius: 5px; font-size: 8px; vertical-align: middle; }
.action-reasons { display: flex; flex-wrap: wrap; gap: 5px; }
.action-reasons span { padding: 5px 7px; color: #53635e; background: #f1f6f3; border-radius: 7px; font-size: 9px; line-height: 1.35; }
.action-advice > span { color: #a26a34; font-size: 9px; font-weight: 750; }
.action-advice p { margin: 5px 0 0; color: #40504b; font-size: 11px; line-height: 1.6; }
.action-card-actions { display: grid; gap: 6px; justify-items: stretch; }
.action-empty { padding: 26px 20px; color: var(--muted); text-align: center; font-size: 11px; }
.action-side { position: sticky; top: 18px; }
.action-side .panel-header > svg { width: 21px; color: #ca8a4d; }
.ranking-factors { padding: 8px 20px; }
.ranking-factors > div { padding: 14px 0; display: grid; grid-template-columns: 27px 1fr; gap: 9px; border-bottom: 1px solid var(--line); }
.ranking-factors > div:last-child { border-bottom: 0; }
.ranking-factors b { color: #bd7b3d; font-size: 9px; }
.ranking-factors span { color: var(--muted); font-size: 10px; line-height: 1.55; }
.ranking-factors strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 11px; }
.action-side-foot { margin: 4px 15px 15px; padding: 15px; background: var(--soft); border-radius: 12px; }
.action-side-foot strong, .action-side-foot span { display: block; }
.action-side-foot strong { font-size: 22px; }
.action-side-foot span { margin: 4px 0 8px; color: var(--muted); font-size: 9px; }
.ranking-explanation { margin-top: 12px; padding: 0 5px; color: var(--muted); font-size: 10px; }
.ranking-explanation summary { width: fit-content; cursor: pointer; color: var(--brand-2); font-weight: 650; }
.ranking-explanation p { max-width: 760px; margin: 8px 0 2px; line-height: 1.65; }

.metrics { margin: 18px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 19px 20px; }
.metric-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.metric-icon { width: 31px; height: 31px; border-radius: 9px; display: grid; place-items: center; background: var(--soft); color: var(--brand); }
.metric-icon.orange { background: var(--accent-soft); color: #b97532; }
.metric-icon.red { background: var(--danger-soft); color: var(--danger); }
.metric-icon svg { width: 15px; }
.metric-value { margin-top: 12px; font-size: 27px; line-height: 1; font-weight: 720; letter-spacing: -.03em; }
.metric-foot { margin-top: 9px; color: var(--muted); font-size: 11px; }
.metric-foot strong { color: var(--success); font-weight: 650; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-header { min-height: 65px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.panel-title { font-size: 15px; font-weight: 720; }
.panel-subtitle { color: var(--muted); font-size: 11px; margin-top: 4px; }
.text-link { border: 0; padding: 4px; color: var(--brand-2); background: none; font-size: 12px; font-weight: 650; }
.priority-list { padding: 3px 20px; }
.priority-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(150px, .95fr) 85px 76px; gap: 12px; align-items: center; min-height: 72px; border-bottom: 1px solid var(--line); }
.priority-row:last-child { border-bottom: 0; }
.person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.person-avatar { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #edf2ee; color: var(--brand); font-size: 12px; font-weight: 750; }
.person-name { font-size: 13px; font-weight: 680; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-meta { color: var(--muted); font-size: 11px; margin-top: 4px; }
.reason { color: #46524e; font-size: 12px; line-height: 1.5; }
.due { font-size: 11px; color: var(--muted); }
.due.overdue { color: var(--danger); font-weight: 650; }
.risk-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; background: var(--accent); }
.risk-dot.high { background: var(--danger); }

.pipeline { padding: 21px 20px 20px; }
.pipeline-row { margin-bottom: 19px; }
.pipeline-row:last-child { margin-bottom: 0; }
.pipeline-label { margin-bottom: 7px; display: flex; justify-content: space-between; font-size: 12px; }
.pipeline-label span:last-child { color: var(--muted); }
.bar { height: 7px; overflow: hidden; background: var(--soft); border-radius: 9px; }
.bar-fill { height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--brand), #5a9488); }
.insight { margin: 20px; padding: 15px; border-radius: 12px; background: #f7f3eb; border: 1px solid #eee3d2; }
.insight-label { color: #9c672e; font-size: 10px; letter-spacing: .1em; font-weight: 750; }
.insight p { margin: 8px 0 0; color: #5d5144; font-size: 12px; line-height: 1.65; }

.toolbar { margin-bottom: 16px; display: flex; justify-content: space-between; gap: 12px; }
.search-box { position: relative; width: min(340px, 100%); }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; color: #8a9692; }
.search-box input { width: 100%; height: 40px; padding: 0 13px 0 38px; border: 1px solid var(--line); border-radius: 11px; background: #fff; outline: none; }
.search-box input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: #73a49a; box-shadow: 0 0 0 3px rgba(53,116,94,.09); }
.filters { display: flex; gap: 8px; }
.filter-select { height: 40px; padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: #fff; outline: none; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 18px; text-align: left; color: #88938f; background: #fafbf8; border-bottom: 1px solid var(--line); font-size: 10px; letter-spacing: .06em; font-weight: 650; white-space: nowrap; }
td { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 12px; vertical-align: middle; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #fafbf8; }
tbody tr:last-child td { border-bottom: 0; }
.clickable-row { cursor: pointer; }
.tag { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 99px; background: var(--soft); color: #52605b; font-size: 10px; font-weight: 650; white-space: nowrap; }
.tag.orange { color: #9b6229; background: var(--accent-soft); }
.tag.green { color: var(--success); background: var(--success-soft); }
.tag.red { color: var(--danger); background: var(--danger-soft); }
.probability { display: flex; align-items: center; gap: 8px; }
.probability .bar { width: 58px; height: 5px; }
.probability span { font-size: 11px; font-weight: 650; }
.empty { padding: 55px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 30px; margin-bottom: 8px; color: #aab3af; }
.empty strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 5px; }

.back-row { margin-bottom: 14px; }
.back-button { border: 0; background: transparent; color: var(--muted); padding: 4px 0; display: flex; align-items: center; gap: 6px; font-size: 12px; }
.back-button svg { width: 16px; }
.detail-head { padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.detail-identity { display: flex; align-items: center; gap: 15px; }
.detail-avatar { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: var(--brand); font-size: 17px; font-weight: 750; }
.detail-name { font-family: ui-serif, "Songti SC", serif; font-size: 22px; font-weight: 650; }
.detail-meta { color: var(--muted); font-size: 12px; margin-top: 6px; }
.more-actions { position: relative; }
.more-actions > summary { list-style: none; }
.more-actions > summary::-webkit-details-marker { display: none; }
.more-actions-menu { position: absolute; z-index: 12; right: 0; top: calc(100% + 7px); min-width: 170px; padding: 6px; display: grid; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 15px 35px rgba(24,56,51,.14); }
.more-actions-menu button { padding: 9px 10px; border: 0; border-radius: 8px; color: #40524d; background: transparent; text-align: left; font-size: 11px; }
.more-actions-menu button:hover { color: var(--brand-2); background: var(--soft); }
.more-actions-menu button:disabled { color: var(--muted); cursor: wait; }
.patient-next { margin-top: 18px; padding: 24px; display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 24px; align-items: start; border-color: #c9e4dd; background: linear-gradient(120deg, #f4fbf8, #fff 68%); }
.patient-next.urgent { border-color: #edcfad; background: linear-gradient(120deg, #fff9f2, #fff 68%); }
.next-step-index { min-height: 62px; padding-right: 20px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); color: var(--brand-2); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.next-step-index > strong { margin-top: 7px; color: #42554f; font-size: 12px; letter-spacing: 0; }
.next-step-index > strong.overdue { color: var(--danger); }
.next-step-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.next-step-meta span { color: #a2672f; font-size: 9px; font-weight: 750; }
.next-step-meta b { padding: 4px 6px; color: #526760; background: var(--soft); border-radius: 6px; font-size: 8px; }
.next-step-main h2 { margin: 7px 0 5px; font-family: ui-serif, "Songti SC", serif; font-size: 21px; line-height: 1.45; }
.next-step-main > span { color: var(--brand-2); font-size: 9px; font-weight: 750; }
.next-step-main > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.next-step-message { margin-top: 12px; padding: 12px 14px; color: #40534d; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.next-step-message span { color: var(--muted); font-size: 9px; }
.next-step-message p { margin: 5px 0 0; font-size: 11px; line-height: 1.65; }
.next-step-criteria { margin-top: 9px; color: var(--muted); font-size: 9px; }
.next-step-criteria summary { cursor: pointer; color: var(--brand-2); font-weight: 650; }
.next-step-criteria p { margin: 7px 0 0; line-height: 1.55; }
.next-step-actions { min-width: 154px; display: grid; gap: 8px; }
.workspace-insights { margin-top: 14px; }
.workspace-insights > summary { min-height: 72px; padding: 15px 20px; display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; background: #fff; }
.workspace-insights > summary::-webkit-details-marker { display: none; }
.workspace-insights > summary > div { display: flex; align-items: center; gap: 12px; }
.workspace-insights > summary strong, .workspace-insights > summary small { display: block; }
.workspace-insights > summary strong { font-size: 13px; }
.workspace-insights > summary small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.workspace-insights > summary > b { color: var(--brand-2); font-size: 10px; }
.workspace-insights[open] > summary { border-bottom: 1px solid var(--line); }
.workspace-insights[open] > summary > b { font-size: 0; }
.workspace-insights[open] > summary > b::after { content: "收起"; font-size: 10px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr); gap: 18px; margin-top: 18px; }
.assistant-workspace { margin-top: 18px; }
.assistant-workspace-head { padding: 23px 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: linear-gradient(115deg, #f1faf7, #fff); }
.assistant-workspace-head > div { display: flex; gap: 13px; align-items: flex-start; }
.assistant-workspace-head h2 { margin: 5px 0; font-family: ui-serif, "Songti SC", serif; font-size: 21px; }
.assistant-workspace-head p { max-width: 720px; margin: 0; color: #536660; font-size: 12px; line-height: 1.65; }
.assistant-mark { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; background: var(--brand); border-radius: 12px; }
.assistant-mark svg { width: 18px; }
.workspace-engine { padding: 5px 8px; color: var(--brand-2); background: #e5f5f1; border-radius: 999px; font-size: 9px; white-space: nowrap; }
.workspace-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.assistant-workspace-grid { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(500px, 1.2fr); }
.workspace-profile { border-radius: 0; border: 0; }
.workspace-guidance { display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.workspace-guidance > div { min-width: 0; }
.workspace-guidance > div + div { border-left: 1px solid var(--line); }
.plan-workspace { margin-top: 18px; overflow: hidden; }
.plan-empty { padding: 28px; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 20px; background: linear-gradient(120deg, #f2faf7, #fff); }
.plan-empty-icon { width: 58px; height: 58px; display: grid; place-items: center; color: var(--brand-2); background: #dff4ee; border-radius: 17px; }
.plan-empty-icon svg { width: 26px; }
.plan-kicker { color: var(--brand-2); font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.plan-empty h2, .plan-workspace-head h2 { margin: 6px 0 5px; font-family: ui-serif, "Songti SC", serif; font-size: 21px; }
.plan-empty p, .plan-workspace-head p { max-width: 690px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.plan-workspace-head { padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.plan-head-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.plan-head-actions a { text-decoration: none; }
.plan-notice { margin: 14px 24px 0; color: #805324; background: #fff3e6; }
.plan-workspace-grid { display: grid; grid-template-columns: minmax(290px, .72fr) minmax(460px, 1.28fr); }
.doctor-plan-pane, .copilot-pane { min-width: 0; padding: 24px; }
.doctor-plan-pane { background: #fbfcfa; border-right: 1px solid var(--line); }
.copilot-pane { color: #f5fbf9; background: linear-gradient(145deg, #173f38, #205b51); }
.pane-title { display: flex; align-items: center; gap: 10px; }
.pane-title > span { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; color: var(--brand-2); background: var(--success-soft); border-radius: 10px; font-size: 10px; font-weight: 800; }
.pane-title > span svg { width: 16px; }
.pane-title strong, .pane-title small { display: block; }
.pane-title strong { font-size: 13px; }
.pane-title small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.pane-title.light > span { color: #f0b577; background: rgba(255,255,255,.08); }
.pane-title.light small { color: rgba(255,255,255,.48); }
.file-row { margin-top: 19px; padding: 13px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.file-mark { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; color: var(--brand-2); background: var(--soft); border-radius: 9px; }
.file-mark svg { width: 16px; }
.file-row > div:nth-child(2) { min-width: 0; }
.file-row strong, .file-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row strong { font-size: 11px; }
.file-row small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.extraction-badge { margin-left: auto; padding: 5px 7px; flex: 0 0 auto; color: var(--brand-2); background: var(--success-soft); border-radius: 999px; font-size: 8px; font-weight: 700; }
.plan-warning { margin-top: 10px; padding: 10px 12px; color: #805324; background: #fff3e6; border-radius: 8px; font-size: 9px; line-height: 1.55; }
.plan-summary-section { margin-top: 20px; }
.plan-summary-section > span, .copilot-section > span, .communication-goal > span, .expectation-box > span, .plan-next span { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .08em; }
.plan-bullets { margin: 8px 0 0; padding-left: 17px; color: #42504c; font-size: 11px; line-height: 1.7; }
.plan-bullets li + li { margin-top: 5px; }
.plan-facts { margin-top: 20px; display: grid; gap: 8px; }
.plan-facts > div { padding: 11px 12px; background: #f1f6f3; border-radius: 9px; }
.plan-facts span, .plan-facts strong { display: block; }
.plan-facts span { color: var(--muted); font-size: 9px; }
.plan-facts strong { margin-top: 4px; font-size: 10px; line-height: 1.55; }
.communication-goal { margin-top: 18px; padding: 15px 16px; background: rgba(239,181,119,.13); border: 1px solid rgba(239,181,119,.18); border-radius: 11px; }
.communication-goal > span { color: #efbd87; }
.communication-goal p { margin: 7px 0 0; font-size: 13px; line-height: 1.75; }
.copilot-section { margin-top: 19px; }
.copilot-section > span { color: rgba(255,255,255,.48); }
.concern-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.concern-chips span { padding: 6px 9px; display: inline-flex; align-items: center; gap: 6px; color: #dfeeea; background: rgba(255,255,255,.08); border-radius: 999px; font-size: 9px; }
.concern-chips b { color: #f0b577; }
.focus-list { margin-top: 8px; display: grid; gap: 7px; }
.focus-list > div { padding: 11px 12px; display: grid; grid-template-columns: 26px 1fr; gap: 9px; background: rgba(255,255,255,.06); border-radius: 9px; }
.focus-list b { color: #efb77d; font-size: 9px; }
.focus-list p { margin: 0; color: rgba(255,255,255,.7); font-size: 10px; line-height: 1.65; }
.focus-list strong { display: block; margin-bottom: 3px; color: #fff; font-size: 10px; }
.objection-list { margin-top: 8px; display: grid; gap: 6px; }
.objection-list details { padding: 10px 12px; background: rgba(255,255,255,.06); border-radius: 9px; }
.objection-list summary { color: #eef7f4; cursor: pointer; font-size: 10px; line-height: 1.5; }
.objection-list p { margin: 8px 0 0; padding-top: 8px; color: rgba(255,255,255,.62); border-top: 1px solid rgba(255,255,255,.08); font-size: 10px; line-height: 1.7; }
.expectation-box { margin-top: 19px; padding: 13px 15px; color: #4d5b57; background: #f7eee5; border-radius: 10px; }
.expectation-box > span { color: #985e2b; }
.expectation-list { margin: 7px 0 0; padding-left: 16px; font-size: 9px; line-height: 1.65; }
.plan-next { margin: 20px -24px -24px; padding: 18px 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; background: #102f2a; }
.plan-next span { color: #efb77d; }
.plan-next strong { display: block; margin-top: 5px; font-size: 11px; }
.plan-next p { max-width: 560px; margin: 5px 0 0; color: rgba(255,255,255,.58); font-size: 9px; line-height: 1.6; }
.plan-next-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.button.light { color: #dcece7; background: rgba(255,255,255,.1); }
.button.accent { color: #173f38; background: #efb77d; }
.plan-disclaimer { padding: 10px 24px; color: #889792; background: #f7f9f7; border-top: 1px solid var(--line); font-size: 9px; text-align: center; }
.upload-guide { margin-bottom: 18px; padding: 13px 14px; color: #49615a; background: var(--soft); border-radius: 10px; }
.upload-guide strong, .upload-guide span { display: block; }
.upload-guide strong { font-size: 11px; }
.upload-guide span { margin-top: 5px; font-size: 9px; line-height: 1.6; }
.summary-block { padding: 20px; }
.summary-text { color: #42504c; font-size: 13px; line-height: 1.75; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-top: 20px; }
.info-item { padding: 13px; background: #f8f9f6; border-radius: 10px; }
.info-label { color: var(--muted); font-size: 10px; }
.info-value { margin-top: 5px; font-size: 12px; font-weight: 650; }
.ai-card { position: relative; padding: 21px; background: linear-gradient(145deg, #173f38, #205b51); color: #fff; }
.ai-card .panel-title { display: flex; align-items: center; gap: 8px; }
.ai-card .panel-title svg { width: 17px; color: #f1b87a; }
.ai-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ai-kicker { margin-bottom: 5px; color: #efb575; font-size: 9px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.ai-kicker.ink { color: #c37835; }
.engine-badge { max-width: 130px; padding: 5px 8px; overflow: hidden; color: rgba(255,255,255,.72); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.engine-notice { margin-top: 12px; padding: 8px 10px; color: #ffe4c5; background: rgba(236,155,76,.12); border-radius: 8px; font-size: 10px; line-height: 1.5; }
.ai-time { color: rgba(255,255,255,.5); font-size: 10px; }
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.ai-item { padding: 12px; border-radius: 10px; background: rgba(255,255,255,.08); }
.ai-label { color: rgba(255,255,255,.53); font-size: 10px; }
.ai-value { margin-top: 5px; font-size: 12px; line-height: 1.5; font-weight: 600; }
.ai-score { color: #f3bd81; font-size: 19px; }
.ai-score small { margin-left: 2px; color: rgba(255,255,255,.45); font-size: 9px; font-weight: 500; }
.ai-strategy { margin-top: 10px; padding: 14px; border-radius: 10px; background: rgba(239,168,94,.14); border: 1px solid rgba(239,168,94,.2); }
.ai-strategy .ai-label { color: #f2c796; }
.ai-strategy .ai-value { font-weight: 450; line-height: 1.65; }
.ai-concerns { margin-top: 13px; }
.chip-row, .soft-chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.ai-chip { padding: 5px 8px; color: #f5dfc8; background: rgba(255,255,255,.08); border-radius: 999px; font-size: 9px; }
.ai-disclaimer { margin-top: 15px; color: rgba(255,255,255,.42); font-size: 9px; line-height: 1.5; }
.ai-loading { min-height: 245px; display: grid; place-items: center; text-align: center; color: rgba(255,255,255,.7); }
.spinner { width: 28px; height: 28px; margin: 0 auto 12px; border: 2px solid rgba(255,255,255,.2); border-top-color: #f0b374; border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.message-box { margin-top: 12px; padding: 14px; border-radius: 10px; background: #f8f9f6; color: #43504c; font-size: 12px; line-height: 1.75; }
.barrier-card { overflow: hidden; }
.barrier-body { padding: 0 20px 20px; }
.barrier-primary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; background: #fff7ed; border: 1px solid #f3dec5; border-radius: 10px; }
.barrier-primary span, .advice-row span, .next-action span, .followup-meta span, .message-label { color: var(--muted); font-size: 10px; }
.barrier-primary strong { color: #9a5420; font-size: 13px; }
.soft-chip { padding: 5px 8px; color: #52615c; background: #f1f4f0; border-radius: 999px; font-size: 9px; }
.evidence-box { margin-top: 12px; padding: 12px 14px; color: #52615c; background: #f8f9f6; border-left: 3px solid #d8a66d; border-radius: 8px; font-size: 10px; line-height: 1.6; }
.evidence-box ul { margin: 6px 0 0; padding-left: 16px; }
.evidence-label { color: #8c5b2e; font-weight: 700; }
.muted-evidence { color: var(--muted); }
.advice-row { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
.advice-row > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; }
.advice-row .avoid { background: #fffafa; border-color: #f1dddd; }
.advice-row p, .next-action p { margin: 5px 0 0; color: #42504c; font-size: 11px; line-height: 1.65; }
.followup-ai { overflow: hidden; }
.followup-body { padding: 0 20px 20px; }
.priority-pill { padding: 5px 9px; color: #537167; background: #edf5f1; border-radius: 999px; font-size: 9px; font-weight: 700; }
.priority-pill.high { color: #a35022; background: #fff0df; }
.followup-meta { display: grid; grid-template-columns: .75fr 1.25fr; gap: 10px; }
.followup-meta > div { padding: 12px 14px; background: #f8f9f6; border-radius: 9px; }
.followup-meta strong { display: block; margin-top: 5px; color: #283b35; font-size: 11px; line-height: 1.4; }
.next-action { margin-top: 10px; padding: 13px 14px; background: #eef6f2; border: 1px solid #dcebe4; border-radius: 9px; }
.message-label { margin-top: 15px; font-weight: 700; }
.message-label small { margin-left: 5px; font-weight: 400; }
.followup-footer { display: flex; justify-content: flex-end; margin-top: 12px; }
.empty.compact { padding: 24px 20px; }
.timeline { padding: 7px 20px 15px; }
.timeline-item { position: relative; padding: 13px 0 13px 25px; }
.timeline-item::before { content: ""; position: absolute; left: 6px; top: 23px; bottom: -12px; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 1px; top: 19px; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand-2); }
.timeline-date { color: var(--muted); font-size: 10px; }
.timeline-title { margin-top: 4px; font-size: 12px; font-weight: 680; }
.timeline-note { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.6; }

.task-list { display: grid; gap: 10px; padding: 15px; }
.task-card { padding: 17px; display: grid; grid-template-columns: 38px minmax(150px, .8fr) minmax(220px, 1.6fr) 110px 98px; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 13px; }
.task-check { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--brand); background: var(--success-soft); }
.task-check svg { width: 16px; }
.task-goal { font-size: 12px; line-height: 1.6; color: #53605c; }
.task-goal small { margin-top: 5px; display: block; color: var(--muted); font-size: 9px; line-height: 1.55; }
.task-ai-source { margin-top: 7px; display: inline-flex; align-items: center; gap: 5px; color: #a5682f; font-size: 9px; font-weight: 700; }
.task-ai-source svg { width: 12px; }
.task-ai-source.inline { margin: 0 7px 4px 0; padding: 3px 5px; background: #fff2e4; border-radius: 5px; }
.task-message-preview { margin-top: 7px; padding: 8px 9px; color: #52625d; background: #f4f8f6; border-radius: 7px; font-size: 9px; line-height: 1.55; }
.task-criteria { margin-top: 6px; color: var(--muted); font-size: 9px; }
.task-criteria summary { cursor: pointer; color: var(--brand-2); }
.task-criteria p { margin: 6px 0 0; line-height: 1.55; }
.task-status.done { text-decoration: line-through; opacity: .55; }
.task-history { border-top: 1px solid var(--line); }
.task-history > summary { padding: 13px 20px; cursor: pointer; color: var(--muted); font-size: 10px; }
.tabs { display: flex; gap: 5px; padding: 4px; background: var(--soft); border-radius: 10px; }
.tab { padding: 7px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 11px; }
.tab.active { background: #fff; color: var(--ink); box-shadow: 0 2px 7px rgba(26,45,39,.07); font-weight: 650; }
.visit-summary { margin-bottom: 16px; padding: 18px 22px; display: flex; align-items: center; gap: 34px; color: #fff; background: linear-gradient(110deg, #164e45, #28695e); border-radius: 15px; }
.visit-summary > div { min-width: 80px; }
.visit-summary strong, .visit-summary span { display: block; }
.visit-summary strong { font-size: 22px; }
.visit-summary span { margin-top: 4px; color: rgba(255,255,255,.58); font-size: 10px; }
.visit-summary .danger-number strong { color: #f5bd84; }
.visit-summary p { margin: 0 0 0 auto; color: rgba(255,255,255,.5); font-size: 10px; }

.management-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.rank-list { padding: 8px 20px; }
.rank-row { min-height: 65px; display: grid; grid-template-columns: 25px 1fr 75px 70px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-number { color: #9ba5a1; font-family: ui-serif, serif; font-size: 14px; }
.rank-number.top { color: #b97937; font-weight: 750; }
.rank-name { font-size: 12px; font-weight: 650; }
.rank-meta { margin-top: 4px; color: var(--muted); font-size: 10px; }
.rank-value { font-size: 12px; font-weight: 650; text-align: right; }
.management-note { padding: 20px; }
.finding { padding: 15px 0; border-bottom: 1px solid var(--line); }
.finding:last-child { border-bottom: 0; }
.finding-num { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; color: #a76b2e; background: var(--accent-soft); font-size: 10px; font-weight: 750; }
.finding-title { margin-top: 10px; font-size: 12px; font-weight: 680; }
.finding-text { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.65; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(13,31,27,.45); backdrop-filter: blur(3px); animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 18px; background: #fff; box-shadow: 0 24px 70px rgba(14,37,32,.22); animation: modalIn .22s ease both; }
.modal:has(#followup-plan-confirm-form) { width: min(900px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.modal-header { padding: 21px 23px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal-title { font-family: ui-serif, "Songti SC", serif; font-size: 20px; font-weight: 650; }
.modal-close { width: 32px; height: 32px; border: 0; border-radius: 9px; display: grid; place-items: center; color: var(--muted); background: var(--soft); }
.modal-close svg { width: 16px; }
.modal-body { padding: 22px 23px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 7px; color: #4e5b57; font-size: 11px; font-weight: 650; }
.required { color: var(--danger); }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); outline: none; }
.field input, .field select { height: 42px; padding: 0 12px; }
.field textarea { min-height: 105px; padding: 11px 12px; resize: vertical; line-height: 1.6; }
.field-hint { margin-top: 6px; color: #919b97; font-size: 10px; }
.modal-footer { padding: 16px 23px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); background: #fafbf8; }
.followup-plan-guide { margin-bottom: 18px; padding: 14px; display: flex; gap: 11px; align-items: flex-start; color: #3e5b53; background: var(--soft); border-radius: 11px; }
.followup-plan-guide > svg { width: 20px; flex: 0 0 auto; color: var(--brand-2); }
.followup-plan-guide strong, .followup-plan-guide span { display: block; }
.followup-plan-guide strong { font-size: 11px; }
.followup-plan-guide span { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.followup-plan-basis { margin-bottom: 15px; padding: 13px 15px; display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; background: #fff4e8; border: 1px solid #f1dfc9; border-radius: 10px; }
.followup-plan-basis span { color: #9f7044; font-size: 9px; }
.followup-plan-basis strong { color: #8d5423; font-size: 12px; }
.followup-plan-basis small { grid-column: 2; color: #987a5d; font-size: 9px; line-height: 1.5; }
.plan-step-editors { display: grid; gap: 13px; }
.plan-step-editor { border: 1px solid var(--line); border-radius: 13px; background: #fbfcfa; overflow: hidden; }
.plan-step-editor.disabled { opacity: .58; }
.plan-step-head { margin: 0; padding: 14px 15px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; list-style: none; cursor: pointer; }
.plan-step-head::-webkit-details-marker { display: none; }
.plan-step-head label { display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 11px; font-weight: 700; }
.plan-step-head > div { min-width: 0; }
.plan-step-head > div strong, .plan-step-head > div small { display: block; }
.plan-step-head > div strong { overflow: hidden; color: #354943; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.plan-step-head > div small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.plan-step-head span { padding: 4px 7px; color: var(--brand-2); background: var(--success-soft); border-radius: 999px; font-size: 9px; }
.plan-step-fields { padding: 15px; border-top: 1px solid var(--line); background: #fff; }
.plan-step-editor .field textarea { min-height: 74px; }
.plan-human-check { margin-top: 15px; padding: 11px 13px; display: flex; gap: 8px; align-items: flex-start; color: #76502f; background: #fff7ee; border-radius: 9px; font-size: 9px; line-height: 1.6; }
.plan-human-check svg { width: 15px; flex: 0 0 auto; }
.confirm-summary { margin-right: auto; color: var(--muted); font-size: 10px; }
.confirm-summary strong { color: var(--brand-2); font-size: 13px; }

#toast-root { position: fixed; right: 24px; bottom: 24px; z-index: 80; display: grid; gap: 10px; }
.toast { min-width: 260px; padding: 13px 15px; display: flex; align-items: center; gap: 10px; color: #fff; background: #193f38; border-radius: 11px; box-shadow: var(--shadow); font-size: 12px; animation: toastIn .25s ease both; }
.toast svg { width: 16px; color: #efb575; }
@keyframes toastIn { from { opacity: 0; transform: translateX(12px); } }

.mobile-nav { display: none; }
@media (max-width: 1050px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .detail-grid, .management-grid, .action-layout { grid-template-columns: 1fr; }
  .action-hero { grid-template-columns: 1fr auto; }
  .action-stats { grid-column: 1 / -1; }
  .action-card { grid-template-columns: minmax(150px, .7fr) minmax(200px, 1fr) minmax(220px, 1.3fr); }
  .action-card-actions { grid-column: 2 / -1; display: flex; }
  .today-focus { grid-template-columns: auto minmax(150px, .7fr) minmax(260px, 1.3fr); }
  .today-focus-buttons { grid-column: 2 / -1; display: flex; }
  .action-side { position: static; }
  .assistant-workspace-grid { grid-template-columns: 1fr; }
  .plan-workspace-grid { grid-template-columns: 1fr; }
  .doctor-plan-pane { border-right: 0; border-bottom: 1px solid var(--line); }
  .task-card { grid-template-columns: 34px 1fr 1.4fr 90px; }
  .task-card > :last-child { grid-column: 2 / -1; justify-self: start; }
}
@media (max-width: 760px) {
  .login-page { grid-template-columns: 1fr; background: #f8f9f6; }
  .login-story { min-height: 220px; padding: 25px; }
  .login-copy { margin: 35px 0 20px; }
  .login-copy h1 { margin: 13px 0 0; font-size: 28px; }
  .login-copy p, .login-proof { display: none; }
  .login-panel { padding: 28px 20px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main { padding: 0 16px 88px; }
  .topbar { height: 73px; }
  .eyebrow { display: none; }
  h1 { font-size: 22px; margin: 0; }
  .top-actions .icon-button { display: none; }
  .hero { padding: 24px 20px; }
  .hero h2 { font-size: 20px; }
  .action-hero { padding: 24px 20px; grid-template-columns: 1fr; gap: 20px; }
  .action-progress { padding: 0; border: 0; }
  .action-stats { grid-column: auto; }
  .action-card { grid-template-columns: 1fr; gap: 12px; }
  .action-card-actions { grid-column: auto; }
  .today-focus { padding: 19px; grid-template-columns: 1fr; gap: 14px; }
  .today-focus-label { min-height: 0; padding: 0 0 11px; border-right: 0; border-bottom: 1px solid var(--line); }
  .today-focus-buttons { grid-column: auto; }
  .today-clear { align-items: flex-start; flex-wrap: wrap; }
  .today-clear .button { margin-left: 36px; }
  .action-group-head > div { grid-template-columns: auto auto; }
  .action-group-head small { grid-column: 2; }
  .assistant-workspace-head { flex-direction: column; }
  .workspace-head-actions { justify-content: flex-start; }
  .assistant-workspace-grid, .workspace-guidance { grid-template-columns: 1fr; }
  .workspace-guidance > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { padding: 15px; }
  .metric-value { font-size: 23px; }
  .priority-row { grid-template-columns: 1.1fr .9fr 62px; }
  .priority-row .due { display: none; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .filters { overflow-x: auto; }
  .search-box { width: 100%; }
  .detail-head { align-items: flex-start; flex-direction: column; }
  .more-actions-menu { left: 0; right: auto; }
  .patient-next { padding: 20px; grid-template-columns: 1fr; gap: 15px; }
  .next-step-index { min-height: 0; padding: 0 0 11px; border-right: 0; border-bottom: 1px solid var(--line); }
  .next-step-actions { min-width: 0; }
  .workspace-insights > summary { align-items: flex-start; }
  .workspace-insights > summary .assistant-mark { display: none; }
  .plan-empty { grid-template-columns: 48px 1fr; }
  .plan-empty > .button { grid-column: 2; justify-self: start; }
  .plan-workspace-head { align-items: flex-start; flex-direction: column; }
  .plan-head-actions { justify-content: flex-start; }
  .plan-next { align-items: stretch; flex-direction: column; }
  .plan-next-actions { flex-wrap: wrap; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .followup-meta { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .task-card { grid-template-columns: 34px 1fr; }
  .task-card > * { grid-column: auto !important; }
  .task-card .task-goal, .task-card .due, .task-card .button { grid-column: 2 !important; }
  .visit-summary { gap: 16px; padding: 15px; flex-wrap: wrap; }
  .visit-summary p { width: 100%; margin: 0; }
  .mobile-nav { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 20; padding: 7px; display: grid; grid-template-columns: repeat(auto-fit, minmax(50px, 1fr)); border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); box-shadow: 0 12px 35px rgba(20,46,40,.16); }
  .mobile-nav .nav-item { justify-content: center; flex-direction: column; gap: 3px; padding: 7px 3px; color: var(--muted); font-size: 9px; }
  .mobile-nav .nav-item.active { color: var(--brand); background: var(--success-soft); box-shadow: none; }
  .mobile-nav .nav-item svg { width: 17px; height: 17px; }
}
