/* Showflow · Sapphire glass. Loaded after legacy styles; document previews keep their own identity. */
:root, :root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb;
  --surface: #ffffffd9;
  --surface2: #edf2f9;
  --surface3: #e4ebf5;
  --border: #cbd5e17d;
  --border-light: #b6c7de;
  --text: #17243b;
  --text-muted: #52627a;
  --text-dim: #617089;
  --accent: #0066cc;
  --primary: var(--accent);
  --accent-dim: #0056b3;
  --accent-glow: #0071e310;
  --green: #047857;
  --green-dim: #04785712;
  --red: #c42b43;
  --red-dim: #c42b4312;
  --yellow: #89500c;
  --yellow-dim: #b7781512;
  --blue: #0066cc;
  --blue-dim: #0071e310;
  --sf-glass: linear-gradient(135deg, #ffffffef, #ffffffe0 42%, #eff5ffcb);
  --sf-glass-heavy: linear-gradient(135deg, #fffffff5, #f2f6fff0);
  --sf-rim: #ffffff;
  --sf-shadow: 0 8px 28px #23477c07, 0 2px 5px #23477c04, inset 0 1px 0 var(--sf-rim);
  --sf-shadow-raised: 0 16px 40px #23477c12, 0 2px 8px #23477c07, inset 0 1px 0 var(--sf-rim);
  --sf-shadow-modal: 0 32px 100px #17396630, 0 4px 16px #17396612, inset 0 1px 0 var(--sf-rim);
  --sf-selected: linear-gradient(115deg, #e2efff, #f1f7ff 34%, #dbeafb 63%, #e8e9fc 82%, #e2efff);
  --sf-selection-border: #87b9ec;
  --sf-selection-glow: #0071e31b;
  --sf-button: linear-gradient(120deg, #0066cc, #0071e3 48%, #1259c1);
  --sf-ambient: radial-gradient(ellipse at 14% 0, #bcd9ff42, transparent 42%), radial-gradient(ellipse at 100% 42%, #ddd4fa35, transparent 42%), radial-gradient(ellipse at 60% 100%, #d5eefa30, transparent 45%);
  --sf-overlay: #17294350;
  --sf-ease: cubic-bezier(.22, 1, .36, 1);
  --sf-radius: 20px;
  --sf-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --sidebar-w: 256px;
  --header-h: 80px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090a0c;
  --surface: #151619ed;
  --surface2: #1c1e22;
  --surface3: #282a30;
  --border: #91acd529;
  --border-light: #50647e;
  --text: #edf3fc;
  --text-muted: #b0bed2;
  --text-dim: #99a9c0;
  --accent: #72b9ff;
  --accent-dim: #9acfff;
  --accent-glow: #2997ff19;
  --green: #51d6a6;
  --green-dim: #10b98118;
  --red: #ff8b9e;
  --red-dim: #f43f5e18;
  --yellow: #f3c575;
  --yellow-dim: #f59e0b18;
  --blue: #72b9ff;
  --blue-dim: #2997ff18;
  --sf-glass: linear-gradient(135deg, #202d3fe8, #151e2be6 45%, #17283ed4);
  --sf-glass-heavy: linear-gradient(135deg, #202d3ff5, #101b2cf5);
  --sf-rim: #ddecff20;
  --sf-shadow: 0 8px 28px #00000020, 0 2px 5px #00000010, inset 0 1px 0 var(--sf-rim);
  --sf-shadow-raised: 0 16px 40px #00000035, 0 2px 8px #00000020, inset 0 1px 0 var(--sf-rim);
  --sf-shadow-modal: 0 32px 100px #00000080, 0 4px 16px #00000040, inset 0 1px 0 var(--sf-rim);
  --sf-selected: linear-gradient(115deg, #193556, #233f64 34%, #1a324f 63%, #302f57 82%, #193556);
  --sf-selection-border: #4883bd;
  --sf-selection-glow: #2997ff28;
  --sf-button: linear-gradient(120deg, #0066cc, #0877e6 48%, #225dcc);
  --sf-ambient: radial-gradient(ellipse at 14% 0, #2057a02b, transparent 42%), radial-gradient(ellipse at 100% 42%, #62419218, transparent 42%), radial-gradient(ellipse at 60% 100%, #1d587419, transparent 45%);
  --sf-overlay: #0207119e;
}
/* Aliases shared by the accounting, Copilot and venue modules. */
:root[data-theme] {
  --text-primary: var(--text); --text-secondary: var(--text-muted);
  --bg-card: var(--surface); --bg-input: var(--surface2); --border-color: var(--border);
  --bg-primary: var(--bg); --bg-secondary: var(--surface); --bg-tertiary: var(--surface2);
  --success: var(--green); --danger: var(--red); --warning: var(--yellow); --info: var(--blue);
  --pink: var(--accent); --pink-hover: var(--accent-dim); --pink-soft: var(--accent-glow);
  --perf: var(--accent); --transfer: var(--yellow); --technical: var(--blue); --hotel: var(--green);
  --black: var(--bg); --dark: var(--surface); --dark-card: var(--surface2); --dark-surface: var(--surface3);
  --dark-border: var(--border); --white: var(--text); --white-80: var(--text-muted);
  --white-60: var(--text-muted); --white-40: var(--text-dim); --white-20: var(--border-light); --white-05: var(--surface2);
  --surface-border: var(--border); --shadow: #17396612;
}
@media screen {
  body {
    background: var(--sf-ambient), var(--bg); background-attachment: fixed;
    color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    letter-spacing: -.012em; -webkit-font-smoothing: antialiased;
  }
  ::selection { background: var(--accent-glow); color: var(--text); }
  button, input, textarea, select { font-family: inherit; }
  button, [role="button"], a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
  :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
  button:disabled { cursor: not-allowed; }
  .content { padding: 32px clamp(20px, 3vw, 48px) 64px; }
  .page-section.active { animation: sf-appear .38s var(--sf-ease) both; }
  .topbar { background: var(--sf-glass); backdrop-filter: blur(24px) saturate(145%); -webkit-backdrop-filter: blur(24px) saturate(145%); border-color: var(--border); box-shadow: inset 0 -1px 0 var(--sf-rim); padding: 0 28px; }
  .topbar-title-wrap { flex: 1; min-width: 0; }
  .topbar-title { font-size: 16px; letter-spacing: -.025em; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
  .topbar-subtitle { font-size: 11px; letter-spacing: .015em; }
  .sidebar { background: var(--sf-glass); backdrop-filter: blur(28px) saturate(130%); -webkit-backdrop-filter: blur(28px) saturate(130%); border-color: var(--border); box-shadow: inset -1px 0 0 var(--sf-rim); }
  .sidebar-logo { padding: 22px 20px 16px !important; gap: 16px; border-bottom-color: var(--border) !important; }
  .sf-wordmark { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font-size: 22px; font-weight: 650; letter-spacing: -.065em; }
  .sf-brand-mark { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: var(--sf-button-text, white); background: var(--sf-button); box-shadow: 0 4px 12px var(--sf-selection-glow), inset 0 1px 0 #ffffff60; }
  .sf-wordmark small { margin-left: auto; border: 1px solid var(--border); border-radius: 6px; padding: 2px 5px; color: var(--text-dim); font-size: 8px; font-weight: 600; letter-spacing: .09em; }
  .sf-workspace-logo { display: flex; align-items: center; justify-content: flex-start; width: 100%; min-height: 34px; padding: 8px 12px; background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; }
  .sf-workspace-logo:has(img[src="/assets/showflow-logo.svg"]) { display: none; }
  .sf-workspace-label { margin: 8px 12px 14px; }
  #sidebar-nav-tree > .tree-node > .active-company-node { background: var(--accent-glow) !important; border-color: var(--border) !important; margin: 8px; }
  .sf-nav-group-body > .tree-header, .sf-nav-group-body > .tree-node > .tree-header { width: calc(100% - 16px); }
  #sidebar-logo-img { max-width: 152px !important; max-height: 34px !important; filter: none !important; }
  .sidebar-new-event { margin: 12px 16px 18px; min-height: 44px; border-radius: 13px; background: var(--sf-button); color: var(--sf-button-text, white); box-shadow: 0 6px 18px var(--sf-selection-glow), inset 0 1px 0 #ffffff50; letter-spacing: 0; text-transform: none; display: flex; align-items: center; justify-content: center; }
  .sidebar-new-event { border: 1px solid var(--sf-selection-border); flex-shrink: 0; }
  .tree-header, .tree-item { border-radius: 10px; margin: 2px 8px; padding: 10px 12px; font-weight: 500; font-size: 12px; line-height: 1.4; border-left-width: 0; }
  .tree-children { background: transparent; }
  .nav-link-content { gap: 10px; }
  .tree-header.active, .tree-item.active { color: var(--accent); }
  .sf-profile-menu { position: relative; }
  .sf-profile-menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; border-radius: 50px; padding: 4px; border: 1px solid var(--border); background: var(--sf-glass); }
  .sf-profile-menu > summary::-webkit-details-marker { display: none; }
  .sf-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--accent); background: var(--sf-selected); font-size: 12px; font-weight: 700; }
  .sf-profile-popover { position: absolute; top: calc(100% + 12px); right: 0; width: 248px; display: grid; gap: 6px; border: 1px solid var(--border); border-radius: 18px; background: var(--sf-glass-heavy); box-shadow: var(--sf-shadow-modal); backdrop-filter: blur(26px); padding: 12px; z-index: 100; }
  .sf-profile-popover strong, .sf-profile-popover small { padding: 2px 8px; overflow-wrap: anywhere; }
  .sf-profile-popover small { color: var(--text-dim); padding-bottom: 10px; border-bottom: 1px solid var(--border); }
  .sf-profile-popover button { justify-content: flex-start; width: 100%; }
  .sf-command-dialog { background: var(--sf-glass-heavy); border-color: var(--border-light); box-shadow: var(--sf-shadow-modal); }
  .sf-bottom-nav { background: var(--sf-glass); border-color: var(--border-light); box-shadow: var(--sf-shadow-raised); }
  .sf-command-option[aria-selected="true"], .sf-bottom-nav button.active, .sf-bottom-nav button[aria-expanded="true"] { background: var(--sf-selected); background-size: 240% 240%; animation: sf-selected-flow 7s ease-in-out infinite; }
  .sf-company-select { min-height: 40px; max-width: 165px; border: 1px solid var(--border); border-radius: 11px; padding: 0 10px; background: var(--surface); color: var(--text); font-size: 12px; }
  .sf-company-label { max-width: 150px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text-muted); font-size: 11px; }
  .card, .mc-card, .mc-kpi, .mc-kpi-card, .stat-card, .summary-item, .sf-copilot-welcome, .sf-copilot-message, .sf-bank-card {
    background: var(--sf-glass) !important; border: 1px solid var(--border); border-radius: var(--sf-radius) !important;
    box-shadow: var(--sf-shadow); background-size: 160% 160% !important; background-position: 0% 0%; transition: box-shadow .35s var(--sf-ease), border-color .35s, transform .35s var(--sf-ease), background-position 1.2s var(--sf-ease);
  }
  .card-header, .mc-card-header { background: transparent; border-color: var(--border); padding: 18px 22px; }
  .card-title, .mc-card-header { font-size: 13px; letter-spacing: -.015em; }
  .card-body, .mc-card-body { padding: 22px; }
  .mc-kpi, .mc-kpi-card, .stat-card { padding: 18px !important; }
  .mc-kpi-val, [id^="stat-acc-"], .sf-bank-amount, .sf-home-stat strong, td.text-right, .totals-value { font-family: var(--sf-mono); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; letter-spacing: -.05em; }
  .mc-kpi-val { font-size: 24px; margin-top: 8px; }
  .mc-kpi-label { font-size: 10px; font-weight: 600; color: var(--text-muted) !important; letter-spacing: .07em; }
  .mc-header { gap: 20px; flex-wrap: wrap; }
  .mc-header > div:last-child { margin-left: 0 !important; gap: 8px !important; flex-wrap: wrap; }
  .mc-header-title { font-size: clamp(24px, 2.3vw, 34px); letter-spacing: -.04em; }
  .mc-chip { padding: 5px 10px; background: var(--surface); color: var(--text-muted); }
  .mc-grid-3 { gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .persona-card, .kanban-task, .file-item, .sf-copilot-compose { border-radius: 12px; background: var(--surface); border-color: var(--border); }
  .kanban-col { background: var(--surface2); border: 1px solid var(--border); border-radius: 16px; }
  .btn, .sf-copilot-button, .sf-copilot-secondary { min-height: 38px; border-radius: 11px; font-size: 12px; font-weight: 600; letter-spacing: -.01em; padding: 9px 15px; transition: transform .22s var(--sf-ease), box-shadow .22s, background .22s; }
  .btn-primary, .sf-copilot-button, .showflow-bubble, .sf-error-submit { background: var(--sf-button) !important; color: var(--sf-button-text, #fff); border: 1px solid #ffffff1a !important; box-shadow: 0 4px 12px var(--sf-selection-glow), inset 0 1px 0 #ffffff42 !important; }
  .btn-primary:hover, .sf-copilot-button:hover { box-shadow: 0 6px 20px var(--sf-selection-glow), inset 0 1px 0 #ffffff62 !important; }
  .btn-secondary, .btn-ghost, .sf-copilot-secondary { background: var(--surface); border-color: var(--border); box-shadow: inset 0 1px 0 var(--sf-rim); color: var(--text-muted); }
  .btn-success { background: var(--green); color: #fff; }
  .btn-danger { background: #be2340; color: #fff; }
  .btn:active:not(:disabled), .sf-copilot-button:active:not(:disabled) { transform: scale(.98); }
  .btn-sm { min-height: 34px; padding: 7px 11px; }
  .form-input, .form-select, .input-field, .input-area, .sf-import-fields input, .sf-import-fields select { border-radius: 11px; border-color: var(--border); background-color: var(--surface2); color: var(--text); color-scheme: inherit; min-height: 42px; }
  .form-input:focus, .form-select:focus, .input-field:focus, .input-area:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: transparent; }
  .type-chip, .exec-tab-btn { border-radius: 10px; padding: 7px 13px; background: var(--surface); font-size: 11px; }
  .tree-header.active, .tree-item.active, .type-chip.active, .lang-toggle.selected, .card.selected, .card[aria-selected="true"], .sf-event-card[aria-current="true"], .exec-tab-btn.active, .toolbar-btn.active, .sidebar-tab.active {
    background: var(--sf-selected) !important; background-size: 240% 240% !important; border-color: var(--sf-selection-border) !important; color: var(--accent);
    box-shadow: inset 0 1px 0 var(--sf-rim), 0 0 0 1px var(--sf-selection-glow), 0 3px 14px var(--sf-selection-glow);
    animation: sf-selected-flow 7s ease-in-out infinite;
  }
  .modal-overlay { background: var(--sf-overlay); backdrop-filter: blur(12px) saturate(90%); -webkit-backdrop-filter: blur(12px) saturate(90%); padding: 16px; }
  .modal-overlay.open { display: flex !important; }
  .modal, #sf-invoice-dialog, .sf-error-dialog { background: var(--sf-glass-heavy); color: var(--text); border: 1px solid var(--border-light); border-radius: 24px; box-shadow: var(--sf-shadow-modal); backdrop-filter: blur(32px) saturate(145%); -webkit-backdrop-filter: blur(32px) saturate(145%); }
  #sf-invoice-dialog { --text-dim: var(--text-muted); }
  .modal-overlay.open > .modal, .modal-overlay.active > .modal, dialog[open] { animation: sf-dialog-in .35s var(--sf-ease) both; }
  dialog::backdrop { background: var(--sf-overlay) !important; backdrop-filter: blur(9px) !important; }
  .modal-header, .modal-footer, .sf-import-head, .sf-import-foot { border-color: var(--border); }
  .modal-footer, .sf-import-foot { background: var(--surface); }
  .modal-close { min-width: 40px; min-height: 40px; border-radius: 50%; background: var(--surface2); display: inline-grid; place-items: center; }
  .sf-import-notice[data-error="true"], .sf-copilot-error { color: var(--red); }
  .sf-copilot-eyebrow, .sf-copilot-message strong { color: var(--accent); }
  .sf-copilot-agents span { border-color: var(--border); background: var(--surface); color: var(--text-muted); }
  .sf-copilot-compose { background: var(--sf-glass-heavy); backdrop-filter: blur(20px); box-shadow: var(--sf-shadow-raised); }
  .showflow-bubble { font-size: 12px; min-height: 44px; border-radius: 50px; }
  .sf-copilot-header h1 { letter-spacing: -.055em; }
  .sf-copilot-welcome { padding: 28px; }
  .stakeholders-table th, .data-table th { background: var(--surface2); color: var(--text-muted); font-size: 10px; font-weight: 600; letter-spacing: .05em; }
  .stakeholders-table td, .data-table td { border-bottom-color: var(--border); padding-top: 14px; padding-bottom: 14px; }
  .stakeholders-table tbody tr:hover, .data-table tbody tr:hover { background: var(--accent-glow); }
  #accounting-invoices-body td:nth-child(6), #accounting-invoices-body td:nth-child(7), #accounting-invoices-body td:nth-child(8) { font-family: var(--sf-mono); font-variant-numeric: tabular-nums; text-align: right; }
  .parse-status.success, .persona-pill.ok, .type-supplier { color: var(--green); background: var(--green-dim); }
  .parse-status.error, .mc-alert, .persona-pill.ko { color: var(--red); background: var(--red-dim); border-color: var(--border); }
  .wizard-quick-card:hover { background: var(--accent-glow) !important; }
  /* Appearance control: quiet segmented glass, usable without relying on icons. */
  .sf-appearance { flex-shrink: 0; }
  .sf-theme-switch { display: inline-flex; align-items: center; padding: 3px; gap: 2px; border: 1px solid var(--border); background: var(--surface2); border-radius: 12px; }
  .sf-theme-option { min-height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 9px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--text-muted); font-size: 10px; font-weight: 600; cursor: pointer; }
  .sf-theme-option svg { width: 14px; height: 14px; }
  .sf-theme-option[aria-pressed="true"], .sf-theme-option[aria-checked="true"] { background: var(--sf-glass); box-shadow: var(--sf-shadow); color: var(--accent); border-color: var(--border); }
  .sf-theme-status { color: var(--text-dim); font-size: 11px; }
  .sf-theme-control { display: grid; justify-items: start; gap: 7px; }
  .topbar .sf-theme-status, .sf-site-plan .header .sf-theme-status, .sf-login .sf-theme-status { display: none; }
  .sf-appearance-card { padding: 24px; margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
  .sf-appearance-copy h2 { margin: 7px 0; font-size: 20px; letter-spacing: -.03em; }
  .sf-appearance-copy p { color: var(--text-muted); font-size: 12px; }
  .sf-palette-card { padding: 24px; margin-bottom: 22px; }
  .sf-palette-form { display: grid; gap: 20px; margin-top: 22px; }
  .sf-palette-modes, .sf-palette-actions { display: flex; gap: 8px; flex-wrap: wrap; }
  .sf-palette-modes .is-active { background: var(--sf-selected); border-color: var(--sf-selection-border); color: var(--accent); box-shadow: var(--sf-shadow); }
  .sf-palette-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 640px; }
  .sf-palette-color { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface2); }
  .sf-palette-color > span { grid-column: 1 / -1; color: var(--text-muted); font-size: 11px; font-weight: 600; }
  .sf-palette-color input { width: 44px; height: 44px; padding: 0; background: transparent; border: 0; cursor: pointer; border-radius: 10px; }
  .sf-palette-color input::-webkit-color-swatch-wrapper { padding: 2px; }
  .sf-palette-color input::-webkit-color-swatch { border: 1px solid var(--border); border-radius: 9px; }
  .sf-palette-color input::-moz-color-swatch { border: 1px solid var(--border); border-radius: 9px; }
  .sf-palette-color code { font: 11px var(--sf-mono); color: var(--text-muted); }
  .sf-palette-brand { display: grid; gap: 8px; font-size: 12px; max-width: 420px; }
  .sf-palette-brand[hidden], .sf-palette-card [hidden] { display: none; }
  .sf-palette-status, .sf-palette-permission { color: var(--text-muted); font-size: 12px; line-height: 1.6; }
  .sf-bank-panel, .sf-bank-modal { background: var(--sf-glass-heavy); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--sf-shadow); }
  .sf-bank-modal select { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
  .sf-bank-positive { color: var(--green); }
  .sf-bank-negative, .sf-bank-error { color: var(--red); }
  .sf-bank-error { background: var(--red-dim); border-color: var(--red); }
  .sf-bank-panel button, .sf-bank-actions button, .sf-bank-table button { min-height: 40px; border-color: var(--border); border-radius: 11px; }
  .sf-bank-stat strong { font-family: var(--sf-mono); font-variant-numeric: tabular-nums; }
  .sf-theme-settings { padding: 24px; margin-bottom: 20px; display: grid; gap: 14px; }
  .sf-theme-settings h3 { font-size: 15px; }
  /* Home uses the current workspace's existing events. */
  #no-event-state.sf-home { padding: 4px 0; max-width: 1360px; margin: auto; text-align: left; }
  /* Mientras showflow-liquid-glass.js no haya hidratado la vista de inicio
     (#no-event-state pasa de .empty-state a .sf-home) no se muestra el mensaje
     heredado, para no ver una pantalla intermedia distinta de la final. */
  #no-event-state.empty-state { visibility: hidden; }
  .sf-home-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
  .sf-eyebrow { font-size: 10px; font-weight: 650; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); }
  .sf-home h1 { font-size: clamp(30px, 3.2vw, 44px); font-weight: 650; letter-spacing: -.06em; line-height: 1.15; margin: 10px 0 12px; }
  #no-event-state.sf-home p { max-width: none; color: var(--text-muted); font-size: 13px; margin: 0; }
  .sf-home-date { text-transform: capitalize; color: var(--text-dim); font-size: 11px; margin-bottom: 6px; }
  .sf-home-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); gap: 22px; }
  .sf-home-primary { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
  .sf-home-hero { position: relative; overflow: hidden; padding: 30px; min-height: 230px; background: var(--sf-selected) !important; background-size: 240% 240% !important; border-color: var(--sf-selection-border); animation: sf-selected-flow 14s ease-in-out infinite; }
  .sf-home-hero::after { content: ''; pointer-events: none; position: absolute; right: -40px; top: -50px; width: 270px; height: 270px; border: 1px solid var(--sf-rim); border-radius: 50%; box-shadow: 0 0 0 30px #ffffff08, 0 0 0 60px #ffffff08, 0 0 0 90px #ffffff06; }
  .sf-home-hero::after { animation: sf-reflection-drift 18s ease-in-out infinite; }
  .sf-home-hero h2 { position: relative; max-width: 80%; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.22; letter-spacing: -.04em; margin: 18px 0 10px; font-weight: 600; overflow-wrap: anywhere; }
  .sf-home-hero .btn { margin-top: 22px; position: relative; z-index: 1; }
  .sf-home-hero-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
  .sf-home-hero .sf-eyebrow { display: flex; align-items: center; gap: 8px; }
  .sf-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
  .sf-home-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .sf-home-stat { padding: 20px; }
  .sf-home-stat span { font-size: 11px; color: var(--text-muted); }
  .sf-home-stat strong { display: block; margin: 8px 0 3px; font-size: 29px; font-weight: 500; }
  .sf-home-stat small { font-size: 10px; color: var(--text-dim); }
  .sf-home-aside { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
  .sf-home-section-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 20px 22px 12px; }
  .sf-home-section-title h2 { font-size: 13px; font-weight: 600; letter-spacing: -.02em; }
  .sf-home-section-title > span { color: var(--text-dim); font-size: 10px; }
  .sf-home-events { display: grid; gap: 6px; padding: 4px 12px 12px; }
  .sf-event-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 13px 10px; background: transparent; color: var(--text); border: 1px solid transparent; border-radius: 13px; cursor: pointer; transition: background .2s, border-color .2s; }
  .sf-event-card:hover { background: var(--accent-glow); border-color: var(--border); }
  .sf-event-date { display: grid; place-items: center; width: 43px; min-width: 43px; height: 48px; border: 1px solid var(--border); background: var(--surface2); border-radius: 11px; line-height: 1.3; padding: 4px; }
  .sf-event-date small { color: var(--accent); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
  .sf-event-date strong { font-size: 19px; font-weight: 550; font-variant-numeric: tabular-nums; }
  .sf-event-info { display: grid; gap: 4px; min-width: 0; flex: 1; }
  .sf-event-info strong { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sf-event-info small { color: var(--text-dim); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sf-home-quick { display: grid; padding: 6px 12px 12px; gap: 6px; }
  .sf-quick-action { display: flex; align-items: center; gap: 12px; text-align: left; min-height: 62px; padding: 10px; border-radius: 13px; background: transparent; border: 1px solid transparent; color: var(--text); cursor: pointer; }
  .sf-quick-action:hover { background: var(--accent-glow); border-color: var(--border); }
  .sf-quick-icon { height: 36px; width: 36px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 11px; color: var(--accent); background: var(--sf-glass); }
  .sf-quick-action > span:nth-child(2) { display: grid; flex: 1; gap: 3px; }
  .sf-quick-action strong { font-size: 12px; font-weight: 600; }
  .sf-quick-action small { font-size: 10px; color: var(--text-dim); }
  .sf-home-note { padding: 24px; }
  .sf-home-note > svg { color: var(--accent); margin-bottom: 18px; }
  .sf-home-note h2 { font-size: 19px; letter-spacing: -.035em; margin-bottom: 8px; font-weight: 600; }
  .sf-home-note .btn { margin-top: 18px; }
  .sf-home-footer { padding: 22px 0 0; font-size: 10px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }
  .sf-home-empty { padding: 18px 22px 24px; font-size: 12px; color: var(--text-muted); }
  /* Login and the venue editor share the same system preference. */
  .login-container { max-width: 460px; }
  .login-card { background: var(--sf-glass); border-color: var(--border); border-radius: 28px; box-shadow: var(--sf-shadow-modal); padding: 42px 34px; }
  .login-card .logo-container img { filter: none; }
  .login-container .sf-appearance { display: flex; justify-content: center; margin-top: 22px; }
  body.sf-login { overflow-y: auto; padding: 24px 0; }
  .sf-login .login-title { font-size: 25px; letter-spacing: -.04em; }
  .sf-login .login-footer { color: var(--text-dim); }
  .sf-login .btn-login { background: var(--sf-button); border-radius: 12px; box-shadow: 0 4px 15px var(--sf-selection-glow); }
  .sf-login .shape { display: none; }
  .sf-site-plan .header, .sf-site-plan .sidebar, .sf-site-plan .toolbar { background: var(--sf-glass); backdrop-filter: blur(22px); border-color: var(--border); }
  .sf-site-plan .header { min-height: 64px; }
  .sf-site-plan .sidebar { box-shadow: none; }
  .sf-site-plan .toolbar { border-radius: 16px; box-shadow: var(--sf-shadow-raised); }
  .sf-site-plan .toolbar-btn { border-radius: 9px; }
  .sf-site-plan .sidebar-tab { border-radius: 8px; margin: 4px; }
  .sf-site-plan .header .sf-theme-option span { display: none; }
  /* Legacy color literals are mapped only inside the app, never in document/email previews. */
  :root[data-theme="light"] .content :is(.stat-card, .mc-kpi-card, .sf-bank-stat) [style*="color:#fff"],
  :root[data-theme="light"] .content :is(.stat-card, .mc-kpi-card, .sf-bank-stat) [style*="color: #fff"] { color: var(--text) !important; }
  @media (hover: hover) and (pointer: fine) {
    .card:hover, .mc-card:hover, .mc-kpi:hover, .sf-home-stat:hover { border-color: var(--border-light); box-shadow: var(--sf-shadow-raised); background-position: 100% 70%; }
    .sf-event-card:hover .sf-event-date, .sf-quick-action:hover .sf-quick-icon { box-shadow: 0 0 18px var(--sf-selection-glow), inset 0 1px 0 var(--sf-rim); }
  }
  @media (max-width: 1250px) {
    .topbar { padding: 0 20px; gap: 12px; }
    .sf-company-label { display: none; }
    .sf-home-grid { grid-template-columns: minmax(0, 1.6fr) minmax(250px, 1fr); gap: 18px; }
    .sf-home-stat { padding: 16px; }
  }
  @media (max-width: 1024px) {
    .topbar { background: var(--sf-glass) !important; box-shadow: inset 0 -1px 0 var(--sf-rim) !important; height: 66px !important; }
    .sf-appearance .sf-theme-option span { display: none; }
    .sf-theme-option { min-width: 36px; min-height: 38px; padding: 6px; }
    .sf-theme-settings .sf-theme-option span { display: inline; }
    .topbar .mobile-logo-brand { display: none !important; }
    .mobile-menu-btn { width: 44px !important; height: 44px !important; border-color: var(--border) !important; background: var(--surface) !important; border-radius: 12px !important; }
    .sf-company-select { max-width: 120px; }
    .content { padding: 24px 20px 108px !important; }
    .mc-grid-3 { grid-template-columns: 1fr; }
    .sidebar-overlay { background: var(--sf-overlay); }
    .btn, .btn-sm, .type-chip, .tree-header, .tree-item, .sf-copilot-button, .sf-copilot-secondary { min-height: 44px; }
    .tree-header { padding-top: 10px; padding-bottom: 10px; }
  }
  @media (max-width: 700px) {
    .content { padding: 24px 16px 112px !important; }
    .topbar { gap: 8px !important; }
    .topbar-title { font-size: 13px !important; }
    .sf-company-select { display: none; }
    .sf-profile-popover .sf-company-select { display: block; width: 100%; max-width: none; }
    #user-topbar-actions { gap: 0 !important; }
    .sf-home-heading { align-items: flex-start; margin-bottom: 22px; }
    .sf-home-heading > .btn { min-width: 44px; padding: 10px; font-size: 0; }
    .sf-home-heading > .btn::before { content: '+'; font-size: 22px; }
    .sf-home h1 { font-size: 34px; }
    .sf-home-grid { grid-template-columns: 1fr; }
    .sf-home-hero { padding: 24px; min-height: 215px; }
    .sf-home-hero h2 { max-width: 92%; }
    .sf-home-stats { gap: 9px; }
    .sf-home-stat { padding: 14px 12px; border-radius: 16px !important; }
    .sf-home-stat strong { font-size: 25px; }
    .sf-home-stat span { font-size: 10px; }
    .sf-home-stat small { font-size: 9px; }
    .sf-home-aside { gap: 18px; }
    .sf-home-note { padding: 24px; }
    .mc-header > div { min-width: 0; max-width: 100%; }
    .card-header, .mc-card-header, .card-body, .mc-card-body { padding: 16px; }
    .modal { width: 100%; max-height: calc(100dvh - 32px); border-radius: 22px; }
    .modal-overlay { padding: 12px; }
    .modal-header, .modal-body, .modal-footer { padding: 18px; }
    .modal-footer { flex-wrap: wrap; }
    .modal-close { min-height: 44px; min-width: 44px; }
    .showflow-bubble { bottom: 92px; }
    .sf-copilot { padding: 4px 0; }
    .sf-copilot-compose { bottom: 94px; }
    .sf-site-plan .header .sf-appearance { display: none; }
    .sf-palette-fields { gap: 8px; }
    .sf-palette-color { padding: 12px; grid-template-columns: 1fr; justify-items: center; }
    .sf-palette-color > span { font-size: 10px; }
    /* Invoice rows become labelled cards; all existing actions stay reachable. */
    .sf-mobile-invoices, .sf-mobile-invoices tbody { display: block; width: 100%; min-width: 0 !important; }
    .sf-mobile-invoices thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .sf-mobile-invoices tbody tr { display: grid; grid-template-columns: 1fr 1fr; margin: 12px; padding: 10px; background: var(--sf-glass); border: 1px solid var(--border); border-radius: 17px; }
    .sf-mobile-invoices tbody td { display: flex; align-items: flex-start; flex-direction: column; padding: 8px !important; border: 0 !important; min-width: 0; width: auto !important; white-space: normal !important; overflow-wrap: anywhere; text-align: left !important; }
    .sf-mobile-invoices tbody td::before { content: attr(data-label); font: 500 9px -apple-system, BlinkMacSystemFont, 'Inter', sans-serif; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; }
    .sf-mobile-invoices tbody td:nth-child(4), .sf-mobile-invoices tbody td:last-child, .sf-mobile-invoices tbody td[colspan] { grid-column: 1 / -1; }
    .sf-mobile-invoices tbody td[colspan]::before { display: none; }
    .sf-mobile-invoices tbody td:last-child { flex-direction: row; align-items: center; gap: 6px; flex-wrap: wrap; }
    .sf-mobile-invoices tbody td:last-child::before { flex-basis: 100%; }
    .sf-mobile-invoices tbody td button { min-width: 44px; min-height: 44px; }
    .sf-mobile-invoices tbody td select { max-width: 100%; }
  }
}
@keyframes sf-selected-flow {
  0%, 100% { background-position: 0% 50%; box-shadow: inset 0 1px 0 var(--sf-rim), 0 0 0 1px var(--sf-selection-glow), 0 3px 10px var(--sf-selection-glow); }
  50% { background-position: 100% 50%; box-shadow: inset 0 1px 0 var(--sf-rim), 0 0 0 1px var(--sf-selection-glow), 0 4px 20px var(--sf-selection-glow); }
}
@keyframes sf-appear { from { opacity: .3; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sf-reflection-drift { 0%, 100% { transform: translate(0, 0); opacity: .65; } 50% { transform: translate(-22px, 16px); opacity: 1; } }
@keyframes sf-dialog-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
:root[data-sf-background="true"] *, :root[data-sf-background="true"] *::before, :root[data-sf-background="true"] *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --surface: #fff; --sf-glass: #fff; --sf-glass-heavy: #fff; }
  :root[data-theme="dark"] { --surface: #151e2b; --sf-glass: #151e2b; --sf-glass-heavy: #151e2b; }
  .sidebar, .topbar, .modal, dialog { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}
@supports not (backdrop-filter: blur(1px)) {
  .sidebar, .topbar, .modal, dialog { background-color: var(--bg); }
}
@media print { .sf-appearance, .sf-profile-menu, .sf-home-footer { display: none !important; } }

/* ShowFlow 0.48 alpha: quiet chrome and graphite surfaces. */
.sf-workspace-logo { display: none !important; }
.sf-wordmark small { border: 0; padding: 0; margin-left: 2px; font-family: inherit; font-size: 12px; font-weight: 300; letter-spacing: -.025em; white-space: nowrap; }
.sf-wordmark small span { font-size: 10px; }
/* Keep the full mark legible; only a broad, feathered reflection moves. */
.sf-brand-mark .sf-logo-stroke { opacity: .78; }
.sf-brand-mark .sf-logo-reflection { opacity: .85; }
.sf-logo-reflection-band { animation: sf-logo-reflection 14s linear infinite; }
@keyframes sf-logo-reflection {
  from { transform: translateX(0); }
  to { transform: translateX(56px); }
}
@media (prefers-reduced-motion: reduce) {
  .sf-logo-reflection-band { animation: none !important; }
  .sf-brand-mark .sf-logo-stroke { opacity: 1; }
  .sf-brand-mark .sf-logo-reflection { display: none; }
}
.sf-theme-option .sf-theme-label { display: inline-block !important; max-width: 52px; opacity: 1; overflow: hidden; transition: max-width .25s ease, opacity .2s ease; }
.sf-theme-option:not(.is-active) { gap: 0; }
.sf-theme-option:not(.is-active) .sf-theme-label { max-width: 0; opacity: 0; }
.sf-report-trigger { flex: 0 0 38px !important; width: 38px !important; min-width: 38px !important; padding: 8px !important; margin-left: 6px; }
.sf-ui-icon { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -.18em; flex-shrink: 0; }
.topbar-title, .modal-title, .card-title { text-transform: none; }
:root[data-theme="dark"] .sf-home-hero::after { opacity: .3; }
@media (max-width: 600px) { .topbar { gap: 5px; padding-inline: 10px; } .sf-report-trigger { margin-left: 0; } }

/* UI headings always inherit the active theme, including legacy inline colors. */
@media screen {
  :root[data-theme] :is(.page-section, .modal, .sf-error-dialog, .sf-mobile-sheet) :is(h1,h2,h3,h4,.header-title,.section-title,.card-title,.mc-card-title,.mc-header-title,.modal-title,.form-section-title):not(.press-release-page *, [id*="preview"] *, .exec-section-card *, [contenteditable="true"] *) {
    color: var(--text) !important; -webkit-text-fill-color: var(--text); text-shadow: none;
  }
  :root[data-theme] :is(.header-subtitle,.section-subtitle) { color: var(--text-muted) !important; }
}

/* Reported UI refinements: editorial hierarchy, compact actions, readable numbers. */
:root { --sf-mono: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif; }
.topbar-subtitle { display: none; }
.sidebar-events, .sf-nav-group-body, .tree-children { min-width: 0; }
#sidebar-nav-tree { overflow-x: hidden !important; }
#sidebar-events-tree .nav-link-content { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
#page-event-detail .mc-header { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; }
#page-event-detail .mc-header > div { min-width: 0; }
#mc-event-name { box-sizing: border-box; min-width: 0; max-width: 100%; font-size: clamp(24px,2.8vw,36px); }
#mc-meta-chips { gap: 8px; }
#mc-meta-chips .mc-chip { padding: 6px 10px; }
.sf-event-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sf-action-menu { position: relative; }
.sf-action-menu > summary { list-style: none; cursor: pointer; }
.sf-action-menu > summary::-webkit-details-marker { display: none; }
.sf-action-menu > div { position: absolute; top: calc(100% + 8px); right: 0; min-width: 210px; padding: 8px; display: grid; gap: 4px; z-index: 80; background: var(--sf-glass-heavy); backdrop-filter: blur(24px); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--sf-shadow-raised); }
.sf-action-menu button { text-align: left; }
#mc-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 0; }
#mc-kpis .mc-kpi { min-width: 0; min-height: 95px; border-radius: 15px !important; }
.mc-kpi-val, .stat-value, .sf-home-stat strong { font-family: inherit !important; font-weight: 550; letter-spacing: -.035em; }
.mc-kpi-label, .stat-label { text-transform: none; letter-spacing: 0; }
#section-contacts .stats-grid { display: none !important; }
#section-contacts .type-chips { flex-wrap: wrap; border: 0 !important; gap: 6px !important; }
#section-contacts #contact-search { flex: 1 1 240px; margin-left: 0 !important; }
#section-contacts .header { gap: 16px; flex-wrap: wrap; }
#section-contacts .header-title { font-size: 28px !important; letter-spacing: -.04em; }
#section-contacts .header-actions { flex-wrap: wrap; }
.sf-home-hero-meta { position: relative; z-index: 1; }
.sf-home-facts { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; position: relative; z-index: 1; }
.sf-home-facts span { display: grid; gap: 4px; font-size: 14px; font-weight: 550; }
.sf-home-facts small { color: var(--text-muted); font-weight: 400; font-size: 11px; }
.sf-home-stat { text-align: left; color: var(--text); cursor: pointer; }
@media(max-width:600px) { #mc-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); } .sf-action-menu > div { right: auto; left: 0; } .sf-event-actions > .btn { flex: 1; } }

#showflow-copilot-root.sf-copilot { max-width: 1000px; min-height: calc(100dvh - 180px); padding: 0 12px 16px; gap: 18px; }
.sf-copilot-header { align-items: center; }
.sf-copilot-header h1 { font-size: 18px; font-weight: 550; }
.sf-copilot-header .sf-copilot-prompts { gap: 6px; }
.sf-copilot-header .sf-copilot-secondary { border: 0; background: transparent; font-size: 12px; }
.sf-copilot-welcome { background: none !important; border: 0 !important; box-shadow: none !important; text-align: center; padding: 34px 0 24px; margin: auto 0; }
.sf-copilot-welcome h2 { font-size: clamp(28px,4vw,42px); letter-spacing: -.055em; font-weight: 550; margin: 16px 0 12px; }
.sf-copilot-welcome p { font-size: 14px; margin-bottom: 26px; }
.sf-copilot-mark { width: 56px; height: 56px; margin: auto; padding: 10px; box-sizing: border-box; border-radius: 18px; color: var(--accent); background: var(--sf-selected); box-shadow: 0 0 30px var(--sf-selection-glow); }
.sf-copilot-welcome .sf-copilot-prompts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; max-width: 640px; margin: auto; }
.sf-copilot-welcome .sf-copilot-secondary { min-height: 62px; text-align: left; border-radius: 15px; background: var(--sf-glass); padding: 18px; }
.sf-copilot-context-label { display: flex; align-items: center; justify-content: flex-start; gap: 12px; color: var(--text-muted); font-size: 12px; }
.sf-copilot-context { max-width: min(360px,65%); border: 1px solid var(--border); border-radius: 10px; padding: 9px; color: var(--text); background: var(--surface2); }
#showflow-copilot-root .sf-copilot-compose { position: static; border-radius: 22px; padding: 14px; margin-bottom: 0; }
.sf-copilot-compose textarea { resize: none; min-height: 58px; }
.sf-copilot-status { font-size: 11px; text-align: center; }
.sf-copilot:has(.sf-copilot-message) .sf-copilot-welcome { display: none; }
.sf-copilot-messages:empty { display: none; }
.sf-copilot-message { background: transparent !important; box-shadow: none !important; border: 0; }
.sf-copilot-message.sf-copilot-user { background: var(--sf-glass) !important; border: 1px solid var(--border); margin-left: 18%; }
body:has(#section-copilot.active) #showflow-copilot-bubble { display: none; }
@media(max-width:600px) { #showflow-copilot-root.sf-copilot { min-height: calc(100dvh - 220px); padding: 0; } .sf-copilot-welcome { padding-block: 20px; } .sf-copilot-header { flex-direction: row; } .sf-copilot-context-label { flex-wrap: wrap; gap: 6px; } .sf-copilot-context { max-width: 100%; width: 100%; } }

#mc-kpis { grid-template-columns: repeat(4,minmax(0,1fr)); }
.sf-event-cash-details { grid-column: 1 / -1; color: var(--text-muted); font-size: 12px; }
.sf-event-cash-details > summary { cursor: pointer; padding: 8px 2px; }
.sf-event-cash-details > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 8px; }
@media(max-width:900px) { #mc-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:450px) { .sf-event-cash-details > div { grid-template-columns: 1fr; } }

.content [style*="font-family:monospace"]:not(.press-release-page *,[id*="preview"] *), .content [style*="font-family: monospace"]:not(.press-release-page *,[id*="preview"] *) { font-family: inherit !important; }
#contacts-grid-view > .contact-cards { display:grid; gap:16px; grid-template-columns:repeat(auto-fill,minmax(min(280px,100%),1fr)); align-items:stretch; }
#contacts-grid-view .contact-card { min-width:0; margin:0; overflow-wrap:anywhere; }

/* Contact agenda: compact identity and channels, consistent editing. */
#section-contacts .contacts-count {font-size:.65em;color:var(--text-muted);font-weight:500;letter-spacing:0}
#section-contacts .contact-view-toggle {display:flex;gap:4px;flex-shrink:0}
#section-contacts .type-chips {margin-bottom:16px!important;padding-bottom:0!important}
#section-contacts .contacts-table th {text-transform:none;letter-spacing:0;font-size:12px;white-space:nowrap}
#section-contacts .contacts-table td {padding:10px 14px;vertical-align:middle;line-height:1.3}
#section-contacts .contacts-table td:first-child {min-width:180px}
#section-contacts .contact-name {display:block;background:none;border:0;padding:0;text-align:left;color:var(--text);font:inherit;font-weight:600;cursor:pointer;white-space:nowrap}
#section-contacts .contact-name:hover {color:var(--accent);text-decoration:underline}
#section-contacts .contact-name:focus-visible {outline:2px solid var(--accent);outline-offset:4px}
#section-contacts .contact-company {font-size:12px;color:var(--text-muted);line-height:1.25;margin-top:3px}
#section-contacts .contact-stack {display:flex;flex-direction:column;gap:3px}
#section-contacts .contact-channels a {color:var(--accent);text-decoration:none;overflow-wrap:anywhere}
#section-contacts .contact-channels a:hover {text-decoration:underline}
#section-contacts .contact-card .card-body {padding:16px!important}
#section-contacts .contact-card-heading {display:flex;gap:12px;align-items:baseline;justify-content:space-between}
#section-contacts .contact-card-heading .contact-name {white-space:normal}
#section-contacts .contact-events {font-size:11px;color:var(--text-muted);white-space:nowrap}
#section-contacts .contact-alias {font-size:12px;margin-top:3px}
#section-contacts .contact-card .contact-channels {margin-top:10px;font-size:12px}
:is(#new-contact-modal,#edit-contact-modal) .form-row {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px!important;margin-bottom:12px}
:is(#new-contact-modal,#edit-contact-modal) .form-group {min-width:0;margin-bottom:0}
:is(#new-contact-modal,#edit-contact-modal) .form-label {display:block;font-size:12px;margin-bottom:5px}
:is(#new-contact-modal,#edit-contact-modal) .form-section-title {font-size:13px;font-weight:600;margin:0 0 12px}
:is(#new-contact-modal,#edit-contact-modal) .form-section {margin-bottom:18px}
:is(#new-contact-modal,#edit-contact-modal) .modal-body {padding:20px 24px}
:is(#new-contact-modal,#edit-contact-modal) .showflow-help {margin:0 0 16px;font-size:12px}
:is(#new-contact-modal,#edit-contact-modal) .form-input,:is(#new-contact-modal,#edit-contact-modal) .form-select {min-height:40px;padding:8px 12px}
@media(min-width:600px){:is(#new-contact-modal,#edit-contact-modal) .form-row:has(> :nth-child(3)) {grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:599px){#section-contacts .contacts-table td:first-child {min-width:130px}#section-contacts .contacts-table .contact-name {white-space:normal}:is(#new-contact-modal,#edit-contact-modal) .form-row {grid-template-columns:1fr}:is(#new-contact-modal,#edit-contact-modal) .modal-body {padding:16px}}

/* Accounting shares the quiet financial workspace hierarchy. */
#section-budgets .stats-grid {display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:0!important;border-block:1px solid var(--border);margin-bottom:16px!important}
#section-budgets .stat-card {background:transparent!important;box-shadow:none!important;border:0!important;border-radius:0!important;padding:14px 12px!important;min-width:0}
#section-budgets .stat-card + .stat-card {border-left:1px solid var(--border)!important}
#section-budgets .stat-icon {display:none!important}
#section-budgets .stat-label {text-transform:none!important;letter-spacing:0!important}
#section-budgets .contacts-table th {text-transform:none;letter-spacing:0;white-space:nowrap}
#section-budgets .contacts-table td {line-height:1.35;padding:10px 14px}
#section-budgets .contacts-table td:nth-child(2) {white-space:nowrap}
#section-budgets .header {gap:12px;flex-wrap:wrap}
@media(max-width:650px){#section-budgets .stats-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important}#section-budgets .stat-card:nth-child(3) {border-left:0!important}}

:is(#new-contact-modal,#edit-contact-modal) .modal {display:flex;flex-direction:column;overflow:hidden!important}
:is(#new-contact-modal,#edit-contact-modal) .modal-body {overflow:auto;min-height:0;flex:1}
:is(#new-contact-modal,#edit-contact-modal) :is(.modal-header,.modal-footer) {flex-shrink:0}
#settings-members-access {margin-bottom:16px}

#section-venues label {text-transform:none!important;letter-spacing:0!important;font-size:12px!important}
