:root {
  --ink: #20251f;
  --muted: #747b70;
  --line: #e4e7df;
  --canvas: #f5f6f1;
  --paper: #fff;
  --green: #245c46;
  --green-2: #37755c;
  --mint: #dceadf;
  --lime: #dceaa7;
  --orange: #d2783b;
  --orange-soft: #fae9dd;
  --red: #b44c45;
  --red-soft: #f8e3e0;
  --blue: #537180;
  --blue-soft: #e4edf0;
  --shadow: 0 8px 32px rgba(31, 44, 35, .08);
  --sidebar: 244px;
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; color: inherit; }
svg { width: 20px; height: 20px; stroke-width: 1.8; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar); padding: 28px 18px 18px; background: #1f352a; color: #fff; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px 30px; }
.brand strong { font-size: 22px; letter-spacing: -.06em; }
.brand small { display: block; margin-top: 3px; font-size: 8px; letter-spacing: .13em; color: #9eafa4; }
.brand-mark { position: relative; width: 31px; height: 31px; transform: rotate(45deg); }
.brand-mark span { position: absolute; width: 12px; height: 12px; border-radius: 8px 8px 3px 8px; background: var(--lime); }
.brand-mark span:nth-child(1) { left: 0; top: 9px; }
.brand-mark span:nth-child(2) { left: 9px; top: 0; transform: rotate(90deg); }
.brand-mark span:nth-child(3) { left: 9px; top: 18px; opacity: .45; }
.main-nav { display: grid; gap: 6px; }
.nav-item { border: 0; background: transparent; color: #b9c5bd; height: 45px; border-radius: 10px; padding: 0 12px; display: flex; gap: 12px; align-items: center; text-align: left; transition: .2s ease; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { color: #fff; background: rgba(220,234,167,.14); box-shadow: inset 3px 0 0 var(--lime); }
.nav-item b { font-size: 13px; font-weight: 600; flex: 1; }
.nav-item em { min-width: 24px; padding: 2px 6px; border-radius: 20px; background: rgba(255,255,255,.1); font-size: 11px; font-style: normal; text-align: center; }
.new-badge { font-style: normal; font-size: 9px; border-radius: 4px; padding: 2px 5px; background: var(--lime); color: #31432b; }
.sidebar-caption { margin: 26px 12px 10px; color: #718379; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.sub-nav { flex: 1; align-content: start; }
.worker-card { display: flex; align-items: center; gap: 10px; border-top: 1px solid rgba(255,255,255,.1); padding: 18px 4px 2px; }
.avatar { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #e5d8bd; color: #493d2c; font-size: 12px; font-weight: 700; }
.worker-card strong, .worker-card small { display: block; }
.worker-card strong { font-size: 11px; }
.worker-card small { color: #8fa097; margin-top: 3px; font-size: 10px; }
.worker-card button { margin-left: auto; border: 0; padding: 4px; background: none; color: #91a299; }

.main { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { height: 90px; padding: 0 38px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(245,246,241,.92); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 30; }
.page-heading p { margin: 0 0 3px; color: var(--muted); font-size: 11px; }
.page-heading h1 { margin: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: 24px; font-weight: 500; letter-spacing: -.03em; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.global-search { height: 40px; width: 250px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; display: flex; align-items: center; gap: 8px; color: #92998f; }
.global-search svg { width: 16px; }
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; font-size: 12px; }
kbd { padding: 2px 5px; border: 1px solid #dfe2dc; border-radius: 4px; background: #f7f8f5; color: #9ba197; font-size: 9px; }
.icon-button, .mobile-menu { position: relative; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 9px; background: #fff; display: grid; place-items: center; }
.notification-button i { position: absolute; right: 5px; top: 4px; width: 14px; height: 14px; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: #fff; border: 2px solid white; font-size: 7px; font-style: normal; }
.primary-button, .secondary-button, .ghost-button, .danger-button { min-height: 40px; border-radius: 9px; border: 0; padding: 0 15px; display: inline-flex; gap: 7px; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.primary-button { background: var(--green); color: #fff; box-shadow: 0 4px 12px rgba(36,92,70,.15); }
.primary-button:hover { background: var(--green-2); }
.secondary-button { background: var(--mint); color: var(--green); }
.ghost-button { background: #fff; border: 1px solid var(--line); }
.danger-button { color: var(--red); background: var(--red-soft); }
.primary-button svg, .secondary-button svg, .ghost-button svg { width: 16px; height: 16px; }
.mobile-menu { display: none; }

.content { max-width: 1440px; padding: 30px 38px 60px; margin: auto; }
.section-kicker { margin: 0 0 5px; color: var(--green-2); font-size: 10px; letter-spacing: .12em; font-weight: 800; text-transform: uppercase; }
.section-title { margin: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: 21px; font-weight: 500; letter-spacing: -.03em; }
.section-subtitle { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.section-header { margin-bottom: 18px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.text-button { border: 0; padding: 5px 0; background: none; color: var(--green); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.text-button svg { width: 14px; }
.card { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 2px 4px rgba(31,44,35,.02); }

.dashboard-hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(310px, .85fr); gap: 18px; }
.agenda-card { min-height: 285px; padding: 23px 25px; }
.progress-ring { width: 45px; height: 45px; position: relative; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--progress) * 1%), #e8ebe4 0); }
.progress-ring::before { content: ""; position: absolute; inset: 5px; background: #fff; border-radius: 50%; }
.progress-ring b { position: relative; font-size: 10px; }
.agenda-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.agenda-title { display: flex; align-items: center; gap: 12px; }
.agenda-title strong { display: block; font-family: Georgia, "Noto Serif KR", serif; font-size: 18px; font-weight: 500; }
.agenda-title small { color: var(--muted); font-size: 11px; }
.task-list { display: grid; }
.task-item { min-height: 54px; display: flex; align-items: center; gap: 12px; border-top: 1px solid #edf0ea; }
.check { width: 20px; height: 20px; flex: 0 0 auto; border-radius: 6px; border: 1.5px solid #c6cbc2; background: white; display: grid; place-items: center; padding: 0; }
.check svg { width: 13px; height: 13px; opacity: 0; }
.task-item.done .check { background: var(--green); border-color: var(--green); color: white; }
.task-item.done .check svg { opacity: 1; }
.task-item.done .task-copy strong { color: #939990; text-decoration: line-through; }
.task-copy { flex: 1; min-width: 0; }
.task-copy strong { font-size: 12px; font-weight: 650; }
.task-copy small { display: block; color: var(--muted); margin-top: 4px; font-size: 10px; }
.priority-dot { width: 7px; height: 7px; border-radius: 50%; }
.priority-dot.high { background: var(--red); }
.priority-dot.normal { background: var(--orange); }
.priority-dot.low { background: var(--green-2); }
.task-kind { padding: 4px 7px; border-radius: 5px; background: #eff2ec; color: #6f786e; font-size: 9px; }

.summary-column { display: grid; gap: 12px; }
.metric-card { padding: 20px; display: flex; align-items: center; gap: 15px; }
.metric-icon { width: 43px; height: 43px; border-radius: 12px; display: grid; place-items: center; background: var(--mint); color: var(--green); }
.metric-icon.orange { background: var(--orange-soft); color: var(--orange); }
.metric-icon.blue { background: var(--blue-soft); color: var(--blue); }
.metric-copy { flex: 1; }
.metric-copy small { color: var(--muted); font-size: 10px; }
.metric-copy strong { display: block; margin-top: 3px; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.metric-trend { align-self: end; color: var(--green); font-size: 9px; }

.dashboard-grid { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 18px; }
.panel { padding: 23px 25px; }
.appointment-list { display: grid; }
.appointment { min-height: 68px; display: grid; grid-template-columns: 58px 4px minmax(0,1fr) auto; align-items: center; gap: 13px; border-top: 1px solid #edf0ea; }
.appointment:first-child { border-top: 0; }
.appointment time { font-family: Georgia, serif; font-size: 15px; }
.appointment .bar { height: 32px; border-radius: 5px; background: var(--green-2); }
.appointment .bar.orange { background: var(--orange); }
.appointment .bar.blue { background: var(--blue); }
.appointment-copy strong { display: block; font-size: 12px; }
.appointment-copy small { color: var(--muted); font-size: 10px; }
.method-badge, .status-badge, .stage-badge { border-radius: 20px; padding: 5px 8px; font-size: 9px; white-space: nowrap; }
.method-badge { background: #f1f3ee; color: #697269; }

.case-watch-list { display: grid; gap: 10px; }
.case-watch { display: flex; align-items: center; gap: 11px; padding: 11px; background: #f7f8f4; border-radius: 10px; cursor: pointer; }
.case-watch:hover { background: #f0f3ec; }
.person-avatar { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; background: #e6ddd0; color: #574b3d; font-size: 11px; font-weight: 700; }
.person-avatar.green { background: #dbe8df; color: var(--green); }
.person-avatar.blue { background: #dfe9ed; color: #45616d; }
.case-watch-copy { flex: 1; min-width: 0; }
.case-watch-copy strong { font-size: 11px; }
.case-watch-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.risk-badge { display: flex; align-items: center; gap: 4px; color: var(--red); font-size: 9px; }
.risk-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.calendar-strip { margin-top: 18px; padding: 20px 24px; }
.week-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 8px; }
.day-cell { min-height: 69px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); border: 1px solid transparent; }
.day-cell span { font-size: 9px; }
.day-cell strong { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-family: Georgia, serif; font-weight: 500; }
.day-cell i { height: 4px; font-size: 0; }
.day-cell.has-event i::after { content: ""; display: block; width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }
.day-cell.today { color: var(--green); background: #eef4ec; border-color: #dde8d9; }
.day-cell.today strong { background: var(--green); color: #fff; }

.view-toolbar { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.toolbar-filters { display: flex; gap: 8px; }
.filter-button { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; background: white; font-size: 11px; }
.filter-button.active { background: var(--green); color: white; border-color: var(--green); }
.case-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.case-card { padding: 18px; cursor: pointer; transition: .18s ease; }
.case-card:hover { transform: translateY(-2px); border-color: #c9d3c8; box-shadow: var(--shadow); }
.case-card-head { display: flex; align-items: center; gap: 11px; }
.case-card-copy { flex: 1; }
.case-card-copy strong { font-size: 13px; }
.case-card-copy small { display: block; color: var(--muted); font-size: 9px; margin-top: 3px; }
.status-badge.focus { color: var(--red); background: var(--red-soft); }
.status-badge.daily { color: var(--green); background: var(--mint); }
.status-badge.loose { color: var(--blue); background: var(--blue-soft); }
.case-card-problem { min-height: 39px; margin: 14px 0; padding: 10px; background: #f7f8f4; border-radius: 8px; color: #566057; font-size: 10px; line-height: 1.55; }
.case-card-foot { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 9px; }
.stage-dots { display: flex; gap: 3px; }
.stage-dots i { width: 14px; height: 3px; border-radius: 3px; background: #e0e4dd; }
.stage-dots i.on { background: var(--green-2); }
.empty-state { padding: 60px 20px; text-align: center; color: var(--muted); grid-column: 1/-1; }
.empty-state h3 { color: var(--ink); font-family: Georgia, serif; font-weight: 500; }

.schedule-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.month-card { padding: 24px; }
.month-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.month-head h2 { font-family: Georgia, serif; font-weight: 500; }
.month-grid { display: grid; grid-template-columns: repeat(7,1fr); }
.month-grid .weekday { min-height: 32px; text-align: center; color: var(--muted); font-size: 9px; }
.month-day { min-height: 88px; padding: 8px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); font-size: 10px; }
.month-day:nth-child(7n+1) { border-left: 0; }
.month-day.muted { color: #b9beb6; }
.month-day.today { background: #f0f5ed; }
.month-day.today b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; }
.calendar-event { margin-top: 5px; padding: 4px 5px; border-radius: 4px; background: var(--mint); color: var(--green); font-size: 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.calendar-event.orange { background: var(--orange-soft); color: var(--orange); }

.record-table { overflow: hidden; }
.table-row { min-height: 62px; padding: 0 18px; display: grid; grid-template-columns: 100px 1.3fr 110px 1fr 90px; gap: 14px; align-items: center; border-top: 1px solid var(--line); font-size: 10px; }
.table-row.table-head { min-height: 42px; background: #f6f7f3; color: var(--muted); border-top: 0; font-size: 9px; }
.table-row strong { font-size: 11px; }
.record-type { width: max-content; border-radius: 5px; padding: 4px 7px; background: var(--blue-soft); color: var(--blue); }
.record-type.service { background: var(--mint); color: var(--green); }

.ai-hero { position: relative; overflow: hidden; padding: 34px; min-height: 180px; background: #213b2e; color: white; }
.ai-hero::after { content: "✦"; position: absolute; right: 40px; top: 14px; font-size: 120px; line-height: 1; color: rgba(220,234,167,.13); }
.ai-hero .section-kicker { color: var(--lime); }
.ai-hero h2 { max-width: 560px; margin: 8px 0; font-family: Georgia, "Noto Serif KR", serif; font-size: 26px; font-weight: 500; }
.ai-hero p { color: #bdcac2; font-size: 11px; }
.ai-hero button { margin-top: 12px; background: var(--lime); color: #273b2d; }
.ai-feature-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.ai-feature { padding: 20px; }
.ai-feature .metric-icon { margin-bottom: 14px; }
.ai-feature h3 { font-size: 13px; }
.ai-feature p { color: var(--muted); font-size: 10px; line-height: 1.65; }
.coming { color: var(--orange); font-size: 9px; }

.settings-list { max-width: 760px; overflow: hidden; }
.setting-row { min-height: 72px; display: flex; align-items: center; gap: 14px; padding: 0 20px; border-top: 1px solid var(--line); }
.setting-row:first-child { border-top: 0; }
.setting-row > div { flex: 1; }
.setting-row strong { font-size: 12px; }
.setting-row small { display: block; color: var(--muted); margin-top: 4px; font-size: 9px; }
.toggle { width: 38px; height: 22px; border: 0; border-radius: 20px; padding: 3px; background: #cdd2ca; }
.toggle::after { content: ""; display: block; width: 16px; height: 16px; border-radius: 50%; background: white; transition: .2s; }
.toggle.on { background: var(--green); }
.toggle.on::after { transform: translateX(16px); }

.modal-root.active, .drawer-root.active { position: fixed; inset: 0; z-index: 100; background: rgba(20,29,23,.42); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: white; border-radius: 16px; box-shadow: 0 24px 80px rgba(18,28,21,.25); }
.modal.wide { width: min(800px, 100%); }
.modal-head { position: sticky; top: 0; z-index: 2; background: white; padding: 21px 24px 16px; display: flex; justify-content: space-between; align-items: start; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: 20px; font-weight: 500; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.close-button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: #f3f4f0; display: grid; place-items: center; }
.modal-body { padding: 22px 24px; }
.modal-foot { position: sticky; bottom: 0; padding: 15px 24px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); background: #fff; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { display: grid; gap: 6px; }
.form-field.full { grid-column: 1/-1; }
.form-field label { color: #596158; font-size: 10px; font-weight: 700; }
.form-field input, .form-field select, .form-field textarea { width: 100%; border: 1px solid #dfe3dc; border-radius: 8px; outline: 0; padding: 10px 11px; background: #fff; color: var(--ink); font-size: 11px; }
.form-field textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(55,117,92,.1); }
.helper-text { color: var(--muted); font-size: 9px; line-height: 1.5; }
.soap-grid { margin-top: 15px; display: grid; gap: 10px; }
.soap-field { padding: 13px; border: 1px solid var(--line); border-radius: 9px; display: grid; grid-template-columns: 30px 1fr; gap: 10px; }
.soap-letter { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; background: var(--green); color: white; font-family: Georgia, serif; font-weight: 700; }
.soap-field label { display: block; margin-bottom: 5px; font-size: 9px; font-weight: 700; }
.soap-field textarea { width: 100%; min-height: 50px; border: 0; outline: 0; resize: vertical; color: #4c554c; font-size: 10px; line-height: 1.55; }

.drawer-root.active { justify-content: flex-end; padding: 0; }
.drawer { height: 100%; width: min(560px, 100%); overflow: auto; background: white; box-shadow: -20px 0 70px rgba(20,30,23,.18); animation: slide-in .25s ease-out; }
@keyframes slide-in { from { transform: translateX(40px); opacity: .5; } }
.drawer-head { padding: 26px; color: white; background: #223a2e; }
.drawer-head-top { display: flex; justify-content: space-between; align-items: center; }
.drawer-head .close-button { color: white; background: rgba(255,255,255,.1); }
.drawer-person { margin-top: 22px; display: flex; align-items: center; gap: 14px; }
.drawer-person .person-avatar { width: 48px; height: 48px; border-radius: 14px; font-size: 14px; }
.drawer-person h2 { margin: 0; font-family: Georgia, serif; font-weight: 500; }
.drawer-person p { margin: 5px 0 0; color: #b8c6bd; font-size: 10px; }
.drawer-body { padding: 22px 26px 40px; }
.info-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.info-cell { padding: 11px; border-radius: 8px; background: #f6f7f3; }
.info-cell span { display: block; color: var(--muted); font-size: 8px; }
.info-cell strong { display: block; margin-top: 5px; font-size: 10px; }
.drawer-section { margin-top: 25px; }
.drawer-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.drawer-section h3 { margin: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: 15px; font-weight: 500; }
.process { display: flex; align-items: start; }
.process-step { flex: 1; text-align: center; position: relative; color: #a4aaa2; font-size: 8px; }
.process-step::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: #e3e6e0; }
.process-step:first-child::before { left: 50%; }
.process-step:last-child::before { right: 50%; }
.process-step i { position: relative; z-index: 1; width: 19px; height: 19px; margin: 0 auto 6px; border: 2px solid #e0e4dc; border-radius: 50%; display: grid; place-items: center; background: white; font-style: normal; font-size: 7px; }
.process-step.done { color: var(--green); }
.process-step.done::before { background: var(--green-2); }
.process-step.done i { background: var(--green); border-color: var(--green); color: white; }
.timeline { display: grid; gap: 13px; }
.timeline-item { position: relative; padding-left: 22px; }
.timeline-item::before { content: ""; position: absolute; left: 5px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--green-2); }
.timeline-item::after { content: ""; position: absolute; left: 8px; top: 14px; bottom: -18px; width: 1px; background: #dfe4dc; }
.timeline-item:last-child::after { display: none; }
.timeline-item strong { font-size: 10px; }
.timeline-item time { float: right; color: var(--muted); font-size: 8px; }
.timeline-item p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }

.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: grid; gap: 8px; }
.toast { min-width: 260px; padding: 13px 16px; border-radius: 10px; background: #1f3429; color: white; box-shadow: var(--shadow); font-size: 10px; animation: toast-in .25s ease-out; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }
.notification-popover { position: fixed; z-index: 70; right: 38px; top: 76px; width: 310px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.notification-popover h3 { margin: 8px 10px 10px; font-family: Georgia, serif; font-size: 14px; font-weight: 500; }
.notice { padding: 10px; border-radius: 8px; display: flex; gap: 9px; }
.notice:hover { background: #f5f7f2; }
.notice i { margin-top: 4px; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--orange); }
.notice strong { font-size: 10px; }
.notice p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }

.sidebar-backdrop { display: none; }
@media (max-width: 1100px) {
  .case-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .global-search { width: 190px; }
  .dashboard-hero { grid-template-columns: minmax(0,1.4fr) minmax(250px,.7fr); }
}
@media (max-width: 860px) {
  :root { --sidebar: 230px; }
  .sidebar { transform: translateX(-100%); transition: .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.active { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(20,30,23,.35); }
  .main { margin-left: 0; }
  .mobile-menu { display: grid; }
  .page-heading { margin-right: auto; margin-left: 12px; }
  .dashboard-hero, .dashboard-grid, .schedule-layout { grid-template-columns: 1fr; }
  .summary-column { grid-template-columns: repeat(3,1fr); }
  .metric-card { padding: 14px; gap: 9px; }
  .metric-icon { width: 35px; height: 35px; }
  .metric-copy strong { font-size: 19px; }
  .ai-feature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar { height: 72px; padding: 0 16px; }
  .content { padding: 20px 16px 40px; }
  .page-heading p { display: none; }
  .page-heading h1 { font-size: 18px; }
  .global-search { display: none; }
  .primary-button#quickRecord { width: 40px; padding: 0; font-size: 0; }
  .summary-column { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .week-grid { gap: 2px; }
  .day-cell { min-height: 61px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .toolbar-filters { overflow-x: auto; max-width: 100%; }
  .view-toolbar { align-items: stretch; flex-direction: column; }
  .table-row { grid-template-columns: 70px 1fr 70px; padding: 0 12px; }
  .table-row > :nth-child(4), .table-row > :nth-child(5) { display: none; }
  .month-card { padding: 12px; overflow-x: auto; }
  .month-grid { min-width: 560px; }
  .appointment { grid-template-columns: 45px 3px minmax(0,1fr); }
  .appointment .method-badge { display: none; }
}
