:root {
    --ink: #17221f;
    --muted: #6b7773;
    --line: #e4e9e7;
    --surface: #ffffff;
    --canvas: #f4f6f4;
    --nav: #17241f;
    --nav-soft: #23342d;
    --primary: #147a5a;
    --primary-dark: #0e6449;
    --primary-soft: #e6f4ee;
    --danger: #c94343;
    --danger-soft: #fff0ef;
    --warning: #9b6708;
    --warning-soft: #fff7df;
    --blue: #315f9c;
    --blue-soft: #edf3fb;
    --shadow: 0 10px 30px rgba(23, 34, 31, .07);
    --radius: 18px;
    --radius-sm: 11px;
    font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); color: var(--ink); }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:where(button, [role="button"], input, select, textarea):focus-visible { outline: 3px solid rgba(20,122,90,.3); outline-offset: 2px; }

.eyebrow { margin: 0 0 5px; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.button { min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; font-weight: 750; transition: .16s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: var(--primary); box-shadow: 0 5px 15px rgba(20,122,90,.18); }
.button-primary:hover { background: var(--primary-dark); }
.button-secondary { color: var(--ink); background: white; border-color: var(--line); }
.button-danger { color: white; background: var(--danger); }
.button-large { width: 100%; min-height: 50px; }
.text-button { padding: 4px; border: 0; background: transparent; color: var(--primary); font-weight: 750; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font-size: 20px; }
.mobile-only { display: none; }

/* 로그인 */
.login-view { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 30% 20%, #eff8f3 0, transparent 32%), linear-gradient(145deg, #f8faf9, #edf2ef); }
.login-card { width: min(440px, 100%); padding: 46px; border: 1px solid rgba(255,255,255,.8); border-radius: 26px; background: rgba(255,255,255,.94); box-shadow: 0 24px 70px rgba(18,40,31,.12); }
.login-mark, .brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: white; background: var(--primary); font-size: 13px; font-weight: 900; letter-spacing: -.04em; }
.login-card h1 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.login-copy { margin: 13px 0 30px; color: var(--muted); line-height: 1.7; }
.form-stack { display: grid; gap: 18px; }
.form-stack label, .field { display: grid; gap: 7px; }
.form-stack label > span, .field > span { font-size: 13px; font-weight: 750; }
input, select, textarea { width: 100%; border: 1px solid #d9e0dd; border-radius: 10px; background: white; color: var(--ink); outline: none; }
input, select { min-height: 44px; padding: 0 12px; }
textarea { min-height: 92px; padding: 11px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20,122,90,.11); }
input:disabled, select:disabled, textarea:disabled { color: #43504b; background: #f4f6f4; opacity: 1; }
.form-error { margin: -4px 0 0; color: var(--danger); font-size: 13px; }
.security-note { margin: 22px 0 0; color: #66736e; font-size: 12px; text-align: center; }

/* 공통 레이아웃 */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.app-shell.password-required > .sidebar, .app-shell.password-required > .workspace, .app-shell.password-required > .sidebar-backdrop { visibility: hidden; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow-y: auto; padding: 24px 18px 18px; color: #e9f0ed; background: var(--nav); }
.sidebar-backdrop { display: none; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; }
.brand strong, .brand small { display: block; }
.brand strong { color: white; font-size: 15px; }
.brand small { margin-top: 3px; color: #8fa39a; font-size: 11px; }
.main-nav { display: grid; gap: 5px; }
.nav-item { min-height: 46px; display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 9px; padding: 0 13px; border: 0; border-radius: 11px; color: #b8c6c0; background: transparent; text-align: left; font-size: 14px; font-weight: 700; }
.nav-item:hover { color: white; background: rgba(255,255,255,.055); }
.nav-item.is-active { color: white; background: var(--nav-soft); box-shadow: inset 3px 0 var(--primary); }
.nav-icon { font-size: 18px; text-align: center; }
.nav-badge { min-width: 24px; padding: 3px 7px; border-radius: 999px; background: #355148; color: white; font-size: 11px; text-align: center; }
.nav-badge-alert { background: #a84943; }
.sidebar-footer { margin-top: auto; display: grid; gap: 14px; }
.continuity-score { padding: 15px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: rgba(255,255,255,.035); }
.continuity-score-head { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.continuity-score-head strong { color: #75d4ad; }
.progress-track { height: 5px; margin: 10px 0; overflow: hidden; border-radius: 99px; background: #31453d; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: #42b486; transition: width .35s ease; }
.continuity-score small { display: block; color: #8fa39a; font-size: 10px; line-height: 1.5; }
.user-button { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; min-height: 56px; padding: 8px 10px; border-radius: 12px; color: white; background: rgba(255,255,255,.03); text-align: left; }
.user-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #355148; font-weight: 800; }
.user-button strong, .user-button small { display: block; }
.user-button strong { font-size: 13px; }
.user-button small { margin-top: 2px; color: #8fa39a; font-size: 10px; }
.user-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.user-actions button { min-height: 30px; padding: 0 7px; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; color: #aebdb7; background: transparent; font-size: 9px; }
.user-actions button:hover { color: white; background: rgba(255,255,255,.05); }

.workspace { min-width: 0; padding: 0 34px 48px; }
.topbar { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.topbar h1 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.company-switcher select { min-width: 190px; background: white; font-weight: 700; }
.sync-notice { margin: -4px 0 18px; padding: 12px 15px; border: 1px solid #f0ddae; border-radius: 10px; color: #72500b; background: #fff9e8; font-size: 13px; }
.view-panel { display: none; }
.view-panel.is-active { display: block; animation: fade-in .18s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* 대시보드 */
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.metric-card { position: relative; min-height: 132px; padding: 21px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; }
.metric-card::after { content: ""; position: absolute; right: -24px; bottom: -33px; width: 90px; height: 90px; border-radius: 50%; background: currentColor; opacity: .055; }
.metric-label { display: block; color: var(--muted); font-size: 13px; font-weight: 750; }
.metric-card strong { display: block; margin: 9px 0 5px; font-size: 34px; line-height: 1; letter-spacing: -.04em; }
.metric-card small { color: var(--muted); font-size: 11px; }
.metric-danger { color: var(--danger); }
.metric-warn { color: var(--warning); }
.metric-blue { color: var(--blue); }
.metric-neutral { color: #62726c; }
.metric-card .metric-label, .metric-card small { color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .7fr); gap: 15px; margin-top: 15px; }
.panel { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-wide { min-height: 260px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.panel h2, .section-intro h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.panel h3 { margin: 0; font-size: 15px; }
.focus-list, .activity-list, .readiness-list { display: grid; gap: 9px; }
.focus-item { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid #edf0ef; border-radius: 12px; background: #fbfcfb; }
.focus-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.focus-dot.danger { background: var(--danger); }
.focus-dot.warning { background: #d3921a; }
.focus-item strong, .focus-item small { display: block; }
.focus-item strong { font-size: 13px; }
.focus-item small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.focus-meta { text-align: right; }
.focus-meta time { display: block; color: var(--muted); font-size: 11px; }
.company-summary { display: grid; gap: 13px; }
.company-row { padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.company-row-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.company-row-button { width: 100%; appearance: none; color: var(--ink); background: white; text-align: left; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.company-row-button:hover { border-color: #c2d3cc; background: #fbfdfc; transform: translateY(-1px); }
.company-row-button[aria-pressed="true"] { border-color: #9fc8b7; box-shadow: inset 3px 0 var(--primary); }
.company-row-title strong, .company-priority-label { display: block; }
.company-priority-label { margin-bottom: 3px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .04em; }
.company-progress { color: var(--primary); }
.company-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; color: var(--muted); font-size: 10px; }
.company-stats span { padding: 7px 5px; border-radius: 7px; background: var(--canvas); text-align: center; }
.company-row-secondary { justify-self: end; width: min(78%, 230px); min-height: 64px; margin-top: 5px; padding: 10px 12px; border-color: #e7ebe9; background: #f8faf9; }
.company-row-secondary .company-row-head { align-items: center; margin-bottom: 0; }
.company-row-secondary .company-priority-label { color: #66736e; }
.company-row-secondary .company-progress { color: #66736e; font-size: 11px; }
.company-row-secondary[aria-pressed="true"] { border-color: #bac8c2; box-shadow: inset 2px 0 #859a91; }
.readiness-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 0; border-bottom: 1px solid #eef1ef; }
.readiness-item:last-child { border-bottom: 0; }
.readiness-item strong { font-size: 12px; }
.readiness-item span { font-size: 12px; font-weight: 800; }
.readiness-item small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.activity-item { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid #eef1ef; }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 900; }
.activity-item strong, .activity-item small { display: block; }
.activity-item strong { font-size: 12px; }
.activity-item small, .activity-item time { color: var(--muted); font-size: 10px; }

/* 업무 */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.segmented button { min-height: 34px; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 750; }
.segmented button.is-active { background: var(--nav); color: white; }
.search-box { width: min(320px, 100%); display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.search-box input { border: 0; box-shadow: none; padding: 0; }
.task-board { display: grid; grid-template-columns: repeat(5, minmax(235px, 1fr)); gap: 13px; overflow-x: auto; padding-bottom: 12px; }
.task-column { min-width: 235px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: #eef2ef; }
.task-column-head { display: flex; justify-content: space-between; gap: 10px; padding: 2px 3px 12px; }
.task-column-head strong { font-size: 13px; }
.task-column-head span { min-width: 22px; padding: 2px 7px; border-radius: 99px; color: var(--muted); background: white; font-size: 10px; text-align: center; }
.task-stack { display: grid; gap: 9px; }
.task-card { padding: 14px; border: 1px solid #e4e9e6; border-radius: 12px; background: white; box-shadow: 0 3px 12px rgba(23,34,31,.05); }
.task-card:hover { border-color: #c8d8d1; }
.task-card-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 9px; }
.company-chip, .status-chip, .priority-chip { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border-radius: 999px; font-size: 9px; font-weight: 850; }
.company-chip.esol { color: #16694f; background: #e6f5ef; }
.company-chip.void { color: #63459b; background: #f0ebfb; }
.priority-chip.high { color: var(--danger); background: var(--danger-soft); }
.priority-chip.urgent { color: white; background: var(--danger); }
.task-card h3 { margin: 0 0 8px; font-size: 13px; line-height: 1.45; }
.task-next { margin: 0 0 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.task-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid #f0f2f1; color: var(--muted); font-size: 10px; }
.task-card-foot .is-overdue { color: var(--danger); font-weight: 800; }

/* 매뉴얼·승인·인수인계·자료 */
.section-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.section-actions { display: flex; gap: 8px; }
.section-intro p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.process-grid, .people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.process-card, .person-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.process-card[role="button"] { cursor: pointer; }
.process-card-head, .person-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.process-card h3, .person-card h3 { margin: 10px 0 5px; font-size: 15px; }
.process-card p, .person-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.process-meta { display: flex; gap: 6px; margin-top: 15px; }
.process-meta span { padding: 6px 8px; border-radius: 7px; background: var(--canvas); color: var(--muted); font-size: 9px; }
.process-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #eef1ef; }
.process-actions small { color: var(--muted); }
.status-chip.published, .status-chip.approved { color: var(--primary); background: var(--primary-soft); }
.status-chip.draft, .status-chip.pending { color: var(--warning); background: var(--warning-soft); }
.approval-list { display: grid; gap: 12px; }
.approval-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: var(--shadow); }
.approval-card h3 { margin: 7px 0; font-size: 15px; }
.approval-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.approval-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 13px; color: var(--muted); font-size: 10px; }
.approval-actions { display: flex; align-items: center; gap: 8px; }
.person-card-head { align-items: center; }
.person-identity { display: flex; align-items: center; gap: 11px; }
.person-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: var(--primary); background: var(--primary-soft); font-weight: 850; }
.person-card dl { display: grid; grid-template-columns: 1fr auto; row-gap: 9px; margin: 17px 0 0; padding-top: 15px; border-top: 1px solid #eef1ef; font-size: 11px; }
.person-card dt { color: var(--muted); }
.person-card dd { margin: 0; font-weight: 800; }
.handover-guide { margin-top: 15px; }
.handover-guide ol { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 0; margin: 17px 0 0; list-style: none; counter-reset: handover; }
.handover-guide li { counter-increment: handover; position: relative; min-height: 110px; padding: 15px 13px 13px 42px; border-radius: 12px; background: var(--canvas); }
.handover-guide li::before { content: counter(handover); position: absolute; top: 14px; left: 13px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: white; background: var(--primary); font-size: 10px; font-weight: 900; }
.handover-guide strong, .handover-guide span { display: block; }
.handover-guide strong { font-size: 12px; }
.handover-guide span { margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.table-panel { padding: 0; overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 14px 17px; border-bottom: 1px solid #edf0ef; text-align: left; white-space: nowrap; }
th { color: var(--muted); background: #f8faf8; font-size: 10px; letter-spacing: .02em; }
tbody tr:last-child td { border-bottom: 0; }

/* 빈 상태·모달·알림 */
.empty-state { display: grid; place-items: center; min-height: 170px; padding: 24px; color: var(--muted); text-align: center; }
.empty-state > span { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 10px; border-radius: 50%; background: var(--canvas); color: #9aa5a0; font-size: 22px; }
.empty-state strong { color: var(--ink); font-size: 13px; }
.empty-state p { margin: 6px 0 0; font-size: 11px; }
.modal { width: min(640px, calc(100% - 28px)); max-height: calc(100vh - 36px); padding: 0; overflow: hidden; border: 0; border-radius: 20px; color: var(--ink); box-shadow: 0 30px 90px rgba(10,28,21,.25); }
.modal::backdrop { background: rgba(12,25,20,.52); backdrop-filter: blur(3px); }
.modal form { max-height: calc(100vh - 36px); display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.modal-head, .modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 23px; }
.modal-head { border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal-body { overflow-y: auto; padding: 22px 23px; }
.modal-foot { justify-content: flex-end; border-top: 1px solid var(--line); background: #fafbfa; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.field.full { grid-column: 1 / -1; }
.field small { color: var(--muted); font-size: 10px; }
.form-help { margin: -6px 0 0; padding: 10px 12px; border-radius: 9px; color: #4f5e58; background: #f2f9f5; font-size: 11px; line-height: 1.55; }
.password-rules { padding: 13px 15px; border: 1px solid #cfe3da; border-radius: 10px; background: #f2f9f5; }
.password-rules strong { font-size: 12px; }
.password-rules p { margin: 5px 0 0; color: #4f5e58; font-size: 11px; line-height: 1.6; }
.dialog-error { margin: 16px 0 0; padding: 11px 13px; border: 1px solid #efc3c0; border-radius: 9px; color: #8a2929; background: var(--danger-soft); font-size: 12px; line-height: 1.55; }
.company-membership { margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 11px; }
.company-membership legend { padding: 0 5px; font-size: 12px; font-weight: 800; }
.company-membership label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.company-membership select { margin-top: 8px; }
.task-checklist { padding-top: 4px; }
.task-checklist > span { display: flex; justify-content: space-between; gap: 12px; }
.task-checklist > span small { color: var(--primary); font-weight: 800; }
.checklist-loading { margin: 0; padding: 14px; border-radius: 10px; color: var(--muted); background: var(--canvas); font-size: 11px; }
.checklist-items { display: grid; gap: 7px; }
.checklist-item { width: 100%; display: grid; grid-template-columns: 26px 1fr; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; text-align: left; }
.checklist-item:hover { border-color: #b9cec5; }
.checklist-item .checkmark { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #cdd8d3; border-radius: 7px; color: white; font-size: 12px; font-weight: 900; }
.checklist-item strong, .checklist-item small, .checklist-item em { display: block; }
.checklist-item strong { font-size: 12px; }
.checklist-item small { margin-top: 4px; color: var(--muted); font-weight: 400; line-height: 1.5; }
.checklist-item em { margin-top: 5px; color: var(--blue); font-size: 9px; font-style: normal; }
.checklist-item.is-complete { border-color: #cce4d9; background: #f4fbf7; }
.checklist-item.is-complete .checkmark { border-color: var(--primary); background: var(--primary); }
.checklist-item.is-complete strong { color: #66726d; text-decoration: line-through; }
.checklist-item:disabled { cursor: default; opacity: .78; }
.read-only-steps ol { display: grid; gap: 9px; margin: 0; padding: 14px 14px 14px 34px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf8; }
.read-only-steps li { font-size: 12px; line-height: 1.5; }
.read-only-steps small { display: block; margin-top: 3px; color: var(--muted); }
.required { color: var(--danger); }
.toast-region { position: fixed; z-index: 1000; top: 18px; right: 18px; display: grid; gap: 9px; }
.toast { min-width: 270px; max-width: 390px; padding: 13px 15px; border-radius: 11px; color: white; background: var(--nav); box-shadow: 0 12px 35px rgba(0,0,0,.18); font-size: 12px; animation: toast-in .2s ease; }
.toast.error { background: #9f3737; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-5px); } }

@media (max-width: 1180px) {
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .process-grid, .people-grid { grid-template-columns: repeat(2, 1fr); }
    .handover-guide ol { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
    .mobile-only { display: inline-grid; place-items: center; }
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; z-index: 51; left: 0; transform: translateX(-102%); width: 260px; transition: transform .2s ease; box-shadow: 20px 0 50px rgba(0,0,0,.18); }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; z-index: 50; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: rgba(9,20,16,.42); }
    .workspace { padding: 0 18px 36px; }
    .topbar { min-height: 92px; }
    .topbar > div:first-of-type { flex: 1; }
    .company-switcher select { min-width: 145px; }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .login-card { padding: 34px 25px; }
    .topbar { flex-wrap: wrap; padding: 17px 0; }
    .topbar h1 { font-size: 21px; }
    .topbar-actions { width: 100%; }
    .company-switcher { flex: 1; }
    .company-switcher select { min-width: 0; }
    .topbar-actions .icon-button { display: none; }
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .metric-card { min-height: 112px; padding: 16px; }
    .metric-card strong { font-size: 29px; }
    .toolbar { align-items: stretch; flex-direction: column; }
    .segmented { overflow-x: auto; }
    .segmented button { flex: 1; white-space: nowrap; }
    .search-box { width: 100%; }
    .section-intro { align-items: flex-start; flex-direction: column; }
    .process-grid, .people-grid { grid-template-columns: 1fr; }
    .handover-guide ol { grid-template-columns: 1fr; }
    .approval-card { grid-template-columns: 1fr; }
    .approval-actions { justify-content: flex-end; }
    .form-grid { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
    .company-row-secondary { width: min(86%, 240px); }
}
