/* IntakeFlow premium layer (docs/design-system.md): tokens, typography, controls, surfaces, motion.
   Loaded right after app.css on every page; page stylesheets still refine their own blocks. */

:root {
    --if-font: "Inter", "Segoe UI Variable Text", "Segoe UI", "SF Pro Text", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --if-font-display: "Inter Display", "Segoe UI Variable Display", "Segoe UI", "SF Pro Display", -apple-system, system-ui, sans-serif;
    --if-ink: #0f1c27;
    --if-ink-2: #2d3f4d;
    --if-muted: #5f7180;
    --if-faint: #8a99a6;
    --if-line: #e2e8ee;
    --if-line-soft: #edf1f5;
    --if-bg: #f3f5f8;
    --if-surface: #ffffff;
    --if-surface-2: #f8fafc;
    --if-accent: #136a7d;
    --if-accent-2: #0d5263;
    --if-accent-soft: #e5f2f5;
    --if-accent-ring: rgba(19, 106, 125, .18);
    --if-gold: #b0843a;
    --if-gold-soft: #f7efe1;
    --if-success: #13886a;
    --if-danger: #c8453f;
    --if-warning: #b9780f;
    --if-radius-sm: 8px;
    --if-radius: 12px;
    --if-radius-lg: 16px;
    --if-shadow-xs: 0 1px 2px rgba(15, 28, 39, .05);
    --if-shadow-sm: 0 1px 2px rgba(15, 28, 39, .04), 0 2px 8px -2px rgba(15, 28, 39, .06);
    --if-shadow: 0 2px 4px rgba(15, 28, 39, .04), 0 12px 32px -12px rgba(15, 28, 39, .16);
    --if-shadow-lg: 0 30px 70px -24px rgba(15, 28, 39, .35), 0 8px 20px -10px rgba(15, 28, 39, .18);
    --if-ease: cubic-bezier(.2, .75, .2, 1);
    --if-sidebar: #0f1d28;
    --if-sidebar-2: #13283a;
    --if-sidebar-text: #b9c8d3;
    --if-sidebar-strong: #f3f7fa;
    --text: var(--if-ink);
    --text-muted: var(--if-muted);
    --bg: var(--if-bg);
    --surface: var(--if-surface);
    --border: var(--if-line);
}
html[data-theme="dark"] {
    --if-ink: #e6eef3;
    --if-ink-2: #c9d6de;
    --if-muted: #9aacb8;
    --if-faint: #758896;
    --if-line: #263845;
    --if-line-soft: #1f2f3b;
    --if-bg: #0b141b;
    --if-surface: #121f29;
    --if-surface-2: #172633;
    --if-accent: #39a3b8;
    --if-accent-2: #2a8ea3;
    --if-accent-soft: #15313b;
    --if-accent-ring: rgba(57, 163, 184, .25);
    --if-gold: #d2aa62;
    --if-gold-soft: #2e2617;
    --if-shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --if-shadow: 0 12px 32px -12px rgba(0, 0, 0, .55);
    --if-shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .7);
    --if-sidebar: #08111a;
    --if-sidebar-2: #0d1b27;
}

/* Typography */
:root { font-family: var(--if-font); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-feature-settings: "cv11", "ss01", "tnum" 0; }
body { color: var(--if-ink); background: var(--if-bg); }
.has-sidebar { background: radial-gradient(1200px 500px at 85% -10%, rgba(19, 106, 125, .07), transparent 60%), var(--if-bg); }
html[data-theme="dark"] .has-sidebar { background: radial-gradient(1200px 500px at 85% -10%, rgba(57, 163, 184, .08), transparent 60%), var(--if-bg); }
h1, h2, h3 { font-family: var(--if-font-display); color: var(--if-ink); letter-spacing: -.02em; }
h1 { font-size: 28px; font-weight: 720; line-height: 1.18; margin: 0 0 8px; }
h2 { font-size: 19px; font-weight: 680; line-height: 1.3; margin: 0 0 14px; }
h3 { font-size: 15px; font-weight: 650; }
p { color: inherit; }
.muted, small.muted, .heading p { color: var(--if-muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--if-gold); }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--if-gold), transparent); }
a { color: var(--if-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s var(--if-ease); }
a:hover { color: var(--if-accent-2); }
code, kbd { font-family: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, monospace; font-size: .9em; }
td, th, .status-pill, .sidebar-badge, .lead-board-count { font-variant-numeric: tabular-nums; }

/* Page header */
.heading { align-items: flex-end; margin-bottom: 26px; gap: 16px 24px; }
.heading > div:first-child { min-width: 0; }
.heading p { margin: 6px 0 0; max-width: 72ch; }
.heading h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Surfaces */
section, .settings-card, .panel { border: 1px solid var(--if-line); background: var(--if-surface); border-radius: var(--if-radius-lg); box-shadow: var(--if-shadow-sm); }
section { padding: 24px 26px; }
section section { box-shadow: none; }
html[data-theme="dark"] section { background: var(--if-surface); border-color: var(--if-line); }

/* Buttons: plain <button>, .button links, and the secondary/danger variants. Buttons with their own
   component class (menus, chips, toggles) keep the look their stylesheet gives them. */
button:not([class]), .button, button.secondary, button.danger {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 16px;
    border: 1px solid transparent; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 620; letter-spacing: .005em; line-height: 1.2;
    color: #fff; background: linear-gradient(180deg, #16788d, var(--if-accent-2)); box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 1px 2px rgba(13, 82, 99, .25), 0 4px 12px -4px rgba(13, 82, 99, .35);
    text-decoration: none; cursor: pointer; transition: transform .16s var(--if-ease), box-shadow .16s var(--if-ease), background .16s, border-color .16s, color .16s;
}
button:not([class]):hover, .button:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 2px 4px rgba(13, 82, 99, .25), 0 10px 22px -8px rgba(13, 82, 99, .45); }
button:not([class]):active, .button:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(13, 82, 99, .3); }
button:focus-visible, .button:focus-visible, a:focus-visible, summary:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--if-accent-ring); }
button .nav-icon, .button .nav-icon { width: 17px; height: 17px; flex: 0 0 17px; }
.button.secondary, button.secondary, a.secondary {
    color: var(--if-ink-2); background: var(--if-surface); border-color: var(--if-line); box-shadow: var(--if-shadow-xs);
}
.button.secondary:hover, button.secondary:hover { color: var(--if-accent-2); background: var(--if-surface); border-color: #bfd3da; transform: translateY(-1px); box-shadow: 0 6px 16px -10px rgba(15, 28, 39, .3); }
.button.danger, button.danger { background: linear-gradient(180deg, #d4534c, #b43a35); border-color: transparent; color: #fff; }
html[data-theme="dark"] button.secondary, html[data-theme="dark"] .button.secondary { background: var(--if-surface-2); color: var(--if-ink-2); border-color: var(--if-line); }
button:disabled, .button.disabled { transform: none !important; box-shadow: none; }

/* Fields */
label { font-size: 13.5px; font-weight: 620; color: var(--if-ink-2); }
input, textarea, select {
    border: 1px solid #d3dce4; border-radius: 10px; background: var(--if-surface); color: var(--if-ink);
    box-shadow: 0 1px 1px rgba(15, 28, 39, .03) inset; transition: border-color .15s, box-shadow .15s, background .15s;
}
input, textarea { padding: 10px 13px; }
select { min-height: 40px; padding: 8px 34px 8px 12px; appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235f7180' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; accent-color: var(--if-accent); box-shadow: none; }
input:hover, textarea:hover, select:hover { border-color: #b8c7d2; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--if-accent); box-shadow: 0 0 0 4px var(--if-accent-ring); }
input::placeholder, textarea::placeholder { color: var(--if-faint); }
html[data-theme="dark"] input, html[data-theme="dark"] textarea, html[data-theme="dark"] select { background-color: var(--if-surface-2); border-color: var(--if-line); color: var(--if-ink); }

/* Tables */
table { font-size: 14px; }
th { background: transparent; color: var(--if-faint); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--if-line); }
td { border-bottom: 1px solid var(--if-line-soft); }
tbody tr { transition: background .15s; }
tbody tr:hover > td { background: rgba(19, 106, 125, .035); }
html[data-theme="dark"] tbody tr:hover > td { background: rgba(57, 163, 184, .06); }

/* Messages */
.notice, .warning { border: 1px solid; border-left-width: 4px; border-radius: var(--if-radius); padding: 13px 18px; box-shadow: var(--if-shadow-xs); animation: if-rise .35s var(--if-ease) backwards; }
.notice { background: #eef8f4; border-color: #cde9de; border-left-color: var(--if-success); color: #134b3c; }
.warning { background: #fff7ea; border-color: #f2dfbd; border-left-color: var(--if-warning); color: #5f430f; }
html[data-theme="dark"] .notice { background: #12302a; border-color: #1d4a3f; color: #b9e6d4; }
html[data-theme="dark"] .warning { background: #33270f; border-color: #4d3b17; color: #f0d59e; }
.status-pill { border-radius: 999px; padding: 4px 10px; font-size: 11.5px; font-weight: 650; letter-spacing: .01em; }

/* Motion: content rises gently on load; nothing moves for people who prefer less motion. */
@keyframes if-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes if-fade { from { opacity: 0; } to { opacity: 1; } }
/* «backwards», not «both»: once risen, elements keep no transform (fixed children and popovers stay intact). */
main > .heading, main > section, main > .grid, main > div:not(.proxy-alerts) { animation: if-rise .45s var(--if-ease) backwards; }
main > :nth-child(2) { animation-delay: .03s; } main > :nth-child(3) { animation-delay: .06s; } main > :nth-child(4) { animation-delay: .09s; }
main > :nth-child(5) { animation-delay: .12s; } main > :nth-child(n+6) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Sidebar: deep ink with a brand accent */
.app-sidebar { background: linear-gradient(180deg, var(--if-sidebar-2) 0%, var(--if-sidebar) 60%); border-right: 0; box-shadow: 1px 0 0 rgba(255, 255, 255, .04), 12px 0 40px -24px rgba(15, 28, 39, .5); color: var(--if-sidebar-text); }
.sidebar-head { border-bottom: 1px solid rgba(255, 255, 255, .06); }
.sidebar-brand { color: var(--if-sidebar-strong); }
.sidebar-brand-mark { border-radius: 11px; background: linear-gradient(135deg, #1b8aa0, #0d4f60); box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 6px 16px -6px rgba(27, 138, 160, .8); font-family: var(--if-font-display); letter-spacing: .02em; }
.sidebar-brand-copy { font-family: var(--if-font-display); font-size: 19px; font-weight: 720; letter-spacing: -.01em; }
.sidebar-brand-copy small { color: var(--if-gold); letter-spacing: .22em; font-weight: 700; }
.sidebar-toggle, .sidebar-mobile-trigger { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .1); color: var(--if-sidebar-text); box-shadow: none; min-height: 0; }
.sidebar-toggle:hover { background: rgba(255, 255, 255, .09); color: #fff; transform: none; box-shadow: none; }
.sidebar-mobile-trigger { background: var(--if-sidebar); color: #fff; }
.sidebar-group, .sidebar-section-title { color: rgba(185, 200, 211, .55); }
.sidebar-section-toggle { background: transparent; box-shadow: none; min-height: 0; color: rgba(185, 200, 211, .55); }
.sidebar-section-toggle:hover { background: transparent; color: var(--if-sidebar-strong); transform: none; box-shadow: none; }
.sidebar-nav-link { color: var(--if-sidebar-text); font-weight: 560; border-radius: 10px; background: transparent; box-shadow: none; min-height: 40px; transition: background .15s, color .15s; }
.sidebar-nav-link .nav-icon { opacity: .78; transition: opacity .15s, transform .2s var(--if-ease); }
.sidebar-nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; transform: none; box-shadow: none; }
.sidebar-nav-link:hover .nav-icon { opacity: 1; transform: translateX(1px); }
.sidebar-nav-link.is-active { background: linear-gradient(90deg, rgba(27, 138, 160, .28), rgba(27, 138, 160, .08)); color: #fff; box-shadow: inset 3px 0 0 var(--if-gold); }
.sidebar-nav-link.is-active .nav-icon { opacity: 1; color: #7fd3e3; }
html[data-sidebar="collapsed"] .sidebar-nav-link.is-active { background: rgba(27, 138, 160, .3); }
.sidebar-footer { border-top: 1px solid rgba(255, 255, 255, .06); }
.sidebar-logout { color: var(--if-sidebar-text); }
.sidebar-badge { background: rgba(255, 255, 255, .12); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; margin-left: auto; }
.sidebar-count { margin-left: auto; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; color: #fff; background: linear-gradient(180deg, #e0605a, #c03e39); box-shadow: 0 0 0 3px rgba(224, 96, 90, .18); }
.sidebar-count[hidden] { display: none; }
.sidebar-badge[hidden] { display: none; }
.sidebar-star, .sidebar-info { color: rgba(185, 200, 211, .5); background: transparent; border: 0; box-shadow: none; min-height: 0; }
.sidebar-star:hover, .sidebar-info:hover { color: var(--if-gold); background: transparent; transform: none; box-shadow: none; }
.sidebar-nav::-webkit-scrollbar { width: 8px; } .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 8px; }

/* Info hints (docs/ui-hints.md): a floating card with the short description and the «Обучение» link. */
.hint { position: relative; display: inline-grid; place-items: center; flex: 0 0 18px; width: 18px; height: 18px; margin-left: 4px; border-radius: 50%;
    border: 1px solid #c4d2db; background: var(--if-surface); color: var(--if-accent); font: italic 700 11px/1 Georgia, "Times New Roman", serif;
    cursor: help; vertical-align: middle; user-select: none; transition: background .15s, color .15s, border-color .15s, box-shadow .15s; }
.hint::after { content: none !important; }
.hint:hover, .hint:focus-visible, .hint.is-open { background: var(--if-accent); border-color: var(--if-accent); color: #fff; outline: none; box-shadow: 0 0 0 4px var(--if-accent-ring); }
.hint-pop { display: none; }
select[multiple] { background-image: none; padding-right: 12px; }
/* Without scripts the card still opens in place. */
html:not(.has-js) .hint:hover .hint-pop, html:not(.has-js) .hint:focus-within .hint-pop { display: grid; position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); z-index: 50; }
.hint-pop, .hint-float { gap: 8px; width: max-content; max-width: min(320px, calc(100vw - 32px)); padding: 12px 14px; border-radius: 12px;
    background: #10202c; color: #eef4f7; font: 500 13px/1.5 var(--if-font); font-style: normal; text-align: left; white-space: normal; letter-spacing: 0;
    box-shadow: var(--if-shadow-lg); border: 1px solid rgba(255, 255, 255, .08); }
.hint-float { position: fixed; z-index: 1000; display: grid; animation: if-pop .16s var(--if-ease) both; }
@keyframes if-pop { from { opacity: 0; transform: translateY(4px) scale(.98); } to { opacity: 1; transform: none; } }
.hint-float .hint-link, .hint-pop .hint-link { color: #8fd8e7; font-weight: 650; text-decoration: none; }
.hint-float .hint-link:hover { color: #fff; text-decoration: underline; }
html[data-theme="dark"] .hint { background: var(--if-surface-2); border-color: #3a5160; color: #7fd3e3; }
html[data-theme="dark"] .hint-float, html[data-theme="dark"] .hint-pop { background: #e9f1f5; color: #10202c; border-color: rgba(0, 0, 0, .06); }
html[data-theme="dark"] .hint-float .hint-link { color: #0d5263; }

/* Sidebar info buttons: one per menu item, shown on hover like the favourite star. */
.sidebar-item { position: relative; }
.sidebar-info { position: absolute; top: 50%; right: 34px; width: 24px; height: 24px; padding: 0; display: grid; place-items: center; transform: translateY(-50%); opacity: 0; transition: opacity .15s; }
.sidebar-info .nav-icon { width: 15px; height: 15px; }
.sidebar-item:hover .sidebar-info, .sidebar-info:focus-visible, .sidebar-info.is-open { opacity: 1; }
.sidebar-item:hover .sidebar-badge, .sidebar-item:focus-within .sidebar-badge { opacity: .35; }
html[data-sidebar="collapsed"] .sidebar-info { display: none; }
.sidebar-footer .sidebar-info { display: none; }

/* Sub-navigation tabs carry their own hints (App\Support\HelpCatalog). */
.subnav-hint { margin-left: -4px; margin-right: 4px; align-self: center; width: 16px; height: 16px; flex-basis: 16px; font-size: 10px; opacity: .55; transition: opacity .15s; }
.has-tab-hints:hover .subnav-hint, .subnav-hint:focus-visible, .subnav-hint.is-open { opacity: 1; }
.account-tabs a .hint, .account-tabs .hint { margin-left: 6px; }

/* Meeting dialog (docs/meetings-calendar.md) */
.meeting-dialog { width: min(560px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 20px; background: var(--if-surface); color: var(--if-ink); box-shadow: var(--if-shadow-lg); }
.meeting-dialog[open] { animation: if-pop .22s var(--if-ease) both; }
.meeting-dialog::backdrop { background: rgba(9, 18, 26, .48); backdrop-filter: blur(3px); animation: if-fade .2s both; }
.meeting-form { display: grid; gap: 14px; padding: 22px 24px 20px; }
.meeting-form label { margin: 0; display: grid; gap: 6px; }
.meeting-form input, .meeting-form textarea, .meeting-form select { margin: 0; width: 100%; }
.meeting-dialog-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; }
.meeting-dialog-head h2 { margin: 2px 0 4px; font-size: 20px; }
.meeting-dialog-head p { margin: 0; font-size: 13.5px; }
.meeting-dialog-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(135deg, #1b8aa0, #0d4f60); box-shadow: 0 8px 18px -8px rgba(13, 79, 96, .8); }
.meeting-dialog-icon .nav-icon { width: 22px; height: 22px; }
.meeting-dialog-close { width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 10px; background: transparent; color: var(--if-muted); border: 1px solid var(--if-line); box-shadow: none; font-size: 20px; }
.meeting-dialog-close:hover { background: var(--if-surface-2); color: var(--if-ink); transform: none; box-shadow: none; }
.meeting-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; }
.meeting-kind { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--if-surface-2); border: 1px solid var(--if-line); width: max-content; }
.meeting-kind-option { margin: 0; cursor: pointer; }
.meeting-kind-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.meeting-kind-option span { display: block; padding: 7px 16px; border-radius: 9px; font-size: 13.5px; font-weight: 620; color: var(--if-muted); transition: background .15s, color .15s, box-shadow .15s; }
.meeting-kind-option input:checked + span { background: var(--if-surface); color: var(--if-accent-2); box-shadow: var(--if-shadow-sm); }
.meeting-kind-option input:focus-visible + span { box-shadow: 0 0 0 3px var(--if-accent-ring); }
.meeting-lead-picker { position: relative; }
.meeting-lead-results { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); max-height: 260px; overflow: auto; margin: 0; padding: 6px; list-style: none; background: var(--if-surface); border: 1px solid var(--if-line); border-radius: 12px; box-shadow: var(--if-shadow); }
.meeting-lead-results button { width: 100%; justify-content: flex-start; display: grid; text-align: left; gap: 2px; padding: 9px 11px; min-height: 0; background: transparent; color: var(--if-ink); border: 0; box-shadow: none; border-radius: 9px; }
.meeting-lead-results button:hover { background: var(--if-accent-soft); transform: none; box-shadow: none; color: var(--if-ink); }
.meeting-lead-results small { color: var(--if-muted); font-weight: 500; }
.meeting-lead-results .is-empty { padding: 10px 12px; color: var(--if-muted); font-size: 13.5px; }
.meeting-dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; border-top: 1px solid var(--if-line-soft); margin-top: 4px; }
@media (max-width: 560px) { .meeting-grid { grid-template-columns: 1fr 1fr; } .meeting-grid label:first-child { grid-column: 1 / -1; } }

/* Meeting entry points on leads */
.lead-meeting-btn { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; min-height: 0; padding: 0; border-radius: 9px; background: var(--if-surface); color: var(--if-accent); border: 1px solid var(--if-line); box-shadow: var(--if-shadow-xs); opacity: 0; transition: opacity .15s, background .15s, color .15s; }
.lead-meeting-btn .nav-icon { width: 16px; height: 16px; }
.lead-board-card { position: relative; }
.lead-board-card:hover .lead-meeting-btn, .lead-meeting-btn:focus-visible { opacity: 1; }
.lead-meeting-btn:hover { background: var(--if-accent); color: #fff; border-color: var(--if-accent); transform: none; }
@media (hover: none) { .lead-meeting-btn { opacity: 1; } }
.lead-meeting-inline { min-height: 34px; padding: 6px 9px; }
.lead-meeting-inline .nav-icon { width: 16px; height: 16px; }
.lead-meeting-inline-icon { min-height: 0; width: 26px; height: 26px; padding: 0; vertical-align: middle; border-radius: 8px; background: var(--if-accent-soft); color: var(--if-accent-2); border: 0; box-shadow: none; }
.lead-meeting-inline-icon .nav-icon { width: 15px; height: 15px; }
.lead-meeting-inline-icon:hover { background: var(--if-accent); color: #fff; transform: none; box-shadow: none; }
.lead-meeting-drop { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 14px 18px; border: 1.5px dashed #b9d3db; border-radius: 14px; background: linear-gradient(90deg, var(--if-accent-soft), transparent); color: var(--if-ink-2); font-size: 14px; transition: background .15s, border-color .15s, transform .15s var(--if-ease); }
.lead-meeting-drop .nav-icon { width: 22px; height: 22px; color: var(--if-accent); flex: 0 0 22px; }
.lead-meeting-drop.is-over { border-color: var(--if-accent); background: var(--if-accent-soft); transform: scale(1.01); box-shadow: 0 0 0 4px var(--if-accent-ring); }
.lead-meetings-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lead-meetings-head h2 { margin: 0; }
.lead-meetings-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.lead-meetings-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 14px; border: 1px solid var(--if-line-soft); border-radius: 12px; background: var(--if-surface-2); }
.lead-meetings-list li small { color: var(--if-muted); }
.lead-meetings-list li .button { margin-left: auto; min-height: 32px; padding: 6px 12px; }
.lead-meetings-list li.is-past { opacity: .7; }
.lead-meetings-list li.is-cancelled { opacity: .5; text-decoration: line-through; }

/* Toasts: reminders on any page */
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 1200; display: grid; gap: 10px; width: min(380px, calc(100vw - 40px)); pointer-events: none; }
.toast { pointer-events: auto; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 14px 16px; border-radius: 14px; text-decoration: none; color: #eef4f7; background: #10202c; box-shadow: var(--if-shadow-lg); border: 1px solid rgba(255, 255, 255, .08); transform: translateY(12px); opacity: 0; transition: transform .3s var(--if-ease), opacity .3s; }
.toast.is-in { transform: none; opacity: 1; }
.toast:hover { color: #fff; }
.toast strong { display: block; font-size: 14px; }
.toast small { display: block; color: #a9bfcc; margin-top: 2px; }
.toast-icon { font-size: 20px; line-height: 1; }

/* Cabinet */
.cabinet-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cabinet-card { display: grid; gap: 12px; }
.cabinet-card h2 { margin: 0 0 4px; }
.reminder { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--if-line-soft); color: var(--if-ink); text-decoration: none; transition: background .15s, border-color .15s; }
.reminder:hover { background: var(--if-surface-2); border-color: var(--if-line); color: var(--if-ink); }
.reminder-dot { width: 9px; height: 9px; border-radius: 50%; background: transparent; }
.reminder.is-unread .reminder-dot { background: var(--if-danger); box-shadow: 0 0 0 4px rgba(200, 69, 63, .14); }
.reminder-copy { display: grid; gap: 2px; min-width: 0; }
.reminder-copy small { color: var(--if-muted); }
.reminder time { color: var(--if-faint); font-size: 12.5px; white-space: nowrap; }
@media (max-width: 900px) { .cabinet-grid { grid-template-columns: 1fr; } }

/* Small screens: comfortable touch targets */
@media (max-width: 760px) { h1 { font-size: 24px; } section { padding: 18px; } .heading { align-items: flex-start; } }

/* KPI strip (docs/design-system.md): compact tiles, the whole report on one screen. */
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 16px 0 12px; }
.kpi-tile { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--if-line); border-radius: 14px; background: linear-gradient(160deg, var(--if-surface), var(--if-surface-2)); box-shadow: var(--if-shadow-xs); text-align: left; transition: box-shadow .2s var(--if-ease), transform .2s var(--if-ease); }
.kpi-tile:hover { box-shadow: var(--if-shadow); transform: translateY(-1px); }
.kpi-ring { width: 56px; height: 56px; color: var(--if-ink); }
.kpi-copy { min-width: 0; }
.kpi-copy h3 { margin: 0 0 2px; font-size: 12.5px; font-weight: 650; color: var(--if-muted); letter-spacing: 0; display: flex; align-items: center; gap: 2px; }
.kpi-value { margin: 0; line-height: 1.1; }
.kpi-value strong { font-family: var(--if-font-display); font-size: 26px; font-weight: 740; letter-spacing: -.02em; color: var(--if-ink); font-variant-numeric: tabular-nums; }
.kpi-value span { color: var(--if-muted); font-size: 13px; }
.kpi-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpi-count { display: grid; gap: 2px; padding: 4px 6px; border-radius: 10px; text-align: center; }
.kpi-count strong { font-family: var(--if-font-display); font-size: 22px; font-weight: 740; color: var(--if-ink); font-variant-numeric: tabular-nums; }
.kpi-count span { font-size: 11.5px; color: var(--if-muted); line-height: 1.25; }
.kpi-count.is-alert { background: #fdeeed; }
.kpi-count.is-alert strong { color: var(--if-danger); }
html[data-theme="dark"] .kpi-count.is-alert { background: #3a1f1d; }
.metric-gauge.kpi-tile svg { max-width: none; margin: 0; }
.proxy-health-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.proxy-health-head h2 { margin: 0; display: flex; align-items: center; gap: 6px; }
.pool-bar-wrap { padding: 4px 0 0; }
.pool-bar { display: block; width: 100%; height: 8px; border-radius: 999px; overflow: hidden; background: var(--if-line-soft); }
.pool-bar .is-ok { fill: #13886a; } .pool-bar .is-failed { fill: #c8453f; } .pool-bar .is-warning { fill: #c98a14; } .pool-bar .is-unknown { fill: #94a3b8; }
.proxy-health-note { margin: 10px 0 4px; font-size: 12.5px; }

/* Tab bars: a segmented control (accounts, projects, settings, monitoring, leads, inbox). */
.account-tabs, .lead-tabs, .inbox-tabs, .outreach-tabs { align-items: center; gap: 4px; padding: 5px; border: 1px solid var(--if-line); border-radius: 14px; background: var(--if-surface-2); box-shadow: none; }
.account-tabs a, .lead-tabs a, .inbox-tabs a, .outreach-tabs a { padding: 8px 14px; border-radius: 10px; color: var(--if-muted); font-size: 13.5px; font-weight: 640; text-decoration: none; transition: background .15s, color .15s, box-shadow .15s; }
.account-tabs a:hover, .lead-tabs a:hover, .inbox-tabs a:hover, .outreach-tabs a:hover { background: var(--if-surface); color: var(--if-ink); }
.account-tabs a.is-active, .lead-tabs a.is-active, .inbox-tabs a.is-active, .outreach-tabs a.is-active { background: var(--if-surface); color: var(--if-accent-2); box-shadow: var(--if-shadow-sm); }
html[data-theme="dark"] .account-tabs a.is-active, html[data-theme="dark"] .lead-tabs a.is-active { background: var(--if-surface); color: #8fd8e7; }

/* Checkboxes and radios sit on the line of their label text. */
label > input[type="checkbox"], label > input[type="radio"] { display: inline-block; vertical-align: -3px; margin: 0 8px 0 0; }

/* Dark theme: app.css paints every button and the sidebar flat; restore the premium look and keep
   component buttons (menu toggles, chips, icon buttons) transparent. */
html[data-theme="dark"] .app-sidebar { background: linear-gradient(180deg, var(--if-sidebar-2) 0%, var(--if-sidebar) 60%); border-color: transparent; }
html[data-theme="dark"] button:not([class]), html[data-theme="dark"] .button:not(.secondary) { background: linear-gradient(180deg, #2a8ea3, #1d6f80); border-color: transparent; color: #fff; }
html[data-theme="dark"] .sidebar-section-toggle, html[data-theme="dark"] .sidebar-star, html[data-theme="dark"] .sidebar-info,
html[data-theme="dark"] .sidebar-nav-link, html[data-theme="dark"] .meeting-dialog-close, html[data-theme="dark"] .cal-popover-close,
html[data-theme="dark"] .cal-slot-add, html[data-theme="dark"] .meeting-lead-results button, html[data-theme="dark"] .link-button { background: transparent; border-color: transparent; }
html[data-theme="dark"] .sidebar-nav-link.is-active { background: linear-gradient(90deg, rgba(57, 163, 184, .3), rgba(57, 163, 184, .08)); }
html[data-theme="dark"] .meeting-dialog-close, html[data-theme="dark"] .cal-slot-add { border-color: var(--if-line); color: var(--if-muted); }
html[data-theme="dark"] .cal-chip { color: var(--if-ink); }
html[data-theme="dark"] .lead-meeting-btn, html[data-theme="dark"] .lead-meeting-inline-icon { background: var(--if-surface-2); border-color: var(--if-line); color: #7fd3e3; }
html[data-theme="dark"] .meeting-dialog, html[data-theme="dark"] .cal-popover, html[data-theme="dark"] .meeting-lead-results { background: var(--if-surface); border-color: var(--if-line); }
html[data-theme="dark"] .kpi-tile, html[data-theme="dark"] .cal-meeting { background: var(--if-surface); border-color: var(--if-line); }
html[data-theme="dark"] .cal-week-head, html[data-theme="dark"] .cal-week-head strong { color: var(--if-ink); }
html[data-theme="dark"] .account-tabs, html[data-theme="dark"] .lead-tabs, html[data-theme="dark"] .inbox-tabs, html[data-theme="dark"] .outreach-tabs { background: var(--if-surface-2); border-color: var(--if-line); }
