/* 18-brand.css — The Esdora brand layer (brandbook 1.0): restyles the components of every file
   above. Keep it after them; a rule moved above it loses to it.
   Part of the CRM stylesheet: the files load in number order (components/app_styles.html) and later
   rules win, exactly as when this was one file. */

/* ==========================================================================
   Esdora — the brand layer (brandbook 1.0). Later rules win, so this restyles every component above.
   ========================================================================== */
body { font-size: 16px; line-height: 1.5; font-weight: 500; background: var(--bg); }
b, strong { font-weight: 700; }

/* The Ink sidebar */
.sidebar { background: var(--sidebar); border-right: 0; color: var(--on-sidebar); scrollbar-color: var(--sidebar-line) transparent; }
.brand { padding: 6px 12px 26px; }
.brand img { height: 28px; width: auto; }
.nav-title { color: #6B7A74; }
.nav-link { color: var(--sidebar-muted); font-weight: 600; border-radius: 12px; }
.nav-link svg { color: var(--sidebar-muted); }
.nav-link:hover { background: var(--sidebar-hover); color: var(--on-sidebar); }
.nav-link:hover svg { color: var(--on-sidebar); }
.nav-link.active { background: var(--sidebar-active); color: var(--on-sidebar); font-weight: 700; }
.nav-link.active svg { color: var(--mint); }
.nav-link.active::before { background: var(--mint); }
.nav-bottom { border-top-color: var(--sidebar-line); }
.sidebar-user { background: var(--sidebar-hover); border-color: var(--sidebar-line); border-radius: 16px; }
.sidebar-user-link .meta b { color: var(--on-sidebar); }
.sidebar-user-link .meta span { color: var(--sidebar-muted); }
.sidebar-user .btn-ghost { color: var(--sidebar-muted); }
.sidebar-user .btn-ghost:hover { background: var(--sidebar-active); color: var(--on-sidebar); }
.sidebar-prefs .segmented { background: var(--sidebar-hover); }
.sidebar-prefs .lang-switch button { color: var(--sidebar-muted); }
.sidebar-prefs .lang-switch button.active { background: var(--sidebar-line); color: var(--on-sidebar); box-shadow: none; }
.sidebar-prefs .icon-btn { background: transparent; border-color: var(--sidebar-line); color: var(--sidebar-muted); }
.sidebar-prefs .icon-btn:hover { background: var(--sidebar-active); color: var(--on-sidebar); }
.home-screen-btn { background: var(--sidebar-active); color: var(--mint); }
.sidebar .nav-badge { background: var(--danger); }
[data-theme="dark"] .sidebar .nav-badge { background: #B91C1C; color: #fff; }

/* Paper canvas, white cards */
.main { background: var(--bg); }
.panel { background: var(--bg); border: 0; border-radius: 0; padding: 28px 36px 48px; }
.topbar { background: var(--bg); padding: 0 36px; }
.topbar-search input { background: var(--surface); border-color: var(--border); border-radius: var(--radius-pill); }
.topbar-search kbd { border-radius: 6px; }
.icon-btn { background: var(--surface); border-color: var(--border); }
.card, .stat, .settings-card, .table-wrap, .filters-bar .filters-extra, .kcard, .pcard { border-radius: var(--radius-lg); }
.card, .stat, .settings-card, .table-wrap { border-color: var(--border); }
.card-highlight { border: 1px solid var(--accent-soft-2); }
a.stat:hover, a.settings-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: none; }
.stat.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Type: few sizes, used the same way everywhere (brandbook hierarchy) */
.page-title { font-size: 32px; line-height: 38px; font-weight: 700; letter-spacing: -.02em; }
.page-sub { font-size: 15px; }
.section-title { font-size: 20px; line-height: 26px; font-weight: 700; letter-spacing: -.02em; }
.field > label, .label { font-size: 13px; line-height: 18px; font-weight: 700; color: var(--text); }
.stat-label, .stat-label.plain { font-size: 13px; font-weight: 700; color: var(--muted); }
.stat-value { font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.table th { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--surface-3); border-bottom-color: var(--border); }
.table td { font-size: 14px; }
.table .num, .num, .money { font-variant-numeric: tabular-nums; }
.link { color: var(--accent); font-weight: 700; }
.link:hover { color: var(--accent-strong); }
.accent { color: var(--accent); }

/* Buttons: the capsule */
.btn { height: 40px; padding: 0 18px; border-radius: var(--radius-pill); border-color: var(--border-strong); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 700; }
.btn:hover { background: var(--surface-3); }
.btn-primary, .btn-accent, .btn-dark { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: none; }
.btn-primary:hover, .btn-accent:hover, .btn-dark:hover { background: var(--primary-strong); border-color: var(--primary-strong); }
[data-theme="dark"] .btn-primary, [data-theme="dark"] .btn-accent, [data-theme="dark"] .btn-dark { color: var(--on-primary); }
.btn-soft { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { height: 32px; padding: 0 13px; border-radius: var(--radius-pill); font-size: 13px; }
.btn-block { height: 46px; }
.btn-icon { border-radius: var(--radius-pill); border-color: transparent; background: transparent; color: var(--faint); padding: 0; width: 34px; height: 34px; }
.btn-icon:hover { color: var(--danger); background: var(--danger-soft); }
.create-menu[open] > summary { background: var(--primary-strong); }
.create-menu-list { border-radius: 16px; box-shadow: var(--shadow); }

/* Inputs */
.input, .select, .textarea, .search-select .input { border-color: var(--border-strong); border-radius: var(--radius); background-color: var(--surface); font-size: 15px; font-weight: 500; }
.input:hover:not(:focus), .select:hover:not(:focus), .textarea:hover:not(:focus) { border-color: var(--text-2); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
:is(a, button, summary, [tabindex]):focus-visible { outline-color: var(--accent); }
.checkbox, .check-list input { accent-color: var(--accent); }
.check-tile { border-color: var(--border-strong); border-radius: var(--radius); }
.check-tile:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* Chips, badges, segmented controls: all capsules */
.badge, .chip-count, .due, .stage-chip, .pill-tab, .direction, .channel, .listen, .match-badge, .reason, .delta-chip { border-radius: var(--radius-pill); }
.badge { font-size: 12.5px; font-weight: 700; }
.segmented { border-radius: var(--radius-pill); background: var(--surface-3); }
.segmented label, .segmented a, .lang-switch button { border-radius: var(--radius-pill); }
.pill-tab.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pager a, .pager span { border-radius: var(--radius-pill); }
.pager .current { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.stage-pill.active { border-color: var(--text); background: var(--surface); color: var(--text); }
.stage-pill.active b { background: var(--primary); color: var(--on-primary); }
.summary-item.tone-red { background: var(--danger-soft); } .summary-item.tone-red b { color: var(--danger); }
.summary-item.tone-amber { background: var(--warning-soft); } .summary-item.tone-amber b { color: var(--warning); }
.summary-item.tone-green { background: var(--success-soft); } .summary-item.tone-green b { color: var(--success); }
.direction.outgoing { background: var(--surface-3); color: var(--text-2); }
.listen { background: var(--accent-soft); color: var(--accent); }

/* Boards: sunken columns, white cards */
.column { background: var(--surface-3); border-color: transparent; border-radius: var(--radius-lg); }
.column.drag-over { background: var(--accent-soft); border-color: var(--accent-soft-2); }
.kcard { border-color: var(--border); box-shadow: none; }
.kcard:hover { box-shadow: var(--shadow-sm); }
.task-check { border-color: var(--border-strong); }
.task-check:hover { border-color: var(--success); color: var(--success); background: var(--success-soft); }
.task-check.is-checked { border-color: var(--success); background: var(--success); color: var(--surface); }

/* Onboarding: the one place Mint marks progress */
.onboarding { background: var(--surface); border-color: var(--border); }
.onboarding-ring { background: conic-gradient(var(--mint) calc(var(--p) * 1%), var(--surface-3) 0); }
.onboarding-kicker { color: var(--accent); }
.onboarding-steps li.is-done .onboarding-mark { background: var(--success); }

/* Drawers, menus, toasts */
.drawer { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.drawer-overlay { background: rgba(13, 20, 18, .42); }
.drawer-hero.tinted { background: linear-gradient(180deg, var(--accent-soft), transparent); }
.search-select-menu { border-radius: var(--radius); box-shadow: var(--shadow); }
.search-select-option.active, .search-select-option:hover { background: var(--surface-3); }

/* Status heatmap and the visit banner in brand tones */
.heatmap .l1 { background: #E3F4EC; } .heatmap .l2 { background: #A8E2C8; } .heatmap .l3 { background: #4FBF94; } .heatmap .l4 { background: #087A55; }
[data-theme=dark] .heatmap .l1 { background: #12352A; } [data-theme=dark] .heatmap .l2 { background: #1A5A44; } [data-theme=dark] .heatmap .l3 { background: #23A378; } [data-theme=dark] .heatmap .l4 { background: #2EE6A6; }
.visit-bar { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 25%, transparent); color: var(--warning); }
.error-code { color: var(--text); }
.error-code::after { content: ""; display: block; width: 64px; height: 24px; margin: 18px auto 0; border-radius: 12px; background: var(--mint); transform: rotate(-24deg); }

/* Sign-in: an Ink panel with the capsule pattern, a Paper form */
.auth-art { background: var(--sidebar); }
.auth-art::before { content: ""; position: absolute; inset: -20%; pointer-events: none; opacity: .9;
  background: repeating-linear-gradient(-24deg, transparent 0 46px, rgba(244, 245, 242, .035) 46px 86px); }
.auth-art::after { content: ""; position: absolute; right: 12%; top: 34%; width: 180px; height: 72px; border-radius: 36px; background: var(--mint); transform: rotate(-24deg); }
.auth-art > * { position: relative; z-index: 1; }
.auth-art h1 { font-size: 48px; line-height: 52px; font-weight: 800; letter-spacing: -.03em; max-width: 520px; }
.auth-art p { color: #A3ADA8; font-size: 18px; line-height: 28px; }
.auth-feats div { background: #151F1C; border-color: #26332F; border-radius: 20px; }
.auth-feats b { color: #F4F5F2; }
.auth-form { background: var(--bg); }
.auth-form > form h1, .auth-form > form h2 { font-size: 32px; line-height: 38px; font-weight: 700; }
.auth-form .btn-block { border-radius: var(--radius-pill) !important; }

/* The owner's platform page */
.platform-agency { border-radius: var(--radius-lg); }

@media (max-width: 820px) {
  .panel { padding: 18px 14px 30px; }
  .topbar { background: color-mix(in srgb, var(--bg) 92%, transparent); padding: 0 12px; }
  .drawer { border-radius: 0; }
  body { font-size: 16px; }
}
@media (max-width: 640px) {
  .panel { padding-left: 12px; padding-right: 12px; }
  .page-title { font-size: 26px; line-height: 32px; }
}

.heat-legend .heat-l1 { background: #E3F4EC; } .heat-legend .heat-l2 { background: #A8E2C8; }
.heat-legend .heat-l3 { background: #4FBF94; } .heat-legend .heat-l4 { background: #087A55; }
.dash-grid { grid-template-columns: 290px minmax(0, 1fr) 290px; gap: 14px; }
@media (max-width: 1280px) { .dash-grid { grid-template-columns: 280px minmax(0, 1fr); } }
@media (max-width: 820px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
[data-theme=dark] .heat-legend .heat-l1 { background: #12352A; } [data-theme=dark] .heat-legend .heat-l2 { background: #1A5A44; }
[data-theme=dark] .heat-legend .heat-l3 { background: #23A378; } [data-theme=dark] .heat-legend .heat-l4 { background: #2EE6A6; }

