:root {
    --bg: #f4f5f3;
    --surface: #ffffff;
    --surface-2: #f8f9f7;
    --text: #161817;
    --muted: #6f746f;
    --muted-2: #929790;
    --border: #e2e5e0;
    --border-strong: #d3d7d1;
    --black: #171918;
    --green: #2d6f4f;
    --green-soft: #edf7f1;
    --amber: #8a5b0a;
    --amber-soft: #fff7e7;
    --red: #9e3d37;
    --red-soft: #fff0ef;
    --blue: #3e5f8a;
    --blue-soft: #eff4fb;
    --shadow-sm: 0 1px 2px rgba(18, 25, 20, .04), 0 8px 20px rgba(18, 25, 20, .03);
    --radius: 12px;
    --radius-sm: 9px;
    --sidebar: 248px;
}

* { box-sizing: border-box; }
html { min-width: 0; background: var(--bg); }
body { margin: 0; color: var(--text); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img, svg { display: block; }
.icon { flex: 0 0 auto; }

.app-body { background: var(--bg); }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: #fbfcfa; border-right: 1px solid var(--border); padding: 22px 14px 16px; display: flex; flex-direction: column; justify-content: space-between; z-index: 50; }
.sidebar-top { display: grid; gap: 26px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 760; letter-spacing: -.03em; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--black); color: white; display: grid; place-items: center; font-size: 14px; font-weight: 800; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.brand-name { font-size: 17px; }
.sidebar .brand { padding: 0 9px; }
.side-nav { display: grid; gap: 4px; }
.nav-link { min-height: 42px; display: flex; align-items: center; gap: 11px; border-radius: 9px; padding: 0 11px; color: #616661; font-size: 14px; font-weight: 580; transition: .18s ease; }
.nav-link:hover { color: var(--text); background: #f0f2ef; }
.nav-link.active { color: var(--text); background: #ecefeb; font-weight: 680; }
.sidebar-bottom { display: grid; gap: 10px; }
.profile-card { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border); padding: 15px 8px 0; min-width: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #e3e7e1; color: #2d312e; display: grid; place-items: center; font-size: 12px; font-weight: 760; flex: 0 0 auto; }
.profile-meta { min-width: 0; flex: 1; display: grid; gap: 2px; }
.profile-meta strong { font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.profile-meta span { font-size: 11px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.icon-button { width: 34px; height: 34px; border: 1px solid transparent; border-radius: 8px; display: inline-grid; place-items: center; background: transparent; cursor: pointer; color: var(--muted); }
.icon-button:hover { background: #f0f2ef; color: var(--text); }
.primary-icon { background: var(--black); color: white; }
.primary-icon:hover { background: #2a2d2b; color: white; }
.app-main { min-height: 100vh; margin-left: var(--sidebar); }
.page-wrap { width: min(1240px, calc(100% - 64px)); margin: 0 auto; padding: 42px 0 70px; }
.mobile-topbar, .sidebar-scrim { display: none; }

.page-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 28px; }
.page-head-copy { min-width: 0; }
.eyebrow { text-transform: uppercase; color: var(--muted); letter-spacing: .12em; font-size: 10px; font-weight: 760; margin: 0 0 8px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(28px, 3vw, 38px); line-height: 1.05; letter-spacing: -.045em; margin-bottom: 9px; }
h2 { font-size: 20px; line-height: 1.2; letter-spacing: -.025em; }
h3 { font-size: 15px; line-height: 1.25; letter-spacing: -.015em; }
.page-subtitle { color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 670px; margin-bottom: 0; }
.head-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }

.button { min-height: 40px; padding: 0 15px; border: 1px solid var(--border-strong); border-radius: 9px; background: white; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 680; cursor: pointer; transition: .18s ease; white-space: nowrap; }
.button:hover { background: #f8f9f7; border-color: #c9cec7; }
.button-dark { background: var(--black); color: white; border-color: var(--black); box-shadow: 0 1px 1px rgba(0,0,0,.07); }
.button-dark:hover { background: #2b2d2c; border-color: #2b2d2c; }
.button-sm { min-height: 34px; padding: 0 12px; font-size: 12px; }
.button-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.button-danger { color: var(--red); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 17px; box-shadow: var(--shadow-sm); min-width: 0; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 620; }
.stat-value { margin: 20px 0 6px; font-size: 30px; line-height: 1; letter-spacing: -.045em; font-weight: 760; }
.stat-delta { color: var(--muted); font-size: 11px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #aeb3ae; }
.dot.success { background: #4d8d68; } .dot.warning { background: #bb8d38; } .dot.danger { background: #c96761; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .85fr); gap: 16px; }
.stack { display: grid; gap: 16px; align-content: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-header { padding: 18px 19px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-header h2 { margin: 0; font-size: 15px; }
.panel-header p { margin: 3px 0 0; font-size: 11px; color: var(--muted); }
.panel-link { color: var(--muted); font-size: 12px; font-weight: 650; display: inline-flex; gap: 4px; align-items: center; }
.panel-link:hover { color: var(--text); }
.panel-body { padding: 0 18px 18px; }
.divider-list > * + * { border-top: 1px solid var(--border); }

.meeting-row, .task-row-mini { padding: 14px 2px; display: grid; align-items: center; gap: 12px; }
.meeting-row { grid-template-columns: 1fr auto; }
.meeting-row-main, .task-row-main { min-width: 0; }
.row-title { display: block; font-size: 13px; font-weight: 690; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { margin-top: 5px; display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.row-meta span { display: inline-flex; gap: 4px; align-items: center; }
.task-row-mini { grid-template-columns: 1fr auto; }
.due-pill { color: var(--muted); font-size: 11px; text-align: right; }
.due-pill.overdue { color: var(--red); font-weight: 650; }

.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; font-size: 10px; font-weight: 730; border: 1px solid transparent; text-transform: capitalize; white-space: nowrap; }
.badge.pending, .badge.draft { background: #f2f3f1; color: #656a65; border-color: #e4e6e2; }
.badge.in_progress, .badge.analyzed { background: var(--blue-soft); color: var(--blue); border-color: #dce7f4; }
.badge.completed, .badge.approved { background: var(--green-soft); color: var(--green); border-color: #d9ecdf; }
.badge.overdue { background: var(--red-soft); color: var(--red); border-color: #f1d9d7; }
.badge.reviewed { background: var(--amber-soft); color: var(--amber); border-color: #f0e2bf; }
.badge.priority-low { background:#f4f5f3;color:#687069; }
.badge.priority-medium { background:#eef4f8;color:#48667d; }
.badge.priority-high { background:#fff5e9;color:#8a5b20; }
.badge.priority-urgent { background:#fff0ef;color:#a0443e; }

.automation-card { background: #1b1e1c; color: white; padding: 18px; border-radius: var(--radius); }
.automation-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.automation-icon { width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,.09); display:grid; place-items:center; }
.automation-card h3 { font-size: 14px; margin: 12px 0 6px; }
.automation-card p { color: #bfc4c0; font-size: 12px; line-height: 1.55; margin-bottom: 16px; }
.status-live { display: inline-flex; gap: 6px; align-items: center; font-size: 10px; color: #d8ddd9; }
.status-live .pulse { width: 7px; height: 7px; border-radius: 50%; background: #70bd8b; box-shadow: 0 0 0 4px rgba(112,189,139,.11); }
.automation-metrics { border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.automation-metrics strong { font-size: 18px; display:block; } .automation-metrics span { color:#aeb5b0; font-size:10px; }

.activity-mini { display: grid; }
.activity-item-mini { display: grid; grid-template-columns: 30px 1fr; gap: 11px; padding: 12px 2px; }
.activity-symbol { width: 28px; height: 28px; border-radius: 8px; display:grid; place-items:center; background:#f2f4f1; color:#5d655f; }
.activity-item-mini strong { display:block; font-size:12px; margin-bottom:4px; line-height:1.35; }
.activity-item-mini span { color:var(--muted); font-size:10px; }

/* Forms */
.form-shell { max-width: 850px; }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px; }
.form-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display:grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
label { color:#3f443f; font-size:12px; font-weight:660; }
.input, .textarea, .select { width:100%; border:1px solid var(--border-strong); background:#fff; border-radius:9px; color:var(--text); outline:none; transition:.15s ease; }
.input, .select { height:42px; padding:0 12px; }
.textarea { min-height: 280px; padding: 12px 13px; resize: vertical; line-height:1.6; }
.input:focus, .textarea:focus, .select:focus { border-color:#969d96; box-shadow:0 0 0 3px rgba(40,48,42,.06); }
.help { color:var(--muted); font-size:11px; line-height:1.5; }
.char-count { color:var(--muted-2); font-size:10px; text-align:right; }
.form-actions { border-top:1px solid var(--border); margin-top:22px; padding-top:18px; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.helper-panel { display:flex; align-items:flex-start; gap:10px; background:#f7f8f6; border:1px solid var(--border); padding:12px 13px; border-radius:9px; color:var(--muted); font-size:11px; line-height:1.5; }
.helper-panel strong { color:var(--text); display:block; margin-bottom:2px; font-size:11px; }

/* Loading overlay */
.analysis-overlay { position:fixed; inset:0; z-index:100; display:none; place-items:center; padding:20px; background:rgba(244,245,243,.88); backdrop-filter: blur(8px); }
.analysis-overlay.open { display:grid; }
.analysis-modal { width:min(520px, 100%); background:white; border:1px solid var(--border); box-shadow:0 24px 70px rgba(30,35,31,.14); border-radius:15px; padding:28px; }
.analysis-orb { width:42px; height:42px; border-radius:12px; background:var(--black); color:white; display:grid; place-items:center; margin-bottom:18px; }
.analysis-modal h2 { font-size:19px; margin-bottom:7px; }
.analysis-modal > p { color:var(--muted); font-size:12px; line-height:1.55; }
.analysis-steps { display:grid; gap:3px; margin-top:18px; }
.analysis-step { display:flex; gap:10px; align-items:center; min-height:36px; color:#949a94; font-size:12px; }
.step-dot { width:18px; height:18px; border-radius:50%; border:1px solid #d7dbd5; display:grid; place-items:center; font-size:9px; }
.analysis-step.active { color:var(--text); font-weight:650; }
.analysis-step.active .step-dot { border-color:var(--text); }
.analysis-step.done { color:#52715e; }
.analysis-step.done .step-dot { background:#edf7f1; border-color:#cfe6d7; }
.analysis-progress { height:4px; background:#eef0ed; border-radius:999px; margin-top:20px; overflow:hidden; }
.analysis-progress span { display:block; height:100%; background:var(--black); width:10%; transition:width .55s ease; }

/* Tables */
.table-tools { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px; }
.search-box { position:relative; width:min(310px,100%); }
.search-box .icon { position:absolute; left:11px; top:50%; transform:translateY(-50%); color:var(--muted); }
.search-box input { padding-left:36px; }
.filter-tabs { display:flex; gap:5px; flex-wrap:wrap; }
.filter-tab { border:1px solid var(--border); border-radius:8px; background:white; min-height:34px; padding:0 11px; font-size:11px; color:var(--muted); cursor:pointer; font-weight:620; }
.filter-tab.active { color:white; background:var(--black); border-color:var(--black); }
.table-card { background:white; border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-sm); }
.data-table { width:100%; border-collapse:collapse; table-layout:fixed; }
.data-table th { padding:11px 14px; background:#f8f9f7; color:#7d827d; font-size:10px; text-transform:uppercase; letter-spacing:.045em; font-weight:720; text-align:left; border-bottom:1px solid var(--border); }
.data-table td { padding:14px; border-bottom:1px solid var(--border); vertical-align:middle; font-size:12px; color:#3e433f; }
.data-table tr:last-child td { border-bottom:0; }
.data-table tbody tr:hover { background:#fcfdfb; }
.cell-title { display:block; color:var(--text); font-size:12px; font-weight:680; margin-bottom:4px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.cell-sub { color:var(--muted); font-size:10px; line-height:1.45; }
.table-empty { padding:60px 20px; text-align:center; }
.table-empty-icon { width:42px; height:42px; margin:0 auto 13px; border-radius:11px; background:#f0f2ef; display:grid; place-items:center; color:var(--muted); }
.table-empty h3 { margin-bottom:6px; } .table-empty p { color:var(--muted); font-size:12px; margin:0 auto 15px; max-width:340px; line-height:1.55; }

/* Review */
.review-layout { display:grid; grid-template-columns:minmax(0, 1fr) 280px; gap:16px; align-items:start; }
.review-section { background:white; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-sm); margin-bottom:14px; overflow:hidden; }
.review-section-head { padding:18px 20px 13px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.review-section-head h2 { font-size:14px; margin:0; }
.review-section-body { padding:18px 20px; }
.summary-edit { width:100%; border:0; padding:0; resize:vertical; min-height:88px; outline:0; line-height:1.7; color:#353a36; }
.decision-list { display:grid; gap:9px; }
.decision-item { border:1px solid var(--border); border-radius:9px; padding:11px 12px; display:flex; gap:10px; align-items:flex-start; }
.decision-index { width:22px; height:22px; background:#f0f2ef; border-radius:6px; display:grid; place-items:center; font-size:10px; color:var(--muted); flex:0 0 auto; }
.decision-item input { border:0; outline:0; width:100%; padding:2px 0; color:var(--text); background:transparent; }
.review-task { border:1px solid var(--border); border-radius:10px; padding:14px; }
.review-task + .review-task { margin-top:10px; }
.review-task-top { display:flex; gap:10px; align-items:center; justify-content:space-between; margin-bottom:12px; }
.review-task-title { border:0; outline:0; font-weight:690; font-size:13px; width:100%; min-width:0; }
.review-task-grid { display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:10px; }
.review-task .textarea { min-height:72px; font-size:11px; }
.compact-input { height:36px; padding:0 10px; font-size:11px; }
.followup-row { display:grid; grid-template-columns:1fr 150px auto; gap:9px; align-items:center; }
.followup-row + .followup-row { margin-top:9px; }
.followup-row .input { height:38px; font-size:11px; }
.review-aside { position:sticky; top:20px; display:grid; gap:12px; }
.confidence-card, .review-actions-card { background:white; border:1px solid var(--border); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow-sm); }
.confidence-ring { width:78px; height:78px; border-radius:50%; display:grid; place-items:center; background:conic-gradient(#1d211e 0 94%, #ecefeb 94% 100%); margin:4px auto 13px; position:relative; }
.confidence-ring::after { content:""; position:absolute; inset:7px; border-radius:50%; background:white; }
.confidence-ring strong { position:relative; z-index:1; font-size:18px; }
.confidence-card h3 { text-align:center; margin-bottom:5px; }
.confidence-card p { text-align:center; color:var(--muted); font-size:10px; line-height:1.5; margin:0; }
.review-actions-card { display:grid; gap:8px; }
.review-actions-card .button { width:100%; }
.review-note { color:var(--muted); font-size:10px; line-height:1.5; padding:2px 3px 0; }

/* Meeting view */
.detail-hero { background:white; border:1px solid var(--border); border-radius:var(--radius); padding:22px; box-shadow:var(--shadow-sm); margin-bottom:14px; }
.detail-meta { display:flex; gap:16px; flex-wrap:wrap; color:var(--muted); font-size:11px; margin:12px 0 0; }
.detail-meta span { display:flex; align-items:center; gap:5px; }
.detail-grid { display:grid; grid-template-columns:1.15fr .85fr; gap:14px; }
.detail-list { display:grid; gap:8px; }
.detail-list-item { padding:11px 12px; background:#fafbf9; border:1px solid var(--border); border-radius:9px; font-size:12px; line-height:1.5; }

/* Activity */
.timeline { position:relative; background:white; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-sm); padding:4px 20px; }
.timeline::before { content:""; position:absolute; left:38px; top:28px; bottom:28px; width:1px; background:var(--border); }
.timeline-item { display:grid; grid-template-columns:36px 1fr auto; gap:14px; position:relative; padding:18px 0; }
.timeline-item + .timeline-item { border-top:1px solid var(--border); }
.timeline-dot { width:36px; height:36px; border-radius:10px; background:#f1f3f0; border:4px solid white; display:grid; place-items:center; color:#646b66; z-index:1; }
.timeline-copy strong { display:block; font-size:12px; margin-bottom:4px; }
.timeline-copy p { margin:0 0 6px; color:var(--muted); font-size:11px; line-height:1.5; }
.timeline-context { color:#808680; font-size:10px; font-weight:620; }
.timeline-time { color:var(--muted); font-size:10px; white-space:nowrap; padding-top:3px; }

/* Settings */
.settings-layout { display:grid; grid-template-columns:200px minmax(0, 700px); gap:28px; }
.settings-nav { display:grid; gap:4px; align-content:start; position:sticky; top:20px; }
.settings-nav button { border:0; background:transparent; border-radius:8px; min-height:38px; padding:0 10px; text-align:left; color:var(--muted); font-size:12px; cursor:pointer; }
.settings-nav button.active { color:var(--text); background:#e9ece8; font-weight:680; }
.settings-panel { display:none; }
.settings-panel.active { display:block; }
.settings-section { background:white; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-sm); overflow:hidden; }
.settings-section-head { padding:18px 20px; border-bottom:1px solid var(--border); }
.settings-section-head h2 { font-size:14px; margin-bottom:4px; }
.settings-section-head p { color:var(--muted); font-size:11px; margin:0; }
.settings-section-body { padding:20px; display:grid; gap:18px; }
.switch-row { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; }
.switch-copy strong { display:block; font-size:12px; margin-bottom:4px; }
.switch-copy span { color:var(--muted); font-size:10px; line-height:1.45; display:block; }
.switch { width:38px; height:22px; border:0; border-radius:999px; background:#dfe3de; position:relative; cursor:pointer; flex:0 0 auto; }
.switch::after { content:""; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:white; box-shadow:0 1px 3px rgba(0,0,0,.15); transition:.18s ease; }
.switch.on { background:#252825; }
.switch.on::after { transform:translateX(16px); }

/* Public / auth */
.public-body { min-height:100vh; background:#f6f7f5; }
.public-nav { height:76px; width:min(1180px, calc(100% - 40px)); margin:0 auto; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.public-nav-actions { display:flex; gap:16px; align-items:center; }
.text-link { color:#595f5a; font-size:12px; font-weight:620; }
.hero { width:min(1180px, calc(100% - 40px)); margin:0 auto; padding:84px 0 52px; display:grid; grid-template-columns:1.05fr .95fr; gap:58px; align-items:center; }
.hero-copy h1 { font-size:clamp(44px, 6vw, 72px); max-width:760px; line-height:.98; margin-bottom:20px; }
.hero-copy p { max-width:600px; color:var(--muted); font-size:16px; line-height:1.7; }
.hero-actions { display:flex; gap:10px; margin-top:26px; flex-wrap:wrap; }
.hero-proof { margin-top:24px; display:flex; gap:18px; color:var(--muted); font-size:10px; flex-wrap:wrap; }
.hero-proof span { display:flex; gap:6px; align-items:center; }
.product-preview { background:white; border:1px solid var(--border); border-radius:16px; box-shadow:0 24px 70px rgba(28,36,30,.09); padding:12px; transform:rotate(1deg); }
.preview-shell { border:1px solid var(--border); border-radius:11px; overflow:hidden; background:#fafbf9; }
.preview-top { height:38px; border-bottom:1px solid var(--border); display:flex; align-items:center; padding:0 12px; gap:5px; }
.preview-dot { width:7px; height:7px; border-radius:50%; background:#d7dbd5; }
.preview-body { display:grid; grid-template-columns:110px 1fr; min-height:390px; }
.preview-side { border-right:1px solid var(--border); padding:14px 10px; background:#fbfcfa; }
.preview-logo { width:66px; height:9px; border-radius:4px; background:#242724; margin-bottom:24px; }
.preview-line { height:7px; background:#e7eae5; border-radius:4px; margin:11px 0; }
.preview-main { padding:25px; }
.preview-title { width:48%; height:18px; border-radius:5px; background:#202320; margin-bottom:25px; }
.preview-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.preview-stat { height:72px; border:1px solid var(--border); border-radius:8px; background:white; }
.preview-table { margin-top:12px; height:180px; border:1px solid var(--border); border-radius:9px; background:white; padding:12px; }
.preview-row { height:25px; border-bottom:1px solid #edf0ec; }
.preview-row:last-child { border-bottom:0; }
.feature-strip { width:min(1180px, calc(100% - 40px)); margin:36px auto 0; padding:30px 0 72px; border-top:1px solid var(--border); display:grid; grid-template-columns:repeat(3,1fr); gap:34px; }
.feature h3 { margin-bottom:7px; }
.feature p { color:var(--muted); font-size:11px; line-height:1.6; margin:0; }
.public-footer { width:min(1180px, calc(100% - 40px)); margin:0 auto; min-height:70px; border-top:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:20px; color:var(--muted); font-size:10px; }
.auth-shell { min-height:calc(100vh - 76px); display:grid; place-items:center; padding:40px 20px 80px; }
.auth-card { width:min(430px,100%); background:white; border:1px solid var(--border); border-radius:14px; box-shadow:0 18px 55px rgba(28,35,30,.07); padding:28px; }
.auth-card h1 { font-size:27px; margin-bottom:7px; }
.auth-card > p { color:var(--muted); font-size:12px; line-height:1.55; margin-bottom:24px; }
.auth-form { display:grid; gap:14px; }
.auth-form .button { width:100%; margin-top:4px; }
.auth-meta { margin-top:18px; padding-top:17px; border-top:1px solid var(--border); text-align:center; color:var(--muted); font-size:11px; }
.auth-meta a { color:var(--text); font-weight:680; }
.form-note { background:#f7f8f6; border:1px solid var(--border); border-radius:8px; padding:10px 11px; color:var(--muted); font-size:10px; line-height:1.45; }

.toast { position:fixed; right:18px; bottom:18px; z-index:200; background:#1d201e; color:white; border-radius:9px; padding:11px 14px; font-size:11px; box-shadow:0 12px 35px rgba(0,0,0,.18); transform:translateY(18px); opacity:0; pointer-events:none; transition:.2s ease; max-width:320px; }
.toast.show { transform:translateY(0); opacity:1; }

@media (max-width: 1020px) {
    :root { --sidebar: 220px; }
    .page-wrap { width:min(100% - 40px, 1100px); }
    .stats-grid { grid-template-columns:repeat(2,1fr); }
    .dashboard-grid, .detail-grid { grid-template-columns:1fr; }
    .review-layout { grid-template-columns:1fr; }
    .review-aside { position:static; grid-template-columns:1fr 1fr; }
    .settings-layout { grid-template-columns:160px minmax(0,1fr); gap:18px; }
    .hero { grid-template-columns:1fr; padding-top:55px; }
    .product-preview { transform:none; max-width:760px; }
}

@media (max-width: 760px) {
    .sidebar { transform:translateX(-105%); transition:transform .22s ease; width:min(280px, 85vw); box-shadow:18px 0 50px rgba(15,20,16,.12); }
    body.sidebar-open .sidebar { transform:translateX(0); }
    .sidebar-scrim { position:fixed; inset:0; background:rgba(16,20,17,.27); z-index:40; }
    body.sidebar-open .sidebar-scrim { display:block; }
    .app-main { margin-left:0; }
    .mobile-topbar { height:60px; position:sticky; top:0; z-index:30; background:rgba(248,249,247,.94); backdrop-filter:blur(12px); border-bottom:1px solid var(--border); padding:0 14px; display:flex; align-items:center; justify-content:space-between; }
    .mobile-topbar .brand.compact { gap:8px; }
    .mobile-topbar .brand-mark { width:27px; height:27px; font-size:12px; }
    .mobile-topbar .brand-name { font-size:14px; }
    .page-wrap { width:calc(100% - 28px); padding:24px 0 50px; }
    .page-head { margin-bottom:20px; }
    .page-head { align-items:stretch; flex-direction:column; gap:16px; }
    .head-actions { justify-content:flex-start; }
    h1 { font-size:29px; }
    .stats-grid { gap:9px; }
    .stat-card { padding:15px; }
    .stat-value { margin-top:16px; font-size:25px; }
    .dashboard-grid { gap:12px; }
    .panel-header { padding:16px 15px 12px; }
    .panel-body { padding:0 14px 14px; }
    .form-card { padding:17px; }
    .form-grid { grid-template-columns:1fr; gap:15px; }
    .field.full { grid-column:auto; }
    .form-actions { align-items:stretch; flex-direction:column-reverse; }
    .form-actions .button { width:100%; }
    .table-tools { align-items:stretch; flex-direction:column; }
    .search-box { width:100%; }
    .filter-tabs { overflow-x:auto; flex-wrap:nowrap; padding-bottom:2px; scrollbar-width:none; }
    .filter-tabs::-webkit-scrollbar { display:none; }
    .table-card { border:0; background:transparent; box-shadow:none; overflow:visible; }
    .data-table, .data-table tbody, .data-table tr, .data-table td { display:block; width:100%; }
    .data-table thead { display:none; }
    .data-table tbody { display:grid; gap:9px; }
    .data-table tr { background:white; border:1px solid var(--border); border-radius:10px; padding:8px 12px; box-shadow:var(--shadow-sm); }
    .data-table td { display:grid; grid-template-columns:100px 1fr; gap:12px; align-items:start; border-bottom:1px solid #edf0ec; padding:9px 0; font-size:11px; }
    .data-table td:last-child { border-bottom:0; }
    .data-table td::before { content:attr(data-label); color:var(--muted); font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
    .cell-title { white-space:normal; }
    .review-section-head, .review-section-body { padding-left:15px; padding-right:15px; }
    .review-task-grid { grid-template-columns:1fr; }
    .followup-row { grid-template-columns:1fr 115px auto; }
    .review-aside { grid-template-columns:1fr; }
    .timeline { padding:3px 14px; }
    .timeline::before { left:31px; }
    .timeline-item { grid-template-columns:32px 1fr; gap:11px; }
    .timeline-dot { width:32px; height:32px; }
    .timeline-time { grid-column:2; padding:0; }
    .settings-layout { grid-template-columns:1fr; gap:14px; }
    .settings-nav { position:static; display:flex; overflow-x:auto; padding-bottom:2px; scrollbar-width:none; }
    .settings-nav::-webkit-scrollbar { display:none; }
    .settings-nav button { white-space:nowrap; }
    .hero { width:calc(100% - 28px); padding-top:42px; gap:40px; }
    .hero-copy h1 { font-size:42px; }
    .hero-copy p { font-size:14px; }
    .preview-body { grid-template-columns:70px 1fr; min-height:310px; }
    .preview-side { padding:12px 8px; }
    .preview-main { padding:16px; }
    .preview-stats { grid-template-columns:1fr 1fr; }
    .preview-stat:last-child { display:none; }
    .feature-strip { width:calc(100% - 28px); grid-template-columns:1fr; gap:22px; }
    .public-nav { width:calc(100% - 28px); }
    .public-footer { width:calc(100% - 28px); align-items:flex-start; flex-direction:column; justify-content:center; padding:18px 0; }
}

@media (max-width: 460px) {
    .stats-grid { grid-template-columns:1fr 1fr; }
    .stat-card { min-height:120px; }
    .stat-top { font-size:10px; }
    .stat-delta { font-size:9px; }
    .followup-row { grid-template-columns:1fr auto; }
    .followup-row .followup-date { grid-column:1; }
    .public-nav .text-link { display:none; }
    .auth-card { padding:22px 18px; }
}


/* Integrated application states */
.form-error {
    border:1px solid #e7c0c0;
    background:#fff6f6;
    color:#8b2525;
    border-radius:8px;
    padding:10px 12px;
    font-size:12px;
    line-height:1.45;
}
.empty-state {
    display:flex;
    flex-direction:column;
    gap:4px;
    padding:20px 4px;
    color:var(--muted);
    font-size:12px;
}
.empty-state strong {
    color:var(--text);
    font-size:13px;
}
.notes-pre {
    margin:0;
    white-space:pre-wrap;
    word-break:break-word;
    font:inherit;
    font-size:12px;
    line-height:1.65;
    color:#454b45;
}
.task-status-select {
    min-width:130px;
}
button:disabled,
select:disabled {
    opacity:.62;
    cursor:not-allowed;
}
