:root {
  --brand-blue: #037ef3;
  --brand-burgundy: #93032e;
  --brand-burgundy-dark: #740225;
  --brand-burgundy-soft: #f8e9ee;
  --brand-ink: #151515;
  --navy: var(--brand-ink);
  --ink: var(--brand-ink);
  --muted: #738296;
  --soft: #eff3f8;
  --line: #e6ebf1;
  --blue: var(--brand-blue);
  --blue-dark: #0068d1;
  --blue-soft: #e9f3ff;
  --green: #209568;
  --green-soft: #e8f7f0;
  --orange: #d68a27;
  --orange-soft: #fff4e2;
  --red: #d45d5d;
  --red-soft: #fff0ef;
  --shadow: 0 12px 32px rgba(26, 48, 73, .07);
  --on-brand: #fff;
  --button-primary: #0068d1;
  --button-hover: #005bb8;
  --button-ink: #fff;
  --accent-ink: #0068a0;
  --line-accent: #037ef3;
  --font-unified: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: var(--font-unified);
  --font-heading: var(--font-unified);
  --font-numeric: var(--font-unified);
  --system-font: var(--font-unified);
}

* { box-sizing: border-box; }
body { margin: 0; background: #fbf8f9; color: var(--ink); font-family: var(--font-unified); font-size: 14px; font-variant-numeric: lining-nums tabular-nums; }
body, body * { font-family: var(--font-unified) !important; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 252px; flex: 0 0 252px; background: #fff; border-right: 1px solid #edf0f4; padding: 25px 15px 16px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; justify-content: center; padding: 0; margin: 0 0 10px; }
.brand-logo { display: block; width: 100%; max-width: 196px; height: 84px; margin-inline: auto; object-fit: contain; object-position: center center; }
.skyera-home-button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 12px; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface, #fff); text-align: left; font-size: 11px; font-weight: 700; transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease; }
.skyera-home-button:hover { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 38%, var(--line)); background: var(--blue-soft); transform: translateY(-1px); }
.skyera-home-button svg { flex: 0 0 16px; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html[data-theme="dark"] .brand-logo.logo-contrast-backing { box-sizing: border-box; padding: 8px 10px; border-radius: 10px; background: #f7f7f8; filter: none; }
.brand-image-trigger { position: relative; display: grid; place-items: center; min-width: 0; padding: 0; border: 0; border-radius: 9px; background: transparent; color: inherit; cursor: pointer; }
.brand-image-trigger.admin-static-brand { cursor: default; pointer-events: none; }
.brand-image-trigger img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-image-trigger:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.brand-image-hint { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid #ffffff72; border-radius: 50%; color: #fff; background: #182332c9; font-size: 11px; line-height: 1; opacity: .78; transition: transform .2s ease, opacity .2s ease; }
.brand-image-trigger:hover .brand-image-hint, .brand-image-trigger:focus-visible .brand-image-hint { opacity: 1; transform: scale(1.08); }
.brand-logo-trigger { width: 100%; height: 84px; }
.brand-logo-trigger img { width: 100%; height: 84px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--blue); color: var(--on-brand); display: grid; place-items: center; font-family: var(--font-numeric), sans-serif; font-size: 21px; font-weight: 800; box-shadow: 0 5px 12px #037ef333; }
.brand strong { display: block; letter-spacing: .08em; color: #17324d; font-size: 13px; }
.brand span { display: block; color: #8a98a9; font-size: 9px; font-weight: 700; letter-spacing: .15em; margin-top: 2px; }
.workspace-label, .nav-label { font-size: 9px; font-weight: 700; letter-spacing: .14em; color: #9ba8b7; padding: 0 13px; margin-bottom: 10px; }
.department-select { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; margin-bottom: 29px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; color: var(--ink); }
.department-select { transition: background-color .22s ease, border-color .22s ease, transform .22s ease; }
.department-select[aria-expanded="true"] { border-color: color-mix(in srgb, var(--blue) 32%, var(--line)); background: color-mix(in srgb, var(--surface, #fff) 88%, var(--blue-soft)); }
.department-select[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.department-select .chevron { transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.workspace-switcher-popover { position: fixed; z-index: 80; width: min(310px, calc(100vw - 24px)); max-height: min(72vh, 560px); overflow: hidden; border: 1px solid color-mix(in srgb, var(--line) 72%, transparent); border-radius: 18px; background: rgba(255,255,255,.82); color: var(--ink); box-shadow: 0 22px 60px rgba(18,33,52,.2), 0 2px 8px rgba(18,33,52,.08); backdrop-filter: blur(24px) saturate(1.45); -webkit-backdrop-filter: blur(24px) saturate(1.45); opacity: 0; transform: translateY(-7px) scale(.985); transform-origin: top left; transition: opacity .22s ease, transform .28s cubic-bezier(.2,.8,.2,1); }
.workspace-switcher-popover[hidden] { display: none; }
.workspace-switcher-popover.is-open { opacity: 1; transform: translateY(0) scale(1); }
.workspace-switcher-heading { padding: 15px 17px 12px; border-bottom: 1px solid color-mix(in srgb, var(--line) 74%, transparent); }
.workspace-switcher-heading strong, .workspace-switcher-heading span { display: block; }
.workspace-switcher-heading strong { font: 750 13px var(--font-heading), sans-serif; }
.workspace-switcher-heading span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.workspace-switcher-list { max-height: calc(min(72vh, 560px) - 60px); overflow: auto; padding: 7px; overscroll-behavior: contain; }
.workspace-switcher-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 49px; padding: 6px 9px; border: 0; border-radius: 12px; background: transparent; color: inherit; text-align: left; transition: background-color .18s ease, transform .18s ease; }
.workspace-switcher-item:hover { background: color-mix(in srgb, var(--blue-soft) 72%, transparent); }
.workspace-switcher-item:active { transform: scale(.985); }
.workspace-switcher-item.is-active { background: color-mix(in srgb, var(--blue-soft) 80%, transparent); }
.workspace-switcher-mark { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb, var(--line) 72%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--surface, #fff) 70%, var(--surface-secondary, #f5f5f7)); color: var(--blue); font: 800 12px var(--font-numeric), sans-serif; }
.workspace-switcher-mark img { width: 100%; height: 100%; padding: 4px; object-fit: contain; }
.workspace-switcher-mark.skyera-mark { background: var(--blue-soft); }
.workspace-switcher-copy { flex: 1; min-width: 0; }
.workspace-switcher-copy strong, .workspace-switcher-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-switcher-copy strong { font-size: 11px; font-weight: 700; }
.workspace-switcher-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.workspace-switcher-check { color: var(--blue); font-size: 14px; font-weight: 800; }
.workspace-switcher-divider { height: 1px; margin: 6px 7px; background: color-mix(in srgb, var(--line) 80%, transparent); }
.department-select > span:nth-child(2) { flex: 1; }
.dept-icon { display: grid; flex: 0 0 31px; place-items: center; width: 31px; height: 31px; overflow: hidden; padding: 3px; border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); background: var(--brand-burgundy-soft); color: var(--blue); border-radius: 9px; }
.dept-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.dept-icon.skyera-mark { background: var(--blue-soft); }
.department-select strong, .department-select small { display: block; }
.department-select strong { font-size: 12px; }
.department-select small { color: #8a98a9; font-size: 10px; margin-top: 2px; }
.chevron { color: #9da9b7; }
.nav-label { margin-bottom: 8px; }
.nav-list { display: grid; gap: 4px; }
.nav-item { height: 41px; padding: 0 12px; border: 0; border-radius: 9px; color: #738296; background: transparent; text-align: left; display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; }
.nav-item:hover { background: #f6f8fb; color: var(--ink); }
.nav-item.active { color: var(--brand-burgundy); background: var(--brand-burgundy-soft); }
.nav-icon { display: grid; flex: 0 0 18px; place-items: center; width: 18px; min-width: 18px; height: 18px; text-align: center; font-size: 16px; line-height: 1; }
.nav-icon svg, .help-button svg, .icon-button svg { display: block; flex: 0 0 17px; width: 17px; min-width: 17px; max-width: 17px; height: 17px; min-height: 17px; max-height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skyera-home-button > svg, .theme-toggle > svg, .account-trigger > svg, .admin-shortcut-icon > svg, .suggestion-icon > svg, .search-box span > svg { display: block; flex: 0 0 auto; aspect-ratio: 1 / 1; }
.skyera-home-button > svg { width: 16px; min-width: 16px; max-width: 16px; height: 16px; min-height: 16px; max-height: 16px; }
.theme-toggle > svg { width: 17px; min-width: 17px; max-width: 17px; height: 17px; min-height: 17px; max-height: 17px; }
.account-trigger > svg { width: 14px; min-width: 14px; max-width: 14px; height: 14px; min-height: 14px; max-height: 14px; }
.admin-shortcut-icon > svg, .suggestion-icon > svg { width: 18px; min-width: 18px; max-width: 18px; height: 18px; min-height: 18px; max-height: 18px; }
.search-box span > svg { width: 16px; min-width: 16px; max-width: 16px; height: 16px; min-height: 16px; max-height: 16px; }
.brand-logo, .workspace-switcher-mark img, .pilot-mark img, .department-card-mark img,
.department-subsection-logo img, .admin-department-logo img, .profile-settings-avatar img {
  flex: 0 0 auto;
  object-fit: contain;
}
.language-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid #ece8eb; border-radius: 999px; background: #f8f7f8; }
.language-switch button { min-width: 34px; padding: 5px 8px; border: 0; border-radius: 999px; color: #8290a0; background: transparent; font-size: 9px; font-weight: 800; transition: color .2s ease, background .2s ease, box-shadow .2s ease; }
.language-switch button.active { color: var(--brand-burgundy); background: white; box-shadow: 0 1px 4px #30203316; }
.theme-toggle { display: grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 1px solid transparent; border-radius: 9px; color: #7d8b9b; background: transparent; transition: color .2s ease, background .2s ease, border-color .2s ease; }
.theme-toggle:hover { color: var(--brand-burgundy); background: #f7f4f5; border-color: #ece8eb; }
.theme-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-sun { display: none; }
.nav-count { margin-left: auto; color: #8796a8; background: #f0f3f7; border-radius: 6px; padding: 2px 7px; font-size: 10px; }
.tools-label { margin-top: 29px; }
.soon-dot { width: 6px; height: 6px; border-radius: 50%; background: #f0ae43; margin-left: auto; }
.sidebar-bottom { margin-top: auto; }
.sync-card { display: flex; align-items: center; gap: 9px; background: #f7f9fc; border: 1px solid #edf1f5; border-radius: 10px; padding: 10px; margin: 0 3px 15px; }
.sync-indicator { width: 8px; height: 8px; border-radius: 100%; background: #e0a342; box-shadow: 0 0 0 3px #f9eddb; }
.sync-card strong, .sync-card small { display: block; }
.sync-card strong { font-size: 10px; }
.sync-card small { font-size: 9px; color: #8a98a9; margin-top: 3px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; flex: 0 0 32px; }
.avatar-blue { background: #dceeff; color: #1973cc; }

.main-area { min-width: 0; flex: 1; }
.topbar { height: 66px; padding: 0 38px; background: #fff; border-bottom: 1px solid #edf0f4; display: flex; align-items: center; justify-content: space-between; }
.breadcrumbs { color: #9aa7b5; font-size: 11px; }
.breadcrumbs strong { color: #526276; font-weight: 600; }
.crumb-sep { margin: 0 10px; color: #c2cad3; }
.topbar-actions { position: relative; display: flex; align-items: center; gap: 16px; }
.icon-button, .help-button { border: 0; background: transparent; color: #7d8b9b; position: relative; }
.icon-button { font-size: 19px; }
.icon-button i { position: absolute; right: 0; top: 1px; width: 5px; height: 5px; border-radius: 50%; background: #ef8c75; border: 1px solid white; }
.notification-button { display: grid; place-items: center; width: 31px; height: 31px; padding: 0; }
.notification-count { position: absolute; top: -2px; right: -4px; min-width: 15px; height: 15px; padding: 0 4px; display: grid; place-items: center; border: 2px solid white; border-radius: 999px; color: white; background: var(--brand-burgundy); font-size: 8px; font-weight: 800; line-height: 1; }
.notification-count[hidden] { display: none; }
.notification-popover { position: absolute; z-index: 30; top: calc(100% + 16px); right: 78px; width: min(380px, calc(100vw - 100px)); overflow: hidden; border: 1px solid #e6ebf1; border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 18px 48px #18263824; }
.notification-popover[hidden] { display: none; }
.notification-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 12px; border-bottom: 1px solid #edf0f4; }
.notification-header strong, .notification-header small { display: block; }
.notification-header strong { color: #263d54; font: 800 12px var(--font-heading); }
.notification-header small { margin-top: 4px; color: #8795a5; font-size: 9px; }
.notification-close { width: 25px; height: 25px; border: 0; border-radius: 7px; color: #8390a0; background: transparent; font-size: 18px; line-height: 1; }
.notification-close:hover { background: #f1f4f7; }
.notification-list { max-height: min(65vh, 420px); overflow: auto; padding: 3px 14px; }
.notification-item { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 58px; border-bottom: 1px solid #f0f2f5; }
.notification-item:last-child { border-bottom: 0; }
.notification-item .followup-date { min-width: 56px; padding: 6px 4px; font-size: 8px; }
.notification-copy { min-width: 0; }
.notification-copy strong, .notification-copy small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.notification-copy strong { color: #344b61; font-size: 10px; }
.notification-copy small { margin-top: 4px; color: #96a3b1; font-size: 8px; }
.notification-item.read { opacity: .68; }
.notification-item.read .notification-copy strong { color: #728094; }
.notification-opened { display: inline-flex; width: fit-content; margin-top: 4px; color: #718197; font-size: 10px; font-weight: 650; }
.notification-opened[hidden] { display: none; }
.notification-item.read .notification-action { opacity: .72; }
.gmail-connect-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 18px 0 14px; }
.gmail-connect-row .form-help { flex-basis: 100%; }
.gmail-schedule-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px; margin: 12px 0 8px; border: 1px solid var(--line, #e6eaf0); border-radius: 12px; }
.gmail-enable { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.gmail-time-label { margin-left: auto; color: var(--muted, #73839a); font-size: 12px; }
.gmail-time { width: 120px; }
.gmail-schedule-row input[type="checkbox"] { accent-color: #087df0; }
.gmail-delivery-summary { padding: 11px 13px; margin: 10px 0 14px; border-radius: 9px; color: #587089; background: #f4f8fc; font-size: 11px; line-height: 1.5; }
.gmail-delivery-summary.has-errors { color: #8b3e42; background: #fff0f0; }
.gmail-recipients { margin: 14px 0; padding: 13px 15px; border: 1px solid #e6ebf1; border-radius: 12px; background: #fbfcfd; }
.gmail-recipients-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 8px; color: #344b61; font-size: 11px; }
.gmail-recipients-heading span { color: #8391a1; font-size: 10px; }
.gmail-recipient-row { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(130px, 1.5fr) auto; align-items: center; gap: 8px; min-height: 41px; border-top: 1px solid #edf0f4; }
.gmail-recipient-address { min-width: 0; overflow: hidden; color: #55708b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.gmail-recipient-address.missing { color: #b37d2b; }
.gmail-recipient-row .button { font-size: 10px; }
.gmail-recipients .form-help { margin: 9px 0 0; }
.gmail-test-form { display: grid; grid-template-columns: minmax(200px, 1fr) auto; align-items: end; gap: 9px 12px; padding: 14px; margin: 14px 0; border: 1px solid #e6ebf1; border-radius: 12px; }
.gmail-test-form .form-field, .gmail-test-form .form-help { margin: 0; }
.gmail-test-form .form-help { grid-column: 1 / -1; }
.gmail-test-form button:disabled { opacity: .55; cursor: wait; }
.gmail-runtime-note { padding: 9px 11px; margin: 10px 0; border-left: 3px solid #e2a93b; color: #805e1c; background: #fff8e8; }
.email-reminder-panel .reminder-template { min-height: 145px; }
.gmail-setup-guide { padding: 13px 15px; border: 1px solid #e4eaf0; border-radius: 11px; background: #f9fbfd; color: #586b7e; font-size: 12px; line-height: 1.65; }
.gmail-setup-guide summary { color: #344b61; font-weight: 700; cursor: pointer; }
.gmail-setup-guide ol { margin: 12px 0; padding-left: 20px; }
.gmail-setup-guide li + li { margin-top: 7px; }
.gmail-setup-guide a { color: #087df0; text-decoration: underline; text-underline-offset: 2px; }
.gmail-setup-guide p { margin: 8px 0 0; }
.gmail-preview-warning { margin: 12px 0; padding: 12px 14px; border: 1px solid #e2c78c; border-radius: 10px; color: #745722; background: #fff8e8; font-size: 12px; line-height: 1.55; }
.gmail-preview-warning code { font-size: 11px; }
.email-preview { max-height: 55vh; overflow: auto; padding: 16px; border: 1px solid #e4eaf0; border-radius: 10px; background: #f9fbfd; }
.email-preview pre { margin: 0; color: #344b61; font: inherit; font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


@media (max-width: 640px) { .gmail-time-label { margin-left: 0; } .gmail-connect-row > button { flex: 1 1 auto; } }
@media (max-width: 560px) { .gmail-test-form { grid-template-columns: 1fr; } .gmail-test-form .form-help { grid-column: auto; } .gmail-recipient-row { grid-template-columns: 1fr auto; padding: 7px 0; } .gmail-recipient-address { grid-column: 1; padding-left: 33px; } .gmail-recipient-row .button { grid-column: 2; grid-row: 1 / span 2; } }
.notification-action { padding: 6px 8px; border: 1px solid #e4eaf0; border-radius: 7px; color: #66768a; background: white; font-size: 9px; font-weight: 700; }
.notification-action:hover { border-color: #cbd6e2; color: var(--brand-burgundy); }
.notification-empty { padding: 24px 12px; color: #91a0af; text-align: center; font-size: 10px; }
.notification-desktop-wrap { border-top: 1px solid #edf0f4; padding: 11px 15px; }
.notification-desktop { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notification-desktop strong, .notification-desktop small { display: block; }
.notification-desktop strong { color: #344b61; font-size: 9px; }
.notification-desktop small, .notification-desktop-note { color: #8795a5; font-size: 8px; line-height: 1.45; }
.notification-desktop small { margin-top: 4px; }
.followup-more { padding: 10px 0 2px; color: #7e8c9c; text-align: center; font-size: 9px; }
.topbar-divider { height: 22px; width: 1px; background: var(--line); }
.help-button { font-size: 11px; display: flex; gap: 7px; align-items: center; }
.help-button:first-letter { border: 1px solid #aab5c2; border-radius: 50%; width: 15px; height: 15px; text-align: center; }
.page-content { max-width: 1440px; margin: 0 auto; padding: 30px 38px 52px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 25px; }
.eyebrow { color: var(--blue); font-size: 9px; letter-spacing: .16em; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
h1, h2, h3, p { margin-top: 0; }
h1 { color: var(--brand-ink); font-family: var(--font-heading), Arial, sans-serif; font-size: 26px; letter-spacing: -.04em; margin-bottom: 6px; }
.subheading { color: #8795a5; font-size: 12px; margin: 0; }
.heading-actions { display: flex; align-items: center; gap: 9px; }
.button { border: 1px solid transparent; border-radius: 10px; padding: 9px 13px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease, border-color .22s ease, background .22s ease, color .22s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--blue); color: var(--on-brand); box-shadow: 0 4px 10px #037ef326; }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { background: #fff; color: #66768a; border-color: #e4eaf0; }
.button-secondary:hover { border-color: #cbd6e2; color: var(--ink); }
.button-ghost { color: var(--blue); background: transparent; padding-left: 4px; padding-right: 4px; }
.button-danger { color: var(--red); background: var(--red-soft); }
.period-picker { display: inline-flex; border: 1px solid #e5eaf0; background: white; border-radius: 8px; padding: 3px; }
.period-picker button { border: 0; background: transparent; border-radius: 6px; padding: 6px 10px; color: #8a97a6; font-size: 10px; font-weight: 600; }
.period-picker button.active { background: #edf5ff; color: var(--blue); }
.dashboard-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; }
.metric-card { background: linear-gradient(155deg, #fff 0%, #fff 72%, #fcfbfc 100%); border: 1px solid #edf0f4; border-radius: 16px; padding: 17px 18px; min-height: 116px; box-shadow: 0 2px 5px #263e5605; transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s ease, border-color .28s ease; }
.metric-card:hover { transform: translateY(-2px); border-color: #e4dfe4; box-shadow: 0 10px 28px #263e560c; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: #8b99a9; font-size: 10px; font-weight: 600; }
.metric-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; font-size: 14px; }
.metric-icon.blue { color: var(--blue); background: #e9f4ff; }
.metric-icon.green { color: var(--green); background: #e8f7f0; }
.metric-icon.orange { color: var(--orange); background: #fff4e3; }
.metric-icon.purple { color: #7962c3; background: #f1edff; }
.icon-svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.metric-value { font-family: var(--font-numeric), Arial, sans-serif; color: #21384f; font-size: 27px; line-height: 1; font-weight: 800; letter-spacing: -.04em; margin: 14px 0 7px; }
.metric-foot { font-size: 9px; color: #95a2b0; }
.metric-foot .positive { color: var(--green); font-weight: 700; }
.metric-foot .neutral { color: #8795a5; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .85fr); gap: 14px; margin-top: 16px; }
.panel { background: #fff; border: 1px solid #edf0f4; border-radius: 16px; box-shadow: 0 2px 5px #263e5605; min-width: 0; transition: box-shadow .25s ease, border-color .25s ease; }
.panel-header { padding: 17px 19px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f0f2f5; }
.panel-title { font-family: var(--font-heading), Arial, sans-serif; font-size: 13px; font-weight: 800; color: #263d54; margin: 0; }
.panel-subtitle { color: #9aa6b4; font-size: 9px; margin-top: 4px; }
.panel-body { padding: 16px 19px; }
.funnel-grid { display: grid; grid-template-columns: 1fr 18px 1fr 18px 1fr 18px 1fr; align-items: center; gap: 8px; }
.funnel-grid div { display: grid; gap: 7px; }
.funnel-grid span { color: #8b99a9; font-size: 9px; }
.funnel-grid strong { color: #244058; font: 800 21px Manrope, sans-serif; }
.funnel-grid small { color: #9aa7b5; font-size: 8px; }
.funnel-grid i { color: #b7c2ce; font-size: 19px; font-style: normal; text-align: center; }
.performance-table, .leads-table, .meetings-table { width: 100%; border-collapse: collapse; }
.performance-table th, .leads-table th, .meetings-table th { text-align: left; color: #9ba7b5; font-size: 9px; font-weight: 600; padding: 10px 9px; white-space: nowrap; border-bottom: 1px solid #edf0f4; }
.performance-table td, .leads-table td, .meetings-table td { padding: 11px 9px; border-bottom: 1px solid #f0f2f5; font-size: 10px; color: #627286; }
.performance-table tbody tr:last-child td, .leads-table tbody tr:last-child td, .meetings-table tbody tr:last-child td { border-bottom: 0; }
.member-cell { display: flex; align-items: center; gap: 8px; white-space: nowrap; color: #354b61; font-weight: 600; }
.member-cell .avatar { width: 25px; height: 25px; flex-basis: 25px; font-size: 8px; }
.member-roster-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0f2f5; }
.member-roster-row:last-child { border-bottom: 0; }
.member-roster-row .button { padding: 6px 9px; font-size: 9px; }
.progress-cell { min-width: 95px; }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 5px; color: #8d9aaa; font-size: 9px; }
.progress-track { width: 100%; height: 5px; border-radius: 4px; overflow: hidden; background: #edf1f5; }
.progress-track span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3a91e7, #78b8f3); transition: width .72s cubic-bezier(.2,.8,.2,1); }
.progress-track span.good { background: #47b887; }
.progress-track span.warn { background: #e8ab4d; }
.activity-list { display: grid; }
.activity-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1f3f6; }
.activity-item:last-child { border-bottom: 0; padding-bottom: 0; }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; background: #62aef4; margin-top: 4px; flex: 0 0 7px; box-shadow: 0 0 0 3px #eef6ff; }
.activity-copy { min-width: 0; flex: 1; color: #53667b; font-size: 10px; line-height: 1.45; }
.activity-copy strong { color: #293f55; font-weight: 700; }
.activity-copy small { display: block; color: #a0acb8; font-size: 9px; margin-top: 4px; }
.followup-grid { margin-top: 16px; grid-template-columns: 1fr; }
.followup-list { padding: 4px 19px 12px; }
.followup-row { min-height: 58px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #f0f2f5; animation: followup-in .32s both; }
.followup-row:last-child { border-bottom: 0; }
.followup-date { min-width: 66px; padding: 6px 8px; text-align: center; border-radius: 8px; font-size: 9px; font-weight: 700; }
.followup-date.overdue { color: #aa4d4d; background: #fff0ef; }
.followup-date.today { color: #a36e20; background: #fff5e5; }
.followup-date.upcoming { color: #426f9d; background: #edf5fd; }
.followup-copy { flex: 1; min-width: 0; }
.followup-copy strong, .followup-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.followup-copy strong { color: #344b61; font-size: 10px; }
.followup-copy small { color: #96a3b1; margin-top: 4px; font-size: 9px; }
.followup-row .button { padding: 7px 10px; font-size: 9px; }
.followup-empty { padding: 22px 0; color: #91a0af; text-align: center; font-size: 10px; }
.department-pilot-card { display: flex; align-items: center; gap: 18px; padding: 20px; border: 1px solid #ead8df; border-radius: 17px; background: linear-gradient(120deg, #fff 0%, #fcf5f7 100%); box-shadow: 0 5px 20px #4b102010; }
.pilot-mark { display: grid; place-items: center; flex: 0 0 54px; height: 54px; border: 1px solid #f0dce3; border-radius: 15px; color: var(--brand-burgundy); background: #fff; font: 800 12px var(--font-numeric), sans-serif; box-shadow: 0 5px 14px #93032e12; }
.pilot-mark img { display: block; width: 43px; height: 34px; object-fit: contain; }
.pilot-logo-trigger { width: 100%; height: 100%; }
.pilot-logo-trigger img { width: 43px; height: 34px; }
.pilot-copy { flex: 1; min-width: 0; }
.pilot-copy h2 { margin: 7px 0 3px; color: #263d54; font: 800 16px var(--font-heading), sans-serif; }
.pilot-copy p { margin: 0; color: #8795a5; font-size: 10px; }
.module-status { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; color: #758292; background: #f0f2f5; font-size: 8px; font-weight: 700; white-space: nowrap; }
.module-status.active { color: #228560; background: #eaf7f0; }
.departments-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 16px; }
.department-card { min-height: 138px; padding: 16px; border: 1px solid #edf0f4; border-radius: 15px; background: #fff; transition: transform .24s cubic-bezier(.2,.8,.2,1), box-shadow .24s ease, border-color .24s ease; }
.department-card:hover { transform: translateY(-2px); border-color: #e3d7dc; box-shadow: 0 10px 24px #263e560d; }
.department-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.department-card-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--brand-burgundy); background: var(--brand-burgundy-soft); font-size: 9px; font-weight: 800; }
.department-card-mark img { display: block; width: 27px; height: 27px; object-fit: contain; }
.department-card-mark .brand-image-hint { top: -3px; right: -3px; width: 15px; height: 15px; font-size: 9px; }
.department-card h2 { margin: 14px 0 4px; color: #263d54; font: 800 15px var(--font-heading), sans-serif; }
.department-card p, .department-footnote { margin: 0; color: #909cab; font-size: 10px; }
.department-card .department-setup-button { margin-top: 13px; padding: 7px 9px; font-size: 9px; }
.department-card-actions { display: flex; gap: 7px; }
.department-footnote { margin-top: 15px; line-height: 1.6; }
.nav-hidden { display: none !important; }
.department-subsection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 820px; }
.department-subsection-card { display: grid; justify-items: stretch; gap: 11px; padding: 22px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface, #fff); color: var(--ink); text-align: left; box-shadow: var(--shadow); transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease; }
.department-subsection-card:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: 0 14px 32px #172a3d18; }
.department-subsection-logo { display: grid; place-items: center; width: 100%; height: 150px; }
.department-subsection-logo img { width: 100%; height: 150px; object-fit: contain; }
.department-subsection-open { display: grid; justify-items: start; gap: 8px; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.department-subsection-card strong { font: 800 21px var(--font-heading), sans-serif; }
.department-subsection-open > span:not(.button) { color: var(--muted); font-size: 11px; }
.department-subsection-card .button { margin-top: 3px; }
.department-workspace-hero { display: flex; align-items: center; gap: 24px; max-width: 920px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface, #fff); box-shadow: var(--shadow); }
.workspace-logo-static { display: grid; place-items: center; flex: 0 0 190px; width: 190px; height: 120px; }
.workspace-logo-static img { max-width: 100%; max-height: 100%; object-fit: contain; }
.workspace-logo-trigger { flex: 0 0 190px; width: 190px; height: 120px; }
.workspace-logo-trigger img { width: 190px; height: 120px; object-fit: contain; }
.workspace-logo-static .workspace-logo-trigger { width: 100%; height: 100%; }
.workspace-logo-static .workspace-logo-trigger img { max-width: 100%; max-height: 100%; }
.department-workspace-hero h2 { margin: 12px 0 5px; font: 800 20px var(--font-heading), sans-serif; }
.department-workspace-hero p { margin: 0; color: var(--muted); font-size: 11px; }
.department-welcome { display: inline-flex; width: fit-content; max-width: 100%; margin: 6px 0 9px !important; padding: 8px 11px; border: 1px solid var(--blue-soft); border-radius: 999px; color: var(--brand-burgundy) !important; background: var(--blue-soft); font: 700 10px var(--font-heading), sans-serif; }
.department-coming-soon { max-width: 920px; margin-top: 16px; }
.department-member-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.department-member-chips span { padding: 6px 9px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 10px; }
.admin-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.admin-department-panel { margin-top: 16px; }
.admin-department-list { padding: 2px 18px; }
.admin-master-brand-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid #edf0f4; }
.admin-department-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid #edf0f4; }
.admin-department-row:last-child { border-bottom: 0; }
.admin-department-logo { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); }
.admin-department-logo img { width: 30px; height: 30px; }
.admin-department-logo .brand-image-hint { top: -4px; right: -4px; width: 16px; height: 16px; font-size: 9px; }
.admin-department-copy { min-width: 0; }
.admin-department-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-department-title strong { color: #263d54; font: 800 11px var(--font-heading), sans-serif; }
.admin-department-copy p { margin: 4px 0 0; color: #8997a7; font-size: 9px; line-height: 1.5; }
.admin-department-actions { display: flex; gap: 6px; }
.avatar-photo { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.profile-modal { display: flex; align-items: center; gap: 13px; padding: 18px 22px 0; }
.profile-modal-avatar { width: 58px; height: 58px; flex: 0 0 58px; overflow: hidden; font-size: 16px; }
.profile-modal > div { display: grid; gap: 4px; min-width: 0; }
.profile-modal strong { color: var(--brand-ink); font-size: 13px; }
.profile-modal small { color: var(--muted, #8290a0); font-size: 10px; }
.department-admin-intro { margin-bottom: 14px; border-color: color-mix(in srgb, var(--blue) 26%, var(--line)); }
.department-admin-intro .panel-body { display: grid; gap: 9px; }
.department-admin-intro h2 { margin: 0; color: var(--brand-ink); font: 800 17px var(--font-heading), sans-serif; }
.department-admin-intro p { margin: 0; color: var(--muted, #8190a1); font-size: 11px; line-height: 1.55; }
.department-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
.department-theme-panel, .department-team-panel { margin-bottom: 14px; }
.department-appearance-page { display: grid; gap: 14px; }
.department-appearance-page .department-theme-panel { margin-bottom: 0; }
.department-palette-picker { padding: 14px 18px 4px; }
.department-palette-picker .department-palette-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.unified-font-note { display: flex; align-items: center; gap: 11px; margin: 16px 0 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--brand-ink); background: var(--surface-secondary, #f5f5f7); }
.unified-font-note > span:first-child { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; color: var(--brand-blue); background: var(--blue-soft); font-size: 15px; font-weight: 700; letter-spacing: -.06em; }
.unified-font-note strong, .unified-font-note small { display: block; }
.unified-font-note strong { font-size: 11px; }
.unified-font-note small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.department-palette-option { display: grid; align-content: start; gap: 9px; min-height: 88px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; color: var(--brand-ink); background: var(--surface, #fff); text-align: left; cursor: pointer; transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.department-palette-option:hover { border-color: var(--brand-blue); transform: translateY(-1px); }
.department-palette-option.is-active { border-color: var(--brand-blue); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-blue) 20%, transparent); }
.department-palette-option strong { font-size: 11px; }
.department-palette-option small { color: var(--muted); font-size: 9px; }
.department-palette-option .department-palette-swatches { gap: 6px; }
.department-palette-option .department-palette-swatches i { width: 22px; height: 22px; border-radius: 7px; }
.department-palette-option:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-blue) 48%, transparent); outline-offset: 2px; }
.department-theme-panel > .panel-header { margin-bottom: 0; }
.department-appearance-shortcut .panel-body { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.department-appearance-shortcut .panel-title { margin: 0; }
.department-appearance-shortcut .page-note { margin: 5px 0 0; }
.department-appearance-shortcut .button { flex: 0 0 auto; }
.department-team-management { display: grid; gap: 12px; }
.teams-overview { display: grid; gap: 14px; }
.teams-overview-intro { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: color-mix(in srgb, var(--surface-secondary, #f7f9fc) 82%, transparent); }
.teams-overview-intro p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.teams-department-list { display: grid; gap: 10px; }
.teams-department-group { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface, #fff); }
.teams-department-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 12px 15px; cursor: pointer; list-style: none; }
.teams-department-group > summary::-webkit-details-marker { display: none; }
.teams-department-group > summary > span { display: grid; gap: 4px; }
.teams-department-group > summary strong { color: var(--brand-ink); font: 750 13px var(--font-heading), sans-serif; }
.teams-department-group > summary small { color: var(--muted); font-size: 9px; }
.teams-department-group > summary > i { color: var(--muted); font-size: 16px; font-style: normal; transition: transform .2s ease; }
.teams-department-group[open] > summary { border-bottom: 1px solid var(--line); }
.teams-department-group[open] > summary > i { transform: rotate(180deg); }
.teams-department-content { padding: 12px; }
.teams-department-content .department-team-management { gap: 0; }
.teams-department-content .department-team-list { gap: 8px; }
.department-team-management-header, .team-calendar-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.department-team-management-header h3, .team-calendar-heading h4, .team-unassigned-list h3 { margin: 0; color: var(--brand-ink); font: 750 13px var(--font-heading), sans-serif; }
.department-team-management-header p, .team-calendar-heading small { display: block; margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.department-team-list { display: grid; gap: 9px; }
.department-team-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); }
.department-team-card > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 10px 13px; cursor: pointer; list-style: none; }
.department-team-card > summary::-webkit-details-marker { display: none; }
.department-team-card > summary > span { display: grid; gap: 4px; }
.department-team-card > summary strong { color: var(--brand-ink); font-size: 12px; }
.department-team-card > summary small { color: var(--muted); font-size: 9px; }
.department-team-card > summary > i { color: var(--muted); font-size: 15px; font-style: normal; transition: transform .2s ease; }
.department-team-card[open] > summary { border-bottom: 1px solid var(--line); }
.department-team-card[open] > summary > i { transform: rotate(180deg); }
.department-team-card-body { display: grid; gap: 13px; padding: 12px; }
.department-team-card-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.department-team-card-actions .button { min-height: 32px; padding: 6px 10px; font-size: 10px; }
.department-team-members { display: grid; }
.department-team-member { display: grid; grid-template-columns: 32px minmax(100px, 1fr) auto auto; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.department-team-member:last-child { border-bottom: 0; }
.department-team-member .admin-user-avatar { width: 30px; height: 30px; }
.department-team-member .admin-user-copy strong { font-size: 10px; }
.department-team-member .admin-user-copy span { font-size: 9px; }
.team-member-actions { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.team-member-actions .button { min-height: 30px; padding: 5px 8px; font-size: 9px; white-space: nowrap; }
.schedule-status { padding: 5px 7px; border-radius: 999px; font-size: 8px; font-weight: 700; white-space: nowrap; }
.schedule-status.complete { color: #187452; background: #e6f6ef; }
.schedule-status.pending { color: #8a641e; background: #fff4dd; }
.team-empty-state, .schedule-empty-row { padding: 14px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.team-unassigned-list { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.team-unassigned-list h3 { margin-bottom: 2px; font-size: 11px; }
.team-calendar-wrap { display: grid; gap: 10px; padding-top: 13px; border-top: 1px solid var(--line); }
.team-calendar-heading { align-items: center; }
.team-calendar-heading h4 { font-size: 11px; }
.team-calendar-heading .module-status { flex: 0 0 auto; }
.team-calendar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.team-calendar-day { display: grid; grid-template-columns: minmax(125px, .85fr) minmax(0, 1.15fr); gap: 10px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-secondary, #f8f9fb); }
.team-calendar-day-title > strong, .team-calendar-day-title > small { display: block; }
.team-calendar-day-title > strong { color: var(--brand-ink); font-size: 10px; line-height: 1.35; }
.team-calendar-day-title time { font: inherit; }
.team-calendar-day-title > small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.team-free-slots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.team-free-slot { padding: 4px 6px; border-radius: 6px; color: #187452; background: #e6f6ef; font-size: 8px; font-weight: 700; white-space: nowrap; }
.team-calendar-lessons { display: grid; align-content: start; gap: 4px; }
.team-class-row { display: flex; align-items: flex-start; gap: 7px; padding: 4px 0; }
.team-class-row time { flex: 0 0 auto; color: var(--muted); font-size: 8px; font-variant-numeric: tabular-nums; }
.team-class-row > span { display: grid; gap: 2px; min-width: 0; }
.team-class-row strong { overflow: hidden; color: var(--brand-ink); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.team-class-row small, .team-calendar-no-class { color: var(--muted); font-size: 8px; }
.schedule-modal-note { margin: 0 0 12px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.schedule-slot-list { display: grid; gap: 8px; }
.schedule-slot-row { display: grid; grid-template-columns: 1fr 100px 100px 1.2fr 1.2fr 32px; align-items: center; gap: 7px; }
.schedule-slot-row .form-control { min-width: 0; height: 38px; padding: 7px; font-size: 10px; }
.schedule-slot-row .button { min-width: 32px; height: 32px; padding: 0; font-size: 18px; }
.schedule-modal-actions { padding-top: 10px; }
html[data-theme="dark"] .department-team-card, html[data-theme="dark"] .team-calendar-day, html[data-theme="dark"] .teams-department-group { background: var(--surface-secondary, #20242b); border-color: var(--separator, #363d48); }
html[data-theme="dark"] .teams-overview-intro { border-color: var(--separator, #363d48); background: color-mix(in srgb, var(--surface-secondary, #20242b) 82%, transparent); }
html[data-theme="dark"] .team-calendar-wrap, html[data-theme="dark"] .team-unassigned-list { border-color: var(--separator, #363d48); }
html[data-theme="dark"] .schedule-status.complete, html[data-theme="dark"] .team-free-slot { color: #8de0bd; background: #193b31; }
html[data-theme="dark"] .schedule-status.pending { color: #f2cc7d; background: #40351f; }
@media (max-width: 880px) {
  .department-team-member { grid-template-columns: 30px minmax(90px, 1fr) auto auto; }
  .department-team-member .schedule-status { grid-column: 3; grid-row: 2; justify-self: end; }
  .team-member-actions { grid-column: 2 / -1; grid-row: 3; flex-direction: row; align-items: center; }
  .schedule-slot-row { grid-template-columns: 1fr 90px 90px 1.2fr 1.2fr 32px; overflow-x: auto; }
}
@media (max-width: 600px) {
  .department-team-management-header, .team-calendar-heading { align-items: flex-start; flex-direction: column; }
  .teams-overview-intro { align-items: flex-start; flex-direction: column; }
  .department-team-member { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 7px; }
  .department-team-member .role-pill { grid-column: 3; grid-row: 1; justify-self: end; }
  .department-team-member .schedule-status { grid-column: 2; grid-row: 2; justify-self: start; }
  .department-team-member .schedule-status { grid-column: 2; grid-row: 2; justify-self: start; }
  .team-member-actions { grid-column: 1 / -1; grid-row: 3; flex-direction: row; align-items: center; }
  .team-calendar-grid { grid-template-columns: 1fr; }
  .team-calendar-day { grid-template-columns: minmax(110px, .8fr) minmax(0, 1.2fr); }
  .schedule-slot-row { grid-template-columns: 1fr 1fr 1fr 32px; }
  .schedule-slot-row [name="course"], .schedule-slot-row [name="location"] { grid-row: 2; }
  .schedule-slot-row [name="course"] { grid-column: 1 / span 2; }
  .schedule-slot-row [name="location"] { grid-column: 3; }
  .schedule-slot-row .button { grid-column: 4; grid-row: 1 / span 2; }
}
.management-category-list { display: grid; gap: 12px; }
.management-category { overflow: visible; border: 1px solid var(--line); border-radius: 16px; background: var(--surface, #fff); box-shadow: 0 2px 10px #182d4308; }
.management-category-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 13px 17px; cursor: pointer; list-style: none; }
.management-category-summary::-webkit-details-marker { display: none; }
.management-category-summary > span { display: grid; gap: 4px; min-width: 0; }
.management-category-summary strong { color: var(--brand-ink); font: 750 13px var(--font-heading), sans-serif; }
.management-category-summary small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.management-category-summary > i { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: 16px; font-style: normal; transition: transform .24s ease, color .2s ease, background .2s ease; }
.management-category[open] > .management-category-summary { border-bottom: 1px solid var(--line); }
.management-category[open] > .management-category-summary > i { transform: rotate(180deg); color: var(--blue); background: var(--blue-soft); }
.management-category-body { padding: 12px; animation: management-reveal .24s ease both; }
.management-category-body > :first-child { margin-top: 0; }
@keyframes management-reveal { from { opacity: .65; } to { opacity: 1; } }
.department-palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 9px; }
.department-palette-swatches { display: flex; gap: 4px; }
.department-palette-swatches i { width: 19px; height: 19px; border: 1px solid #00000018; border-radius: 6px; background: var(--swatch); }
.department-team-panel .panel-body { padding-top: 10px; }
html[data-theme="dark"] .department-admin-intro { background: var(--surface, #191c22); border-color: var(--separator, #303741); }
html[data-theme="dark"] .department-palette-option { color: var(--label-primary, #edf0f4); background: var(--surface-secondary, #20242b); border-color: var(--separator, #363d48); }
html[data-theme="dark"] .profile-modal strong { color: #edf0f4; }
@media (max-width: 540px) {
  .department-appearance-shortcut .panel-body { align-items: stretch; flex-direction: column; }
  .management-category-summary { min-height: 62px; padding: 11px 13px; }
  .management-category-summary strong { font-size: 12px; }
  .management-category-body { padding: 8px; }
}
.admin-department-actions .button { padding: 7px 10px; font-size: 9px; }
.admin-shortcuts-wrap { margin-top: 21px; }
.admin-shortcuts-wrap > div:first-child { margin-bottom: 10px; }
.admin-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.admin-shortcut { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface, #fff); text-align: left; box-shadow: 0 2px 5px #263e5605; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.admin-shortcut:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: var(--shadow); }
.admin-shortcut-icon { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-size: 16px; }
.admin-shortcut > span:nth-child(2) { display: grid; gap: 4px; flex: 1; min-width: 0; }
.admin-shortcut strong { color: #263d54; font: 700 10px var(--font-heading), sans-serif; }
.admin-shortcut small { color: #8997a7; font-size: 8px; line-height: 1.4; }
.admin-shortcut-arrow { color: var(--muted); font-size: 19px; }
.admin-management-panel, .admin-kpi-panel { margin-top: 16px; }
.admin-audit-panel { margin-top: 16px; }
.audit-log-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.audit-log-row:last-child { border-bottom: 0; }
.audit-log-main { display: grid; gap: 4px; min-width: 0; }
.audit-log-main strong { overflow-wrap: anywhere; font-size: 11px; }
.audit-log-main > span, .audit-log-meta { color: var(--muted); font-size: 9px; }
.audit-log-meta { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex: 0 0 auto; text-align: right; }
.audit-log-meta small { white-space: nowrap; }
.admin-user-list, .admin-department-people-list, .admin-kpi-list { display: grid; gap: 9px; }
.admin-user-row { display: grid; grid-template-columns: 34px minmax(130px, 1fr) auto auto; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.admin-user-row:last-child { border-bottom: 0; }
.admin-user-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 800; }
.admin-user-copy { display: grid; gap: 3px; min-width: 0; }
.admin-user-copy strong { color: var(--brand-ink); font-size: 11px; }
.admin-user-copy span, .admin-empty-state { color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.role-pill, .pending-pill { display: inline-flex; align-items: center; justify-content: center; padding: 5px 8px; border-radius: 999px; color: #315271; background: #edf3f8; font-size: 8px; font-weight: 700; }
.pending-pill { color: #885d15; background: #fff2d7; }
.admin-security-note { display: grid; gap: 4px; margin-bottom: 9px; padding: 11px 12px; border: 1px solid #ead59e; border-radius: 9px; background: #fff9e9; color: #715317; font-size: 9px; line-height: 1.5; }
.admin-security-note strong { font-size: 10px; }
.admin-unit-people { border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); overflow: hidden; }
.admin-unit-people > summary, .admin-kpi-department > summary { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(115px, auto); align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.admin-unit-people > summary::-webkit-details-marker, .admin-kpi-department > summary::-webkit-details-marker, .admin-kpi-item > summary::-webkit-details-marker { display: none; }
.admin-unit-people > summary::after, .admin-kpi-department > summary::after { content: "⌄"; grid-column: 2; grid-row: 1; justify-self: end; color: var(--muted); transition: transform .18s ease; }
.admin-unit-people[open] > summary::after, .admin-kpi-department[open] > summary::after { transform: rotate(180deg); }
.admin-unit-people > summary span:first-child { color: var(--brand-ink); font-size: 11px; font-weight: 800; }
.admin-unit-people > summary span:last-child { color: var(--muted); font-size: 9px; text-align: right; padding-right: 20px; }
.admin-unit-people-body { padding: 0 14px 13px; }
.admin-kpi-department { border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); overflow: hidden; }
.admin-kpi-department > summary { grid-template-columns: minmax(105px, 1fr) repeat(2, minmax(115px, auto)) auto 16px; }
.admin-kpi-department > summary::after { grid-column: 5; }
.admin-kpi-dept-name { color: var(--brand-ink); font-size: 11px; font-weight: 800; }
.admin-kpi-period { display: grid; gap: 3px; }
.admin-kpi-period small { color: var(--muted); font-size: 8px; }
.admin-kpi-period strong { color: var(--brand-ink); font-size: 10px; }
.admin-kpi-department > summary .module-status { justify-self: end; margin-right: 19px; }
.admin-kpi-breakdown { display: grid; gap: 8px; padding: 0 14px 14px; border-top: 1px solid var(--line); }
.admin-kpi-item { border-bottom: 1px solid var(--line); }
.admin-kpi-item > summary { display: grid; grid-template-columns: minmax(120px, 1fr) repeat(2, minmax(110px, auto)); gap: 10px; align-items: center; padding: 10px 2px; cursor: pointer; list-style: none; }
.admin-kpi-item > summary strong { color: var(--brand-ink); font-size: 10px; }
.admin-kpi-item > summary span { color: var(--muted); font-size: 9px; text-align: right; }
.admin-kpi-targets { display: flex; justify-content: flex-end; gap: 10px; padding: 4px 0; }
.admin-kpi-targets label { display: grid; gap: 4px; width: min(190px, 50%); color: var(--muted); font-size: 8px; font-weight: 700; }
.admin-kpi-targets .form-control, .admin-kpi-member-row .form-control { padding: 6px 7px; font-size: 9px; }
.admin-kpi-member-heading, .admin-kpi-member-row { display: grid; grid-template-columns: minmax(135px, 1.3fr) repeat(4, minmax(95px, 1fr)); gap: 8px; align-items: center; }
.admin-kpi-member-heading { padding: 7px 0; color: var(--muted); font-size: 7px; font-weight: 800; }
.admin-kpi-member-row { padding: 7px 0; border-top: 1px solid var(--line); }
.admin-kpi-member-row > strong { display: grid; gap: 3px; color: var(--brand-ink); font-size: 9px; }
.admin-kpi-member-row > strong small, .admin-kpi-member-row label span { color: var(--muted); font-size: 8px; }
.admin-kpi-member-row label { display: grid; gap: 4px; }
.admin-kpi-member-row > span { color: var(--muted); font-size: 8px; }
.admin-kpi-member-row .form-control { min-width: 0; }
html[data-theme="dark"] .admin-security-note { color: #f0d99e; background: #302817; border-color: #5a4720; }
html[data-theme="dark"] .role-pill { color: #c5d6e7; background: #2b333d; }
html[data-theme="dark"] .pending-pill { color: #f2d58f; background: #392f1d; }
html[data-theme="dark"] .admin-unit-people, html[data-theme="dark"] .admin-kpi-department { background: #191c22; border-color: #303741; }
@keyframes followup-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.target-card { background: linear-gradient(135deg, #0879e8, #2a9afa); color: white; border-radius: 12px; padding: 18px; margin-top: 14px; position: relative; overflow: hidden; }
.target-card:after { content: ""; position: absolute; right: -38px; top: -55px; width: 145px; height: 145px; border: 1px solid #ffffff25; border-radius: 50%; box-shadow: 0 0 0 18px #ffffff12, 0 0 0 38px #ffffff0a; }
.target-card .target-title { font-weight: 700; font-size: 11px; }
.target-card .target-copy { color: #d9edff; font-size: 9px; margin: 4px 0 15px; }
.target-total { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-numeric); font-size: 23px; font-weight: 800; }
.target-total small { font: 10px "DM Sans", sans-serif; color: #dbedff; }
.target-card .progress-track { background: #ffffff45; margin-top: 9px; height: 6px; }
.target-card .progress-track span { background: #fff; }
.suggestion-banner { display: flex; align-items: center; gap: 11px; padding: 12px 15px; border-radius: 10px; background: #edf6ff; border: 1px solid #deedff; margin: 14px 0; color: #46647f; font-size: 10px; }
.suggestion-icon { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border-radius: 8px; color: var(--blue); background: white; font-weight: 800; }
.suggestion-banner strong { color: #1d5d98; }
.suggestion-banner .suggestion-copy { flex: 1; }
.suggestion-banner button { flex: 0 0 auto; }

.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 13px; }
.search-box { position: relative; flex: 1; min-width: 190px; }
.search-box span { position: absolute; left: 11px; top: 8px; color: #9aa7b5; font-size: 13px; }
.search-box input { width: 100%; padding: 9px 12px 9px 32px; border: 1px solid #e5eaf0; border-radius: 8px; outline: none; background: white; color: var(--ink); font-size: 10px; }
.search-box input:focus, .form-control:focus { border-color: #84bdff; box-shadow: 0 0 0 3px #e5f2ff; }
.select-filter { padding: 9px 28px 9px 10px; border: 1px solid #e5eaf0; border-radius: 8px; color: #6d7d90; background: white; font-size: 10px; }
.table-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
.leads-table { min-width: 850px; }
.company-cell { display: flex; align-items: center; gap: 9px; min-width: 150px; }
.company-logo { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #eff5fb; color: #56718d; font-size: 10px; font-weight: 800; flex: 0 0 28px; }
.company-cell strong, .company-cell small { display: block; }
.company-cell strong { color: #344b61; font-size: 10px; font-weight: 700; }
.company-cell small { color: #9aa7b5; font-size: 9px; margin-top: 3px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 20px; font-size: 9px; font-weight: 600; white-space: nowrap; }
.status-pill:before { content: ""; width: 5px; height: 5px; border-radius: 100%; background: currentColor; }
.status-new { color: #537aa3; background: #edf5fd; }
.status-no-answer { color: #a07834; background: #fff6e8; }
.status-call-later { color: #8b71ba; background: #f3effb; }
.status-positive, .status-meeting { color: #228560; background: #eaf7f0; }
.status-negative, .status-not-interested { color: #b86161; background: #fff0ef; }
.status-closed { color: #647285; background: #eff2f5; }
.table-action { border: 0; background: transparent; color: #74869a; font-size: 16px; padding: 4px 7px; border-radius: 6px; }
.table-action:hover { color: var(--blue); background: #eef6ff; }
.table-footer { border-top: 1px solid #eff2f5; padding: 12px 17px; display: flex; align-items: center; justify-content: space-between; color: #9aa7b5; font-size: 9px; }
.lead-pagination { display: flex; align-items: center; gap: 9px; }
.lead-pagination .button { padding: 6px 9px; font-size: 9px; }
.lead-pagination .button:disabled { opacity: .45; cursor: not-allowed; }
.empty-state { text-align: center; padding: 36px 15px; color: #91a0af; font-size: 11px; }
.empty-state strong { display: block; color: #496177; margin-bottom: 5px; }
.target-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .8fr); gap: 14px; }
.goal-input { width: 72px; border: 1px solid #e4eaf0; background: white; border-radius: 6px; padding: 6px; color: var(--ink); font-size: 10px; text-align: center; }
.goal-number { color: #40566d; font-weight: 700; }
.month-picker { border: 1px solid #e4eaf0; background: white; padding: 8px 10px; border-radius: 8px; font-size: 10px; color: #6c7d90; }
.meeting-card { display: flex; align-items: flex-start; gap: 12px; border-bottom: 1px solid #eef1f5; padding: 14px 0; }
.meeting-card:last-child { border: 0; }
.meeting-date { flex: 0 0 40px; text-align: center; background: #f2f7fd; padding: 6px 2px; border-radius: 8px; color: #5b88b6; }
.meeting-date strong { display: block; font: 800 16px Manrope, sans-serif; }
.meeting-date small { display: block; font-size: 8px; text-transform: uppercase; }
.meeting-info { min-width: 0; flex: 1; }
.meeting-info strong { display: block; color: #3a5066; font-size: 10px; }
.meeting-info span { display: block; color: #96a3b1; font-size: 9px; margin-top: 4px; }
.meeting-info .meeting-notes { color: #738397; line-height: 1.45; margin-top: 7px; }
.meeting-meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 7px; }
.meeting-meta .status-pill { font-size: 8px; }
.page-note { color: #8b9aaa; font-size: 10px; }
.integration-card { padding: 18px; display: flex; gap: 13px; align-items: flex-start; }
.integration-icon { width: 35px; height: 35px; border-radius: 10px; background: #eaf4ff; color: #1679d2; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: 0 0 35px; }
.integration-card strong { display: block; color: #334b62; font-size: 11px; }
.integration-card p { color: #8795a5; font-size: 10px; line-height: 1.5; margin: 5px 0 10px; }
.integration-status { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 4px 7px; color: #a57b3c; background: #fff5e5; font-size: 8px; font-weight: 700; }
.integration-status:before { content: ""; height: 5px; width: 5px; border-radius: 50%; background: currentColor; }

#modal-root:empty { display: none; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: #12294055; backdrop-filter: blur(3px); }
.modal { width: min(520px, 100%); max-height: 90vh; overflow-y: auto; border-radius: 14px; background: white; box-shadow: 0 20px 60px #10273d38; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 19px 21px 14px; border-bottom: 1px solid #edf0f4; }
.modal-header h2 { font: 800 16px Manrope, sans-serif; color: #263d54; margin: 0; }
.modal-header p { color: #8a98a9; font-size: 10px; margin: 5px 0 0; }
.close-button { border: 0; background: transparent; color: #8f9dad; font-size: 21px; line-height: 1; }
.modal-form { padding: 16px 21px 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-field { display: grid; gap: 5px; margin-bottom: 12px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: #68798d; font-size: 9px; font-weight: 700; }
.form-control { width: 100%; border: 1px solid #e2e8ef; border-radius: 7px; background: white; padding: 9px 10px; outline: none; color: #34495e; font-size: 10px; }
textarea.form-control { resize: vertical; min-height: 72px; }
.form-help { color: #97a3b1; font-size: 9px; line-height: 1.4; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid #edf0f4; margin-top: 5px; padding-top: 14px; }
.form-error { color: #bd5555; font-size: 9px; margin-bottom: 10px; }
#toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: grid; gap: 8px; }
.toast { color: white; background: #213d55; padding: 11px 14px; border-radius: 9px; box-shadow: 0 8px 22px #11283b30; font-size: 10px; animation: toast-in .2s ease-out; }
.toast.error { background: #a74343; }
@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 1100px) {
  .sidebar { width: 220px; flex-basis: 220px; }
  .page-content { padding-left: 24px; padding-right: 24px; }
  .topbar { padding: 0 24px; }
  .dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shortcuts { grid-template-columns: 1fr; }
  .admin-user-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .admin-user-row .pending-pill { grid-column: 2 / -1; justify-self: start; }
  .audit-log-row { align-items: flex-start; flex-direction: column; gap: 7px; }
  .audit-log-meta { justify-content: flex-start; flex-wrap: wrap; text-align: left; }
  .admin-kpi-department > summary { grid-template-columns: minmax(90px, 1fr) minmax(100px, auto) minmax(100px, auto) 16px; }
  .admin-kpi-department > summary .module-status { display: none; }
  .admin-kpi-department > summary::after { grid-column: 4; }
  .admin-kpi-member-heading, .admin-kpi-member-row { grid-template-columns: minmax(105px, 1fr) repeat(2, minmax(85px, 1fr)); }
  .admin-kpi-member-heading span:nth-child(2), .admin-kpi-member-row label:nth-of-type(1), .admin-kpi-member-row label:nth-of-type(2) { display: none; }
}
@media (max-width: 760px) {
  .sidebar { width: 68px; flex-basis: 68px; padding: 18px 8px 12px; }
  .brand { justify-content: center; padding: 0; margin-bottom: 26px; }
  .brand > div:last-child, .workspace-label, .department-select > span:not(.dept-icon), .nav-label, .nav-item:not(.active) { display: none; }
  .department-select { justify-content: center; padding: 7px; margin-bottom: 15px; border: 0; }
  .nav-list { gap: 6px; }
  .nav-item { justify-content: center; padding: 0; font-size: 0; }
  .nav-item.active { display: flex; }
  .nav-item[data-page="admin"], .nav-item[data-page="departments"] { display: flex; }
  .nav-item[data-page="teams"] { display: flex; }
  .nav-icon { flex-basis: 20px; width: 20px; min-width: 20px; height: 20px; font-size: 18px; }
  .nav-icon svg { flex-basis: 18px; width: 18px; min-width: 18px; max-width: 18px; height: 18px; min-height: 18px; max-height: 18px; }
  .nav-count, .soon-dot { display: none; }
  .sidebar-bottom .sync-card { justify-content: center; padding: 9px 5px; }
  .sync-card div { display: none; }
  .topbar { height: 56px; padding: 0 15px; }
  .notification-popover { right: -52px; width: min(360px, calc(100vw - 82px)); }
  .page-content { padding: 22px 14px 38px; }
  .page-heading { flex-direction: column; margin-bottom: 18px; }
  .heading-actions { width: 100%; flex-wrap: wrap; }
  .content-grid, .target-layout { grid-template-columns: 1fr; }
  .funnel-grid { grid-template-columns: 1fr 12px 1fr; row-gap: 16px; }
  .dashboard-grid { gap: 9px; }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .departments-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .department-pilot-card { align-items: flex-start; flex-wrap: wrap; }
  .metric-card { padding: 14px; min-height: 108px; }
  .metric-value { font-size: 23px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .page-heading h1 { font-size: 23px; }
}

@media (max-width: 520px) {
  .departments-grid { grid-template-columns: 1fr; }
  .admin-stats-grid { grid-template-columns: 1fr; }
  .admin-department-row { grid-template-columns: 36px minmax(0, 1fr); }
  .admin-department-actions { grid-column: 2; }
  .department-subsection-grid { grid-template-columns: 1fr; }
  .department-workspace-hero { align-items: flex-start; flex-direction: column; }
  .workspace-logo-static { flex-basis: auto; width: 190px; height: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Supabase sign-in and invite recovery */
.auth-checking .app-shell,
.auth-locked .app-shell { display: none !important; }
#auth-root:empty { display: none; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; background: radial-gradient(circle at 15% 10%, #eaf7ff 0, transparent 34%), linear-gradient(145deg, #f7fbff, #f5f7fb 60%, #eef5ff); color: #1b2f45; font-family: var(--font-unified); }
.auth-card { width: min(430px, 100%); padding: 34px; border: 1px solid #e2eaf2; border-radius: 22px; background: #ffffffed; box-shadow: 0 22px 70px #18395b16; animation: auth-in .28s ease-out; }
.auth-logo { display: block; width: 172px; max-height: 65px; object-fit: contain; object-position: left center; margin: 0 0 28px; }
.auth-eyebrow { color: #037ef3; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.auth-card h1 { margin: 9px 0 0; color: #172b40; font: 800 26px/1.18 var(--font-heading); letter-spacing: -.035em; }
.auth-subtitle { margin: 9px 0 22px; color: #708196; font-size: 13px; line-height: 1.55; }
.auth-form { display: grid; gap: 14px; }
.auth-field { display: grid; gap: 7px; color: #52657a; font-size: 11px; font-weight: 700; }
.auth-field input { box-sizing: border-box; width: 100%; height: 44px; padding: 0 12px; border: 1px solid #dce5ef; border-radius: 10px; outline: none; background: #fff; color: #24384d; font: 14px var(--font-body); transition: border-color .18s, box-shadow .18s; }
.auth-field input:focus { border-color: #037ef3; box-shadow: 0 0 0 3px #037ef31c; }
.auth-primary { min-height: 45px; margin-top: 2px; border: 0; border-radius: 10px; background: #037ef3; color: #fff; font: 800 13px var(--font-body); cursor: pointer; transition: transform .18s, box-shadow .18s, opacity .18s; }
.auth-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 18px #037ef332; }
.auth-primary:disabled { opacity: .65; cursor: wait; transform: none; }
.auth-link { display: block; margin: 15px auto 0; padding: 5px; border: 0; background: transparent; color: #037ef3; font: 700 11px var(--font-body); cursor: pointer; }
.auth-message { margin: 0 0 17px; padding: 11px 12px; border: 1px solid #d7e8f8; border-radius: 10px; background: #f1f8ff; color: #355b7a; font-size: 11px; line-height: 1.5; }
.auth-footnote { margin-top: 24px; padding-top: 15px; border-top: 1px solid #edf1f5; color: #91a0b1; font-size: 10px; text-align: center; }
html[data-theme="dark"] .auth-page { background: radial-gradient(circle at 15% 10%, #0b314b 0, transparent 36%), linear-gradient(145deg, #10151c, #171c24 62%, #111b29); color: #e5edf6; }
html[data-theme="dark"] .auth-card { border-color: #303945; background: #1b222bf2; box-shadow: 0 22px 70px #0007; }
html[data-theme="dark"] .auth-card h1 { color: #f0f4f8; }
html[data-theme="dark"] .auth-subtitle, html[data-theme="dark"] .auth-field { color: #a8b7c8; }
html[data-theme="dark"] .auth-field input { border-color: #3a4552; background: #141a21; color: #eff4fa; }
html[data-theme="dark"] .auth-message { border-color: #29445e; background: #1a2d40; color: #c3d9ed; }
html[data-theme="dark"] .auth-footnote { border-color: #303945; color: #8a9aaa; }
@keyframes auth-in { from { opacity: 0; transform: translateY(7px) scale(.99); } to { opacity: 1; transform: none; } }
@media (max-width: 480px) { .auth-card { padding: 26px 21px; border-radius: 18px; } .auth-card h1 { font-size: 23px; } }

html[data-theme="dark"] { color-scheme: dark; --brand-ink: #f1f3f6; --brand-burgundy-soft: #3a202b; --muted: #a1adbb; --soft: #222832; --line: #343b46; --blue-soft: #1b3045; --green-soft: #1b332b; --orange-soft: #382d1d; --red-soft: #3a2425; }
html[data-theme="dark"] body { background: #101216; color: #edf0f4; }
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .department-card,
html[data-theme="dark"] .modal { background-color: #191c22; border-color: #2d333d; }
html[data-theme="dark"] .department-select,
html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .period-picker,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .language-switch { color: #e7ebf0; background-color: #20242b; border-color: #363d48; }
html[data-theme="dark"] .workspace-switcher-popover { background: rgba(27,30,36,.88); border-color: #3a404a; color: #edf0f4; box-shadow: 0 24px 64px rgba(0,0,0,.42), 0 2px 8px rgba(0,0,0,.2); }
html[data-theme="dark"] .metric-card { background: linear-gradient(155deg, #1b1f26 0%, #191c22 72%, #171a20 100%); border-color: #2d333d; }
html[data-theme="dark"] .department-pilot-card { background: linear-gradient(120deg, #201c22 0%, #241b21 100%); border-color: #45303a; }
html[data-theme="dark"] .pilot-mark { background: #1b1f26; border-color: #45303a; }
html[data-theme="dark"] .department-card, html[data-theme="dark"] .department-subsection-card, html[data-theme="dark"] .department-workspace-hero { background: #191c22; border-color: #303741; }
html[data-theme="dark"] .admin-shortcut { background: #191c22; border-color: #303741; }
html[data-theme="dark"] .admin-department-row, html[data-theme="dark"] .admin-master-brand-row { border-color: #303741; }
html[data-theme="dark"] :is(.admin-department-title strong, .admin-shortcut strong) { color: #edf0f4; }
html[data-theme="dark"] :is(.admin-department-copy p, .admin-shortcut small) { color: #a9b3c0; }
html[data-theme="dark"] .admin-kpi-item > summary strong, html[data-theme="dark"] .admin-kpi-member-row > strong { color: #edf0f4; }
html[data-theme="dark"] .sync-card { background: #20242b; border-color: #303741; }
html[data-theme="dark"] .nav-item:hover { background: #222730; }
html[data-theme="dark"] .nav-item.active { background: var(--brand-burgundy-soft); }
html[data-theme="dark"] .language-switch button.active { background: #383e48; color: var(--brand-burgundy); }
html[data-theme="dark"] .theme-toggle:hover { background: #292e37; border-color: #3a414c; }
html[data-theme="dark"] .theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: block; }
html[data-theme="dark"] :is(h1, h2, h3, .panel-title, .metric-value, .funnel-grid strong, .activity-copy strong, .member-cell, .department-card h2, .pilot-copy h2, .integration-card strong, .modal-header h2, .department-select, .breadcrumbs strong) { color: #edf0f4; }
html[data-theme="dark"] :is(.subheading, .panel-subtitle, .metric-top, .metric-foot, .funnel-grid span, .funnel-grid small, .activity-copy, .activity-copy small, .performance-table td, .leads-table td, .meetings-table td, .followup-copy strong, .integration-card p, .modal-header p, .form-field label, .form-control, .breadcrumbs, .help-button, .icon-button, .nav-item) { color: #a9b3c0; }
html[data-theme="dark"] :is(.department-card p, .department-footnote, .pilot-copy p, .sync-card small) { color: #9aa6b5; }
html[data-theme="dark"] :is(.panel-header, .performance-table th, .leads-table th, .meetings-table th, .performance-table td, .leads-table td, .meetings-table td, .member-roster-row, .modal-header, .modal-actions) { border-color: #2e343e; }
html[data-theme="dark"] .nav-count { color: #b0bac7; background: #2b313b; }
html[data-theme="dark"] .progress-track { background: #303742; }
html[data-theme="dark"] .activity-dot { box-shadow: 0 0 0 3px #1d2b39; }
html[data-theme="dark"] .period-picker button.active { background: #1e3852; color: #75b7f5; }
html[data-theme="dark"] .form-control::placeholder { color: #7f8a99; }
html[data-theme="dark"] .button-secondary:hover { background: #292f38; border-color: #4a5360; }
html[data-theme="dark"] .topbar-divider { background: #343b46; }
html[data-theme="dark"] .notification-popover { color: #edf0f4; background: #191c22; border-color: #343b46; box-shadow: 0 18px 48px #0008; }
html[data-theme="dark"] .notification-header { border-color: #303741; }
html[data-theme="dark"] .notification-header strong,
html[data-theme="dark"] .notification-copy strong { color: #e7ebf0; }
html[data-theme="dark"] .notification-item.read .notification-copy strong { color: #a0aab8; }
html[data-theme="dark"] .notification-opened { color: #9aa6b5; }
html[data-theme="dark"] .notification-header small,
html[data-theme="dark"] .notification-copy small,
html[data-theme="dark"] .notification-empty,
html[data-theme="dark"] .followup-more { color: #a9b3c0; }
html[data-theme="dark"] .notification-desktop-wrap { border-color: #303741; }
html[data-theme="dark"] .notification-desktop strong { color: #e7ebf0; }
html[data-theme="dark"] .notification-desktop small,
html[data-theme="dark"] .notification-desktop-note { color: #a9b3c0; }
html[data-theme="dark"] .notification-item { border-color: #2e343e; }
html[data-theme="dark"] .notification-close:hover { background: #292f38; }
html[data-theme="dark"] .gmail-setup-guide, html[data-theme="dark"] .email-preview { color: #b8c2ce; background: #20242b; border-color: #39414c; }
html[data-theme="dark"] .gmail-recipients, html[data-theme="dark"] .gmail-test-form { background: #20242b; border-color: #39414c; }
html[data-theme="dark"] .gmail-recipients-heading { color: #e0e5ec; }
html[data-theme="dark"] .gmail-recipients-heading span, html[data-theme="dark"] .gmail-recipient-address { color: #a9b6c5; }
html[data-theme="dark"] .gmail-recipient-address.missing { color: #f0ca7d; }
html[data-theme="dark"] .gmail-recipient-row { border-color: #39414c; }
html[data-theme="dark"] .gmail-delivery-summary { color: #b9c7d6; background: #202831; }
html[data-theme="dark"] .gmail-delivery-summary.has-errors { color: #f2b0b3; background: #342326; }
html[data-theme="dark"] .gmail-runtime-note { color: #f0d898; background: #302a1e; }
html[data-theme="dark"] .gmail-setup-guide summary, html[data-theme="dark"] .email-preview pre { color: #e0e5ec; }
html[data-theme="dark"] .gmail-preview-warning { color: #f0d898; background: #302a1e; border-color: #66552e; }
html[data-theme="dark"] .notification-action { color: #c3ccd7; background: #20242b; border-color: #3a414c; }
html[data-theme="dark"] .notification-action:hover { color: #f4c4d2; background: #2a2329; border-color: #654455; }
html[data-theme="dark"] .notification-count { border-color: #191c22; }
html[data-theme="dark"] .brand-logo { filter: drop-shadow(0 0 5px #f4a4c133); }
html[data-theme="dark"] :is(.brand strong, .goal-number, .company-cell strong, .meeting-info strong, .meeting-notes, .page-note, .form-help, .table-footer, .progress-meta, .close-button, .department-select small, .crumb-sep, .followup-copy small, .followup-empty, .empty-state strong) { color: #d7dde6; }
html[data-theme="dark"] :is(.search-box input, .select-filter, .goal-input, .month-picker) { color: #e7ebf0; background: #20242b; border-color: #363d48; }
html[data-theme="dark"] .search-box input::placeholder { color: #8995a4; }
html[data-theme="dark"] .meeting-date { color: #a9d0fa; background: #1d3044; }
html[data-theme="dark"] .company-logo { color: #b6cee7; background: #263544; }
html[data-theme="dark"] .suggestion-banner { color: #c1d8ef; background: #1b2d3f; border-color: #29445e; }
html[data-theme="dark"] .suggestion-banner strong { color: #a8d2fa; }
html[data-theme="dark"] .suggestion-icon { background: #26394c; }
html[data-theme="dark"] .module-status { color: #c3ccd7; background: #2c323b; }
html[data-theme="dark"] .module-status.active { color: #a0e0c2; background: #1d392d; }
html[data-theme="dark"] .integration-status { color: #ffd28a; background: #3a2f1e; }
html[data-theme="dark"] .status-new { color: #a9d1fa; background: #1d3044; }
html[data-theme="dark"] .status-no-answer { color: #f3ce86; background: #3b2e1c; }
html[data-theme="dark"] .status-call-later { color: #d3c0ff; background: #302642; }
html[data-theme="dark"] .status-positive,
html[data-theme="dark"] .status-meeting { color: #9ce0bd; background: #1d392d; }
html[data-theme="dark"] .status-negative,
html[data-theme="dark"] .status-not-interested { color: #ffb5b0; background: #3e2828; }
html[data-theme="dark"] .status-closed { color: #c0c9d4; background: #2c323b; }
html[data-theme="dark"] .followup-date.overdue { color: #ffb5b0; background: #3e2828; }
html[data-theme="dark"] .followup-date.today { color: #ffd28a; background: #3a2f1e; }
html[data-theme="dark"] .followup-date.upcoming { color: #a9d1fa; background: #1d3044; }
html[data-theme="dark"] .empty-state strong { color: #e1e6ed; }

/* Visual direction adapted from Unslop by Damir Sokolovsky, CC BY 4.0. */
:root {
  --shadow: 0 1px 2px rgba(12, 26, 38, .05);
  --ui-ease: cubic-bezier(.22, 1, .36, 1);
}
body { background: #f5f7fa; color: #17191c; font-size: 14px; line-height: 1.45; }
.sidebar { background: #fff; }
.topbar { height: 60px; padding-inline: 32px; background: #fff; }
.page-content { padding: 32px 32px 48px; }
.page-heading { gap: 24px; margin-bottom: 24px; }
.eyebrow, .workspace-label, .nav-label { color: #526273; font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.workspace-label, .nav-label { margin-bottom: 8px; }
.nav-item { height: 36px; gap: 10px; border-radius: 8px; font-size: 13px; font-weight: 500; }
.nav-list { gap: 3px; }
.tools-label { margin-top: 24px; }
.topbar-actions { gap: 12px; }
.language-switch { border-radius: 8px; background: #f4f6f8; border-color: #e5e9ed; }
.language-switch button { border-radius: 6px; font-size: 11px; font-weight: 500; transition: color .16s var(--ui-ease), background .16s var(--ui-ease); }
.language-switch button.active { box-shadow: none; }
h1 { color: #17191c; font-size: 30px; font-weight: 500; letter-spacing: -.02em; line-height: 1.16; }
.subheading { color: #525b65; font-size: 14px; line-height: 1.45; }
.button { min-height: 36px; padding: 8px 12px; border-radius: 8px; font-size: 12px; font-weight: 500; transition: color .16s var(--ui-ease), background .16s var(--ui-ease), border-color .16s var(--ui-ease); }
.button:hover { transform: none; }
.button-primary { color: #fff; background: #0068d1; box-shadow: none; }
.button-primary:hover { background: #005bb8; }
.button-secondary { color: #38414b; background: #fff; border-color: #dfe4e9; }
.button-secondary:hover { border-color: #aeb8c2; color: #17191c; }
.panel, .metric-card, .department-card, .department-subsection-card, .admin-shortcut { border-color: #e1e5e9; border-radius: 14px; box-shadow: none; }
.metric-card { min-height: 112px; padding: 20px; background: #fff; transition: border-color .16s var(--ui-ease), background .16s var(--ui-ease); }
.metric-card:hover, .department-card:hover { transform: none; border-color: #cdd5dc; box-shadow: none; }
.metric-top, .metric-foot { color: #525b65; font-size: 12px; }
.metric-value { color: #17191c; font-size: 30px; font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.panel-header { padding: 16px 20px; }
.panel-body { padding: 20px; }
.panel-title { color: #20252a; font-size: 15px; font-weight: 500; }
.panel-subtitle { color: #525b65; font-size: 12px; line-height: 1.45; }
.admin-kpi-department, .admin-unit-people { border-radius: 10px; background: #fff; }
.admin-kpi-department[open] > summary { border-inline-start: 3px solid #037ef3; }
.admin-kpi-department > summary { min-height: 56px; gap: 12px; padding: 12px 16px; }
.admin-kpi-dept-name { font-size: 14px; font-weight: 500; }
.admin-kpi-period { gap: 4px; }
.admin-kpi-period small { color: #525b65; font-size: 11px; }
.admin-kpi-period strong { color: #17191c; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.admin-kpi-breakdown { gap: 12px; padding: 16px; }
.admin-kpi-funnel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; padding: 0 0 12px; border-bottom: 1px solid #e1e5e9; }
.admin-kpi-funnel-grid > div { display: grid; gap: 5px; min-height: 62px; align-content: center; padding: 8px 0; border-bottom: 1px solid #edf0f2; }
.admin-kpi-funnel-grid > div:last-child { border-bottom: 0; }
.admin-kpi-funnel-grid small { color: #525b65; font-size: 12px; line-height: 1.35; }
.admin-kpi-funnel-grid strong { color: #17191c; font-family: var(--font-numeric), sans-serif; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.admin-kpi-funnel-grid > div:nth-last-child(-n+2) strong { color: #0068a0; }
.admin-b2b-member-heading, .admin-b2b-member-row { display: grid; grid-template-columns: minmax(100px, 1.2fr) repeat(4, minmax(80px, 1fr)); gap: 8px; align-items: stretch; }
.admin-b2b-member-heading { padding: 10px 0 8px; color: #525b65; font-size: 11px; font-weight: 500; border-bottom: 1px solid #dfe4e9; }
.admin-b2b-member-row { padding: 10px 0; border-bottom: 1px solid #e6eaee; }
.admin-b2b-member-row:last-of-type { border-bottom: 0; }
.admin-b2b-member-row > strong { align-self: center; color: #20252a; font-size: 13px; font-weight: 500; }
.admin-b2b-member-row > span { display: grid; align-content: start; gap: 5px; min-width: 0; padding: 8px; border: 1px solid #e5e9ed; border-radius: 8px; background: #f7f8fa; }
.admin-b2b-member-row > span small { color: #525b65; font-size: 11px; }
.admin-b2b-member-row > span b { display: block; color: #20252a; font-size: 11px; font-weight: 500; line-height: 1.35; font-variant-numeric: tabular-nums; }
.admin-b2b-member-heading { font-size: 11px; }
.admin-department-list { padding: 4px 20px; }
.admin-master-brand-row, .admin-department-row { gap: 16px; padding: 12px 0; }
.admin-department-title strong, .admin-shortcut strong { color: #20252a; font-size: 13px; font-weight: 500; }
.admin-department-copy p, .admin-shortcut small { color: #525b65; font-size: 12px; line-height: 1.45; }
.admin-department-actions { gap: 8px; }
.admin-department-actions .button { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.admin-shortcuts-wrap { margin-top: 24px; }
.admin-shortcuts-wrap > div:first-child { margin-bottom: 12px; }
.admin-shortcuts { gap: 12px; }
.admin-shortcut { min-height: 72px; padding: 14px; gap: 12px; transition: border-color .16s var(--ui-ease), background .16s var(--ui-ease); }
.admin-shortcut:hover { transform: none; border-color: #b9c7d2; background: #f9fbfc; box-shadow: none; }
.admin-shortcut-icon { flex-basis: 32px; width: 32px; height: 32px; color: #0068a0; background: #e8f7ff; border-radius: 8px; }
.admin-shortcut-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.admin-shortcut strong { font-size: 13px; }
.admin-shortcut small { font-size: 11px; }
.module-status, .role-pill, .pending-pill { border-radius: 6px; font-size: 11px; font-weight: 500; }
.sync-card { border-radius: 10px; background: #f5f7f9; border-color: #e1e5e9; }
.sync-card strong { font-size: 12px; font-weight: 500; }
.sync-card small { color: #525b65; font-size: 11px; }
.sync-indicator { box-shadow: none; }
.admin-kpi-member-heading, .admin-kpi-member-row { font-size: 12px; }
.admin-kpi-member-heading { color: #525b65; font-weight: 500; }
.admin-kpi-member-row > strong { font-size: 13px; font-weight: 500; }
.admin-kpi-member-row > strong small, .admin-kpi-member-row label span { color: #525b65; font-size: 11px; }
.admin-kpi-member-row .form-control { min-height: 36px; font-size: 13px; }
.department-pilot-card { border-color: #e1e5e9; border-radius: 14px; background: #fff; box-shadow: none; }
.pilot-mark { border-color: #e1e5e9; border-radius: 12px; background: #f7f8fa; box-shadow: none; }
.pilot-copy h2 { color: #20252a; font-size: 16px; font-weight: 500; }
.pilot-copy p { color: #525b65; font-size: 13px; line-height: 1.45; }
.progress-track span { background: #0068d1; transition: width .2s var(--ui-ease); }
.progress-track span.good { background: #25885e; }
.progress-track span.warn { background: #a56b16; }
.target-card { border-radius: 12px; background: #0068d1; }
.target-card:after { display: none; }
.target-card .target-title, .target-total { font-weight: 500; }
.target-card .target-copy, .target-total small { color: #eef6ff; font-size: 12px; }
.meeting-date small { color: #525b65; font-size: 11px; text-transform: none; }
.metric-icon, .admin-stats-grid .metric-icon { color: #0068a0; background: #e8f7ff; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #0068a0; outline-offset: 2px; }
.auth-page { background: #f5f7fa; color: #17191c; }
.auth-card { padding: 32px; border-color: #e1e5e9; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(12, 26, 38, .06); animation: none; }
.auth-eyebrow { color: #0068a0; font-size: 12px; font-weight: 500; letter-spacing: 0; }
.auth-card h1 { color: #17191c; font-size: 28px; font-weight: 500; letter-spacing: -.02em; }
.auth-subtitle, .auth-field { color: #525b65; font-size: 13px; font-weight: 400; }
.auth-field input { height: 44px; border-color: #dfe4e9; border-radius: 8px; color: #17191c; }
.auth-field input:focus { border-color: #0068a0; box-shadow: 0 0 0 2px #64d2ff44; }
.auth-primary { border-radius: 8px; background: #0068d1; font-size: 13px; font-weight: 500; transition: background .16s var(--ui-ease), opacity .16s var(--ui-ease); }
.auth-primary:hover { transform: none; background: #005bb8; box-shadow: none; }
.auth-link { color: #0068a0; font-size: 12px; font-weight: 500; }
html[data-theme="dark"] .department-pilot-card, html[data-theme="dark"] .auth-card { background: #11141c; border-color: #303541; box-shadow: none; }
html[data-theme="dark"] .pilot-mark { background: #1a1e28; border-color: #343b46; }
html[data-theme="dark"] .pilot-copy h2, html[data-theme="dark"] .auth-card h1 { color: #eef0f5; }
html[data-theme="dark"] .pilot-copy p, html[data-theme="dark"] .auth-subtitle,
html[data-theme="dark"] .auth-field, html[data-theme="dark"] .meeting-date small { color: #a3a9b8; }
html[data-theme="dark"] .target-card { background: #111f2c; }
html[data-theme="dark"] .target-card .target-copy, html[data-theme="dark"] .target-total small { color: #cbd7e4; }
html[data-theme="dark"] .metric-icon, html[data-theme="dark"] .admin-stats-grid .metric-icon { color: #64d2ff; background: #1a2832; }
html[data-theme="dark"] .auth-page { background: #0b0d14; }
html[data-theme="dark"] .auth-field input { background: #1a1e28; border-color: #343b46; color: #eef0f5; }
html[data-theme="dark"] .auth-message { background: #1a1e28; border-color: #343b46; color: #a3a9b8; }

html[data-theme="dark"] body { background: #0b0d14; color: #eef0f5; }
html[data-theme="dark"] .sidebar, html[data-theme="dark"] .topbar, html[data-theme="dark"] .panel,
html[data-theme="dark"] .admin-kpi-department, html[data-theme="dark"] .admin-unit-people,
html[data-theme="dark"] .admin-shortcut, html[data-theme="dark"] .metric-card { background: #11141c; border-color: #303541; }
html[data-theme="dark"] .department-select, html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .sync-card { background: #1a1e28; border-color: #343b46; }
html[data-theme="dark"] .button-secondary { color: #eef0f5; }
html[data-theme="dark"] .button-primary { color: var(--button-ink); background: var(--button-primary); }
html[data-theme="dark"] .button-primary:hover { background: var(--button-hover); }
html[data-theme="dark"] h1, html[data-theme="dark"] .panel-title,
html[data-theme="dark"] .admin-kpi-dept-name, html[data-theme="dark"] .admin-kpi-period strong,
html[data-theme="dark"] .admin-kpi-funnel-grid strong, html[data-theme="dark"] .admin-b2b-member-row > strong,
html[data-theme="dark"] .admin-b2b-member-row > span b, html[data-theme="dark"] .admin-department-title strong,
html[data-theme="dark"] .admin-shortcut strong, html[data-theme="dark"] .metric-value { color: #eef0f5; }
html[data-theme="dark"] .subheading, html[data-theme="dark"] .panel-subtitle,
html[data-theme="dark"] .admin-kpi-period small, html[data-theme="dark"] .admin-kpi-funnel-grid small,
html[data-theme="dark"] .admin-b2b-member-heading, html[data-theme="dark"] .admin-b2b-member-row > span small,
html[data-theme="dark"] .admin-department-copy p, html[data-theme="dark"] .admin-shortcut small,
html[data-theme="dark"] .metric-top, html[data-theme="dark"] .metric-foot,
html[data-theme="dark"] .sync-card small { color: #a3a9b8; }
html[data-theme="dark"] .admin-b2b-member-row > span { background: #1a1e28; border-color: #343b46; }
html[data-theme="dark"] .admin-kpi-department[open] > summary { border-inline-start-color: #64d2ff; }
html[data-theme="dark"] .admin-kpi-funnel-grid > div:nth-last-child(-n+2) strong { color: #64d2ff; }
html[data-theme="dark"] .admin-shortcut-icon { color: #64d2ff; background: #1a2832; }
html[data-theme="dark"] .admin-kpi-funnel-grid { border-color: #303541; }

@media (max-width: 1100px) {
  .admin-b2b-member-heading { display: none; }
  .admin-b2b-member-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .admin-b2b-member-row > strong { grid-column: 1 / -1; padding: 4px 0 8px; border-bottom: 1px solid #e1e5e9; }
  .admin-kpi-member-heading { display: none; }
  .admin-kpi-member-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 0; }
  .admin-kpi-member-row > strong { grid-column: 1 / -1; }
  .admin-kpi-member-row label { display: grid; }
}
@media (max-width: 760px) {
  .topbar { padding-inline: 16px; }
  .page-content { padding: 24px 16px 40px; }
  h1 { font-size: 26px; }
  .admin-kpi-department > summary { grid-template-columns: minmax(0, 1fr) minmax(82px, auto) minmax(82px, auto) 16px; gap: 8px; padding: 12px; }
  .admin-kpi-period small { font-size: 10px; }
  .admin-kpi-period strong { font-size: 12px; }
  .admin-kpi-department > summary .module-status { display: none; }
  .admin-kpi-department > summary::after { grid-column: 4; }
  .admin-kpi-funnel-grid { gap: 0 12px; }
  .admin-kpi-breakdown { padding: 12px; }
  .admin-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .admin-department-list { padding-inline: 16px; }
  .admin-department-row { grid-template-columns: 38px minmax(0, 1fr); }
  .admin-department-actions { grid-column: 2; }
}
html[data-theme="dark"] .admin-b2b-member-row > strong { border-color: #303541; }

/* B2Be&GV work areas: readable data tables, call funnel and meeting records. */
.dashboard-grid { gap: 16px; }
.content-grid { gap: 16px; margin-top: 20px; }
.funnel-grid { gap: 12px; }
.funnel-grid div { gap: 8px; }
.funnel-grid span, .funnel-grid small { color: #525b65; font-size: 12px; line-height: 1.4; }
.funnel-grid strong { color: #20252a; font: 500 24px/1 var(--font-numeric), sans-serif; font-variant-numeric: tabular-nums; }
.funnel-grid i { color: #7d8791; font-size: 16px; }
.suggestion-banner { gap: 12px; padding: 16px; margin: 16px 0; border-color: #d9e9f0; border-radius: 10px; background: #f1f8fb; color: #34424b; font-size: 13px; line-height: 1.5; }
.suggestion-banner strong { color: #005c80; font-weight: 500; }
.suggestion-icon { width: 32px; height: 32px; flex-basis: 32px; border-radius: 8px; color: #0068a0; background: #fff; }
.suggestion-icon svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.suggestion-banner .button { flex: 0 0 auto; }
.toolbar { gap: 12px; margin-bottom: 16px; }
.search-box { min-width: 240px; }
.search-box span { left: 12px; top: 10px; width: 16px; height: 16px; color: #68737e; }
.search-box span svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.search-box input, .select-filter, .goal-input, .month-picker { min-height: 40px; border-color: #dfe4e9; border-radius: 8px; color: #20252a; font-size: 13px; }
.search-box input { padding: 9px 12px 9px 36px; }
.search-box input:focus, .form-control:focus { border-color: #0068a0; box-shadow: 0 0 0 2px #64d2ff44; }
.select-filter { padding: 8px 32px 8px 12px; }
.table-scroll { scrollbar-color: #aeb8c2 #f1f3f5; scrollbar-width: thin; }
.performance-table, .leads-table, .meetings-table { font-variant-numeric: tabular-nums; }
.performance-table th, .leads-table th, .meetings-table th { padding: 12px; border-color: #e1e5e9; color: #525b65; font-size: 11px; font-weight: 500; letter-spacing: 0; }
.performance-table td, .leads-table td, .meetings-table td { padding: 12px; border-color: #e6eaee; color: #38414b; font-size: 13px; }
.performance-table tbody tr:hover, .leads-table tbody tr:hover { background: #f7f9fa; }
.leads-table { min-width: 940px; }
.company-cell { gap: 10px; min-width: 175px; }
.company-cell strong, .meeting-info strong { color: #20252a; font-size: 13px; font-weight: 500; }
.company-cell small, .meeting-info span { color: #525b65; font-size: 12px; line-height: 1.4; }
.company-logo { width: 32px; height: 32px; flex-basis: 32px; border: 1px solid #e1e5e9; border-radius: 8px; color: #38414b; background: #f4f6f8; font-weight: 500; }
.status-pill { gap: 7px; padding: 5px 8px; border-radius: 6px; font-size: 11px; font-weight: 500; }
.status-pill:before { width: 6px; height: 6px; }
.status-new { color: #375b6c; background: #eaf3f6; }
.status-no-answer, .status-call-later { color: #795b24; background: #f7f1e4; }
.status-positive, .status-meeting { color: #286b4d; background: #e8f3ed; }
.status-negative, .status-not-interested { color: #8b4545; background: #f7eded; }
.status-closed { color: #4d5964; background: #eceff2; }
.table-action { display: inline-grid; place-items: center; min-width: 32px; min-height: 32px; color: #525b65; }
.table-action:hover { color: #005c80; background: #eaf5f9; }
.table-footer { gap: 16px; padding: 14px 20px; color: #525b65; font-size: 12px; }
.lead-pagination { gap: 10px; }
.lead-pagination .button { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.empty-state { padding: 32px 16px; color: #525b65; font-size: 13px; line-height: 1.5; }
.empty-state strong { color: #20252a; font-weight: 500; }
.goal-input { width: 84px; padding: 6px 8px; text-align: right; font-variant-numeric: tabular-nums; }
.goal-number { color: #20252a; font-weight: 500; }
.target-layout { gap: 20px; }
.target-card { padding: 20px; }
.target-total { gap: 12px; font-size: 22px; font-variant-numeric: tabular-nums; }
.target-total small { font-size: 12px; }
.meeting-card { gap: 16px; padding: 16px 0; border-color: #e6eaee; }
.meeting-date { flex-basis: 48px; border: 1px solid #e1e5e9; border-radius: 8px; color: #20252a; background: #f4f6f8; }
.meeting-date strong { font: 500 18px/1.1 var(--font-numeric), sans-serif; }
.meeting-date small { margin-top: 4px; }
.meeting-info { line-height: 1.5; }
.meeting-info span { margin-top: 5px; }
.meeting-meta { justify-content: flex-start; gap: 8px 12px; margin-top: 10px; }
.meeting-meta .status-pill { font-size: 11px; }
.meeting-notes { color: #38414b; font-size: 12px; line-height: 1.5; }
.page-note { color: #525b65; font-size: 12px; line-height: 1.5; }
.member-cell { gap: 10px; color: #20252a; font-weight: 500; }
.member-cell .avatar { width: 28px; height: 28px; flex-basis: 28px; font-size: 10px; }
.progress-meta { margin-bottom: 7px; color: #525b65; font-size: 12px; font-variant-numeric: tabular-nums; }
.progress-track { height: 6px; border-radius: 4px; background: #e6eaee; }
.integration-card { gap: 16px; padding: 18px 20px; border-top: 1px solid #e6eaee; }
.integration-icon { width: 36px; height: 36px; flex-basis: 36px; border: 1px solid #dfe4e9; border-radius: 8px; color: #005c80; background: #f1f8fb; font-weight: 500; }
.integration-card strong { color: #20252a; font-size: 14px; font-weight: 500; }
.integration-card p { color: #525b65; font-size: 13px; line-height: 1.5; }
.integration-status { border-radius: 6px; padding: 5px 8px; font-size: 11px; font-weight: 500; }

html[data-theme="dark"] .funnel-grid span, html[data-theme="dark"] .funnel-grid small,
html[data-theme="dark"] .performance-table td, html[data-theme="dark"] .leads-table td,
html[data-theme="dark"] .meetings-table td, html[data-theme="dark"] .table-footer,
html[data-theme="dark"] .empty-state, html[data-theme="dark"] .page-note,
html[data-theme="dark"] .progress-meta, html[data-theme="dark"] .meeting-notes { color: #a3a9b8; }
html[data-theme="dark"] .funnel-grid strong, html[data-theme="dark"] .empty-state strong,
html[data-theme="dark"] .company-cell strong, html[data-theme="dark"] .meeting-info strong,
html[data-theme="dark"] .member-cell { color: #eef0f5; }
html[data-theme="dark"] .funnel-grid i { color: #7a8296; }
html[data-theme="dark"] .suggestion-banner { color: #d5e3eb; background: #141c22; border-color: #2c424e; }
html[data-theme="dark"] .suggestion-banner strong, html[data-theme="dark"] .suggestion-icon { color: #64d2ff; }
html[data-theme="dark"] .suggestion-icon { background: #1a2832; }
html[data-theme="dark"] .search-box input, html[data-theme="dark"] .select-filter,
html[data-theme="dark"] .goal-input, html[data-theme="dark"] .month-picker { color: #eef0f5; background: #1a1e28; border-color: #343b46; }
html[data-theme="dark"] .search-box input::placeholder { color: #a3a9b8; }
html[data-theme="dark"] .performance-table th, html[data-theme="dark"] .leads-table th,
html[data-theme="dark"] .meetings-table th { color: #a3a9b8; border-color: #303541; }
html[data-theme="dark"] .performance-table tbody tr:hover, html[data-theme="dark"] .leads-table tbody tr:hover { background: #181c24; }
html[data-theme="dark"] .company-logo, html[data-theme="dark"] .meeting-date { color: #eef0f5; background: #1a1e28; border-color: #343b46; }
html[data-theme="dark"] .meeting-info span, html[data-theme="dark"] .company-cell small { color: #a3a9b8; }
html[data-theme="dark"] .integration-card { border-color: #303541; }
html[data-theme="dark"] .integration-icon { color: #64d2ff; background: #1a2832; border-color: #2c424e; }
html[data-theme="dark"] .integration-card strong { color: #eef0f5; }
html[data-theme="dark"] .integration-card p { color: #a3a9b8; }

/* Apple HIG-inspired web refinement: calm materials, clear hierarchy, responsive controls. */
body { background: var(--surface-secondary); color: var(--label-primary); }
.sidebar { background: color-mix(in srgb, var(--surface) 94%, transparent); border-color: var(--separator); }
.topbar { position: sticky; inset-block-start: 0; z-index: 20; color: var(--label-primary); background: color-mix(in srgb, var(--surface) 84%, transparent); border-color: color-mix(in srgb, var(--separator) 76%, transparent); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); }
.breadcrumbs, .breadcrumbs strong { color: var(--label-secondary); }
.nav-item, .skyera-home-button, .department-select { font-family: var(--system-font); }
.nav-item { min-height: 38px; color: var(--label-secondary); transition: color .16s ease, background-color .16s ease; }
.nav-item:hover { color: var(--label-primary); background: color-mix(in srgb, var(--surface-tertiary) 68%, transparent); }
.nav-item.active { color: var(--brand-burgundy); background: color-mix(in srgb, var(--brand-blue) 10%, var(--surface)); }
.panel, .metric-card, .department-card, .department-subsection-card, .admin-shortcut, .department-workspace-hero { color: var(--label-primary); background: var(--surface); border-color: var(--separator); box-shadow: 0 1px 2px color-mix(in srgb, #000 5%, transparent); }
.panel, .metric-card, .department-card, .department-subsection-card { border-radius: 14px; }
.panel-title, .metric-value, .company-cell strong, .meeting-info strong, .admin-department-title strong { color: var(--label-primary); }
.panel-subtitle, .metric-top, .metric-foot, .subheading, .page-note { color: var(--label-secondary); }
.button, .form-control, .search-box input, .select-filter, .goal-input, .month-picker { font-family: var(--system-font); }
.button { min-height: 38px; border-radius: 10px; transition: color .16s ease, background-color .16s ease, border-color .16s ease, transform .12s ease; }
.button:active, .nav-item:active, .skyera-home-button:active { transform: scale(.98); }
.button-secondary { color: var(--label-primary); background: var(--surface); border-color: var(--separator); }
.button-secondary:hover { color: var(--label-primary); background: var(--surface-secondary); border-color: color-mix(in srgb, var(--label-secondary) 45%, var(--separator)); }
.form-control, .search-box input, .select-filter, .goal-input, .month-picker { color: var(--label-primary); background: var(--surface); border-color: var(--separator); }
.performance-table th, .leads-table th, .meetings-table th { color: var(--label-secondary); border-color: var(--separator); }
.performance-table td, .leads-table td, .meetings-table td { border-color: color-mix(in srgb, var(--separator) 75%, transparent); }
.skyera-home-button { color: var(--label-secondary); background: var(--surface); border-color: var(--separator); }
.skyera-home-button:hover { color: var(--brand-blue); background: color-mix(in srgb, var(--brand-blue) 8%, var(--surface)); }
:where(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-blue) 54%, transparent); outline-offset: 2px; }
html[data-theme="dark"] .sidebar { background: color-mix(in srgb, var(--surface) 94%, transparent); }
html[data-theme="dark"] .nav-item.active { color: color-mix(in srgb, var(--brand-blue) 60%, white); background: color-mix(in srgb, var(--brand-blue) 18%, var(--surface)); }
html[data-theme="dark"] .panel, html[data-theme="dark"] .metric-card, html[data-theme="dark"] .department-card,
html[data-theme="dark"] .department-subsection-card, html[data-theme="dark"] .admin-shortcut,
html[data-theme="dark"] .department-workspace-hero { background: var(--surface); border-color: var(--separator); }
html[data-theme="dark"] .panel-title, html[data-theme="dark"] .metric-value,
html[data-theme="dark"] .company-cell strong, html[data-theme="dark"] .meeting-info strong,
html[data-theme="dark"] .admin-department-title strong { color: var(--label-primary); }
html[data-theme="dark"] .panel-subtitle, html[data-theme="dark"] .metric-top, html[data-theme="dark"] .metric-foot,
html[data-theme="dark"] .subheading, html[data-theme="dark"] .page-note { color: var(--label-secondary); }
html[data-theme="dark"] .button-secondary, html[data-theme="dark"] .form-control,
html[data-theme="dark"] .search-box input, html[data-theme="dark"] .select-filter,
html[data-theme="dark"] .goal-input, html[data-theme="dark"] .month-picker { color: var(--label-primary); background: var(--surface); border-color: var(--separator); }
html[data-theme="dark"] .button-secondary:hover { background: var(--surface-tertiary); }
@media (prefers-reduced-transparency: reduce) {
  .topbar, .sidebar { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 760px) {
  .nav-item, .button, .icon-button, .theme-toggle, .notification-button, .skyera-home-button { min-height: 44px; }
  .topbar { min-height: 56px; height: auto; }
}

@media (max-width: 1100px) {
  .funnel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
  .funnel-grid i { display: none; }
  .target-layout { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .metric-card { min-height: 104px; padding: 14px; }
  .metric-top, .metric-foot { font-size: 11px; }
  .metric-value { font-size: 26px; }
  .suggestion-banner { align-items: flex-start; flex-wrap: wrap; }
  .suggestion-banner .suggestion-copy { flex-basis: calc(100% - 44px); }
  .suggestion-banner .button { margin-left: 44px; }
  .toolbar { align-items: stretch; }
  .search-box { min-width: 100%; }
  .select-filter { flex: 1 1 calc(50% - 6px); min-width: 0; }
  .table-footer { align-items: flex-start; flex-direction: column; }
  .lead-pagination { width: 100%; justify-content: space-between; }
  .meeting-card { gap: 12px; }
  .meeting-card > .table-action { flex: 0 0 32px; }
  .meeting-date { flex-basis: 44px; }
  .meeting-meta { align-items: flex-start; }
}

/* Whole-app finish: shared surfaces, forms, alerts and theme-aware accents. */
.button-primary, .auth-primary { color: var(--button-ink); background: var(--button-primary); }
.button-primary:hover, .auth-primary:hover { background: var(--button-hover); }
.button-primary:active, .auth-primary:active { transform: translateY(1px); }
.button:disabled, button:disabled { cursor: not-allowed; opacity: .55; }
.admin-kpi-department[open] > summary { border-inline-start-color: var(--line-accent); }
.admin-kpi-funnel-grid > div:nth-last-child(-n+2) strong,
.admin-shortcut-icon, .metric-icon, .admin-stats-grid .metric-icon,
.suggestion-icon, .integration-icon { color: var(--accent-ink); }
.progress-track span { background: var(--button-primary); }
.target-card { color: var(--brand-ink); background: color-mix(in srgb, var(--button-primary) 13%, #fff); border: 1px solid color-mix(in srgb, var(--button-primary) 28%, #e1e5e9); }
.target-card .target-copy, .target-total small { color: color-mix(in srgb, var(--brand-ink) 70%, #fff); }
.admin-shortcut-icon, .metric-icon, .admin-stats-grid .metric-icon, .suggestion-icon { background: color-mix(in srgb, var(--button-primary) 10%, #fff); }
.suggestion-banner strong, .table-action:hover { color: var(--accent-ink); }
.search-box input:focus, .form-control:focus, .auth-field input:focus { border-color: var(--accent-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--button-primary) 18%, transparent); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline-color: var(--accent-ink); }
.auth-eyebrow, .auth-link { color: var(--accent-ink); }
.auth-field input { background: var(--surface-raised, #fff); }

.modal-backdrop { background: rgba(10, 18, 28, .48); backdrop-filter: blur(5px); }
.modal { width: min(560px, 100%); border: 1px solid var(--line); border-radius: 14px; background: var(--surface-raised, #fff); color: var(--brand-ink); box-shadow: 0 22px 65px rgba(10, 18, 28, .2); }
.modal-header { padding: 20px 22px 16px; border-color: var(--line); }
.modal-header h2 { color: var(--brand-ink); font: 600 17px/1.3 var(--font-heading), sans-serif; }
.modal-header p, .form-help { color: var(--muted); font-size: 12px; line-height: 1.5; }
.modal-form { padding: 18px 22px 22px; }
.form-grid { gap: 14px; }
.form-field { gap: 6px; margin-bottom: 14px; }
.form-field label { color: var(--brand-ink); font-size: 12px; font-weight: 500; }
.form-control, .search-box input, .select-filter, .goal-input, .month-picker, .auth-field input {
  min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised, #fff); color: var(--brand-ink); font: 400 13px/1.4 var(--font-body), sans-serif;
}
.form-control { padding: 9px 11px; }
textarea.form-control { min-height: 96px; }
.form-control::placeholder, .auth-field input::placeholder { color: var(--muted); }
.close-button, .notification-close { color: var(--muted); border-radius: 7px; }
.close-button:hover, .notification-close:hover { color: var(--brand-ink); background: var(--soft); }
.modal-actions { gap: 9px; padding-top: 16px; border-color: var(--line); }
.form-error { font-size: 12px; }

.notification-popover { width: min(390px, calc(100vw - 32px)); padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-raised, #fff); box-shadow: 0 16px 45px rgba(20, 33, 47, .16); }
.notification-header { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.notification-header strong { color: var(--brand-ink); font-size: 13px; font-weight: 600; }
.notification-header small, .notification-copy small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.notification-list { max-height: min(440px, 62vh); overflow: auto; }
.notification-item { gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); transition: background .16s var(--ui-ease); }
.notification-item:hover { background: color-mix(in srgb, var(--button-primary) 5%, transparent); }
.notification-item.is-opened, .notification-opened { color: var(--muted); opacity: .72; }
.notification-copy strong { color: var(--brand-ink); font-size: 12px; font-weight: 500; }
.notification-action { color: var(--accent-ink); border-radius: 6px; font-size: 11px; font-weight: 500; }
.notification-action:hover { background: color-mix(in srgb, var(--button-primary) 9%, transparent); }
.notification-desktop-wrap, .notification-empty, .notification-desktop-note { padding: 12px 14px; color: var(--muted); font-size: 11px; }
.followup-row { gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.followup-copy strong { color: var(--brand-ink); font-size: 13px; font-weight: 500; }
.followup-copy small, .followup-more, .followup-empty { color: var(--muted); font-size: 12px; line-height: 1.5; }
.followup-date { border-radius: 6px; font-size: 11px; font-weight: 500; }
.pace-signal { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, 1fr); gap: 0; overflow: hidden; margin: 14px 0 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface, #fff); box-shadow: 0 4px 18px #1a30430a; }
.pace-signal-heading { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 18px 20px; border-inline-end: 1px solid var(--line); }
.pace-signal-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; color: var(--blue); background: var(--blue-soft); font-size: 17px; font-weight: 800; }
.pace-signal-heading > div { display: grid; gap: 4px; min-width: 0; }
.pace-period { color: var(--muted); font-size: 10px; }
.pace-signal-heading h2 { margin: 0; color: var(--brand-ink); font: 750 15px var(--font-heading), sans-serif; }
.pace-status { margin-inline-start: auto; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--blue); font-size: 10px; font-weight: 700; white-space: nowrap; }
.pace-signal-content { display: grid; align-content: center; gap: 8px; padding: 15px 18px; }
.pace-signal-content > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.pace-progress .progress-meta { color: var(--muted); font-size: 10px; }
.pace-progress .progress-meta strong { color: var(--brand-ink); }
.pace-progress .progress-track span { background: var(--blue); }
.pace-member-lines { display: flex; flex-wrap: wrap; gap: 5px; }
.pace-member-lines span { padding: 4px 7px; border-radius: 999px; color: var(--brand-ink); background: var(--surface-secondary, #f3f5f7); font-size: 9px; }
.pace-signal-content .button { justify-self: start; min-height: 28px; padding: 4px 0; font-size: 10px; }
.pace-signal.at-risk { border-color: color-mix(in srgb, #e56b51 42%, var(--line)); }
.pace-signal.at-risk .pace-signal-icon { color: #bd4834; background: color-mix(in srgb, #e56b51 14%, var(--surface)); }
.pace-signal.at-risk .pace-status { color: #a83f2d; background: color-mix(in srgb, #e56b51 10%, var(--surface)); }
.pace-signal.watch .pace-signal-icon, .pace-signal.watch .pace-status { color: #9b681c; background: color-mix(in srgb, #e8ae4c 14%, var(--surface)); }
.pace-signal.on-pace .pace-signal-icon, .pace-signal.on-pace .pace-status { color: #20835f; background: color-mix(in srgb, #31ad7b 12%, var(--surface)); }
.pace-signal.no-target .pace-signal-icon { color: var(--muted); background: var(--surface-secondary, #f3f5f7); }
.followup-date.suggested { color: #7750a5; background: #f3ebff; }
.action-queue-row { animation: followup-in .28s both; }
.action-queue-row:nth-child(2) { animation-delay: 35ms; }
.action-queue-row:nth-child(3) { animation-delay: 70ms; }
html[data-theme="dark"] .pace-signal { background: var(--surface, #171a20); border-color: var(--separator, #353b46); }
html[data-theme="dark"] .pace-signal-heading { border-color: var(--separator, #353b46); }
html[data-theme="dark"] .pace-member-lines span { background: var(--surface-secondary, #222630); }
html[data-theme="dark"] .followup-date.suggested { color: #d5b9ff; background: #342543; }
@media (max-width: 760px) {
  .pace-signal { grid-template-columns: 1fr; }
  .pace-signal-heading { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .pace-signal-content { padding: 14px 17px; }
}
.toast { padding: 11px 14px; border: 1px solid color-mix(in srgb, var(--brand-ink) 12%, transparent); border-radius: 9px; font-size: 12px; box-shadow: 0 8px 22px rgba(10, 18, 28, .18); }

html[data-theme="dark"] {
  --surface-raised: #151922;
  --muted: #a3a9b8;
  --soft: #202530;
  --line: #303541;
}
html[data-theme="dark"] .modal-backdrop { background: rgba(0, 0, 0, .62); }
html[data-theme="dark"] .modal, html[data-theme="dark"] .notification-popover { background: #151922; border-color: #303541; color: #eef0f5; }
html[data-theme="dark"] .modal-header h2, html[data-theme="dark"] .form-field label,
html[data-theme="dark"] .notification-header strong, html[data-theme="dark"] .notification-copy strong,
html[data-theme="dark"] .followup-copy strong { color: #eef0f5; }
html[data-theme="dark"] .form-control, html[data-theme="dark"] .search-box input,
html[data-theme="dark"] .select-filter, html[data-theme="dark"] .goal-input,
html[data-theme="dark"] .month-picker, html[data-theme="dark"] .auth-field input { background: #1a1e28; color: #eef0f5; border-color: #343b46; }
html[data-theme="dark"] .admin-shortcut-icon, html[data-theme="dark"] .metric-icon,
html[data-theme="dark"] .admin-stats-grid .metric-icon, html[data-theme="dark"] .suggestion-icon,
html[data-theme="dark"] .integration-icon { background: color-mix(in srgb, var(--button-primary) 14%, #1a1e28); }
html[data-theme="dark"] .target-card { background: color-mix(in srgb, var(--button-primary) 18%, #11141c); border-color: color-mix(in srgb, var(--button-primary) 34%, #303541); }
html[data-theme="dark"] .target-card .target-copy, html[data-theme="dark"] .target-total small { color: #cbd1de; }
html[data-theme="dark"] .notification-item:hover { background: color-mix(in srgb, var(--button-primary) 9%, #151922); }
html[data-theme="dark"] .department-welcome { color: #f0b3c7 !important; border-color: #604052; background: #2b2028; }
html[data-theme="dark"] .language-switch button.active { color: #f1f3f6; background: #383e48; }

@media (max-width: 760px) {
  .modal-backdrop { align-items: end; padding: 10px; }
  .modal { width: 100%; max-height: 88vh; border-radius: 14px 14px 10px 10px; }
  .modal-header, .modal-form { padding-inline: 16px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .form-field.full { grid-column: auto; }
  .modal-actions { position: sticky; bottom: -1px; padding: 12px 0 0; background: var(--surface-raised, #fff); }
  .notification-popover { right: 8px; width: min(390px, calc(100vw - 78px)); }
  .followup-row { align-items: flex-start; flex-wrap: wrap; }
}

/* One motion language across page changes, sheets, popovers and direct controls. */
:root { --motion-settle: cubic-bezier(.22, 1, .36, 1); --motion-quick: cubic-bezier(.2, .8, .2, 1); }
html { scroll-behavior: smooth; }
.page-content.page-enter { animation: page-arrive 240ms var(--motion-settle) both; }
html[data-page="department-appearance"] .page-content.page-enter { animation: department-appearance-arrive 200ms ease both; }
.nav-item, .button, .skyera-home-button, .notification-button, .theme-toggle, .language-switch button,
.department-select, .notification-action, .close-button { transition-timing-function: var(--motion-settle); }
.button-primary:active, .button-secondary:active, .auth-primary:active { transform: scale(.98); }
.modal-backdrop { animation: scrim-arrive 180ms var(--motion-quick) both; }
.modal { transform-origin: 50% 46%; animation: sheet-arrive 260ms var(--motion-settle) both; }
.notification-popover:not([hidden]) { transform-origin: top right; animation: popover-arrive 190ms var(--motion-settle) both; background: color-mix(in srgb, var(--surface-raised, #fff) 88%, transparent); backdrop-filter: saturate(170%) blur(18px); -webkit-backdrop-filter: saturate(170%) blur(18px); }
.toast { animation-duration: 220ms; animation-timing-function: var(--motion-settle); }
@keyframes page-arrive { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes department-appearance-arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes scrim-arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-arrive { from { opacity: 0; transform: translateY(9px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes popover-arrive { from { opacity: 0; transform: translateY(-4px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 760px) {
  .modal { transform-origin: 50% 100%; }
  @keyframes sheet-arrive { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
}
@media (prefers-reduced-transparency: reduce) {
  .notification-popover { background: var(--surface-raised, #fff); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .page-content.page-enter, .modal-backdrop, .modal, .notification-popover:not([hidden]) { animation: none; }
  .workspace-switcher-popover { transition-duration: .01ms; }
  .button-primary:active, .button-secondary:active, .auth-primary:active { transform: none; }
}

/* Department identity crossfade and palette handoff. */
.brand { position: relative; isolation: isolate; }
.brand-logo { transition: opacity 720ms cubic-bezier(0.22, 0.61, 0.36, 1); }
.brand-logo-transition-target { opacity: 0; }
.brand-logo-transition-target.is-entering { opacity: 1; }
.brand-logo-transition-clone { position: absolute; z-index: 1; inset-block-start: 0; inset-inline: 12px; width: calc(100% - 24px); max-width: 196px; height: 84px; object-fit: contain; object-position: left center; opacity: 1; pointer-events: none; transition: opacity 720ms cubic-bezier(0.22, 0.61, 0.36, 1); }
.brand-logo-transition-clone.is-leaving { opacity: 0; }
.brand-logo-transition-clone.logo-contrast-backing { box-sizing: border-box; padding: 8px 10px; border-radius: 10px; background: #f7f7f8; }
html.brand-theme-transition body, html.brand-theme-transition .sidebar, html.brand-theme-transition .topbar,
html.brand-theme-transition .department-select, html.brand-theme-transition .nav-item,
html.brand-theme-transition .panel, html.brand-theme-transition .metric-card, html.brand-theme-transition .department-card,
html.brand-theme-transition .department-subsection-card, html.brand-theme-transition .department-workspace-hero,
html.brand-theme-transition .button, html.brand-theme-transition .breadcrumbs,
html.brand-theme-transition .panel-title, html.brand-theme-transition .panel-subtitle {
  transition-property: color, background-color, border-color;
  transition-duration: 360ms, 360ms, 360ms;
  transition-timing-function: var(--motion-settle);
}
@media (prefers-reduced-motion: reduce) {
  .brand-logo, .brand-logo-transition-clone { transition: none; }
  .brand-logo-transition-target { opacity: 1; }
  .brand-logo-transition-clone { display: none; }
  html.brand-theme-transition body, html.brand-theme-transition .sidebar, html.brand-theme-transition .topbar,
  html.brand-theme-transition .department-select, html.brand-theme-transition .nav-item,
  html.brand-theme-transition .panel, html.brand-theme-transition .metric-card, html.brand-theme-transition .department-card,
  html.brand-theme-transition .department-subsection-card, html.brand-theme-transition .department-workspace-hero,
  html.brand-theme-transition .button, html.brand-theme-transition .breadcrumbs,
  html.brand-theme-transition .panel-title, html.brand-theme-transition .panel-subtitle { transition-duration: .01ms; }
}

/* SKYERA sign-in and account surfaces */
.auth-page {
  --auth-bg: #0b0d12;
  min-height: 100svh;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  padding: clamp(20px, 5vw, 64px);
  color: #f1f3f6;
  background: var(--auth-bg);
  font-family: var(--font-unified);
}
.auth-layout {
  width: min(1040px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  overflow: hidden;
  border: 1px solid #ffffff16;
  border-radius: 28px;
  background: #11141a;
  box-shadow: 0 36px 100px #0008, inset 0 1px #ffffff0a;
  animation: auth-in .62s cubic-bezier(.22, 1, .36, 1) both;
}
.auth-story {
  min-width: 0;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 5vw, 56px);
  overflow: hidden;
  border-right: 1px solid #ffffff10;
  background: #111821;
}
.auth-story::before, .auth-story::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.auth-story::before { inset: 0; opacity: .16; background-image: linear-gradient(#ffffff0b 1px, transparent 1px), linear-gradient(90deg, #ffffff0b 1px, transparent 1px); background-size: 46px 46px; mask-image: linear-gradient(135deg, #000, transparent 74%); }
.auth-story::after { width: 340px; height: 340px; right: -150px; bottom: -165px; border: 1px solid #64d2ff24; border-radius: 50%; }
.auth-logo { display: block; width: 164px; max-height: 62px; object-fit: contain; object-position: left center; margin: 0; }
.auth-story-copy { margin: auto 0; max-width: 390px; padding: 48px 0; }
.auth-kicker { display: inline-flex; align-items: center; gap: 9px; color: #a7b3c1; font-size: 10px; font-weight: 650; letter-spacing: .12em; }
.auth-kicker i { width: 7px; height: 7px; border-radius: 50%; background: #64d2ff; box-shadow: 0 0 0 4px #64d2ff18; }
.auth-story-label { margin: 36px 0 10px; color: #92a0af; font-size: 12px; letter-spacing: .02em; }
.auth-story-copy h2 { margin: 0; color: #f3f5f7; font: 550 clamp(38px, 5vw, 58px)/1.04 var(--font-heading); letter-spacing: -.055em; }
.auth-story-note { max-width: 310px; margin: 18px 0 0; color: #a0aab6; font-size: 13px; line-height: 1.7; }
.auth-story-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #697584; font-size: 9px; letter-spacing: .11em; }
.auth-story-footer span:first-child { color: #d7dce2; font-weight: 800; letter-spacing: .18em; }
.auth-card { align-self: center; width: auto; margin: 0; padding: clamp(30px, 5vw, 56px); border: 0; border-radius: 0; background: #11141a; box-shadow: none; animation: none; color: #edf0f4; }
.auth-card-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 38px; color: #768291; font-size: 9px; font-weight: 650; letter-spacing: .1em; }
.auth-mobile-logo { display: none; width: 112px; max-height: 42px; object-fit: contain; }
.auth-eyebrow { color: #64d2ff; font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.auth-card h1 { margin: 11px 0 0; color: #f3f5f7; font: 600 30px/1.2 var(--font-heading); letter-spacing: -.045em; }
.auth-subtitle { margin: 9px 0 28px; color: #9aa5b2; font-size: 13px; line-height: 1.6; }
.auth-form { gap: 16px; }
.auth-field { gap: 8px; color: #c6ccd4; font-size: 11px; font-weight: 600; }
.auth-field input { height: 48px; padding-inline: 14px; border: 1px solid #ffffff1b; border-radius: 11px; background: #0c0f14; color: #f2f4f7; font: 14px var(--font-body); }
.auth-field input::placeholder { color: #6f7a88; }
.auth-field input:focus { border-color: #64d2ff9c; box-shadow: 0 0 0 3px #64d2ff1c; }
.auth-primary { min-height: 48px; margin-top: 5px; border: 1px solid #71d5fb; border-radius: 11px; background: #64d2ff; color: #07131b; font-size: 13px; font-weight: 750; transition: transform .24s cubic-bezier(.22, 1, .36, 1), background .2s ease, box-shadow .2s ease; }
.auth-primary:hover { transform: translateY(-1px); background: #82dcff; box-shadow: 0 10px 26px #64d2ff20; }
.auth-link { margin-top: 17px; color: #8bdcff; font-size: 11px; font-weight: 600; }
.auth-link:hover { color: #c2edff; }
.auth-message { border-color: #64d2ff32; background: #15212b; color: #c5deeb; }
.auth-footnote { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 36px; padding-top: 15px; border-color: #ffffff12; color: #788391; font-size: 10px; }
.auth-secure-mark { color: #64d2ff; font-size: 15px; }

.account-trigger {
  display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 4px 8px 4px 12px;
  border: 1px solid transparent; border-radius: 12px; color: var(--label-primary, #273648); background: transparent;
  cursor: pointer; transition: background .2s var(--motion-settle), border-color .2s var(--motion-settle), transform .2s var(--motion-settle);
}
.account-trigger:hover, .account-trigger[aria-expanded="true"] { background: color-mix(in srgb, var(--surface-secondary, #f2f4f7) 78%, transparent); border-color: var(--line, #e2e6eb); }
.account-trigger:active { transform: scale(.985); }
.account-greeting { color: var(--muted, #758296); font-size: 11px; white-space: nowrap; }
.account-greeting strong { color: var(--label-primary, #26384c); font-weight: 650; }
.account-role { padding: 5px 8px; border: 1px solid color-mix(in srgb, var(--button-primary, #087df0) 22%, var(--line, #e1e6ed)); border-radius: 999px; color: var(--accent-ink, #087df0); background: color-mix(in srgb, var(--button-primary, #087df0) 7%, transparent); font-size: 9px; font-weight: 700; white-space: nowrap; }
.account-avatar { width: 31px; height: 31px; flex-basis: 31px; overflow: hidden; font-size: 10px; }
.account-chevron { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--muted, #758296); transition: transform .24s var(--motion-settle); }
.account-trigger[aria-expanded="true"] .account-chevron { transform: rotate(180deg); }
.account-menu-popover { position: absolute; z-index: 45; top: calc(100% + 12px); right: 0; width: min(300px, calc(100vw - 28px)); padding: 8px; border: 1px solid var(--line, #e1e6ed); border-radius: 16px; color: var(--label-primary, #26384c); background: color-mix(in srgb, var(--surface-raised, #fff) 88%, transparent); box-shadow: 0 20px 56px #12243b25; backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); transform-origin: top right; animation: popover-arrive .2s var(--motion-settle) both; }
.account-menu-popover[hidden] { display: none; }
.account-menu-identity { display: flex; align-items: center; gap: 11px; padding: 10px 9px 14px; margin-bottom: 5px; border-bottom: 1px solid var(--line, #e1e6ed); }
.account-menu-identity .avatar { width: 38px; height: 38px; flex-basis: 38px; overflow: hidden; }
.account-menu-identity > span:last-child { display: grid; gap: 4px; min-width: 0; }
.account-menu-identity strong, .account-menu-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-identity strong { font-size: 12px; }
.account-menu-identity small { color: var(--muted, #758296); font-size: 10px; }
.account-menu-popover > button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 9px; color: inherit; background: transparent; text-align: left; font: 500 11px var(--font-body); cursor: pointer; }
.account-menu-popover > button:hover { background: color-mix(in srgb, var(--button-primary, #087df0) 9%, transparent); }
.account-menu-popover > button span:last-child { color: var(--muted, #758296); font-size: 16px; }
.profile-settings { padding: 4px 22px 22px; }
.profile-settings-card { display: flex; align-items: center; gap: 15px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface-secondary, #f4f6f8) 62%, transparent); }
.profile-settings-avatar { position: relative; display: grid; place-items: center; width: 68px; height: 68px; flex: 0 0 68px; overflow: hidden; font-size: 17px; }
.profile-settings-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.profile-settings-identity { display: grid; gap: 5px; min-width: 0; }
.profile-settings-identity strong { overflow: hidden; color: var(--brand-ink); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.profile-settings-identity small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.profile-photo-action { justify-self: start; min-height: 24px; margin-top: 2px; font-size: 10px; }
.profile-settings-section { padding: 19px 3px 16px; border-bottom: 1px solid var(--line); }
.profile-settings-kicker { margin: 0 0 10px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.profile-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 35px; color: var(--muted); font-size: 11px; }
.profile-detail-row strong { color: var(--brand-ink); font-size: 11px; font-weight: 600; text-align: right; }
.profile-settings-note { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.profile-security { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; }
.profile-security .profile-settings-kicker { grid-column: 1 / -1; margin-bottom: 0; }
.profile-security > div { display: grid; gap: 5px; }
.profile-security > div strong { color: var(--brand-ink); font-size: 11px; }
.profile-security > div small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.profile-security .button { font-size: 10px; }
.profile-settings-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 17px; }

html[data-theme="dark"] .account-trigger { color: var(--label-primary, #eef0f5); }
html[data-theme="dark"] .account-greeting strong { color: var(--label-primary, #eef0f5); }
html[data-theme="dark"] .account-menu-popover { color: #eef0f5; border-color: #343b46; background: color-mix(in srgb, #151922 90%, transparent); box-shadow: 0 20px 56px #0008; }
html[data-theme="dark"] .account-menu-identity { border-color: #343b46; }
html[data-theme="dark"] .account-menu-popover > button:hover { background: #ffffff0c; }
html[data-theme="dark"] .profile-settings-card { background: color-mix(in srgb, var(--surface-secondary, #222630) 68%, transparent); }
html[data-theme="dark"] .profile-settings-identity strong, html[data-theme="dark"] .profile-detail-row strong, html[data-theme="dark"] .profile-security > div strong { color: #eef0f5; }

@media (max-width: 820px) {
  .auth-page { padding: 18px; }
  .auth-layout { width: min(520px, 100%); min-height: auto; grid-template-columns: 1fr; border-radius: 22px; }
  .auth-story { min-height: 205px; padding: 25px 28px; border-right: 0; border-bottom: 1px solid #ffffff10; }
  .auth-logo { width: 132px; }
  .auth-story-copy { margin: 28px 0 20px; padding: 0; }
  .auth-story-label, .auth-story-note, .auth-story-footer { display: none; }
  .auth-story-copy h2 { font-size: 34px; }
  .auth-card { padding: 30px 28px 26px; }
  .auth-card-brand { margin-bottom: 25px; }
}
@media (max-width: 560px) {
  .account-trigger { gap: 6px; padding: 4px; }
  .account-greeting, .account-role, .help-button span { display: none; }
  .account-avatar { width: 30px; height: 30px; flex-basis: 30px; }
  .topbar-actions { gap: 8px; }
  .profile-settings { padding-inline: 16px; }
  .profile-settings-card { padding: 14px; }
  .profile-settings-avatar { width: 56px; height: 56px; flex-basis: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-layout { animation: none; }
  .account-menu-popover { animation: none; }
}

.sidebar-logout-button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 7px 10px; margin-top: 7px;
  border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; text-align: left;
  font: 550 11px var(--font-body); cursor: pointer;
  transition: color .18s var(--motion-settle), background .18s var(--motion-settle), border-color .18s var(--motion-settle);
}
.sidebar-logout-button svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-logout-button:hover { color: #b43c4b; border-color: color-mix(in srgb, #b43c4b 18%, var(--line)); background: color-mix(in srgb, #b43c4b 7%, transparent); }
html[data-theme="dark"] .sidebar-logout-button:hover { color: #ff9ba4; border-color: #79343e; background: #351d25; }
@media (max-width: 760px) {
  .sidebar-logout-button { justify-content: center; width: 40px; min-height: 40px; padding: 0; margin: 5px auto 0; }
  .sidebar-logout-button span { display: none; }
}

.lead-controls { display: grid; gap: 12px; margin-bottom: 14px; }
.lead-controls-top, .lead-filter-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; }
.lead-controls .search-box { flex: 1 1 340px; max-width: 520px; }
.lead-view-switch, .lead-product-filters { display: flex; align-items: center; gap: 4px; min-width: 0; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-secondary, #f5f6f8); }
.lead-view-switch button, .lead-product-filter { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 6px 12px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font: 550 11px var(--system-font); white-space: nowrap; transition: color .16s ease, background-color .16s ease, box-shadow .16s ease; }
.lead-view-switch button.active, .lead-product-filter.active { color: var(--brand-ink); background: var(--surface-raised, #fff); box-shadow: 0 1px 3px #10182818; }
.lead-product-filters { flex: 0 1 auto; }
.lead-select-filters { display: flex; flex: 1 1 auto; justify-content: flex-end; gap: 8px; min-width: 0; }
.lead-select-filters .select-filter { min-width: 145px; max-width: 210px; }
.lead-product-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.lead-product-badges > span { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 7px; border: 1px solid color-mix(in srgb, var(--blue) 16%, var(--line)); border-radius: 6px; color: var(--accent-ink, var(--blue)); background: color-mix(in srgb, var(--blue) 7%, var(--surface-raised, #fff)); font-size: 10px; font-weight: 650; white-space: nowrap; }
.lead-kanban-wrap { display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; padding: 1px 1px 12px; scrollbar-width: thin; }
.lead-kanban-column { display: grid; flex: 0 0 236px; gap: 10px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-secondary, #f5f6f8); }
.lead-kanban-column > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; }
.lead-kanban-column > header > strong { display: grid; min-width: 24px; height: 24px; place-items: center; border-radius: 7px; color: var(--muted); background: var(--surface-raised, #fff); font-size: 10px; font-variant-numeric: tabular-nums; }
.lead-kanban-cards { display: grid; align-content: start; gap: 8px; min-height: 72px; }
.lead-kanban-card { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-raised, #fff); }
.lead-kanban-title { display: grid; gap: 4px; min-width: 0; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; }
.lead-kanban-title strong { overflow: hidden; color: var(--brand-ink); font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.lead-kanban-title span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.lead-kanban-meta, .lead-kanban-meta > span, .lead-kanban-footer { display: flex; align-items: center; gap: 7px; }
.lead-kanban-meta { justify-content: space-between; color: var(--muted); font-size: 9px; }
.lead-kanban-meta .avatar { width: 21px; height: 21px; flex-basis: 21px; font-size: 8px; }
.lead-kanban-footer { justify-content: space-between; border-top: 1px solid var(--line); padding-top: 8px; }
.lead-kanban-footer .status-pill { font-size: 9px; }
.lead-kanban-empty { margin: 0; padding: 14px 4px; color: var(--muted); font-size: 10px; text-align: center; }
.lead-product-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.lead-product-choice { min-height: 30px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface-raised, #fff); font-size: 10px; font-weight: 650; }
.lead-product-choice.active { border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); color: var(--accent-ink, var(--blue)); background: var(--blue-soft); }
.crm-recent-panel { margin-bottom: 14px; }
.overview-target-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 16px; padding: 15px 18px; margin-top: 16px; }
.overview-target-copy { display: flex; align-items: center; justify-content: space-between; gap: 12px; grid-column: 1; }
.overview-target-copy .page-note { margin: 5px 0 0; }
.overview-target-copy > strong { color: var(--accent-ink); font-size: 18px; font-variant-numeric: tabular-nums; }
.overview-target-summary > .progress-track { grid-column: 1; }
.overview-target-summary > .button { grid-column: 2; grid-row: 1 / span 2; }
.crm-recent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 16px 16px; }
.crm-recent-lead { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: inherit; background: var(--surface-raised, #fff); text-align: left; }
.crm-recent-lead:hover { border-color: var(--blue); background: var(--surface-secondary, #f5f6f8); }
.crm-recent-company { display: grid; flex: 1 1 auto; min-width: 0; gap: 4px; }
.crm-recent-company strong, .crm-recent-company small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-recent-company strong { color: var(--brand-ink); font-size: 11px; font-weight: 650; }
.crm-recent-company small { color: var(--muted); font-size: 9px; }
html[data-theme="dark"] .lead-view-switch, html[data-theme="dark"] .lead-product-filters, html[data-theme="dark"] .lead-kanban-column { background: var(--surface-secondary, #20242b); }
html[data-theme="dark"] .lead-view-switch button.active, html[data-theme="dark"] .lead-product-filter.active, html[data-theme="dark"] .lead-kanban-column > header > strong, html[data-theme="dark"] .lead-kanban-card { background: var(--surface, #191c22); }
html[data-theme="dark"] .lead-product-badges > span { background: color-mix(in srgb, var(--blue) 14%, #191c22); }
@media (max-width: 760px) {
  .lead-controls-top, .lead-filter-row { align-items: stretch; flex-direction: column; gap: 9px; }
  .lead-controls .search-box { flex: auto; max-width: none; }
  .lead-view-switch { align-self: flex-start; }
  .lead-product-filters { align-self: flex-start; max-width: 100%; overflow-x: auto; }
  .lead-select-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
  .lead-select-filters .select-filter { width: 100%; min-width: 0; max-width: none; }
  .lead-kanban-column { flex-basis: min(78vw, 260px); }
  .crm-recent-grid { grid-template-columns: 1fr; padding-inline: 10px; }
  .crm-recent-lead { flex-wrap: wrap; }
  .overview-target-summary { grid-template-columns: minmax(0, 1fr); }
  .overview-target-summary > .button { grid-column: 1; grid-row: auto; justify-self: start; }
}
