/* CRM Ops 4.0: semantic tokens inspired by Lightning, with an independent identity. */
:root {
  color-scheme: light;
  --ink: #172b4d; --ink-2: #34445d; --muted: #5b6b82; --muted-2: #737f91;
  --surface: #ffffff; --surface-2: #f3f5f8; --surface-3: #eaf0f6;
  --line: #dce3eb; --line-2: #b9c6d6;
  --accent: #1261ad; --accent-2: #084b88; --accent-soft: #eaf3ff;
  --teal: #21734c; --teal-soft: #e7f5ed; --warn: #946009; --warn-soft: #fff5d9;
  --danger: #bc3037; --danger-soft: #fcecee; --violet: #6953a1;
  --nav: var(--surface); --nav-2: var(--accent-soft); --nav-text: var(--ink-2); --nav-muted: var(--muted);
  --shadow: 0 2px 5px rgb(23 43 77 / 6%); --shadow-dialog: 0 16px 60px rgb(23 43 77 / 22%);
  --radius: 8px; --radius-sm: 5px; --sidebar: 256px; --header: 68px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px;
  --font-xs: 11px; --font-sm: 12px; --font-md: 14px; --font-lg: 18px; --font-xl: 24px;
  --row-padding: 10px 12px; --control-height: 36px; --focus: #318ae8;
  --elevation-0: none; --elevation-1: var(--shadow); --elevation-2: var(--shadow-dialog);
  --editor-font-size: 14px;
  --breakpoint-sm: 420px; --breakpoint-md: 760px; --breakpoint-lg: 980px; --breakpoint-xl: 1250px;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --ink: #e5edf9; --ink-2: #ccd6e7; --muted: #a5b3ca; --muted-2: #8898b1;
  --surface: #182337; --surface-2: #101a2a; --surface-3: #23324a;
  --line: #344258; --line-2: #51647e;
  --accent: #80b9fb; --accent-2: #a5ceff; --accent-soft: #203d61;
  --teal: #8ed8b1; --teal-soft: #1a3d31; --warn: #f4cd76; --warn-soft: #46391f;
  --danger: #ff9b9b; --danger-soft: #482b35; --violet: #c0adf1;
  --shadow: 0 2px 6px rgb(0 0 0 / 14%); --shadow-dialog: 0 16px 60px rgb(0 0 0 / 42%);
}
:root[data-density='compact'] { --row-padding: 6px 10px; --control-height: 32px; }
body { font-size: var(--font-md); }
button, input, select, textarea { font-family: inherit; }
button { touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--accent-soft); color: var(--ink); }
input, select, textarea { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 8px 10px; max-width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type='checkbox'], input[type='radio'] { accent-color: var(--accent); }
input[type='range'] { padding: 0; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
label { color: var(--ink-2); }
svg { flex-shrink: 0; vertical-align: middle; }
.button { min-height: var(--control-height); display: inline-flex; justify-content: center; align-items: center; gap: 7px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; padding: 8px 13px; box-shadow: none; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme='dark'] .button.primary { background: #2474c5; color: #fff; border-color: #2474c5; }
.button.primary:hover { background: #084b88; color: #fff; }
.button.secondary { background: var(--surface); color: var(--accent); border: 1px solid var(--line-2); }
.button.secondary:hover, .button.ghost:hover { background: var(--accent-soft); color: var(--accent); }
.button.ghost { color: var(--ink-2); background: transparent; border: 1px solid transparent; }
.button.tiny { min-height: 28px; padding: 4px 8px; font-size: 11px; }
.icon-button { width: 34px; height: 34px; min-width: 34px; display: inline-flex; justify-content: center; align-items: center; padding: 0; color: var(--ink-2); background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm); }
.icon-button:hover { color: var(--accent); background: var(--accent-soft); border-color: var(--line); }
.icon-button[aria-pressed='true'] { background: var(--warn-soft); color: var(--warn); }
.icon-button[aria-pressed='true'] svg { fill: currentColor; }
.app-layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { background: var(--surface); color: var(--ink-2); border-right: 1px solid var(--line); width: var(--sidebar); padding: 0; height: 100dvh; display: flex; flex-direction: column; box-shadow: none; }
.sidebar-brand { min-height: var(--header); padding: 16px; gap: 10px; border-bottom: 1px solid var(--line); margin: 0; color: var(--ink); }
.sidebar-brand > span:nth-child(2) { flex: 1; min-width: 0; }
.sidebar-brand strong { font-size: 14px; white-space: nowrap; }
.sidebar-brand small { font-size: 10px; color: var(--muted); }
.product-mark { background: #1261ad; color: #fff; border-radius: 8px; box-shadow: none; }
.product-mark.small { width: 32px; height: 32px; min-width: 32px; font-size: 11px; }
.side-nav { padding: 12px 10px; overflow-y: auto; flex: 1; display: block; scrollbar-width: thin; }
.nav-group { margin-bottom: 8px; }
.nav-group-toggle { width: 100%; padding: 9px 9px 6px; display: flex; justify-content: space-between; align-items: center; background: transparent; border: 0; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.nav-group-toggle svg { width: 12px; height: 12px; }
.nav-group-toggle[aria-expanded='false'] svg { transform: rotate(-90deg); }
.side-nav .tab { display: flex; align-items: center; position: relative; gap: 11px; min-height: 36px; width: 100%; color: var(--ink-2); background: transparent; border: 0; border-radius: 5px; padding: 8px 10px; font-size: 12px; font-weight: 500; text-align: left; margin: 2px 0; }
.side-nav .tab > .nav-label, .side-nav .tab.active > .nav-label { width: auto; height: auto; min-width: 0; color: inherit; background: transparent; border: 0; font: inherit; padding: 0; display: inline; }
.side-nav .tab:hover { background: var(--surface-3); }
.side-nav .tab.active { background: var(--accent-soft); color: var(--accent); font-weight: 650; box-shadow: inset 3px 0 var(--accent); }
.side-nav .tab svg { width: 17px; height: 17px; }
.side-nav .tab > .new-dot { margin-left: auto; width: 5px; min-width: 5px; height: 5px; border: 0; border-radius: 50%; background: var(--accent); padding: 0!important; }
.sidebar-bottom { padding: 12px 16px; border-top: 1px solid var(--line); }
.privacy-status { padding: 0; display: flex; gap: 10px; border: 0; color: var(--teal); }
.privacy-status strong { color: var(--ink-2); font-size: 11px; }
.privacy-status small { color: var(--muted); font-size: 10px; }
.main-column { min-width: 0; }
.app-header { height: var(--header); padding: 0 24px; gap: 24px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: none; position: sticky; top: 0; z-index: 20; }
.header-context { min-width: 160px; display: flex; align-items: center; gap: 10px; }
.header-context #headerEyebrow { color: var(--muted); font-size: 10px; text-transform: none; letter-spacing: 0; }
.header-context #headerTitle { font-size: 13px; white-space: nowrap; }
.workspace-breadcrumb { color: var(--muted); font-size: 10px; white-space: nowrap; }
.workspace-breadcrumb button { background: transparent; border: 0; padding: 0; color: var(--accent); font-size: inherit; }
.workspace-breadcrumb #headerEyebrow { display: inline; }
.global-search { margin: 0 auto; min-width: 0; flex: 1; max-width: 460px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 5px; background: var(--surface-2); color: var(--muted); font-size: 11px; text-align: left; height: 34px; }
.global-search span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.global-search kbd { margin-left: auto; white-space: nowrap; border: 1px solid var(--line); background: var(--surface); border-radius: 3px; padding: 1px 4px; font-size: 10px; }
.header-actions { gap: 12px; min-width: 0; }
.workspace-header-controls { display: flex; align-items: center; gap: 2px; }
#workspaceBusy { position: fixed; right: 20px; bottom: 20px; background: var(--surface); color: var(--accent); border: 1px solid var(--line); border-radius: 6px; padding: 8px; box-shadow: var(--shadow); font-size: 11px; }
#workspaceBusy[hidden] { display: none; }
.user-menu-button { background: transparent; border: 0; color: var(--ink); }
#userAvatar { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--line); }
.user-menu { background: var(--surface); box-shadow: var(--shadow-dialog); z-index: 40; }
.user-menu button { color: var(--ink); font-size: 12px; }
.workspace { width: 100%; padding: 24px; max-width: 1800px; margin: 0 auto; }
.panel > *, .overview-grid > * { animation: none; }
.panel-head { padding: 0 0 16px; border-bottom: 1px solid var(--line); align-items: center; }
.panel-head h2 { font-size: 24px; font-weight: 650; letter-spacing: -.025em; }
.panel-head p { font-size: 13px; }
.section-kicker { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .07em; }
.workspace-welcome { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 4px 0 18px; }
.workspace-welcome h1 { font-size: 28px; font-weight: 650; letter-spacing: -.035em; margin: 6px 0; }
.workspace-welcome p { color: var(--muted); font-size: 13px; margin: 0; }
.local-chip { display: inline-flex; gap: 6px; align-items: center; color: var(--teal); font-size: 11px; padding: 6px 9px; background: var(--teal-soft); border-radius: 5px; white-space: nowrap; }
.local-chip svg { width: 14px; height: 14px; }
.workspace-primary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.workspace-insights { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 20px; }
.workspace-insights > div { padding: 14px 18px; border-right: 1px solid var(--line); }
.workspace-insights > div:last-child { border: 0; }
.workspace-insights span { color: var(--muted); font-size: 11px; display: block; }
.workspace-insights strong { font-size: 25px; font-weight: 650; display: block; margin-top: 4px; }
.workspace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span-2 { grid-column: span 2; }
.workspace-card, .subpanel, .overview-card, .audit-card, .results, .upload-card, .checklist-group, .library-item, .metric, .mini-metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; }
.workspace-card { padding: 18px; min-width: 0; }
.workspace-card h2 { font-size: 14px; margin: 0; font-weight: 650; }
.card-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.workspace-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.workspace-tool { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); text-align: left; color: var(--ink); }
.workspace-tool:hover { border-color: var(--accent); background: var(--accent-soft); }
.workspace-tool > svg:first-child { color: var(--accent); margin-top: 2px; }
.workspace-tool > svg:last-child { width: 14px; height: 14px; margin-left: auto; margin-top: 3px; color: var(--muted); }
.workspace-tool span { min-width: 0; flex: 1; }
.workspace-tool strong { display: block; font-size: 12px; font-weight: 600; }
.workspace-tool small { display: block; font-size: 11px; color: var(--muted); line-height: 1.45; margin-top: 4px; }
.workspace-card > .workspace-tool { margin-bottom: 6px; }
.activity-row { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; border: 0; border-bottom: 1px solid var(--line); padding: 12px 0; color: var(--ink); background: transparent; }
.activity-row:hover { color: var(--accent); }
.activity-row > svg:first-child { color: var(--muted); }
.activity-row > svg:last-child { margin-left: auto; width: 14px; height: 14px; }
.activity-row strong { display: block; font-size: 12px; font-weight: 600; }
.activity-row small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.workspace-note { display: flex; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; font-size: 11px; color: var(--muted); line-height: 1.6; }
.workspace-note svg { color: var(--teal); margin-top: 3px; }
.empty-state { text-align: center; padding: 24px 18px; border-radius: 6px; border: 1px dashed var(--line); background: var(--surface-2); color: var(--muted); font-size: 12px; }
.empty-state strong { display: block; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.empty-state p { margin: 8px 0 0; }
.notice { background: var(--surface); font-size: 12px; color: var(--ink-2); }
.notice.info { background: var(--accent-soft); border-color: var(--line); }
.notice.error, .alert.error { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }
.notice.success, .alert.success { color: var(--teal); background: var(--teal-soft); }
.alert { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.badge, .status-badge, .status-chip { color: var(--ink-2); background: var(--surface-3); font-size: 10px; }
.badge.good, .badge.active, .badge.baixo, .status-badge.active, .status-chip.good { color: var(--teal); background: var(--teal-soft); }
.badge.bad, .badge.held, .badge.unsubscribed, .badge.alto, .badge.crítico, .status-badge.held, .status-badge.unsubscribed { color: var(--danger); background: var(--danger-soft); }
.badge.warn, .badge.médio { color: var(--warn); background: var(--warn-soft); }
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--radius-sm); }
table { border-collapse: collapse; background: var(--surface); color: var(--ink); font-size: 12px; width: 100%; }
thead, th { background: var(--surface-3); color: var(--ink-2); }
th, td { padding: var(--row-padding); border-bottom: 1px solid var(--line); }
th { font-size: 11px; font-weight: 650; white-space: nowrap; }
td { font-size: 12px; }
tr:hover td { background: var(--accent-soft); }
.table-note, .subtle { font-size: 11px; color: var(--muted); }
.upload-card { position: relative; min-height: 120px; font-size: 12px; }
.upload-card:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.upload-card input[type='file'] { display: block; position: absolute; width: 1px; height: 1px; opacity: 0; padding: 0; border: 0; bottom: 0; left: 0; }
.upload-card strong { font-size: 12px; }
.upload-card small { font-size: 10px; }
.file-state { font-size: 10px; }
.code-input, .library-editor, pre, code { font-family: Consolas, 'SFMono-Regular', monospace; font-size: 12px; color: var(--ink-2); background: var(--surface-2); }
pre { overflow: auto; max-width: 100%; }
.code-input { line-height: 1.6; }
.cm-editor { font-size: var(--editor-font-size); background: var(--surface); color: var(--ink); min-height: 260px; border: 1px solid var(--line-2); border-radius: 5px; resize: vertical; overflow: auto; }
.cm-editor .cm-scroller { font-family: Consolas, monospace; line-height: 1.6; }
.cm-editor .cm-gutters { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.cm-editor.cm-focused { outline: 2px solid var(--focus); outline-offset: 2px; }
.cm-editor .cm-activeLine, .cm-editor .cm-activeLineGutter { background: var(--accent-soft); }
.cm-editor .cm-panels, .cm-editor .cm-tooltip { color: var(--ink); background: var(--surface); border-color: var(--line); }
.cm-editor .cm-panels button, .cm-editor .cm-panels input { color: var(--ink); background: var(--surface); }
.cm-editor .crm-code-tag { color: #075f3f; }
.cm-editor .crm-code-keyword { color: #174f94; }
.cm-editor .crm-code-string { color: #873b14; }
.cm-editor .crm-code-attribute, .cm-editor .crm-code-number { color: #6c347f; }
.cm-editor .crm-code-comment { color: #526277; }
:root[data-theme='dark'] .cm-editor .crm-code-tag { color: #a8e1bf; }
:root[data-theme='dark'] .cm-editor .crm-code-keyword { color: #b6ccff; }
:root[data-theme='dark'] .cm-editor .crm-code-string { color: #f8d291; }
:root[data-theme='dark'] .cm-editor .crm-code-attribute, :root[data-theme='dark'] .cm-editor .crm-code-number { color: #ffb3bb; }
:root[data-theme='dark'] .cm-editor .crm-code-comment { color: #b8c7dc; }
.metric strong { color: var(--ink); font-size: 23px; }
.metric span, .metric small { color: var(--muted); font-size: 11px; }
.score-ring { background: var(--surface-3); }
.score-ring::before { background: var(--surface); }
.finding, .insight { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.finding.bad, .insight.bad { border-left-color: var(--danger); }
.finding.warn, .insight.warn { border-left-color: var(--warn); }
.finding.ok, .insight.ok { border-left-color: var(--teal); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 960px; }
.form-field span { color: var(--ink-2); font-size: 12px; }
.check-control { font-size: 12px; }
.skeleton { background: var(--surface-3); color: var(--muted); padding: 16px; border-radius: 5px; }
progress { accent-color: var(--accent); width: 100%; height: 8px; }
dialog { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0; box-shadow: var(--shadow-dialog); }
dialog::backdrop { background: rgb(8 24 46 / 48%); }
.command-palette { width: min(700px, calc(100% - 28px)); margin: 12vh auto; max-height: 72vh; }
.command-search { display: flex; gap: 10px; align-items: center; padding: 15px; border-bottom: 1px solid var(--line); }
.command-search input { flex: 1; border: 0; background: transparent; min-width: 0; font-size: 14px; }
.command-search svg { color: var(--muted); }
#commandResults { overflow: auto; max-height: 50vh; padding: 6px; }
.command-result { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 5px; padding: 11px 12px; background: transparent; text-align: left; color: var(--ink); }
.command-result.selected, .command-result:hover { background: var(--accent-soft); }
.command-result strong { display: block; font-size: 13px; font-weight: 600; }
.command-result small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.command-result > svg { margin-left: auto; color: var(--muted); width: 14px; height: 14px; }
.command-palette footer { border-top: 1px solid var(--line); padding: 10px 15px; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.help-dialog { width: min(640px, calc(100% - 28px)); max-height: 80vh; padding: 24px; }
.help-dialog h2 { font-size: 20px; margin: 0; }
.help-dialog h3 { font-size: 13px; margin-top: 22px; }
.help-dialog p, .help-dialog li { color: var(--ink-2); font-size: 13px; }
.shortcuts { display: grid; grid-template-columns: 1fr 1fr; font-size: 12px; gap: 10px; }
.shortcuts dt { color: var(--accent); font-family: Consolas, monospace; }
.shortcuts dd { margin: 0; color: var(--muted); }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(480px, 100%); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--elevation-2); overflow: auto; padding: 24px; z-index: 60; }
.drawer-dialog { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(460px, 100%); padding: 24px; border-radius: 0; }
.drawer-dialog h2 { font-size: 20px; margin: 0; }
.export-choice { width: 100%; justify-content: space-between; margin: 6px 0; }
.table-sort { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; font-weight: 650; }
.popover, .tooltip { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 5px; box-shadow: var(--shadow); padding: 8px 12px; }
.filter-bar, .pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; }
.split-pane { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; min-width: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs [aria-selected='true'] { color: var(--accent); border-bottom: 2px solid var(--accent); }
.toast { font-size: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-dialog); }
.toast.success { color: var(--teal); background: var(--teal-soft); }
.toast.error { color: var(--danger); background: var(--danger-soft); }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.icon-button.mobile-only { display: none; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; padding: 10px; background: var(--surface); border: 2px solid var(--accent); z-index: 100; }
.auth-page { background: var(--surface-2); }
.auth-context { background: #10365e; color: #fff; }
.auth-card { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.auth-tabs { background: var(--surface-3); }
.auth-tab.active { background: var(--surface); color: var(--accent); }
body.sidebar-collapsed { --sidebar: 76px; }
body.sidebar-collapsed .sidebar-brand { padding: 16px 8px; flex-direction: column; min-height: 105px; gap: 6px; }
body.sidebar-collapsed .sidebar-brand > span:nth-child(2), body.sidebar-collapsed .nav-label, body.sidebar-collapsed .nav-group-toggle, body.sidebar-collapsed .privacy-status div, body.sidebar-collapsed .new-dot { display: none; }
body.sidebar-collapsed .side-nav .tab { justify-content: center; padding: 10px; }
body.sidebar-collapsed .side-nav .tab svg { width: 20px; height: 20px; }
body.sidebar-collapsed .nav-group { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
body.sidebar-collapsed .privacy-status { justify-content: center; }
@media (min-width: 1700px) { .workspace-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1250px) {
  .app-header { gap: 16px; padding: 0 18px; }
  .header-actions .user-menu-button > span:nth-child(2) { display: none; }
  .workspace-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-search kbd { display: none; }
}
@media (max-width: 980px) {
  :root { --sidebar: 220px; }
  .workspace { padding: 18px; }
  .workspace-insights { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .workspace-insights > div { border-bottom: 1px solid var(--line); }
  .workspace-grid, .split-pane { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .workspace-welcome { display: block; }
  .local-chip { margin-top: 14px; }
  .global-search span { display: none; }
  .global-search { max-width: 36px; flex: 0 0 36px; justify-content: center; padding: 7px; }
  .header-context { flex: 1; min-width: 0; }
}
@media (max-width: 760px) {
  .icon-button.mobile-only { display: inline-flex; }
  .app-layout { display: block; }
  .sidebar, body.sidebar-collapsed .sidebar { position: fixed; left: -280px; width: 256px; z-index: 50; box-shadow: var(--shadow-dialog); }
  body.nav-open .sidebar { left: 0; }
  body.sidebar-collapsed .sidebar-brand { flex-direction: row; min-height: var(--header); padding: 16px; }
  body.sidebar-collapsed .sidebar-brand > span:nth-child(2), body.sidebar-collapsed .nav-label, body.sidebar-collapsed .nav-group-toggle, body.sidebar-collapsed .privacy-status div { display: block; }
  body.sidebar-collapsed .nav-group-toggle { display: flex; }
  body.sidebar-collapsed .side-nav .tab { justify-content: flex-start; }
  .app-header { padding: 0 12px; gap: 6px; height: 60px; }
  .header-context #headerTitle { max-width: 150px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
  .header-context #headerEyebrow { font-size: 9px; }
  .workspace-breadcrumb button, .workspace-breadcrumb { font-size: 9px; }
  .workspace-breadcrumb { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
  .header-actions { gap: 4px; }
  .workspace-header-controls #quickFavorites, .workspace-header-controls #moduleHelpBtn, .workspace-header-controls #exportCenterBtn { display: none; }
  .workspace-header-controls .icon-button { width: 30px; min-width: 30px; }
  .user-menu-button { padding: 0; }
  .user-menu-button b { display: none; }
  .workspace { padding: 16px 12px; }
  .workspace-welcome h1 { font-size: 25px; }
  .workspace-insights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-insights > div { padding: 12px; }
  .workspace-insights strong { font-size: 23px; }
  .workspace-card { padding: 14px; }
  .panel-head { flex-wrap: wrap; gap: 12px; }
  .panel-head h2 { font-size: 22px; }
  .settings-grid { grid-template-columns: 1fr; }
  .toolbar-actions { flex-wrap: wrap; }
  .command-palette { margin-top: 8vh; }
  .command-palette footer { gap: 8px; font-size: 10px; }
}
@media (max-width: 420px) {
  .workspace-tools { grid-template-columns: 1fr; }
  .header-context #headerTitle { max-width: 116px; }
  .local-chip { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto!important; animation: none!important; transition: none!important; } }
