/* Company workspace. Shared controls, task-first hierarchy, progressive detail. */
body, body[data-theme="sevinok"], body[data-theme="mist"] {
  --ink: #202b3b;
  --muted: #59677a;
  --soft: #667487;
  --line: #e2e7ee;
  --line-strong: #b8c3d1;
  --surface: #fff;
  --surface-soft: #f6f8fa;
  --page: #f6f8fa;
  --nav: #fff;
  --nav-soft: #eaf1fb;
  --nav-ink: #202b3b;
  --nav-muted: #59677a;
  --nav-active: #235caf;
  --accent: #275faf;
  --accent-dark: #204d90;
  --button-hover: #204d90;
  --danger: #b3363a;
  --warning: #945813;
  --success: #277353;
  --cyan-soft: #edf3fa;
  --shadow-sm: none;
  --shadow-md: 0 8px 24px rgb(32 43 59 / 10%);
  --shadow-lg: 0 18px 60px rgb(32 43 59 / 18%);
}
body[data-theme="mono"] {
  --nav: #fff; --nav-soft: #edf0f2; --nav-ink: #24282e; --nav-muted: #626974;
  --nav-active: #24282e; --page: #f5f6f7;
}
body[data-theme="mist"] { --page: #eef1f4; --nav: #f8f9fb; }
body[data-theme="navy"] {
  --accent: #95bcff; --accent-dark: #b4cfff; --button-hover: #accaff;
  --nav-soft: #28354b; --nav-active: #bed5ff; --line: #354155;
}
body { font-size: 14px; letter-spacing: 0; line-height: 1.55; }
::selection { background: var(--accent); color: var(--surface); }
input, textarea { caret-color: var(--accent); }
button, input, select, textarea { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, summary:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.app-shell { display: grid; grid-template-columns: 216px minmax(0,1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; padding: 0 14px 16px; background: var(--nav); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 0; overflow-y: auto; }
.brand { padding: 22px 10px 18px; min-height: 96px; border-bottom: 0; }
.brand .brand-site { align-items: flex-start; gap: 8px; }
.brand-logo-frame { width: 156px; height: 45px; padding: 4px 8px; border-radius: 4px; border: 0; background: #fff; box-shadow: none; }
.brand-logo { width: 100%; height: 100%; object-fit: contain; }
.brand span.brand-product { font-size: 11px; letter-spacing: .04em; color: var(--muted); margin: 0 0 0 8px; }
.nav-list { display: flex; flex-direction: column; padding: 6px 0; gap: 12px; }
.workspace-nav-toggle { display: none; }
.nav-core, .nav-tool-list, .nav-resources { display: flex; flex-direction: column; gap: 4px; }
.nav-resources { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.nav-item { width: 100%; min-height: 42px; padding: 9px 14px; border: 0; border-radius: 5px; color: var(--nav-muted); font-size: 14px; font-weight: 450; text-align: left; gap: 0; }
.nav-item::before { display: none; }
.nav-item:hover { color: var(--nav-ink); background: var(--surface-soft); border: 0; }
.nav-item.active { background: var(--nav-soft); color: var(--nav-active); border: 0; box-shadow: none; font-weight: 600; }
.nav-tools { border: 0; padding: 0; }
.nav-tools > summary { padding: 10px 14px; color: var(--nav-muted); font-size: 12px; cursor: pointer; }
.nav-tools > summary span { display: none; }
.account-card { margin-top: auto; padding: 16px 8px 0; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.user-box { display: flex; align-items: flex-start; border: 0; padding: 0; gap: 8px; background: transparent; }
.user-box #userDisplay { flex: 1; font-size: 12px; font-weight: 450; color: var(--nav-ink); line-height: 1.6; overflow-wrap: anywhere; white-space: normal; }
.user-box .btn { width: auto; color: var(--muted); flex: 0 0 auto; }
.account-meta { margin-top: 6px; }
.account-meta #syncStatus { color: var(--muted); font-size: 11px; font-weight: 400; }
.topbar { position: relative; min-height: 96px; padding: 21px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: none; }
.title-block { min-width: 0; }
.title-block .workspace-company { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.title-block #viewSubtitle { margin: 5px 0 0; font-size: 12px; max-width: 58ch; }
h1 { font-size: 23px; line-height: 1.3; letter-spacing: -.015em; font-weight: 600; }
h2, .panel-head h2, .section-bar h2 { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.top-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.btn, .btn.compact, .icon-btn { border-radius: 5px; box-shadow: none; transition: background-color 160ms ease, color 160ms ease; }
.btn { min-height: 36px; padding: 8px 14px; font-size: 13px; }
.btn.compact { min-height: 30px; padding: 5px 10px; font-size: 12px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
body[data-theme="navy"] .btn.primary { color: #152235; }
.btn.primary:hover { background: var(--button-hover); border-color: var(--button-hover); }
.btn.secondary, .btn:not(.primary):not(.danger):not(.ghost) { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent-dark); }
.btn:hover { transform: none; box-shadow: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-icon { display: none; }
.action-overflow { position: relative; }
.action-overflow > summary { list-style: none; cursor: pointer; }
.action-overflow > summary::-webkit-details-marker { display: none; }
.action-overflow-menu { position: absolute; z-index: 40; right: 0; top: calc(100% + 6px); width: 190px; padding: 6px; background: var(--surface); box-shadow: var(--shadow-md); border-radius: 6px; }
.action-overflow-menu .btn { display: block; text-align: left; width: 100%; border: 0 !important; background: transparent !important; }
.action-overflow-menu .btn:hover { background: var(--surface-soft) !important; }
.view { max-width: 1600px; margin: 0 auto; padding: 24px 32px 40px; }
.workflow-nav { margin: 0; padding: 0 32px; border-bottom: 1px solid var(--line); background: var(--surface); gap: 24px; border-radius: 0; }
.workflow-nav button { border-radius: 0; border: 0; border-bottom: 2px solid transparent; padding: 12px 0; background: transparent; color: var(--muted); }
.workflow-nav button[aria-current="page"] { background: transparent; color: var(--accent); border-bottom-color: var(--accent); }
.sync-feedback { position: sticky; top: 0; z-index: 30; margin: 16px 32px 0; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sync-feedback > div:first-child { min-width: 0; max-width: 72ch; }
.sync-feedback strong { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.sync-feedback p { margin: 4px 0 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.sync-feedback[data-state="error"] strong { color: var(--danger); }
.sync-feedback-actions { display: flex; flex-shrink: 0; flex-wrap: wrap; gap: 8px; }
.auth-recovery { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.auth-recovery p { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.panel, .discovery-card, .queue-item, .draft-card, .growth-card, .deal-card { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: none; }
.panel { padding: 20px 22px; }
.panel-head { margin-bottom: 16px; padding-bottom: 0; border-bottom: 0; gap: 12px; }
.panel-head p, .section-bar p { font-size: 12px; }
.section-bar { margin: 0 0 16px; }
.next-step { margin: 0 0 20px; padding: 14px 18px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; box-shadow: none; }
.next-step > div { display: block; }
.next-step strong { font-size: 13px; }
.next-step small { margin: 4px 0 0; font-size: 12px; }
#dashboardView.active-view { display: flex; flex-direction: column; gap: 20px; }
#dashboardView > * { margin: 0; }
#dashboardView > .next-step { order: 1; }
#dashboardView > .ops-metric-grid { order: 0; }
#dashboardView > .dashboard-grid { order: 2; }
#dashboardView > .dashboard-secondary { order: 3; }
.ops-metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; padding-bottom: 20px; gap: 0; }
.ops-metric-grid article { padding: 4px 24px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.ops-metric-grid article:first-child { padding-left: 0; }
.ops-metric-grid article:last-child { border-right: 0; }
.ops-metric-grid span { color: var(--muted); font-size: 12px; }
.ops-metric-grid strong { font-size: 26px; margin: 8px 0 5px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.ops-metric-grid small { font-size: 11px; color: var(--muted); }
#openPipelineValue { font-size: 20px; padding-top: 7px; overflow-wrap: anywhere; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); align-items: start; gap: 20px; }
.dashboard-grid > .panel { min-height: 0; }
.dashboard-grid > .dashboard-activity { grid-column: 1 / -1; }
.dashboard-secondary { border-top: 1px solid var(--line); padding: 0; }
.dashboard-secondary .metric-grid { margin-top: 16px; }
.dashboard-secondary .pipeline-overview { margin-top: 16px; }
.metric-grid, .customer-summary, .social-ledger, .report-kpis, .pipeline-summary { box-shadow: none; border-radius: 6px; border-color: var(--line); }
.metric::before, .metric::after { display: none; }
.metric strong, .customer-summary strong, .social-ledger strong { color: var(--ink); font-size: 23px; }
.metric, .customer-summary article { padding: 16px 20px; border-color: var(--line); background: var(--surface); }
.customer-summary { margin-bottom: 20px; grid-template-columns: repeat(5,minmax(0,1fr)); }
.customer-summary article { min-height: 92px; }
.customer-summary article.risk { box-shadow: none; }
.customer-section-bar { padding: 0; border: 0; background: transparent; }
.customer-section-bar h2 { display: none; }
.customer-summary small { font-size: 11px; }
.customer-pool-context { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 16px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
.customer-pool-context > div:first-child { display: grid; gap: 3px; }
.customer-pool-context strong { font-size: 13px; }
.customer-pool-context span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.task-card, .priority-item, .activity-item { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 16px 0; box-shadow: none; }
.task-card:last-child, .priority-item:last-child, .activity-item:last-child { border-bottom: 0; }
.task-list, .priority-list { gap: 0; }
.dashboard-grid .priority-item.enhanced { grid-template-columns: minmax(0,1fr) auto; gap: 10px 16px; }
.dashboard-grid .priority-item.enhanced > div:first-child { grid-column: 1/-1; }
.dashboard-grid .priority-item.enhanced .row-actions { justify-self: end; grid-column: 2; }
.priority-copy { min-width: 0; display: grid; gap: 4px; }
.priority-copy small { color: var(--muted); font-size: 11px; }
.priority-copy span { color: var(--ink); font-size: 12px; line-height: 1.5; }
.empty { background: transparent; border: 0; border-radius: 0; padding: 36px 18px; font-size: 13px; }
.empty strong { font-size: 15px; }
.empty span { max-width: 48ch; font-size: 12px; }
.quiet-fold > summary { color: var(--muted); font-size: 12px; font-weight: 500; cursor: pointer; padding: 12px 0; }
.quiet-fold > summary:hover { color: var(--accent); }
.quiet-fold[open] > summary { color: var(--ink); margin-bottom: 12px; }
.panel.quiet-fold { padding-top: 6px; padding-bottom: 6px; }
.panel.quiet-fold[open] { padding-bottom: 20px; }
.table-detail > summary { cursor: pointer; color: var(--muted); font-size: 11px; margin-top: 6px; }
.table-detail small { margin-top: 8px; }
.table-wrap { border: 1px solid var(--line); border-radius: 6px; box-shadow: none; background: var(--surface); overflow-x: auto; }
.customer-table { min-width: 1080px; width: 100%; table-layout: fixed; }
.customer-table th:nth-child(1) { width: 21%; }
.customer-table th:nth-child(2) { width: 18%; }
.customer-table th:nth-child(3) { width: 14%; }
.customer-table th:nth-child(4) { width: 9%; }
.customer-table th:nth-child(5) { width: 17%; }
.customer-table th:nth-child(6) { width: 11%; }
.customer-table th:nth-child(7) { width: 10%; }
th { padding: 12px 14px; color: var(--muted); background: var(--surface-soft); font-size: 12px; font-weight: 500; letter-spacing: 0; white-space: nowrap; }
.customer-table td { padding: 16px 14px; font-size: 13px; vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.customer-table td :is(strong,small,span) { white-space: normal; overflow-wrap: anywhere; }
.sales-work-panel { margin: 0 0 18px; }
body[data-management-scope="true"] #dashboardView > :not(#managementDashboardPanel),
body[data-management-scope="true"] #tasksView > :not(#salesTaskPanel) { display:none; }
body[data-management-scope="true"] #salesWorkPanel > summary {display:none;}
body[data-management-scope="true"] #salesWorkPanel {padding-top:20px;}
.management-work-summary {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:18px;}
.management-work-summary > div {border:1px solid var(--line);border-radius:10px;padding:16px;background:var(--surface);}
.management-work-summary span {display:block;font-size:13px;color:var(--muted);}
.management-work-summary strong {display:block;font-size:26px;font-weight:550;line-height:1.5;margin-top:4px;}
.sales-field-changes {margin:10px 0;}
.sales-field-changes summary {cursor:pointer;color:var(--accent);font-size:13px;}
.sales-field-changes dl {display:grid;grid-template-columns:minmax(90px,140px) minmax(0,1fr);gap:10px 16px;font-size:13px;}
.sales-field-changes dt {font-weight:500;}
.sales-field-changes dd {margin:0;overflow-wrap:anywhere;white-space:pre-wrap;}
.sales-field-changes dd span {display:block;}
#salesWorkEntries article {overflow-wrap:anywhere;}
@media(max-width:760px){.management-work-summary{grid-template-columns:repeat(2,minmax(0,1fr));}.sales-field-changes dl{grid-template-columns:1fr;gap:4px;}.sales-field-changes dd{margin-bottom:10px;}}
.sales-work-panel > summary { padding: 16px 20px; cursor: pointer; color: var(--ink); font-weight: 550; }
.sales-work-panel > :not(summary) { margin: 0 20px 16px; }
.sales-work-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.sales-work-filters label { display: grid; gap: 7px; min-width: 160px; flex: 0 1 220px; }
.sales-work-table { min-width: 850px; width: 100%; }
.sales-customer-windows { margin: 16px 0; }
.sales-customer-windows p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.sales-customer-window-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.sales-customer-window-tabs .btn { min-height: 44px; white-space: normal; }
.sales-work-table th { white-space: nowrap; font-size: 12px; }
.sales-work-table td { padding: 14px 12px; font-size: 13px; }
.sales-work-table td small { display: block; color: var(--muted); margin-top: 4px; }
.sales-work-history { margin-top: 16px; }
.sales-work-history summary { cursor: pointer; padding: 10px 0; }
.sales-work-history article { padding: 12px 0; border-top: 1px solid var(--line); }
.sales-work-history article span { margin-left: 12px; color: var(--muted); }
.sales-work-history p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 7px 0; }
.sales-person-filter { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 13px; }
.sales-person-filter select { max-width: 320px; }
.sales-followup-dialog { width: min(700px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; }
.customer-actions-more > summary { list-style: none; cursor: pointer; }
.customer-actions-more > summary::-webkit-details-marker { display: none; }
.customer-secondary-actions { display: grid; gap: 6px; margin-top: 8px; }
.customer-actions-more { width: 100%; }
.sales-followup-dialog .modal-head { align-items: start; }
body[data-sales-scope="true"] [data-action="seed-module-questions"],
body[data-sales-scope="true"] [data-action="knowledge-approve"],
body[data-sales-scope="true"] [data-action="knowledge-archive"],
body[data-sales-scope="true"] [data-action="rename-project-file"],
body[data-sales-scope="true"] [data-action="sync-overdue-tasks"],
body[data-sales-scope="true"] [data-action="batch-draft"],
body[data-sales-scope="true"] [data-action="draft"],
body[data-sales-scope="true"] [data-action="go-acquisition"],
body[data-sales-scope="true"] [data-action="go-campaigns"],
body[data-sales-scope="true"] [data-action="go-automation"] { display: none; }
body[data-market-access="false"] [data-action="go-acquisition"],
body[data-market-access="false"] [data-action="focus-acquisition"],
body[data-market-access="false"] #workflowNav [data-view="acquisition"] { display: none; }
@media (max-width: 600px) {
  .sales-work-panel > :not(summary) { margin-inline: 12px; }
  .sales-work-filters label { flex: 1 1 140px; min-width: 0; }
  .sales-person-filter { align-items: stretch; flex-direction: column; }
  .sales-person-filter select { max-width: none; }
  .sales-followup-dialog { padding: 16px; }
  .customer-row-actions .btn, .customer-actions-more > summary { min-height: 44px; }
}
.customer-row.attention-overdue, .customer-row.attention-missing, .customer-row.attention-stale { box-shadow: none; }
tbody tr:hover { background: var(--surface-soft); }
.customer-identity strong, .customer-contact strong, .customer-next-cell strong { font-size: 13px; }
.customer-identity small, .customer-identity span, .customer-contact small, .customer-contact span { font-size: 11px; }
.customer-score-value { font-size: 16px; font-variant-numeric: tabular-nums; }

.customer-grade { display: inline-flex; align-items: center; gap: 8px; padding: 5px 9px; border-radius: 5px; color: var(--ink); background: var(--surface-soft); font-size: 17px; font-weight: 560; line-height: 1.4; white-space: nowrap; }
.customer-grade > span { font-size: 12px; font-weight: 400; }
.customer-grade.grade-a { color: #155b43; background: #eaf5ef; }
.customer-grade.grade-b { color: #245487; background: #edf3fb; }
.customer-grade.grade-c { color: #75541f; background: #f8f2e5; }
.customer-grade.grade-d { color: #754647; background: #f7edee; }
.customer-grade.grade-u { color: #515a68; background: #eef0f3; }
.grade-detail { min-width: 0; max-width: 270px; white-space: normal; }
.grade-detail small { display: block; margin-top: 7px; font-size: 12px; line-height: 1.6; }
.customer-grade-help { margin: 0 0 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.customer-grade-help > summary { cursor: pointer; font-size: 13px; }
.grade-standard-list { display: grid; gap: 12px; padding-top: 15px; }
.grade-standard-list > div { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: start; }
.grade-standard-list .customer-grade { justify-self: start; }
.grade-standard-list p { margin: 0; font-size: 13px; line-height: 1.65; }
.grade-standard-list small, .grade-form-preview > small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.grade-note { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.6; }
.grade-form-preview { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.grade-form-preview p { margin: 9px 0 0; font-size: 13px; line-height: 1.6; }
.grade-next-hint { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.grade-fill-link { display: inline-block; padding: 4px 0; border: 0; border-radius: 2px; background: transparent; color: var(--accent-dark); font-size: 12px; font-weight: 450; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.grade-fill-link:hover { color: var(--ink); }
.grade-fill-link:active { color: var(--accent); }
.grade-preview-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.grade-preview-head > span:last-child { color: var(--muted); font-size: 12px; }
.grade-form-preview .grade-preview-next { margin: 10px 0 14px; color: var(--ink); }
.grade-checklist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grade-check { min-width: 0; padding: 12px 14px; }
.grade-check:first-child { padding-left: 0; }
.grade-check:last-child { padding-right: 0; }
.grade-check + .grade-check { border-left: 1px solid var(--line); }
.grade-check > div { display: flex; flex-direction: column; gap: 3px; }
.grade-check > div > span { color: var(--muted); font-size: 12px; }
.grade-check strong { font-size: 14px; font-weight: 550; }
.grade-check.check-verified strong { color: var(--success); }
.grade-check.check-hold strong { color: var(--warning); }
.grade-check small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.grade-check .grade-fill-link { margin-top: 5px; }
.grade-preview-note { margin-top: 10px; }
.grade-preview-rules > summary { padding: 5px 0; font-size: 12px; }
.grade-project-details > summary { font-size: 13px; font-weight: 500; }
.grade-project-note, .grade-field-group > p { margin: 10px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.grade-field-group { min-width: 0; margin: 22px 0 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); }
.grade-field-group legend { padding: 0 10px 0 0; color: var(--ink); font-size: 14px; font-weight: 550; }
.grade-field-group > p { margin-top: 0; }
.lead-form-error { margin: 0; padding: 12px; border: 1px solid var(--danger); border-radius: 5px; color: var(--danger); font-size: 13px; }
#leadForm [aria-invalid="true"] { border-color: var(--danger); }
.discovery-card header > .grade-detail { flex-shrink: 0; }
@media (max-width: 640px) {
  .grade-standard-list > div { grid-template-columns: 1fr; gap: 6px; }
  .customer-grade { font-size: 15px; }
  .grade-checklist { grid-template-columns: 1fr; }
  .grade-check, .grade-check:first-child, .grade-check:last-child { padding: 12px 0; }
  .grade-check + .grade-check { border-left: 0; border-top: 1px solid var(--line); }
  .grade-check > div { flex-direction: row; justify-content: space-between; gap: 12px; }
}
.customer-row-actions { gap: 6px; }
.status, .status-tag, .review-state, .attention-label, .task-priority, .monitor-badge { padding: 3px 7px; font-size: 11px; border-radius: 4px; line-height: 1.6; white-space: normal; }
body[data-theme="navy"] .status { color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line); }
.score { border: 0; border-radius: 4px; background: var(--surface-soft); color: var(--ink); font-size: 14px; }
input:not([type=checkbox]):not([type=radio]), select, textarea { border-radius: 5px; border-color: var(--line-strong); font-size: 13px; background: var(--surface); color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.form-grid { gap: 18px 24px; }
.form-grid label { font-size: 12px; gap: 7px; }
.toolbar, .customer-management-toolbar { margin-bottom: 16px; }
.search-box { border-radius: 5px; border-color: var(--line-strong); box-shadow: none; }
.acquisition-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
.acquisition-grid .form-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.acquisition-grid .form-grid .wide { grid-column: 1/-1; }
.acquisition-grid #findCustomersBtn { justify-self: start; }
.strategy-list { grid-template-columns: repeat(2,minmax(0,1fr)); display: grid; gap: 20px; }
.strategy-list > div { background: transparent; border: 0; padding: 0; }
.strategy-list span { font-size: 12px; }
.acquisition-results { display: block; }
.acquisition-results-head { margin-top: 28px; }
.acquisition-progress { border: 1px solid var(--line); border-radius: 6px; box-shadow: none; margin-bottom: 16px; background: var(--surface); }
.progress-head { padding: 14px 18px; background: transparent; border: 0; }
.progress-head strong { font-size: 13px; }
.progress-head > span { color: var(--muted); font-size: 12px; }
.acquisition-progress .quiet-fold { padding: 0 18px; }
.progress-log { max-height: 300px; overflow-y: auto; }
.progress-item { padding: 10px 0; font-size: 12px; }
.progress-item.is-active { background: var(--surface-soft); }
.progress-item strong { font-size: 12px; }
.result-diagnostics { margin-bottom: 12px; }
.result-note { font-size: 12px; }
.discovery-card { padding: 20px 22px; margin-bottom: 14px; }
.discovery-card header { gap: 20px; }
.discovery-card h2 { font-size: 16px; }
.discovery-card header span, .discovery-card p, .discovery-meta { font-size: 13px; }
.discovery-meta { margin-top: 14px; padding: 0; background: transparent; border: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.discovery-evidence { border-top: 1px solid var(--line); margin-top: 16px; }
.evidence-list { display: grid; gap: 8px; color: var(--muted); font-size: 12px; }
.discovery-risks { display: flex; gap: 14px; font-size: 12px; color: var(--warning); }
.discovery-risks strong { white-space: nowrap; }
.discovery-risks span { display: block; margin-bottom: 4px; }
.discovery-card .draft-actions { margin-top: 12px; }
.workflow-checks span { border: 0; background: var(--surface-soft); border-radius: 3px; font-size: 11px; padding: 4px 7px; color: var(--muted); }
.settings-tabs, .monitor-tabs { display: flex; flex-wrap: wrap; gap: 24px; margin: 0 0 24px; padding: 0; border-bottom: 1px solid var(--line); }
.settings-tabs button, .monitor-tabs button { font: inherit; font-size: 13px; cursor: pointer; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 12px 2px; background: transparent; color: var(--muted); }
.settings-tabs button[aria-pressed=true], .monitor-tabs button[aria-pressed=true] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.settings-tabs button:hover, .monitor-tabs button:hover { color: var(--ink); background: transparent; }
.settings-grid { grid-template-columns: minmax(0,1fr); max-width: 1100px; gap: 20px; }
.settings-grid > .panel { grid-column: auto; }
.settings-grid .account-security-panel { max-width: 780px; }
.settings-grid .support-panel { max-width: 780px; }
.settings-grid .notice { margin-top: 18px; }
.theme-picker::after { content: none; }
#changePasswordForm button[type=submit] { align-self: end; justify-self: start; }
.notice, .integrity-notice { border-radius: 5px; border-width: 1px; box-shadow: none; }
.governance-list > div { background: transparent; border-radius: 0; }
.monitor-intro { border: 0; background: transparent; padding: 0; }
.monitor-intro .panel-head { padding: 0; }
.monitor-intro > .monitor-tabs { margin: 16px 0 0; }
.monitor-explainer > summary { padding: 0; }
.social-ledger { margin: 14px 0; }
.social-ledger > div { padding: 14px 20px; }
.monitor-account { padding: 20px 0; }
.monitor-account h3 { font-size: 16px; }
.monitor-account .monitor-eyebrow { display: inline-block; margin-bottom: 6px; letter-spacing: 0; font-size: 12px; }
.monitor-account .social-note { margin: 10px 0; font-size: 12px; }
.monitor-account > header p.muted { margin: 5px 0 0; font-size: 12px; }
.account-metric-details { margin-bottom: 12px; }
.monitor-metrics strong { font-size: 20px; }
.monitor-account .row-actions { margin-top: 12px; }
.social-empty { padding: 24px 0; }
.auth-screen { background: var(--page); padding: 24px; }
.auth-card { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; box-shadow: none; padding: 36px; }
.auth-card .brand-logo-frame { width: 190px; height: 58px; }
.auth-card h2 { font-size: 21px; margin: 24px 0; }
.auth-card label { font-size: 12px; }
.auth-card .brand-product { color: var(--muted); font-size: 12px; }
.auth-card .auth-toggle { font-size: 12px; }
dialog { border: 0; border-radius: 10px; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); }
dialog::backdrop { background: rgb(15 25 40 / 35%); backdrop-filter: none; }
.modal { padding: 24px; }
.modal-head { padding-bottom: 16px; }
.modal-actions { border-top: 1px solid var(--line); padding-top: 16px; }
.task-completion-modal { width: min(660px,calc(100vw - 32px)); }
.modal-kicker { display: block; margin-bottom: 4px; color: var(--accent); font-size: 11px; font-weight: 650; letter-spacing: .08em; }
.task-completion-context { display: grid; gap: 5px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.task-completion-context span, .task-completion-context small { color: var(--muted); font-size: 12px; }
.task-completion-context strong { color: var(--ink); font-size: 15px; }
.task-completion-modal label small { display: block; margin-top: 6px; color: var(--muted); font-weight: 400; line-height: 1.5; }
.task-completion-modal .form-error { min-height: 20px; margin: 6px 0 0; color: var(--danger); font-size: 12px; }
body[data-workspace-role="staff"] [data-admin-ui] { display: none !important; }
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 190px minmax(0,1fr); }
  .topbar { padding: 20px 24px; align-items: flex-start; }
  .top-actions { max-width: 240px; }
  .view { padding: 24px; }
  .workflow-nav { padding-inline: 24px; }
  .sync-feedback { margin-inline: 24px; flex-wrap: wrap; }
  .ops-metric-grid article { padding-inline: 16px; }
  .ops-metric-grid strong { font-size: 23px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .acquisition-grid .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .app-shell { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: relative; height: auto; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .workspace-nav-toggle { display: inline-flex; position: absolute; top: 14px; right: 16px; min-height: 40px; align-items: center; }
  .sidebar:not([data-navigation-open="true"]) .nav-list.task-navigation,
  .sidebar:not([data-navigation-open="true"]) #workspaceAccountUser { display: none; }
  .sidebar:not([data-navigation-open="true"]) .account-card { margin: 0; padding: 0; border: 0; }
  .brand { min-height: 0; padding: 0 0 12px; }
  .brand .brand-site { display: flex; align-items: center; flex-direction: row; gap: 12px; }
  .brand-logo-frame { width: 125px; height: 35px; }
  .brand span.brand-product { display: none; }
  .nav-list.task-navigation { display: flex; flex-direction: column; gap: 6px; padding: 0; }
  .task-navigation .nav-core { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; overflow: visible; }
  .nav-item { text-align: center; justify-content: center; font-size: 12px; min-height: 40px; padding: 8px 6px; }
  .nav-tools > summary { padding: 8px 6px; }
  .task-navigation .nav-tool-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .task-navigation .nav-resources { display: flex; flex-direction: row; border: 0; padding: 0; margin: 0; }
  .task-navigation .nav-tools > summary { width: auto; }
  .nav-resources .nav-item { width: auto; padding: 6px 12px; }
  .account-card { display: block; margin-top: 10px; padding: 10px 0 0; }
  .user-box { align-items: center; }
  .account-meta #syncStatus { padding: 0; }
  .topbar { position: relative; padding: 20px 16px; flex-wrap: wrap; gap: 14px; }
  .topbar h1 { font-size: 21px; }
  .top-actions { max-width: none; width: 100%; justify-content: flex-start; }
  .top-actions .btn { min-height: 40px; width: auto; flex: 0 1 auto; }
  .view { padding: 20px 16px; }
  #dashboardView > .dashboard-grid { order: 0; }
  #dashboardView > .ops-metric-grid { order: 2; }
  .workflow-nav { padding: 0 16px; gap: 20px; overflow-x: auto; flex-wrap: nowrap; }
  .sync-feedback { margin-inline: 16px; align-items: flex-start; }
  .sync-feedback-actions { flex-shrink: 1; }
  .sync-feedback-actions .btn { min-height: 40px; }
  .workflow-nav button { flex-shrink: 0; }
  .ops-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 0; }
  .ops-metric-grid article { padding: 0 16px; }
  .ops-metric-grid article:nth-child(odd) { padding-left: 0; }
  .ops-metric-grid article:nth-child(even) { border: 0; }
  .ops-metric-grid strong { font-size: 24px; }
  .customer-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .customer-summary article:last-child { grid-column: 1/-1; }
  .customer-pool-context { align-items: flex-start; flex-direction: column; }
  .panel { padding: 18px 16px; }
  .panel-head { flex-wrap: wrap; }
  .form-grid, .acquisition-grid .form-grid, .social-form, .strategy-list { grid-template-columns: minmax(0,1fr); }
  .settings-tabs, .monitor-tabs { gap: 8px 20px; }
  .settings-tabs button, .monitor-tabs button { min-height: 44px; }
  .team-invite-form { grid-template-columns: minmax(0,1fr); }
  .next-step { align-items: flex-start; gap: 14px; flex-direction: column; }
  .discovery-meta { display: grid; gap: 6px; }
  .discovery-card { padding: 18px 16px; }
  .social-ledger { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .monitor-intro { padding: 0; }
  .btn.compact, input:not([type=checkbox]):not([type=radio]), select { min-height: 40px; }
  .modal { padding: 20px; }
  #salesFollowupDialog .modal-actions .btn, #salesFollowupRestore { min-height: 44px; }
  .auth-card { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
@media print {
  .app-shell { display: block; }
  .sidebar, .topbar, .workflow-nav { display: none; }
}
