
/* ═══════════════════════════════════════════════════════════════════════════
   THE ADMIN KIT

   One stylesheet for every Firm Admin and Klonza Admin screen. Klonza's
   neutrals and status colours, the brand pair, seven type sizes, one of each
   part. A screen names a colour from here (var(--k-*)) or it does not get
   one: an inline hex is a bug.

   Each firm swaps the brand pair for its own two colours (its look in Firm
   Admin): every --k-accent-* and --k-second-* value comes from lookCss, which
   picks white or ink words by contrast, so no colour a firm types leaves a
   word unreadable. Words in the brand colour use --k-accent-text, never
   --k-accent, and success is green whatever the firm's colour is.
   ═══════════════════════════════════════════════════════════════════════════ */


:root {
    /* ── Klonza's neutrals and status colours (src/brand/palette.ts) ─────── */
    --k-ink: #141B2B;          /* the menu */
    --k-text: #141B2B;
    --k-muted: #5B6475;
    --k-line: #E3E6EC;
    --k-ground: #F5F6F8;
    --k-surface: #FFFFFF;
    --k-field: #8A93A6;      /* input borders, 3:1 on white */
    --k-green: #177A41;
    --k-green-soft: #E5F4EB;
    --k-amber: #9A5300;
    --k-amber-soft: #FDF0DC;
    --k-red: #B42318;
    --k-red-soft: #FCE7E5;
    --k-blue: #1F56C2;
    --k-blue-soft: #E6EEFB;

    /* ── The brand pair: Klonza's navy and orange here; a firm's page sets its
       own two (lookCss), each with the words worked out to read on it. ──── */
    --k-accent: #0E1B33; --k-on-accent: #FFFFFF; --k-accent-hover: #303B50; --k-accent-text: #0E1B33; --k-accent-soft: #E4E6E9; --k-on-accent-soft: #0E1B33; --k-second: #FF7A45; --k-on-second: #141B2B; --k-second-hover: #FF8F63; --k-second-text: #D43C00; --k-second-soft: #FFF0EB; --k-on-second-soft: #CA3900; --k-focus: #D43C00;

    /* ── Derived, never new colours ─────────────────────────────────────── */
    --k-accent-deep: var(--k-accent-hover);
    --k-hover: color-mix(in srgb, var(--k-ground) 55%, var(--k-surface));
    --k-ink-2: color-mix(in srgb, var(--k-ink) 88%, #fff);                 /* menu hover */
    --k-ink-3: color-mix(in srgb, var(--k-ink) 80%, #fff);                 /* menu active */
    --k-ink-text: color-mix(in srgb, var(--k-surface) 80%, var(--k-ink));
    --k-ink-muted: color-mix(in srgb, var(--k-surface) 58%, var(--k-ink));

    /* ── Type: seven sizes ──────────────────────────────────────────────── */
    --k-font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --k-mono: ui-monospace, 'SFMono-Regular', Menlo, monospace;
    --k-32: 2rem; --k-24: 1.5rem; --k-18: 1.125rem; --k-16: 1rem;
    --k-14: 0.875rem; --k-13: 0.8125rem; --k-12: 0.75rem;

    --k-r: 14px;
    --k-r-sm: 10px;
    --k-menu-w: 232px;

    /* ── The premium look (owner's Look A, 12 Nov 2026): a warm light ground,
       a light menu, white cards with a soft shadow, navy words. Flame is
       only for counts that need someone and for the main action. ────────── */
    --k-ink: #0E1B33;
    --k-text: #0E1B33;
    --k-muted: #5B667D;                 /* the faintest real words go */
    --k-ground: #F7F5F0;
    --k-line: #EBE8E1;
    --k-hair: rgba(14, 27, 51, .07);
    /* Owner, 12 Nov 2026 (option A): Admin is always Klonza's orange and
       navy. A firm shows itself by its name, letter and logo only; its own
       colours paint its flyers, pages and app, never Admin. */
    --k-accent: #FF7A45;
    --k-accent-hover: #FF9A6B;
    --k-on-accent: #0E1B33;
    --k-accent-text: #B9461C;
    --k-accent-soft: #FFF0E9;
    --k-on-accent-soft: #8A3414;
    --k-focus: #B9461C;
    --k-action: linear-gradient(135deg, #FF9A6B 0%, #FF7A45 100%);
    --k-flame: #FF7A45;
    --k-flame-soft: #FFF0E9;
    --k-flame-text: #B9461C;
    --k-card-r: 24px;
    --k-shadow: 0 1px 0 var(--k-hair), 0 12px 30px -12px rgba(14, 27, 51, .14);
    --k-shadow-sm: 0 1px 0 var(--k-hair), 0 6px 14px -8px rgba(14, 27, 51, .22);
    --k-hero: linear-gradient(135deg, #0E1B33 0%, #1E3266 100%);
    --k-nav-text: #3B4763;
    --k-nav-bg: color-mix(in srgb, var(--k-surface) 55%, var(--k-ground));
    --k-nav-on-bg: var(--k-surface);
    --k-nav-on-text: var(--k-text);
    --k-chip: #EEF1F7;
    --k-pill-bg: rgba(31, 169, 113, .2);
    --k-pill-text: #7FE0B5;
    color-scheme: light;
}

/* ── The dark look (Look B, Midnight): each staff member picks Automatic
   (the computer's own setting, the default), Light or Dark; the page carries
   data-theme from the server, so there is no flash of the other look. ── */
:root[data-theme="dark"] {
    color-scheme: dark;
    --k-ink: #F4F1EA;
    --k-text: #F4F1EA;
    --k-muted: #C4CBDB;
    --k-ground: #0A1430;
    --k-surface: #132049;
    --k-line: rgba(244, 241, 234, .12);
    --k-hair: rgba(244, 241, 234, .08);
    --k-field: #7482A8;
    --k-hover: #18275A;
    --k-nav-text: #C4CBDB;
    --k-nav-bg: #0D1838;
    --k-chip: #1D2D63;
    --k-flame-soft: rgba(255, 122, 69, .16);
    --k-flame-text: #FFB08A;
    --k-green: #B9C6F0;
    --k-green-soft: rgba(185, 198, 240, .14);
    --k-amber: #FFC08A;
    --k-amber-soft: rgba(255, 192, 138, .14);
    --k-red: #FF9C92;
    --k-red-soft: rgba(255, 156, 146, .14);
    --k-blue: #A9C4FF;
    --k-blue-soft: rgba(169, 196, 255, .14);
    --k-accent: #FF7A45;
    --k-accent-hover: #FF9A6B;
    --k-on-accent: #0E1B33;
    --k-accent-text: #FFB08A;
    --k-accent-soft: rgba(255, 122, 69, .16);
    --k-focus: #FF9A6B;
    --k-shadow: 0 0 0 1px rgba(244, 241, 234, .08), 0 18px 34px -18px rgba(0, 0, 0, .55);
    --k-shadow-sm: 0 0 0 1px rgba(244, 241, 234, .08), 0 8px 16px -10px rgba(0, 0, 0, .5);
    --k-hero: linear-gradient(135deg, #22357A 0%, #172656 100%);
    --k-on-accent-soft: #FFD9C7;
    --k-nav-on-bg: #FF7A45;
    --k-nav-on-text: #0E1B33;
    --k-pill-bg: rgba(255, 122, 69, .18);
    --k-pill-text: #FFC2A6;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
    color-scheme: dark;
    --k-ink: #F4F1EA;
    --k-text: #F4F1EA;
    --k-muted: #C4CBDB;
    --k-ground: #0A1430;
    --k-surface: #132049;
    --k-line: rgba(244, 241, 234, .12);
    --k-hair: rgba(244, 241, 234, .08);
    --k-field: #7482A8;
    --k-hover: #18275A;
    --k-nav-text: #C4CBDB;
    --k-nav-bg: #0D1838;
    --k-chip: #1D2D63;
    --k-flame-soft: rgba(255, 122, 69, .16);
    --k-flame-text: #FFB08A;
    --k-green: #B9C6F0;
    --k-green-soft: rgba(185, 198, 240, .14);
    --k-amber: #FFC08A;
    --k-amber-soft: rgba(255, 192, 138, .14);
    --k-red: #FF9C92;
    --k-red-soft: rgba(255, 156, 146, .14);
    --k-blue: #A9C4FF;
    --k-blue-soft: rgba(169, 196, 255, .14);
    --k-accent: #FF7A45;
    --k-accent-hover: #FF9A6B;
    --k-on-accent: #0E1B33;
    --k-accent-text: #FFB08A;
    --k-accent-soft: rgba(255, 122, 69, .16);
    --k-focus: #FF9A6B;
    --k-shadow: 0 0 0 1px rgba(244, 241, 234, .08), 0 18px 34px -18px rgba(0, 0, 0, .55);
    --k-shadow-sm: 0 0 0 1px rgba(244, 241, 234, .08), 0 8px 16px -10px rgba(0, 0, 0, .5);
    --k-hero: linear-gradient(135deg, #22357A 0%, #172656 100%);
    --k-on-accent-soft: #FFD9C7;
    --k-nav-on-bg: #FF7A45;
    --k-nav-on-text: #0E1B33;
    --k-pill-bg: rgba(255, 122, 69, .18);
    --k-pill-text: #FFC2A6;
    }
}


* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--k-font);
    font-size: var(--k-14);
    line-height: 1.5;
    background: var(--k-ground);
    color: var(--k-text);
    display: flex;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'ss01', 'cv11';
}
a { color: var(--k-accent-text); }
a:hover { color: var(--k-text); }
h1, h2, h3, h4 { color: var(--k-text); letter-spacing: -0.01em; }
h2 { font-size: var(--k-18); font-weight: 600; }
h3 { font-size: var(--k-16); font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--k-line); }
code { font-family: var(--k-mono); font-size: 0.92em; }
.mono { font-family: var(--k-mono); }
.money { font-variant-numeric: tabular-nums; font-weight: 600; }
td.num, th.num, .num { text-align: right; font-variant-numeric: tabular-nums; }
small, .k-help { font-size: var(--k-13); color: var(--k-muted); }

*:focus-visible { outline: 2px solid var(--k-focus); outline-offset: 2px; }

/* ═══ THE MENU ═══════════════════════════════════════════════════════════ */
.sidebar {
    width: var(--k-menu-w);
    background: var(--k-ink);
    color: var(--k-ink-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    height: 100vh;
    z-index: 50;
    transition: transform .2s ease-in-out, width .15s;
}
.sidebar a { color: inherit; text-decoration: none; }
.sidebar-header {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 14px 10px;
}
.ws-mark {
    width: 28px; height: 28px; flex: none; border-radius: var(--k-r-sm);
    background: var(--k-accent); color: var(--k-on-accent);
    box-shadow: 0 0 0 1px color-mix(in srgb, #fff 18%, transparent);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: var(--k-14);
    overflow: hidden;
}
.ws-mark img { width: 100%; height: 100%; object-fit: cover; }
.sidebar .ws-mark { color: var(--k-on-accent); }
.ws-name { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.ws-name b { font-size: var(--k-14); font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-name span { font-size: var(--k-12); color: var(--k-ink-muted); }
.nav-search-hint {
    display: flex; align-items: center; gap: 8px;
    margin: 4px 12px 8px; height: 36px; padding: 0 10px;
    border-radius: var(--k-r-sm); border: 0; cursor: pointer;
    background: var(--k-ink-2); color: var(--k-ink-muted);
    font: 400 var(--k-13) var(--k-font); text-align: left; width: calc(100% - 24px);
}
.nav-search-hint span { flex: 1; }
.nav-search-hint kbd { font-family: var(--k-mono); font-size: 11px; }
.nav-search-hint:hover { color: #fff; }
.nav-collapse-btn {
    background: none; border: none; color: var(--k-ink-muted);
    cursor: pointer; font-size: var(--k-13); padding: 4px 6px; border-radius: var(--k-r-sm);
}
.nav-collapse-btn:hover { color: #fff; background: var(--k-ink-2); }

.sidebar-nav { flex: 1; list-style: none; overflow-y: auto; padding: 0 12px 12px; scrollbar-width: thin; scrollbar-color: var(--k-ink-3) transparent; }
.sidebar-nav ul { list-style: none; }
.sidebar-section-title, .nav-sec {
    font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--k-ink-muted); padding: 14px 10px 6px; pointer-events: none;
}
.sidebar-nav li a {
    display: flex; align-items: center; gap: 10px;
    height: 34px; padding: 0 10px; border-radius: var(--k-r-sm);
    font-size: var(--k-14); color: var(--k-ink-text);
}
.sidebar-nav li a i { width: 16px; text-align: center; font-size: 13px; opacity: .7; }
.sidebar-nav li a span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-nav li a:hover { background: var(--k-ink-2); color: #fff; }
.sidebar-nav li a.active { background: var(--k-ink-3); color: #fff; font-weight: 500; box-shadow: none; }
.sidebar-nav li a.active i { opacity: 1; color: color-mix(in srgb, var(--k-accent) 45%, #fff); }
.nav-badge {
    font-variant-numeric: tabular-nums; font-size: 11px; line-height: 20px; height: 20px;
    padding: 0 6px; border-radius: 4px;
    background: var(--k-second); color: var(--k-on-second);
}
.super-pill {
    font-size: 10px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
    padding: 1px 6px; border-radius: 4px;
    background: var(--k-second) !important; color: var(--k-on-second) !important;
}
.sidebar-footer {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px 14px; border-top: 1px solid var(--k-ink-2);
}
.sidebar-footer .avatar {
    width: 28px; height: 28px; border-radius: 50%; flex: none;
    background: var(--k-ink-3); color: var(--k-ink-text);
    display: inline-flex; align-items: center; justify-content: center; font-size: var(--k-12); font-weight: 600;
}
.sidebar-footer .who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.sidebar-footer .who b { font-size: var(--k-13); font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer .who span { font-size: var(--k-12); color: var(--k-ink-muted); }
.sidebar-footer .out { color: var(--k-ink-muted); font-size: var(--k-13); padding: 6px; border-radius: var(--k-r-sm); }
.sidebar-footer .out:hover { color: #fff; background: var(--k-ink-2); }
.user-info { display: flex; align-items: center; gap: 8px; font-size: var(--k-13); }

/* Collapsed menu: icons only, label on hover. "[" toggles it. */
body.nav-collapsed .sidebar { width: 62px; }
body.nav-collapsed .main-content { margin-left: 62px; width: calc(100% - 62px); }
body.nav-collapsed .ws-name,
body.nav-collapsed .nav-search-hint span,
body.nav-collapsed .nav-search-hint kbd,
body.nav-collapsed .sidebar-nav a span,
body.nav-collapsed .nav-badge,
body.nav-collapsed .nav-sec,
body.nav-collapsed .sidebar-section-title,
body.nav-collapsed .super-pill,
body.nav-collapsed .sidebar-footer .who { display: none; }
body.nav-collapsed .sidebar-header { flex-direction: column; padding: 14px 0 8px; }
body.nav-collapsed .nav-search-hint { width: 38px; margin: 4px auto 8px; justify-content: center; padding: 0; }
body.nav-collapsed .sidebar-nav { padding: 0 8px 12px; }
body.nav-collapsed .sidebar-nav li a { justify-content: center; padding: 0; }
body.nav-collapsed .nav-collapse-btn { transform: rotate(180deg); }
body.nav-collapsed .sidebar-footer { flex-direction: column; padding: 10px 0 14px; }
body.nav-collapsed .sidebar-nav li a { position: relative; }
body.nav-collapsed .sidebar-nav li a:hover::after {
    content: attr(data-label); position: absolute; left: 100%; margin-left: 10px;
    background: var(--k-text); color: var(--k-surface); padding: 4px 10px; border-radius: var(--k-r-sm);
    font-size: var(--k-12); white-space: nowrap; z-index: 60; pointer-events: none;
}

/* ═══ PAGE FRAME ═════════════════════════════════════════════════════════ */
.main-content {
    flex: 1;
    min-width: 0;
    margin-left: var(--k-menu-w);
    width: calc(100% - var(--k-menu-w));
    padding: 0;
}
.header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 20px 32px 4px;
    background: transparent;
    border: 0;
}
.page-title { font-size: var(--k-24); font-weight: 600; letter-spacing: -0.02em; color: var(--k-text); }
.user-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header.header-bare { display: none; }
.admin-page { padding: 20px 32px 48px; }
.k-page { padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 24px; max-width: 1480px; }
.admin-page .page-header, .page-header {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 16px;
}
.admin-page .page-header h1, .admin-page > h1, .page-header h1 {
    font-size: var(--k-24); font-weight: 600; letter-spacing: -0.02em; margin: 0;
}
.k-eyebrow { font-size: var(--k-12); letter-spacing: 0.06em; text-transform: uppercase; color: var(--k-muted); }
.k-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.k-head h1 { font-size: var(--k-32); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.k-head .k-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.k-lede { font-size: var(--k-16); color: var(--k-muted); max-width: 760px; }

/* Flash messages and alerts */
.k-flash { margin: 12px 32px 0; padding: 12px 16px; border-radius: var(--k-r); font-size: var(--k-14); }
.k-flash.ok, .alert-success { background: var(--k-green-soft); color: var(--k-green); }
.k-flash.bad, .alert-danger { background: var(--k-red-soft); color: var(--k-red); }
.alert { padding: 12px 16px; border-radius: var(--k-r); margin-bottom: 16px; font-size: var(--k-14); border: 0; }
.alert-warning { background: var(--k-amber-soft); color: var(--k-amber); }
.alert-info { background: var(--k-blue-soft); color: var(--k-blue); }

/* ═══ HUB TABS: related screens inside one page ══════════════════════════ */
.hub-tabs, .k-tabs {
    display: flex; flex-wrap: wrap; gap: 4px;
    margin: 0 32px 20px; padding: 0;
    border-bottom: 1px solid var(--k-line);
}
.admin-page .hub-tabs, .k-page .k-tabs { margin-left: 0; margin-right: 0; }
.hub-tab, .k-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 12px; margin-bottom: -1px;
    font-size: var(--k-14); color: var(--k-muted); text-decoration: none;
    background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
}
.hub-tab:hover, .k-tab:hover { color: var(--k-text); border-color: var(--k-line); }
.hub-tab.active, .k-tab.on { color: var(--k-text); border-bottom-color: var(--k-text); font-weight: 500; background: none; }
.hub-tab .n, .k-tab .n { font-variant-numeric: tabular-nums; font-size: var(--k-12); color: var(--k-amber); }
.tab-nav { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--k-line); margin-bottom: 20px; }
.tab-nav button, .tab-nav a {
    padding: 10px 12px; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
    cursor: pointer; font: 400 var(--k-14) var(--k-font); color: var(--k-muted); text-decoration: none;
}
.tab-nav button:hover, .tab-nav a:hover { color: var(--k-text); }
.tab-nav button.active, .tab-nav a.active { color: var(--k-text); border-bottom-color: var(--k-text); font-weight: 500; }

/* ═══ SURFACES ═══════════════════════════════════════════════════════════ */
.card, .k-panel {
    background: var(--k-surface);
    border: 1px solid var(--k-line);
    border-radius: var(--k-r);
    box-shadow: none;
    margin-bottom: 24px;
    overflow: hidden;
}
.k-panel { margin-bottom: 0; }
.card:has(table) { overflow-x: auto; }
.card-header {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 16px 20px; border-bottom: 1px solid var(--k-line);
}
.card-title { font-size: var(--k-16); font-weight: 600; color: var(--k-text); }
.card-body { padding: 20px; }
.k-pad { padding: 20px; }

.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px; background: var(--k-line); border: 1px solid var(--k-line);
    border-radius: var(--k-r); overflow: hidden; margin-bottom: 24px;
}
.stat-card { background: var(--k-surface); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; border: 0; border-radius: 0; box-shadow: none; }
.stat-title { font-size: var(--k-12); letter-spacing: .06em; text-transform: uppercase; color: var(--k-muted); font-weight: 400; margin: 0; }
.stat-value { font-family: var(--k-font); font-size: 1.75rem; font-weight: 500; color: var(--k-text); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-change { font-size: var(--k-13); color: var(--k-muted); margin: 0; }
.stat-change.positive { color: var(--k-green); }
.stat-change.negative { color: var(--k-red); }

/* ═══ TABLES: search, filters, saved views, CSV, then rows ═══════════════ */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; background: var(--k-surface); font-size: var(--k-14); }
th, td { padding: 12px 16px; text-align: left; }
th {
    font-size: var(--k-12); font-weight: 500; color: var(--k-muted);
    text-transform: none; letter-spacing: 0;
    background: var(--k-surface); border-bottom: 1px solid var(--k-line);
    white-space: nowrap;
}
td { border-bottom: 1px solid color-mix(in srgb, var(--k-line) 60%, var(--k-surface)); color: var(--k-text); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
/* A row's own label (a th in the body: a fact, a bill line) wraps like its value; only column heads stay on one line. */
table.k-cards tbody th { white-space: normal; }
/* A line of money's words (a bill, a statement) read like any line, at every width; the figure is beside them. */
table.k-cards tbody th:has(+ td.num) { font-size: var(--k-14); font-weight: 400; color: var(--k-text); background: none; border-bottom: 1px solid var(--k-hair); }
table.k-cards tbody tr:last-child > th:has(+ td.num) { border-bottom: none; }
tbody tr:hover td { background: var(--k-hover); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { padding: 10px 16px; background: var(--k-surface); }
.admin-table td { padding: 12px 16px; font-size: var(--k-14); }
.admin-table-compact th, .admin-table-compact td { padding: 9px 10px; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 36px; height: 36px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--k-r-sm); font-size: var(--k-13); color: var(--k-text); text-decoration: none;
}
.pagination a { border: 1px solid var(--k-line); background: var(--k-surface); }
.pagination a:hover { border-color: var(--k-field); }
.pagination .active, .pagination a.active { background: var(--k-text); border-color: var(--k-text); color: var(--k-surface); }

.filter-bar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.filter-bar input[type="text"], .filter-bar input[type="search"] { min-width: 220px; }

/* ═══ BUTTONS: one primary per screen ════════════════════════════════════ */
.btn, .btn-sm {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: 500 var(--k-14)/1 var(--k-font);
    border-radius: var(--k-r-sm); border: 1px solid var(--k-line);
    background: var(--k-surface); color: var(--k-text);
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background-color .15s, border-color .15s, color .15s;
}
.btn { height: 40px; padding: 0 16px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: var(--k-13); }
.btn:hover, .btn-sm:hover { border-color: var(--k-field); color: var(--k-text); }
.btn-primary, .btn.primary { background: var(--k-accent); border-color: var(--k-accent); color: var(--k-on-accent); }
.btn-primary:hover, .btn.primary:hover { background: var(--k-accent-hover); border-color: var(--k-accent-hover); color: var(--k-on-accent); }
.btn-secondary { background: var(--k-surface); border-color: var(--k-line); color: var(--k-text); }
.btn-secondary:hover { background: var(--k-hover); border-color: var(--k-field); color: var(--k-text); }
.btn-success { background: var(--k-green); border-color: var(--k-green); color: var(--k-surface); }
.btn-success:hover { background: color-mix(in srgb, var(--k-green) 84%, #000); color: var(--k-surface); }
.btn-danger { background: var(--k-surface); border-color: color-mix(in srgb, var(--k-red) 30%, var(--k-surface)); color: var(--k-red); }
.btn-danger:hover { background: var(--k-red); border-color: var(--k-red); color: var(--k-surface); }
.btn-warning { background: var(--k-amber-soft); border-color: var(--k-amber-soft); color: var(--k-amber); }
.btn-quiet, .btn.quiet { background: transparent; border-color: transparent; color: var(--k-accent-text); }
.btn[disabled], .btn-sm[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; }

/* ═══ FORMS: labelled, with help text under the field ════════════════════ */
input[type="text"], input[type="email"], input[type="number"], input[type="date"],
input[type="datetime-local"], input[type="time"], input[type="search"], input[type="tel"],
input[type="url"], input[type="password"], input:not([type]), select, textarea, .form-control {
    font: 400 var(--k-14) var(--k-font);
    color: var(--k-text);
    background: var(--k-surface);
    border: 1px solid var(--k-field);
    border-radius: var(--k-r-sm);
    padding: 0 12px;
    min-height: 40px;
    max-width: 100%;
}
textarea, textarea.form-control { padding: 10px 12px; line-height: 1.5; resize: vertical; min-height: 88px; }
.form-control { display: block; width: 100%; }
select[multiple] { padding: 6px; }
input:focus, select:focus, textarea:focus, .form-control:focus {
    outline: 2px solid color-mix(in srgb, var(--k-accent) 35%, transparent);
    outline-offset: 0;
    border-color: var(--k-accent-text);
    box-shadow: none;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--k-muted) 75%, var(--k-surface)); }
label, .form-label { font-size: var(--k-13); font-weight: 500; color: var(--k-text); }
.form-group { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
fieldset { border: 0; min-width: 0; }
legend { font-size: var(--k-14); font-weight: 500; margin-bottom: 6px; }
.form-group label + .form-control, .form-group label + input, .form-group label + select, .form-group label + textarea { margin-top: 0; }
.k-field { display: grid; gap: 6px; margin-bottom: 16px; }
.k-field .help, .form-text { font-size: var(--k-13); font-weight: 400; color: var(--k-muted); }

.k-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.k-chip {
    display: inline-flex; align-items: center; gap: 6px; position: relative;
    height: 32px; padding: 0 12px; border-radius: var(--k-r-sm);
    border: 1px solid var(--k-line); background: var(--k-surface);
    font-size: var(--k-13); font-weight: 500; color: var(--k-muted);
    cursor: pointer; user-select: none;
}
.k-chip input { position: absolute; opacity: 0; pointer-events: none; }
.k-chip:hover { border-color: var(--k-field); }
.k-chip:has(input:checked), .k-chip.on { background: var(--k-text); border-color: var(--k-text); color: var(--k-surface); }
.k-chip input:focus-visible + span { outline: 2px solid var(--k-focus); outline-offset: 3px; border-radius: 3px; }

.k-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--k-r); background: color-mix(in srgb, var(--k-line) 70%, var(--k-ground)); }
.k-seg > * {
    border: 0; background: transparent; height: 32px; padding: 0 12px; border-radius: var(--k-r-sm);
    display: inline-flex; align-items: center;
    font: 500 var(--k-13) var(--k-font); color: var(--k-muted); text-decoration: none; cursor: pointer;
}
.k-seg > .on, .k-seg > .active, .k-seg label:has(input:checked), .k-seg > label.on:not(:has(input)) {
    background: var(--k-surface); color: var(--k-text); box-shadow: 0 1px 2px rgba(15, 23, 20, .08);
}
.k-seg label { display: inline-flex; align-items: center; cursor: pointer; }
/* The page a list is on, among its page numbers: dark, never the flame (one orange button a page). */
.btn.k-page-on { background: var(--k-text); border-color: var(--k-text); color: var(--k-surface); cursor: default; }

/* ═══ STATUS: the same few words, the same look, everywhere ══════════════ */
.status-badge, .badge, .tag {
    display: inline-flex; align-items: center; gap: 6px;
    height: 22px; padding: 0 8px; border-radius: 4px;
    font-size: var(--k-12); font-weight: 500; letter-spacing: 0; text-transform: none;
    white-space: nowrap; vertical-align: middle;
    background: var(--k-ground); color: var(--k-muted);
}
.tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge-status, .status-inactive, .badge-secondary, .tag.neutral { background: var(--k-ground); color: var(--k-muted); }
.status-active, .status-success, .badge-success, .tag.ok { background: var(--k-green-soft); color: var(--k-green); }
.status-pending, .status-warning, .badge-warning, .tag.warn { background: var(--k-amber-soft); color: var(--k-amber); }
.status-danger, .badge-danger, .tag.bad { background: var(--k-red-soft); color: var(--k-red); box-shadow: none; }
.status-info, .badge-info, .tag.info { background: var(--k-blue-soft); color: var(--k-blue); }

/* ═══ SMALL PARTS ════════════════════════════════════════════════════════ */
.progress-bar { height: 6px; background: var(--k-line); border-radius: 3px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--k-accent-text); border-radius: 3px; transition: width .3s; }
.chart-container { position: relative; height: 300px; width: 100%; }
.modal-overlay { position: fixed; inset: 0; background: color-mix(in srgb, var(--k-ink) 55%, transparent); display: flex; justify-content: center; align-items: center; z-index: 100; }
.modal-content { background: var(--k-surface); border-radius: var(--k-r); padding: 24px; max-width: 420px; width: 92%; box-shadow: 0 24px 48px rgba(15, 23, 20, .18); }
.k-empty { border: 1px dashed var(--k-field); border-radius: var(--k-r); padding: 28px; display: flex; flex-direction: column; gap: 6px; color: var(--k-muted); }
.k-empty b { font-size: var(--k-16); color: var(--k-text); font-weight: 600; }

/* Folded blocks: the summary still says the answer. */
.k-fold { border: 1px solid var(--k-line); border-radius: var(--k-r); background: var(--k-surface); margin-bottom: 16px; }
.k-fold > summary { cursor: pointer; padding: 14px 18px; font-weight: 600; font-size: var(--k-14); list-style: none; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.k-fold > summary::-webkit-details-marker { display: none; }
.k-fold > summary::before { content: "\25B8"; color: var(--k-muted); font-size: 12px; }
.k-fold[open] > summary::before { content: "\25BE"; }
.k-fold > summary .k-fold-value { font-weight: 400; color: var(--k-muted); font-size: var(--k-13); }
.k-fold > .k-fold-body { padding: 0 18px 16px; }

.k-split { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; align-items: start; }
.k-stack { display: grid; gap: 16px; }
.k-work { display: grid; grid-template-columns: 1fr minmax(300px, 380px); gap: 16px; align-items: start; }

/* Count cards for a dashboard. */
.action-inbox { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px; background: var(--k-line); border: 1px solid var(--k-line); border-radius: var(--k-r); overflow: hidden; margin: 0 32px 24px; }
.inbox-card { display: flex; align-items: center; gap: 12px; background: var(--k-surface); padding: 14px 16px; text-decoration: none; color: var(--k-text); border: 0; }
.inbox-card:hover { background: var(--k-hover); }
.inbox-card .count { font-variant-numeric: tabular-nums; font-size: 1.4rem; font-weight: 500; min-width: 2.4rem; text-align: right; }
.inbox-card .label { font-size: var(--k-13); color: var(--k-muted); line-height: 1.3; }
.inbox-card.kind-warning .count { color: var(--k-amber); }
.inbox-card.kind-danger .count { color: var(--k-red); }

/* ═══ HOME: the to-do list ═══════════════════════════════════════════════ */
.k-todo a, .k-todo > div {
    display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 20px; align-items: center;
    padding: 16px 20px; border-top: 1px solid color-mix(in srgb, var(--k-line) 60%, var(--k-surface));
    text-decoration: none; color: var(--k-text);
}
.k-todo a:hover { background: var(--k-hover); color: var(--k-text); }
.k-todo .n { font-variant-numeric: tabular-nums; font-size: var(--k-24); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.k-todo .n.warn { color: var(--k-amber); }
.k-todo .n.bad { color: var(--k-red); }
.k-todo .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.k-todo .t b { font-size: var(--k-14); font-weight: 500; }
.k-todo .t span { font-size: var(--k-13); color: var(--k-muted); }
.k-todo .go { font-size: var(--k-13); font-weight: 500; color: var(--k-accent-text); }
.k-cols { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.k-cols > .main { flex: 999 1 520px; min-width: 0; }
.k-cols > .side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
/* An invoice in Klonza Admin on a phone: Record a payment comes first, above the long invoice (16 Nov 2026, journey F9). */
@media (max-width: 760px) { .k-cols > .side:has(.k-record-pay) { order: -1; } }
.k-dark { background: var(--k-ink); color: var(--k-ink-text); border-radius: var(--k-r); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.k-dark .k-eyebrow { color: var(--k-ink-muted); }
.k-list > div { display: flex; gap: 14px; padding: 8px 0; font-size: var(--k-14); }
.k-list .when { width: 76px; flex: none; font-variant-numeric: tabular-nums; font-size: var(--k-13); color: var(--k-muted); }

/* ═══ MODULES: on/off switches ═══════════════════════════════════════════ */
.k-switch { position: relative; width: 44px; height: 26px; flex: none; border-radius: 13px; border: 0; background: var(--k-field); cursor: pointer; }
.k-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left .15s; }
.k-switch.on, .k-switch[aria-checked="true"] { background: var(--k-accent-text); }
.k-switch.on::after, .k-switch[aria-checked="true"]::after { left: 21px; }
.k-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 20px; border-top: 1px solid color-mix(in srgb, var(--k-line) 60%, var(--k-surface)); }
.k-row .t b { display: block; font-size: var(--k-14); font-weight: 500; }
.k-row .t span { font-size: var(--k-13); color: var(--k-muted); }
.k-lock { font-size: var(--k-12); color: var(--k-muted); display: inline-flex; align-items: center; gap: 6px; }
.k-banner { margin: 0 32px 16px; padding: 12px 16px; border-radius: var(--k-r); background: var(--k-blue-soft); color: var(--k-blue); font-size: var(--k-14); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.k-banner a { color: inherit; font-weight: 500; }

/* ═══ QUICK JUMP (⌘K) ════════════════════════════════════════════════════ */
.nav-palette-backdrop { position: fixed; inset: 0; background: color-mix(in srgb, var(--k-ink) 55%, transparent); z-index: 100; display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.nav-palette-backdrop.open { display: flex; }
.nav-palette { width: min(520px, 92vw); background: var(--k-surface); border-radius: 12px; box-shadow: 0 24px 60px rgba(15, 23, 20, .3); overflow: hidden; }
.nav-palette input { width: 100%; border: 0; outline: 0; min-height: 52px; padding: 0 18px; font-size: var(--k-16); border-bottom: 1px solid var(--k-line); border-radius: 0; }
.nav-palette input:focus { outline: 0; }
.nav-palette-results { max-height: 46vh; overflow-y: auto; list-style: none; padding: 6px; }
.nav-palette-results li a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--k-r-sm); color: var(--k-text); text-decoration: none; font-size: var(--k-14); }
.nav-palette-results li a .group-hint { margin-left: auto; font-size: var(--k-12); color: var(--k-muted); }
.nav-palette-results li a:hover, .nav-palette-results li.selected a { background: var(--k-accent-soft); }
.nav-palette-empty { padding: 14px 18px; color: var(--k-muted); font-size: var(--k-14); }
/* A page found by an older name says so under its name. */
.nav-palette-results li a .nav-palette-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.nav-palette-results li a .was-hint { font-size: var(--k-12); color: var(--k-muted); }
.nav-palette-results li.nav-palette-empty a { display: inline; padding: 0; color: var(--k-accent-text); font-weight: 600; background: none; }


/* ═══ PHONES: nothing scrolls sideways, targets stay 40px+ ═══════════════ */
/* The Look page's logo: a preview box, a real button to choose it, then save (journey F12). */
.k-logopick { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.k-logo-preview { width: 160px; height: 96px; flex: none; display: grid; place-items: center; border-radius: var(--k-r-sm); background: #fff; box-shadow: 0 0 0 1px var(--k-line); padding: 8px; overflow: hidden; }
/* Sized in pixels: a percentage of a grid cell grows with the picture, and a square logo spilled out of the box. */
.k-logo-preview img { max-width: 144px; max-height: 80px; width: auto; height: auto; object-fit: contain; }
.k-logo-letter { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--k-hero); color: #fff; font-weight: 700; font-size: var(--k-24); }
.k-logopick-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; flex: 1 1 220px; }
.k-filebtn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
/* One styled file picker (live walk F6, D7): the label is the button; the browser's own box stays for the keyboard only. */
.k-filepick { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; }
.k-filepick:has(.k-fileinput:focus-visible) .k-filebtn { outline: 2px solid var(--k-accent-text); outline-offset: 2px; }
.k-filepick[data-sending] .k-filebtn { opacity: .6; pointer-events: none; }
/* Any other file box in the Admin wears the kit's button, never the browser's plain grey one. */
input[type="file"]:not(.k-sr) { font: inherit; font-size: var(--k-14); color: var(--k-muted); }
input[type="file"]:not(.k-sr)::file-selector-button { font: inherit; font-weight: 600; color: var(--k-text); background: var(--k-surface); border: 1px solid var(--k-field); border-radius: 999px; padding: 8px 16px; margin-right: 12px; cursor: pointer; }
input[type="file"]:not(.k-sr)::file-selector-button:hover { border-color: var(--k-text); }
.k-logopick:has(#logoFile:focus-visible) .k-filebtn { outline: 2px solid var(--k-accent-text); outline-offset: 2px; }
/* A box whose choices can be long: its words end in "..." before the arrow, never under it. */
select.k-select-fit { width: 100%; max-width: 100%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; padding-right: 36px; }
.k-phonebar { display: none; }
.k-phonebrand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--k-text); text-decoration: none; }
.k-phonebrand-words { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.k-phonebrand-words b { font-size: var(--k-14); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-phonebrand-words span { font-size: var(--k-13); color: var(--k-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-menu-toggle { display: none; font-size: 1.25rem; background: none; border: 0; color: var(--k-text); cursor: pointer; width: 40px; height: 40px; border-radius: var(--k-r-sm); }
@media (max-width: 900px) {
    .k-split, .k-work { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar, body.nav-collapsed .sidebar { width: var(--k-menu-w); transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--k-ink) 45%, transparent); }
    .main-content, body.nav-collapsed .main-content { margin-left: 0; width: 100%; overflow-x: hidden; }
    body.nav-collapsed .ws-name, body.nav-collapsed .sidebar-nav a span, body.nav-collapsed .nav-sec,
    body.nav-collapsed .nav-search-hint span, body.nav-collapsed .sidebar-footer .who { display: revert; }
    .nav-collapse-btn { display: none; }
    .mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .header, .header.header-bare { display: flex; justify-content: flex-start; padding: 8px 14px; background: var(--k-ground); }
    /* The phone's top bar: the firm's logo (or letter) and name, the page's name, the menu (owner, 16 Nov 2026, journey decision 7). */
    .k-phonebar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 30; padding: 8px 8px 8px 16px; background: var(--k-ground); border-bottom: 1px solid color-mix(in srgb, var(--k-line) 70%, transparent); }
    .header .page-title { font-size: var(--k-18); margin-right: auto; }
    .admin-page, .k-page { padding: 12px 16px 48px; }
    .hub-tabs, .k-tabs { margin: 0 16px 16px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
    .admin-page .hub-tabs { margin-left: 0; margin-right: 0; }
    .hub-tab, .k-tab { white-space: nowrap; }
    .k-flash, .k-banner, .action-inbox { margin-left: 16px; margin-right: 16px; }
    .btn, .btn-sm, .hub-tab, .k-chip, .k-seg > * { min-height: 40px; }
    input, select, textarea, .form-control { min-height: 44px; font-size: 16px; }
    .filter-bar, .admin-page .page-header { flex-direction: column; align-items: stretch; }
    .filter-bar > *, .filter-bar input, .filter-bar select { width: 100%; }
    .k-head h1 { font-size: var(--k-24); }
    .k-todo a { grid-template-columns: 64px minmax(0, 1fr); }
    .k-todo .go { display: none; }
    .card { overflow-x: visible; }
    .card:has(table) { overflow-x: auto; }
    table.k-cards, table.k-cards thead { display: block; }
    table.k-cards thead { display: none; }
    table.k-cards tbody, table.k-cards tr, table.k-cards td { display: block; width: 100%; }
    table.k-cards tr { border: 1px solid var(--k-line); border-radius: var(--k-r); margin-bottom: 10px; padding: 10px 12px; background: var(--k-surface); }
    table.k-cards td { border: 0; padding: 4px 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
    table.k-cards td::before { content: attr(data-label); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--k-muted); flex: 0 0 5.5rem; }
    table.k-cards td[data-label=""]::before, table.k-cards td:not([data-label])::before { display: none; }
    table.k-cards td.num { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
@media print {
    .sidebar, .header, .hub-tabs, .mobile-menu-toggle, .k-phonebar { display: none !important; }
    .main-content { margin: 0; width: 100%; }
}

/* ═══ HUB HEADER: the menu item's tabs, above the screen ═════════════════ */
.k-hubhead { padding: 20px 32px 0; display: flex; flex-direction: column; gap: 6px; }
.k-hubhead .hub-tabs { margin: 0; }
.k-hubhead .k-hubtitle { margin-top: 18px; }
.header.header-tools { display: none; }
.has-hub .admin-page .page-header h1, .has-hub .admin-page > h1 { font-size: var(--k-24); }
.has-hub .admin-page { padding-top: 20px; }
@media (max-width: 768px) {
    .header.header-tools { display: flex; }
    .k-hubhead { padding: 4px 16px 0; }
    .k-hubhead .hub-tabs { margin: 0; }
}
.hub-tabs-sub { border-bottom: 0; gap: 2px; margin-bottom: 16px; }
.hub-tabs-sub .hub-tab { border: 0; border-radius: var(--k-r-sm); padding: 6px 10px; font-size: var(--k-13); margin: 0; }
.hub-tabs-sub .hub-tab.active { background: var(--k-surface); box-shadow: inset 0 0 0 1px var(--k-line); }

/* Screens built without .admin-page / .k-page still get the page margins. */
.page-body { padding: 0 32px 48px; }
.page-body:has(> .admin-page), .page-body:has(> .k-page) { padding: 0; }
@media (max-width: 768px) {
    .page-body { padding: 0 16px 48px; }
    .page-body:has(> .admin-page), .page-body:has(> .k-page) { padding: 0; }
}

/* ═══ MENU GROUPS ════════════════════════════════════════════════════════ */
.nav-group-block { list-style: none; }
.nav-group-list { list-style: none; }
.nav-item { position: relative; }
body.nav-collapsed .nav-sec { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   THE PREMIUM LOOK (Look A, 12 Nov 2026)

   Laid over the kit above, so every screen gets it: a warm light ground, a
   light menu whose page is a white raised pill, white cards with a soft
   shadow, Inter with tight big titles, figures in the same type as the words.
   ═══════════════════════════════════════════════════════════════════════════ */

body { background: var(--k-ground); color: var(--k-text); font-size: var(--k-14); }
h1, h2, h3, h4 { letter-spacing: -0.02em; }
h2 { font-weight: 700; }
.ph { flex: none; vertical-align: middle; }
.ph-dt { fill: var(--k-flame); opacity: .25; }

/* ── The menu ──────────────────────────────────────────────────────────── */
.sidebar {
    background: var(--k-nav-bg);
    border-right: 1px solid var(--k-hair);
    color: var(--k-text);
    padding: 22px 14px 14px;
}
.sidebar-header { flex-direction: column; align-items: stretch; gap: 16px; padding: 0 0 16px; }
.k-brand { display: inline-flex; padding: 2px 10px; align-self: flex-start; }
.k-brand .k-logo { height: 22px; width: auto; }
.ws-chip {
    display: flex; align-items: center; gap: 10px; padding: 10px; margin: 0 2px;
    border-radius: 14px; background: var(--k-surface); box-shadow: var(--k-shadow-sm);
}
.sidebar .ws-mark, .ws-mark {
    width: 30px; height: 30px; border-radius: 9px; box-shadow: none;
    background: var(--k-hero); color: #fff; font-size: var(--k-13); font-weight: 700;
}
/* A logo sits on white, never on the dark tile: a dark logo vanished on it. */
.sidebar .ws-mark:has(img), .ws-mark:has(img) { background: #fff; padding: 3px; box-shadow: 0 0 0 1px var(--k-line); }
.ws-mark img { object-fit: contain; }
.ws-name b, .sidebar .ws-name b { color: var(--k-text); font-weight: 600; font-size: var(--k-14); }
.ws-name span, .sidebar .ws-name span { color: var(--k-muted); }
.sidebar-nav { padding: 4px 0 12px; scrollbar-color: var(--k-line) transparent; }
.sidebar-nav li a {
    height: 40px; padding: 0 12px; border-radius: 12px; gap: 12px;
    font-size: 14.5px; font-weight: 500; color: var(--k-nav-text);
}
.sidebar-nav li a .ph { opacity: 1; color: var(--k-muted); }
.sidebar-nav li a i { color: var(--k-muted); opacity: 1; }
.sidebar-nav li a:hover { background: color-mix(in srgb, var(--k-surface) 70%, transparent); color: var(--k-text); }
.k-logo-dark { display: none; }
:root[data-theme="dark"] .k-logo-light { display: none; }
:root[data-theme="dark"] .k-logo-dark { display: inline; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .k-logo-light { display: none; }
    :root:not([data-theme="light"]) .k-logo-dark { display: inline; }
}
.sidebar-nav li a.active {
    background: var(--k-nav-on-bg); color: var(--k-nav-on-text); font-weight: 600;
    box-shadow: var(--k-shadow-sm);
}
.sidebar-nav li a.active .ph, .sidebar-nav li a.active i { color: var(--k-nav-on-text); }
.sidebar-footer { border-top: 1px solid var(--k-hair); padding: 12px 4px 0; }
.k-look { display: flex; gap: 2px; padding: 3px; margin: 0 0 10px; border-radius: 12px; background: color-mix(in srgb, var(--k-line) 55%, transparent); }
.k-look button {
    flex: 1; height: 30px; border: 0; border-radius: 9px; background: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; color: var(--k-muted);
}
.k-look button:hover { color: var(--k-text); }
.k-look button.on { background: var(--k-surface); color: var(--k-text); box-shadow: var(--k-shadow-sm); }
.sidebar-footer .avatar { background: var(--k-hero); color: #fff; }
.sidebar-footer .who b { color: var(--k-text); }
.sidebar-footer .who span { color: var(--k-muted); }
.sidebar-footer .out, .sidebar-footer .out:hover { color: var(--k-muted); background: none; border: 0; cursor: pointer; display: inline-flex; }
.sidebar-footer .out:hover { color: var(--k-text); }

.nav-search-hint, .nav-search-hint:hover {
    width: 100%; margin: 0 0 10px; height: 38px; padding: 0 12px; gap: 10px; border-radius: 12px;
    background: color-mix(in srgb, var(--k-line) 55%, transparent); color: var(--k-muted); font-weight: 500;
}
.nav-search-hint:hover { color: var(--k-text); }
.nav-search-hint kbd { font-family: var(--k-font); font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; background: var(--k-surface); color: var(--k-muted); }
.nav-palette { border-radius: 20px; }
.nav-palette-results li a .ph { color: var(--k-muted); }
[hidden] { display: none !important; }

/* ── The page's top: a small label, a big tight title, its "?" ─────────── */
.header { padding: 32px 38px 10px; align-items: flex-end; }
.k-titlebox { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.k-titleline { display: flex; align-items: center; gap: 10px; }
.page-title { font-size: 30px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
.k-eyebrow { font-size: var(--k-12); font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--k-muted); }
.k-eyebrow a { color: inherit; text-decoration: none; }
.k-eyebrow a:hover { color: var(--k-text); }
.k-eyebrow a { display: inline-flex; align-items: center; gap: 2px; }
.k-back { transform: rotate(180deg); margin-left: -4px; }
body.is-home .header { display: none; }

.k-about { position: relative; }
.k-about > summary {
    list-style: none; cursor: pointer; width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--k-surface); color: var(--k-muted); box-shadow: var(--k-shadow-sm);
}
.k-about > summary::-webkit-details-marker { display: none; }
.k-about > summary:hover, .k-about[open] > summary { color: var(--k-text); }
.k-about-body {
    position: absolute; z-index: 40; top: 38px; left: 0; width: min(440px, 80vw);
    background: var(--k-surface); border-radius: 16px; box-shadow: var(--k-shadow), 0 0 0 1px var(--k-hair);
    padding: 14px 16px; font-size: var(--k-14); font-weight: 400; letter-spacing: 0; color: var(--k-text); line-height: 1.55;
}

/* The pages inside a menu item, as pills; then a page's own tabs, underlined. */
.k-sectabs { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 4px; margin: 8px 38px 18px; padding: 4px; width: fit-content; max-width: calc(100% - 76px);
    border-radius: 14px; background: color-mix(in srgb, var(--k-line) 65%, var(--k-ground)); }
/* One line at any width: a row longer than the page scrolls sideways, never wraps (journey F14); the page's own tabs too. */
.k-sectabs::-webkit-scrollbar, .hub-tabs::-webkit-scrollbar, .k-tabs::-webkit-scrollbar { display: none; }
.hub-tabs, .k-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.hub-tab, .k-tab { white-space: nowrap; flex: none; }
.k-more-right { mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.k-more-left { mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
.k-more-left.k-more-right { mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
/* With its arrow, a row fades on the left only: the arrow on the right says there is more (live walk D1). */
.k-has-more.k-more-right { mask-image: none; }
.k-has-more.k-more-left { mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
.k-tabmore { position: sticky; right: 0; flex: none; align-self: center; margin-left: auto; width: 32px; height: 32px; border-radius: 999px;
    border: 1px solid var(--k-hair); background: var(--k-surface); color: var(--k-text); font-size: 22px; line-height: 1; cursor: pointer;
    box-shadow: -14px 0 14px 4px color-mix(in srgb, var(--k-ground) 85%, transparent); display: inline-flex; align-items: center; justify-content: center; }
.k-tabmore[hidden] { display: none; }
.k-sectab { flex: none; }
.k-sectab { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 10px;
    font-size: var(--k-14); font-weight: 500; color: var(--k-nav-text); text-decoration: none; white-space: nowrap; }
.k-sectab:hover { color: var(--k-text); }
.k-sectab.active { background: var(--k-surface); color: var(--k-text); font-weight: 600; box-shadow: var(--k-shadow-sm); }
.hub-tabs, .k-tabs { margin: 0 0 20px; border-bottom: 1px solid var(--k-line); }
.hub-tab, .k-tab { font-weight: 500; color: var(--k-muted); }
.hub-tab.active, .k-tab.on { color: var(--k-text); border-bottom-color: var(--k-flame); font-weight: 600; }

.page-body { padding: 4px 38px 56px; }
.page-body:has(> .admin-page), .page-body:has(> .k-page) { padding: 4px 38px 56px; }
.admin-page, .k-page { padding: 0; max-width: 1320px; }
.k-flash { margin: 0 38px 16px; border-radius: 14px; font-weight: 500; }

/* ── Surfaces ──────────────────────────────────────────────────────────── */
.card, .k-panel, .k-fold {
    border: 0; border-radius: var(--k-card-r);
    background: var(--k-surface); box-shadow: var(--k-shadow);
}
.card { margin-bottom: 20px; }
.card-header { padding: 18px 24px; border-bottom: 1px solid var(--k-hair); }
.card-title { font-size: var(--k-16); font-weight: 700; letter-spacing: -0.01em; }
.card-body, .k-pad { padding: 22px 24px; }
.stats-grid { gap: 14px; background: none; border: 0; border-radius: 0; overflow: visible; }
.stat-card { border-radius: 18px; background: color-mix(in srgb, var(--k-ground) 60%, var(--k-surface)); padding: 16px 18px; }
.card .stat-card { background: var(--k-ground); }
.stats-grid > .stat-card:only-child, .stats-grid:not(.card .stats-grid) > .stat-card { background: var(--k-surface); box-shadow: var(--k-shadow); }
.stat-title { font-size: var(--k-13); text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--k-muted); }
.stat-value { font-family: var(--k-font); font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; }

table { background: transparent; }
th { background: transparent; font-size: var(--k-12); font-weight: 600; color: var(--k-muted); padding-top: 14px; }
td { border-bottom: 1px solid var(--k-hair); }
th, td { padding-left: 20px; padding-right: 20px; }
tbody tr:hover td { background: color-mix(in srgb, var(--k-ground) 55%, var(--k-surface)); }
.card > table thead th:first-child, .card > .table-responsive table thead th:first-child { padding-left: 24px; }
.card > table td:first-child { padding-left: 24px; }

/* ── Buttons: round, one main action ───────────────────────────────────── */
.btn, .btn-sm { border-radius: 999px; font-weight: 600; border-color: var(--k-hair); box-shadow: 0 1px 2px rgba(14, 27, 51, .06); }
.btn { height: 42px; padding: 0 20px; }
.btn-sm { height: 34px; padding: 0 14px; }
.btn-secondary, .btn:not(.btn-primary):not(.primary):not(.btn-danger):not(.btn-success):not(.btn-warning):not(.btn-quiet):not(.quiet) { background: var(--k-surface); border-color: var(--k-line); }
.btn-primary, .btn.primary, .btn-primary:hover, .btn.primary:hover {
    background: var(--k-action); border-color: transparent; color: var(--k-on-accent);
    box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--k-accent) 70%, transparent);
}
.btn-primary:hover, .btn.primary:hover { filter: brightness(1.04); }
.btn-quiet, .btn.quiet { box-shadow: none; }
.btn .ph, .btn-sm .ph { margin: 0 -2px; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
input[type="text"], input[type="email"], input[type="number"], input[type="date"],
input[type="datetime-local"], input[type="time"], input[type="search"], input[type="tel"],
input[type="url"], input[type="password"], input:not([type]), select, textarea, .form-control {
    border-radius: 12px; min-height: 42px; background: var(--k-surface);
}
label, .form-label { font-weight: 600; }
/* A tick box and its words sit on one line, the box never stretched or cut. */
input[type="checkbox"], input[type="radio"] {
    width: 18px; height: 18px; min-height: 0; flex: none; margin: 0; padding: 0;
    accent-color: var(--k-ink); vertical-align: middle; cursor: pointer;
}
label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) {
    display: inline-flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer;
    line-height: 1.4; min-width: 0; white-space: normal; background: none;
}
.form-group:has(> label > input[type="checkbox"]), .form-group:has(> label > input[type="radio"]) { flex-direction: row; flex-wrap: wrap; align-items: center; }

.tag, .status-badge, .badge { border-radius: 999px; height: 24px; padding: 0 10px; font-weight: 600; }

/* ── Empty states, folds, notes ────────────────────────────────────────── */
.k-empty { border: 0; border-radius: var(--k-card-r); background: var(--k-surface); box-shadow: var(--k-shadow); padding: 28px 28px 28px 84px; position: relative; min-height: 92px; justify-content: center; }
.k-empty::before {
    content: ''; position: absolute; left: 22px; top: 50%; margin-top: -26px; width: 52px; height: 52px;
    /* An empty list shows the tray things arrive in, never the shared "?" (live walk K11). */
    background: url("/admin/art/inbox.d17b839bda.webp") center / contain no-repeat;
    filter: drop-shadow(0 8px 12px rgba(14, 27, 51, .22));
}
.card .k-empty, .k-fold .k-empty { box-shadow: none; background: color-mix(in srgb, var(--k-ground) 60%, var(--k-surface)); }
.k-fold { margin-bottom: 16px; }
.k-fold > summary { padding: 18px 24px; font-size: var(--k-16); font-weight: 700; align-items: center; }
.k-fold > summary::before { content: none; }
.k-fold > summary .k-fold-value { flex: 1; font-size: var(--k-14); font-weight: 400; color: var(--k-muted); }
.k-fold > summary .k-edit { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px;
    border: 1px solid var(--k-line); font-size: var(--k-13); font-weight: 600; color: var(--k-text); background: var(--k-surface); }
.k-fold[open] > summary .k-edit .k-edit-open { display: none; }
.k-fold:not([open]) > summary .k-edit .k-edit-close { display: none; }
.k-fold > .k-fold-body { padding: 4px 24px 22px; border-top: 1px solid var(--k-hair); padding-top: 18px; }
.k-fold-help { font-size: var(--k-13); color: var(--k-muted); margin-bottom: 12px; max-width: 760px; }

/* A row of fields or buttons on one line, wrapping on a narrow screen. */
.k-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 0; border: 0; margin: 4px 0 12px; }
.k-row > .form-group { flex: 1 1 200px; margin-bottom: 0; }
.k-row > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), .k-row > select { flex: 1 1 180px; min-width: 0; }
.k-row > .k-help { flex: 1 1 100%; }
.k-row > .card { flex: 1 1 280px; margin: 0; }
.k-row > label:has(> input[type="checkbox"]) { align-self: center; }

/* A switch with its words: the box is drawn as a small toggle, the words beside it. */
label.k-switch, label.k-switch:has(> input[type="checkbox"]) {
    position: static; width: auto; height: auto; border-radius: 0; background: none; cursor: pointer;
    display: flex; align-items: center; gap: 12px; padding: 8px 0; margin: 2px 0;
    font-size: var(--k-14); font-weight: 500; color: var(--k-text);
}
label.k-switch::after { content: none; }
label.k-switch input[type="checkbox"] {
    appearance: none; -webkit-appearance: none; position: relative; flex: none;
    width: 42px; height: 24px; border-radius: 12px; background: var(--k-field); transition: background .15s;
}
label.k-switch input[type="checkbox"]::before {
    content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
    background: var(--k-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: left .15s;
}
label.k-switch input[type="checkbox"]:checked { background: var(--k-ink); }
label.k-switch input[type="checkbox"]:checked::before { left: 21px; }
label.k-switch input[type="checkbox"]:disabled { opacity: .5; cursor: not-allowed; }

/* Headings inside a form card keep their distance from what came before. */
.card-body > h3:not(:first-child), form > h3:not(:first-child), .card-body > h2:not(:first-child) { margin-top: 22px; }
.card-body > h3 + .k-help, .card-body > h2 + .k-help { margin: 4px 0 10px; }

/* Fields inside a table fill their cell, never wider than the table. */
td > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), td > select { width: 100%; min-width: 5rem; }
.card { overflow: visible; }
.card:has(table) { overflow-x: auto; }
td > .k-help { display: block; margin-top: 4px; }
td a:not(.btn):not(.btn-sm) { color: var(--k-text); font-weight: 600; text-decoration: none; }
td a:not(.btn):not(.btn-sm):hover { color: var(--k-accent-text); text-decoration: underline; text-underline-offset: 3px; }

/* A row's "more" menu: rarely used moves, each confirmed on its own page. */
.k-menu-cell { width: 1%; text-align: right; }
.k-menu { position: relative; display: inline-block; }
.k-menu > summary { list-style: none; cursor: pointer; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--k-muted); }
.k-menu > summary::-webkit-details-marker { display: none; }
.k-menu > summary:hover, .k-menu[open] > summary { background: color-mix(in srgb, var(--k-line) 60%, transparent); color: var(--k-text); }
.k-menu-list { position: absolute; right: 0; top: 40px; z-index: 30; min-width: 190px; padding: 6px; border-radius: 14px;
    background: var(--k-surface); box-shadow: var(--k-shadow), 0 0 0 1px var(--k-hair); display: flex; flex-direction: column; text-align: left; }
.k-menu-list a { padding: 9px 12px; border-radius: 9px; color: var(--k-text) !important; font-weight: 500 !important; text-decoration: none !important; white-space: nowrap; }
.k-menu-list a:hover { background: color-mix(in srgb, var(--k-line) 50%, transparent); }
/* A row menu may hold buttons too (a move posted by the row's own form). */
.k-menu-list button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 9px; background: none; color: var(--k-text); font: 500 var(--k-14) var(--k-font); white-space: nowrap; cursor: pointer; }
.k-menu-list button:hover { background: color-mix(in srgb, var(--k-line) 50%, transparent); }
/* A number box in a table row: as wide as its number, never the column's whole width. */
input.k-num-in { width: 9ch; min-width: 0; }
/* Quick views on the left, the page's main button on the right, on one line. */
.k-viewbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.k-viewbar > .k-views { margin: 0; }
/* The first thing to type, in an empty state: a box and its button on one line. */
.k-inline-add { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0; }
.k-inline-add input:not([type=hidden]) { flex: 1 1 240px; min-width: 0; min-height: 44px; }
.k-empty-acts form.k-inline-add { display: flex; flex-wrap: nowrap; width: 100%; max-width: 560px; }
/* A closed calendar or More menu takes no room at all. Current Chrome still lays out a closed <details>' inside
   (content-visibility), so without this the calendar's buttons had boxes below the bar (the walk read them as a second row). */
.k-dates:not([open]) > .k-dates-pop, .k-more:not([open]) > .k-more-list { display: none; }
@media (max-width: 768px) {
    .k-empty-acts form.k-inline-add { flex-wrap: wrap; }
    .k-empty-acts form.k-inline-add > * { flex: 1 1 100%; }
    /* A phone's filter bar: choices two to a row, the page's own button on a row of its own. */
    .k-filterbar > .k-fb-select { flex: 1 1 calc(50% - 5px); }
    .k-filterbar > .btn { flex: 1 1 100%; }
}
.k-confirm { max-width: 620px; display: flex; flex-direction: column; gap: 14px; font-size: var(--k-16); }

/* ═══ HOME ═══════════════════════════════════════════════════════════════ */
.k-art { flex: none; display: block; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(14, 27, 51, .22)); }
.k-art-dark { display: none; }
:root[data-theme="dark"] .k-art-light { display: none; }
:root[data-theme="dark"] .k-art-dark { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .k-art-light { display: none; }
    :root:not([data-theme="light"]) .k-art-dark { display: block; }
}
:root[data-theme="dark"] .k-art { filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45)); }
.k-hero .k-hero-art { position: relative; z-index: 1; margin: -6px 0 4px -6px; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .35)); }
.k-need .k-art { width: 44px; height: 44px; margin: -4px 0; }
.k-kpi .top { align-items: flex-start; }
.k-kpi .top .k-art { margin: -6px -6px -14px 0; }

.k-home { display: flex; flex-direction: column; gap: 20px; padding-top: 10px; max-width: 1180px; }
.k-home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.k-home-head h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; margin-top: 6px; }
.k-home-head .btn-primary { height: 46px; padding: 0 22px; font-size: 14.5px; }
.k-home-top { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: stretch; }
.k-home-top.solo { grid-template-columns: 1fr; }
.k-hero {
    position: relative; overflow: hidden; border-radius: var(--k-card-r); padding: 26px 28px; min-height: 220px;
    background: var(--k-hero); color: #fff; box-shadow: 0 24px 40px -22px rgba(14, 27, 51, .6);
    display: flex; flex-direction: column; gap: 6px; text-decoration: none;
}
.k-hero::after { content: ''; position: absolute; right: -80px; bottom: -120px; width: 300px; height: 300px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 122, 69, .4), transparent 65%); pointer-events: none; }
.k-hero:hover { color: #fff; }
.k-hero small { font-size: 13.5px; font-weight: 500; color: #C8D0E3; display: flex; align-items: center; gap: 8px; }
.k-hero b { font-size: 46px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.k-hero .pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
    font-size: 13px; font-weight: 600; background: var(--k-pill-bg); color: var(--k-pill-text); position: relative; z-index: 1; }
.k-hero .pill.down { background: rgba(255, 122, 69, .18); color: #FFB894; }
.k-hero .pill.flat { background: rgba(255, 255, 255, .1); color: #C8D0E3; }
.k-hero .k-hero-note { font-size: 13px; color: #C8D0E3; position: relative; z-index: 1; margin-top: auto; }
.k-hero svg.k-trend { position: absolute; right: 24px; bottom: 22px; z-index: 1; }
.k-needs { padding: 20px 22px; margin: 0; }
.k-needs-title, .k-glance-title { font-size: var(--k-12); font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--k-muted); margin-bottom: 4px; }
.k-need { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--k-hair); color: var(--k-text); text-decoration: none; font-size: 15px; }
.k-need:last-child { border-bottom: 0; }
.k-need:hover { color: var(--k-text); }
.k-need:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.k-need .n { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 10px; display: inline-grid; place-items: center; flex: none;
    font-size: var(--k-14); font-weight: 700; background: var(--k-flame-soft); color: var(--k-flame-text); font-variant-numeric: tabular-nums; }
.k-need .n.bad { background: var(--k-red-soft); color: var(--k-red); }
.k-need .t { flex: 1; min-width: 0; line-height: 1.3; }
.k-need .t span { display: block; font-size: var(--k-13); color: var(--k-muted); }
.k-need .go { font-size: var(--k-13); font-weight: 500; color: var(--k-muted); display: inline-flex; align-items: center; gap: 4px; }
.k-allclear { display: flex; align-items: center; gap: 12px; padding: 14px 0 4px; color: var(--k-muted); }
.k-allclear .ph { color: var(--k-green); }
.k-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.k-kpi { margin: 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--k-text); transition: transform .15s; }
.k-kpi:hover { color: var(--k-text); transform: translateY(-1px); }
.k-kpi .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.k-kpi small { font-size: 13.5px; font-weight: 500; color: var(--k-muted); }
.k-kpi .ph { color: var(--k-text); }
.k-kpi b { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.k-kpi em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--k-green); }
.k-kpi em.quiet { color: var(--k-muted); font-weight: 500; }
.k-feed { padding: 6px 22px; margin: 0; }
.k-feed-title { padding: 16px 0 6px; }
.k-fd { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--k-hair); font-size: 14.5px; color: var(--k-text); text-decoration: none; }
.k-fd:last-child { border-bottom: 0; }
.k-fd:hover { color: var(--k-text); }
.k-fd .who { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12.5px; font-weight: 700; background: var(--k-chip); color: var(--k-text); }
.k-fd .who.k { background: var(--k-hero); color: #fff; }
.k-fd .what { flex: 1; min-width: 0; }
.k-fd .at { margin-left: auto; color: var(--k-muted); font-size: 13px; white-space: nowrap; }
.k-glance { padding: 18px 22px 8px; margin: 0; }
.k-glance-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 24px; }
.k-glance-grid a, .k-glance-grid > div { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--k-hair); color: var(--k-text); text-decoration: none; font-size: var(--k-14); }
.k-glance-grid .ph { color: var(--k-muted); }
.k-glance-grid .v { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.k-glance-grid a:hover .l { text-decoration: underline; text-underline-offset: 3px; }


/* Lists: a head with search and the main button; a row opens from anywhere on it. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.k-listhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.k-listhead .filter-bar { margin-bottom: 0; flex: 1 1 520px; }
.k-listhead .card-title { margin: 0; }
table.k-rows tbody tr { position: relative; }
table.k-rows tbody tr:hover { background: var(--k-hover); }
a.k-rowlink::after { content: ''; position: absolute; inset: 0; }
table.k-rows td form, table.k-rows td .btn, table.k-rows td a:not(.k-rowlink), table.k-rows td input, table.k-rows td select, table.k-rows td button { position: relative; z-index: 1; }
td a.k-rowlink { color: var(--k-text); }
tr.k-opens { cursor: pointer; }
tr.k-opens:hover { background: var(--k-hover); }
tr.k-opens td:first-child a:not(.btn) b, tr.k-opens td:first-child a:not(.btn) { text-decoration: underline; text-decoration-color: var(--k-line); text-underline-offset: 4px; }
td a.k-rowlink b { text-decoration: underline; text-decoration-color: var(--k-line); text-underline-offset: 4px; }
/* Forms in parts: two fields side by side on a computer, one on a phone. */
.k-form { display: flex; flex-direction: column; gap: 16px; }
.k-form .card-title { margin: 6px 0 0; }
.k-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 16px; }
.k-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.k-plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
/* Choosing one: a card per choice. */
.k-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.k-choice { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid var(--k-line); border-radius: var(--k-r); background: var(--k-surface); cursor: pointer; }
.k-choice input { margin-top: 3px; accent-color: var(--k-accent); }
.k-choice span { display: flex; flex-direction: column; gap: 3px; }
.k-choice small { color: var(--k-muted); font-size: var(--k-13); line-height: 1.4; }
.k-choice:has(input:checked) { border-color: var(--k-accent); box-shadow: 0 0 0 1px var(--k-accent); }
/* Permissions, under headings. */
.k-perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.k-permgroup { border: 1px solid var(--k-line); border-radius: var(--k-r); padding: 10px 14px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.k-permgroup legend { font-weight: 700; font-size: var(--k-14); padding: 0 6px; }
.k-tick { display: flex; gap: 8px; align-items: flex-start; font-size: var(--k-14); line-height: 1.4; cursor: pointer; }
.k-tick input { margin-top: 3px; accent-color: var(--k-accent); flex: none; }
.k-canlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.k-canlist ul { margin: 6px 0 0 18px; padding: 0; color: var(--k-muted); font-size: var(--k-14); line-height: 1.5; }
/* Roles, as cards. */
.k-rolegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.k-rolecard { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: var(--k-card-r); background: var(--k-surface); box-shadow: var(--k-shadow); color: var(--k-text); text-decoration: none; }
.k-rolecard:hover { color: var(--k-text); box-shadow: 0 0 0 1px var(--k-accent); }
.k-rolecard-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.k-rolecard small { color: var(--k-muted); font-size: var(--k-13); line-height: 1.4; }
.k-personhead { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }

@media (max-width: 900px) {
    .k-home-top { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar { background: var(--k-ground); padding-top: 18px; }
    .header { padding: 10px 16px; background: var(--k-ground); }
    body.is-home .header { display: none; }
    .page-title { font-size: 22px; }
    .k-sectabs { margin: 4px 16px 14px; max-width: calc(100% - 32px); overflow-x: auto; flex-wrap: nowrap; }
    .page-body, .page-body:has(> .admin-page), .page-body:has(> .k-page) { padding: 4px 16px 48px; }
    .k-flash { margin: 0 16px 14px; }
    .k-home-head h1 { font-size: 28px; }
    .k-hero b { font-size: 36px; }
    /* Under the note on a phone, never beneath it (live walk D13: the chip sat on top of the line). */
    .k-hero svg.k-trend { position: static; align-self: flex-end; margin-top: 10px; max-width: 100%; opacity: .5; }
    .k-about-body { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; }
}

/* ── Parts any Admin page may use: Klonza Admin first (13 Nov 2026) ─────── */
.k-paneltabs { margin: 0 0 4px; }
.k-panel-body { display: flex; flex-direction: column; gap: 20px; }
.k-panel-body[hidden] { display: none; }
.k-panel-body > .card, .k-page > .card { margin-bottom: 0; }
.k-bar { height: 8px; border-radius: 999px; background: var(--k-line); overflow: hidden; min-width: 96px; }
.k-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--k-accent); }
.k-bar.warn > span { background: var(--k-amber); }
.k-bar.bad > span { background: var(--k-red); }
.k-bar.ok > span { background: var(--k-green); }
.k-formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 18px; align-items: start; }
.k-formgrid .form-group { margin: 0; }
.k-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.k-inline > input:not([type="hidden"]), .k-inline > select { flex: 1 1 180px; min-width: 0; }
.k-inline > .k-help { flex-basis: 100%; }
.k-section { display: flex; flex-direction: column; gap: 12px; }
.k-section + .k-section { border-top: 1px solid var(--k-hair); padding-top: 20px; }
.k-section h3 { font-size: var(--k-14); font-weight: 700; }
.k-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 24px; margin: 0; }
.k-dl > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.k-dl dt { font-size: var(--k-13); color: var(--k-muted); font-weight: 500; }
.k-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.k-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.k-fact { border-radius: 18px; background: var(--k-surface); box-shadow: var(--k-shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; text-decoration: none; color: var(--k-text); }
a.k-fact:hover { color: var(--k-text); transform: translateY(-1px); }
.k-fact small { font-size: var(--k-13); font-weight: 500; color: var(--k-muted); display: flex; align-items: center; gap: 6px; }
.k-fact b { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; overflow-wrap: anywhere; }
.k-fact span { font-size: var(--k-13); color: var(--k-muted); }
.k-fact.warn b { color: var(--k-amber); }
.k-fact.bad b { color: var(--k-red); }
.k-idline { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; color: var(--k-muted); font-size: var(--k-14); }
.k-idline .mono { color: var(--k-text); }
.k-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.k-toolbar .k-chips { flex: 1 1 auto; }
a.k-chip { text-decoration: none; color: var(--k-text); }
a.k-chip .n { color: var(--k-muted); font-variant-numeric: tabular-nums; margin-left: 4px; }
a.k-chip.on .n { color: inherit; opacity: .75; }
.k-names { font-size: var(--k-13); color: var(--k-muted); }
.k-two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .k-two { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
    /* A list on a phone: each row is its own card, its first cell its title. */
    .card:has(> table.k-cards) { background: none; box-shadow: none; border-radius: 0; overflow: visible; }
    .card:has(> table.k-cards) > .card-header { padding: 4px 2px 10px; border: 0; }
    .card:has(> table.k-cards) > .card-body { padding: 8px 2px; }
    table.k-cards tr { border: 0; border-radius: 18px; box-shadow: var(--k-shadow); padding: 14px 16px; margin-bottom: 12px; }
    .card > table.k-cards td:first-child, table.k-cards td { padding-left: 0; padding-right: 0; }
    table.k-cards td:first-child { padding-bottom: 8px; display: block; font-size: var(--k-16); }
    table.k-cards td:first-child::before { display: none; }
    table.k-cards td { display: block; position: relative; padding-left: 6.5rem; min-height: 26px; }
    table.k-cards td::before { position: absolute; left: 0; top: 7px; width: 6rem; }
    table.k-cards td:first-child, table.k-cards td[data-label=""], table.k-cards td:not([data-label]) { padding-left: 0; }
    .card-body table.k-cards tr, .k-section table.k-cards tr { box-shadow: none; border: 1px solid var(--k-hair); }
    /* A table of facts (each row a th, then its value) stays one card of lines on a phone: a card for each
       fact, with the label's own underline, was what "About them" and a bill's lines looked like. */
    table.k-cards tr:has(> th:first-child) { border: 0; border-bottom: 1px solid var(--k-hair); border-radius: 0; box-shadow: none; background: none; padding: 10px 0; margin: 0; }
    table.k-cards tr:has(> th:first-child):last-child { border-bottom: 0; }
    table.k-cards tr > th:first-child { display: block; width: auto; border: 0; padding: 0 0 2px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--k-muted); background: none; }
    table.k-cards tr:has(> th:first-child) > td { padding: 0; min-height: 0; }
    table.k-cards tr:has(> th:first-child) > td::before { display: none; }
    /* A line of money (a bill) keeps its figure on the right of its words. */
    table.k-cards tr:has(> th:first-child + td.num) { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
    table.k-cards tr > th:first-child:has(+ td.num) { flex: 1 1 auto; min-width: 0; text-transform: none; letter-spacing: 0; font-size: var(--k-14); font-weight: 400; color: var(--k-text); padding: 0; }
    table.k-cards tr:has(> th:first-child + td.num) > td.num { flex: none; width: auto; text-align: right; white-space: nowrap; }
    /* Its card stays a card: a list's card gives way to the cards of its rows, a table of facts has none. */
    .card:has(> table.k-cards > tbody > tr > th:first-child) { background: var(--k-surface); box-shadow: var(--k-shadow); border-radius: 18px; }
    .card[class="card"]:has(> table.k-cards > tbody > tr > th:first-child) { padding: 4px 16px; }
    .k-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .k-fact { padding: 14px; border-radius: 16px; }
    .k-paneltabs { margin: 0 -16px 4px; padding: 0 16px; }
    .k-inline > *, .k-inline > button { flex: 1 1 100%; }
    .k-fact b { font-size: 19px; }
    .k-toolbar > form, .k-toolbar > .btn, .k-toolbar > .btn-sm { width: 100%; }
    .k-toolbar > form .btn-sm { width: 100%; }
}

/* ═══ ROOM TO BREATHE (owner, 15 Nov 2026: "Check for spacing on all pages. Nothing should look cramped") ══
   One scale: 8, 12, 16, 24, 32. A plain card (its class is "card" and nothing else) gives room to what
   sits straight inside it: a heading, a phone number, a note, tick boxes, a form. The parts that pad
   themselves (a card header or body, a table, a padded block) still run from edge to edge, so a list
   keeps its full width and its rows their own padding. */
.card[class="card"] { padding: 20px 24px; }
.card[class="card"] > :is(table, .table-responsive, .card-header, .card-body, .k-pad, .k-section) { margin-left: -24px; margin-right: -24px; }
.card[class="card"] > :is(table, .table-responsive) { width: calc(100% + 48px); max-width: none; }
.card[class="card"] > :is(table, .table-responsive, .card-header, .card-body, .k-pad, .k-section):is(:first-child, input[type="hidden"]:first-child + *) { margin-top: -20px; }
.card[class="card"] > :is(table, .table-responsive, .card-header, .card-body, .k-pad, .k-section):last-child { margin-bottom: -20px; }
.card[class="card"] > :is(table, .table-responsive, .card-header, .card-body, .k-pad, .k-section) + :not(table, .table-responsive, .card-header, .card-body, .k-pad, .k-section, input[type="hidden"]) { margin-top: 16px; }
.card[class="card"] > :not(table, .table-responsive, .card-header, .card-body, .k-pad, .k-section, input[type="hidden"]) + :is(table, .table-responsive) { margin-top: 14px; }
.card[class="card"] > :not(table, .table-responsive, .card-header, .card-body, .k-pad, .k-section, input[type="hidden"]) + :not(table, .table-responsive, .card-header, .card-body, .k-pad, .k-section, input[type="hidden"]) { margin-top: 12px; }
.card[class="card"] > :is(h1, h2, h3, h4, .card-title) + :not(table, .table-responsive, .card-header, .card-body, .k-pad, .k-section, input[type="hidden"]):not([hidden]) { margin-top: 6px; }
.card[class="card"] > span.card-title { display: block; }
/* A form's first heading sits at the top, even with the form's hidden security field in front of it. */
:is(form, .card-body) > input[type="hidden"]:first-child + :is(h2, h3),
:is(form, .card-body) > input[type="hidden"]:first-child + input[type="hidden"] + :is(h2, h3) { margin-top: 0; }
/* A card laid out as a row (a figure and its buttons) pads itself too. */
.card.k-row { padding: 16px 24px; margin-bottom: 20px; }
/* A bar of filters drawn as a card pads itself the same way. */
.card.filter-bar { padding: 16px 24px; }
/* Inside a card's body, an empty note or a fold keeps its distance from the words above it. */
.card-body > * + :is(.k-empty, .k-fold, form), .k-pad > * + :is(.k-empty, .k-fold) { margin-top: 12px; }
/* A long address in an empty note wraps instead of running past the card. */
.k-empty b, .k-empty span, .k-empty p { overflow-wrap: anywhere; }
/* A line of links, a note or a heading on the page itself keeps its distance from the card under it. */
.admin-page > :is(p, .k-help, .k-lede):not(:last-child), .k-page > :is(p, .k-help, .k-lede):not(:last-child) { margin-bottom: 16px; }
.admin-page > :is(h2, h3):not(:first-child), .k-page > :is(h2, h3):not(:first-child) { margin-top: 28px; }
.admin-page > :is(h2, h3), .k-page > :is(h2, h3) { margin-bottom: 12px; }
@media (max-width: 768px) {
    .card[class="card"] { padding: 16px; }
    .card[class="card"] > :is(table, .table-responsive, .card-header, .card-body, .k-pad, .k-section) { margin-left: -16px; margin-right: -16px; }
    .card[class="card"] > :is(table, .table-responsive) { width: calc(100% + 32px); }
    .card[class="card"] > :is(table, .table-responsive, .card-header, .card-body, .k-pad, .k-section):is(:first-child, input[type="hidden"]:first-child + *) { margin-top: -16px; }
    .card[class="card"] > :is(table, .table-responsive, .card-header, .card-body, .k-pad, .k-section):last-child { margin-bottom: -16px; }
    /* A list card on a phone has no card around it (each row is its own card): its words line up with the rows. */
    .card[class="card"]:has(> table.k-cards) { padding: 4px 2px 0; }
    .card[class="card"]:has(> table.k-cards) > :is(table, .table-responsive, .card-header, .card-body, .k-pad, .k-section) { margin: 0 -2px; width: calc(100% + 4px); }
    .card[class="card"]:has(> table.k-cards) > :is(table, .table-responsive, .card-header, .card-body, .k-pad, .k-section):is(:first-child, input[type="hidden"]:first-child + *) { margin-top: 0; }
    .card[class="card"]:has(> table.k-cards) > :is(table, .table-responsive, .card-header, .card-body, .k-pad, .k-section):last-child { margin-bottom: 0; }
    .card[class="card"]:has(> table.k-cards) > :not(table, .table-responsive, .card-header, .card-body, .k-pad, .k-section, input[type="hidden"]) + table.k-cards { margin-top: 12px; }
    .card.k-row, .card.filter-bar { padding: 14px 16px; }
    .k-sectabs { margin-top: 10px; }
}

/* ═══ TYPE (owner, 15 Nov 2026, of Home's "Needs you today": "It's the font there that might be an issue") ══
   One scale and clear weights in Inter. Page titles 800; section and card titles 700; the title of a list
   item 600 at 15px; the line under it 400, a step smaller, in the muted colour with room between its lines;
   small upper-case labels 600 with tracking; figures in even columns. The font is loaded with its optical
   sizes (opsz 14 to 32), so big titles tighten and small words open up. */
:root { --k-item: 0.9375rem; --k-item-sub: 0.8125rem; }
body { font-optical-sizing: auto; font-kerning: normal; }
h1, .page-title, .k-home-head h1 { font-weight: 800; }
h2, h3, .card-title, .k-fold > summary { font-weight: 700; }
/* A list item's title, then the line under it. */
.k-need .t, .k-todo .t b, .k-row .t b { font-size: var(--k-item); font-weight: 600; line-height: 1.35; letter-spacing: -0.005em; color: var(--k-text); }
.k-need .t span, .k-todo .t span, .k-row .t span { display: block; margin-top: 2px; font-size: var(--k-item-sub); font-weight: 400; line-height: 1.45; letter-spacing: 0; color: var(--k-muted); }
.k-need { padding: 12px 0; }
.k-allclear span { font-weight: 600; color: var(--k-text); }
/* The line under a title or a field. */
.k-help, small, .form-text, .k-field .help { line-height: 1.5; }
/* Small labels above things: upper case, 600, tracked. */
.k-eyebrow, .k-needs-title, .k-glance-title { font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
table.k-cards td::before { font-weight: 600; letter-spacing: .06em; }
/* Figures line up. */
.k-need .n, .k-todo .n, .stat-value, .k-kpi b, .k-fact b, .k-hero b, .money, .num, .k-list .when { font-variant-numeric: tabular-nums; }
.k-todo .n { font-weight: 800; }

/* ═══ A CONVERSATION (owner, 15 Nov 2026: the chat, the question and the answer sat on top of each other) ═══
   Each message is a block of its own: who said it above in small letters, then their words. Klo's lines are
   tinted, a right answer is green; "Answered by" is a small quiet line with room above; "Wrong answer" is a
   small button set apart, its form opening under it. */
.k-turn { padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.k-turn-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: var(--k-13); color: var(--k-muted); }
.k-msg { max-width: 760px; padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--k-ground) 75%, var(--k-surface)); }
.k-msg-klo { background: color-mix(in srgb, var(--k-accent) 7%, var(--k-surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k-accent) 16%, transparent); }
.k-msg-right { background: var(--k-green-soft, color-mix(in srgb, var(--k-green) 10%, var(--k-surface))); }
.k-msg-who { font-size: var(--k-12); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--k-muted); margin-bottom: 4px; }
.k-msg-words { font-size: var(--k-item); line-height: 1.55; color: var(--k-text); white-space: pre-line; overflow-wrap: anywhere; }
.k-turn-by { font-size: var(--k-13); color: var(--k-muted); margin-top: 2px; }
.k-turn-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.k-wrong > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px;
    border: 1px solid var(--k-line); background: var(--k-surface); font-size: var(--k-13); font-weight: 600; color: var(--k-text); }
.k-wrong > summary::-webkit-details-marker { display: none; }
.k-wrong > summary:hover { border-color: var(--k-muted); }
.k-wrong[open] > summary { margin-bottom: 12px; }
.card > .k-msg + .k-turn-by { margin-top: 8px; }
/* Lines in a card's body (a list of chats, notes, emails) keep a little room between them. */
.card-body > :is(p, .k-help) + :is(p, .k-help, ul, ol, form, details) { margin-top: 10px; }
@media (max-width: 768px) { .k-turn { padding: 16px; } .k-msg { padding: 10px 14px; } }

/* ═══ THE EXCELLENCE KIT (owner, 16 Nov 2026: "Yes to the look"; the bar is design/excellence-15nov/STANDARD.md) ═══
   Empty states with their own picture and a next step; a first-run card; a one-line intro; quick views as tabs
   with counts; one filter bar on one line; days picked from a calendar; a "More" menu. Drawn by src/admin/parts.ts. */

/* Empty states: the picture on the left, one line, real buttons. The old "?" is gone from these. */
.k-empty.k-empty-pic { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 26px; align-items: center; padding: 30px 34px; min-height: 0; }
.k-empty.k-empty-pic::before { content: none; }
.k-empty-pic .k-empty-art { width: 112px; height: 112px; filter: drop-shadow(0 16px 20px rgba(14, 27, 51, .28)); }
.k-empty-words { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.k-empty-pic .k-empty-title { font-size: var(--k-18); font-weight: 700; letter-spacing: -0.01em; color: var(--k-text); }
.k-empty-line { color: var(--k-muted); font-size: var(--k-14); line-height: 1.55; max-width: 60ch; }
.k-empty-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.k-empty-acts form { display: inline-flex; margin: 0; }
.k-empty-tip { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; border-radius: 14px;
    background: color-mix(in srgb, var(--k-accent) 8%, var(--k-surface)); color: var(--k-muted); font-size: var(--k-13); line-height: 1.5; max-width: 60ch; }
.k-empty-tip .ph { color: var(--k-accent-text); flex: none; margin-top: 1px; }
.k-empty.k-empty-small { grid-template-columns: 72px minmax(0, 1fr); gap: 18px; padding: 22px 26px; }
.k-empty-small .k-empty-art { width: 72px; height: 72px; }
.k-empty-small .k-empty-title { font-size: var(--k-16); }
.card .k-empty.k-empty-pic, .k-fold .k-empty.k-empty-pic { background: color-mix(in srgb, var(--k-ground) 50%, var(--k-surface)); }
.card-body > .k-empty.k-empty-pic:only-child { margin: 0; }
:is(.admin-page, .k-page, .page-body) > .k-empty.k-empty-pic { margin-bottom: 20px; }

/* The first-run card (mockup 5a): the first step big, its picture on the right, three steps under it. */
.k-firstrun { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.k-firstrun-card { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 32px; align-items: center; padding: 40px 44px;
    border-radius: var(--k-card-r); background: var(--k-surface); box-shadow: var(--k-shadow); position: relative; overflow: hidden; }
.k-firstrun-card::after { content: ''; position: absolute; right: -80px; top: -80px; width: 360px; height: 360px; border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--k-accent) 16%, transparent) 0%, transparent 70%); pointer-events: none; }
.k-firstrun-words { display: flex; flex-direction: column; gap: 8px; min-width: 0; position: relative; z-index: 1; }
.k-firstrun-words h2 { font-size: var(--k-24); font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.k-firstrun-words p { color: var(--k-muted); font-size: var(--k-16); line-height: 1.55; margin: 0; max-width: 56ch; }
.k-firstrun-art { display: grid; place-items: center; position: relative; z-index: 1; }
.k-firstrun-art .k-empty-art { width: 200px; height: 200px; filter: drop-shadow(0 24px 30px rgba(14, 27, 51, .32)); }
.k-firstrun-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.k-firstrun-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 20px 22px; border-radius: 20px; background: var(--k-surface); box-shadow: var(--k-shadow); }
.k-firstrun-steps i { font-style: normal; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    background: var(--k-accent-soft); color: var(--k-accent-text); font-weight: 700; font-size: var(--k-14); }
.k-firstrun-steps b { display: block; font-size: var(--k-16); font-weight: 700; }
.k-firstrun-steps span { display: block; color: var(--k-muted); font-size: var(--k-14); line-height: 1.5; margin-top: 2px; }

/* The page's own line under its title: one line, two at most; more behind "How it works". */
.k-intro { margin: -2px 0 18px; }
/* The page's line and its main buttons on one row: the line on the left, the buttons top right. */
.k-headrow { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.k-headrow > .k-intro { margin: 0; flex: 1 1 360px; min-width: 0; }
.k-headacts { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 768px) { .k-headacts { width: 100%; } .k-headacts .btn { flex: 1 1 auto; } }
.k-intro-line { margin: 0; color: var(--k-muted); font-size: var(--k-16); line-height: 1.55; max-width: 72ch; }
/* A page's own grey lines at the top (Payroll, Commission, Papers): a size up, and about 70 letters a line, never the
   whole width of the page (live walk D18). */
.admin-page > p.k-help, .k-page > p.k-help { font-size: var(--k-14); line-height: 1.55; max-width: 66ch; }
.k-intro-more { color: var(--k-accent-text); font-weight: 600; text-decoration: none; white-space: nowrap; }
.k-intro-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.k-how { margin-top: 10px; max-width: 760px; }
.k-how > summary { display: none; }
.k-how:not([open]) { display: none; }
.k-how-body { padding: 16px 20px; border-radius: 16px; background: var(--k-surface); box-shadow: var(--k-shadow); color: var(--k-text); font-size: var(--k-14); line-height: 1.6; }
.k-how-body > * + * { margin-top: 8px; }
.k-how-body ul, .k-how-body ol { margin: 0; padding-left: 20px; }

/* Quick views as tabs with counts (mockup 6). */
.k-views { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 16px; border-radius: 14px; max-width: 100%;
    background: color-mix(in srgb, var(--k-line) 65%, var(--k-ground)); }
.k-view { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; white-space: nowrap;
    font-size: var(--k-14); font-weight: 500; color: var(--k-nav-text); text-decoration: none; }
.k-view:hover { color: var(--k-text); }
.k-view.on { background: var(--k-surface); color: var(--k-text); font-weight: 600; box-shadow: var(--k-shadow-sm); }
.k-view .n { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center;
    font-size: var(--k-12); font-weight: 700; font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--k-line) 80%, var(--k-surface)); color: var(--k-muted); }
.k-view.on .n { background: var(--k-accent); color: var(--k-on-accent); }

/* One filter bar on one line: search grows, the choices and the days keep their size, "⋯" at the end. */
.k-filterbar { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; flex-wrap: nowrap; min-width: 0; }
.k-filterbar-only { justify-content: flex-end; }
.k-fb-search { flex: 1 1 260px; min-width: 0; position: relative; display: flex; align-items: center; margin: 0; font-weight: 400; }
.k-fb-search .ph { position: absolute; left: 14px; color: var(--k-muted); pointer-events: none; }
.k-fb-search input { width: 100%; padding-left: 42px; min-height: 44px; border-radius: 12px; }
.k-fb-select { flex: 0 1 200px; min-width: 0; min-height: 44px; border-radius: 12px; }
.k-fb-act { flex: none; margin-left: auto; }
.k-fb-tick { flex: none; white-space: nowrap; font-size: var(--k-14); }
.k-askbar .btn { flex: none; min-height: 44px; }
.k-fb-act form { margin: 0; }
.k-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }

/* "More": the downloads and settings a page needs now and then. */
.k-more { position: relative; flex: none; }
.k-more > summary { list-style: none; cursor: pointer; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    border: 1px solid var(--k-line); background: var(--k-surface); color: var(--k-text); }
.k-more > summary::-webkit-details-marker { display: none; }
.k-more > summary:hover, .k-more[open] > summary { border-color: var(--k-field); }
.k-more-list { position: absolute; right: 0; top: 50px; z-index: 40; min-width: 240px; padding: 6px; border-radius: 16px;
    background: var(--k-surface); box-shadow: var(--k-shadow), 0 0 0 1px var(--k-hair); display: flex; flex-direction: column; }
.k-more-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--k-text); font-size: var(--k-14); font-weight: 500; text-decoration: none; white-space: nowrap; }
.k-more-list a:hover { background: color-mix(in srgb, var(--k-line) 55%, transparent); }
.k-more-list a .ph { color: var(--k-muted); }
.k-more-form { padding: 12px; gap: 10px; min-width: 260px; }
.k-more-form label { display: flex; flex-direction: column; gap: 4px; font-size: var(--k-13); font-weight: 600; }
.k-more-form select { width: 100%; }
.k-more-list hr { border: 0; border-top: 1px solid var(--k-hair); margin: 6px 4px; }

/* Days, from a calendar (mockup 8). */
.k-dates { position: relative; flex: none; }
.k-dates > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px;
    border-radius: 12px; border: 1px solid var(--k-field); background: var(--k-surface); color: var(--k-text); font-size: var(--k-14); font-weight: 500; white-space: nowrap; }
.k-dates > summary::-webkit-details-marker { display: none; }
.k-dates > summary .ph { color: var(--k-muted); }
.k-dates[open] > summary { border-color: var(--k-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--k-accent) 22%, transparent); }
.k-dates-pop { position: absolute; right: 0; top: 52px; z-index: 45; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px;
    padding: 14px; border-radius: 20px; background: var(--k-surface); box-shadow: var(--k-shadow), 0 0 0 1px var(--k-hair); width: max-content; max-width: min(560px, calc(100vw - 32px)); }
.k-date-one .k-dates-pop { left: 0; right: auto; }
.k-dates-quick { display: flex; flex-direction: column; gap: 2px; }
.k-dates-quick button { text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 10px; font: 500 var(--k-14) var(--k-font); color: var(--k-text); cursor: pointer; }
.k-dates-quick button:hover { background: color-mix(in srgb, var(--k-line) 55%, transparent); }
.k-dates-quick button.on { background: var(--k-accent-soft); color: var(--k-accent-text); font-weight: 600; }
.k-dates-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.k-dates-own { display: flex; flex-direction: column; gap: 8px; }
.k-dates-own label { display: flex; flex-direction: column; gap: 4px; font-size: var(--k-13); }
.k-dates-act { display: flex; justify-content: flex-end; gap: 8px; }
.k-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; font-size: var(--k-14); }
.k-cal-head button { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--k-line); background: var(--k-surface); color: var(--k-text); cursor: pointer; display: grid; place-items: center; font-size: 18px; line-height: 1; }
.k-cal { border-collapse: separate; border-spacing: 2px; width: auto; background: none; margin-top: 6px; }
.k-cal th { padding: 4px 0; text-align: center; font-size: var(--k-12); color: var(--k-muted); font-weight: 600; background: none; border: 0; }
.k-cal td { padding: 0; border: 0; }
.k-cal tbody tr:hover td { background: none; }
.k-cal button { width: 38px; height: 34px; border: 0; border-radius: 9px; background: none; color: var(--k-text); font: 500 var(--k-14) var(--k-font); cursor: pointer; font-variant-numeric: tabular-nums; }
.k-cal button:hover { background: color-mix(in srgb, var(--k-line) 60%, transparent); }
.k-cal button.out { color: color-mix(in srgb, var(--k-muted) 55%, transparent); }
.k-cal button.in { background: color-mix(in srgb, var(--k-accent) 14%, var(--k-surface)); }
.k-cal button.end { background: var(--k-accent); color: var(--k-on-accent); font-weight: 700; }
.k-cal button.today:not(.end) { box-shadow: inset 0 0 0 1px var(--k-field); }
.k-cal button[disabled] { opacity: .35; cursor: not-allowed; }

/* Add a person (Leads and CRM): the form in parts, where they came from as pills. */
.k-addperson { max-width: 760px; }
.k-addperson fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.k-addperson legend { font-weight: 600; margin-bottom: 8px; }
.k-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.k-pills label.k-pill { position: relative; display: inline-flex; align-items: center; gap: 0; cursor: pointer; font-weight: 500; }
.k-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.k-pill span { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--k-line); background: var(--k-surface); color: var(--k-text); font-size: var(--k-14); }
.k-pill input:checked + span { border-color: var(--k-accent); background: var(--k-accent-soft); color: var(--k-accent-text); font-weight: 600; }
.k-pill input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--k-accent) 30%, transparent); }
/* Billing: the plan strip, Add modules as cards, "Your new plan" beside them (src/billing/billing-picker.ts). */
.k-plan { display: flex; align-items: center; gap: 18px; padding: 18px 24px; flex-wrap: wrap; }
.k-plan .k-art { width: 56px; height: 56px; }
.k-plan-words { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.k-plan-words b { font-size: var(--k-16); }
.k-plan-words span { color: var(--k-muted); font-size: var(--k-14); }
.k-plan .tag { white-space: nowrap; }
.k-picker { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.k-picker-cards h2 { font-size: var(--k-18); font-weight: 700; margin: 0 0 4px; }
.k-mod-group { margin: 22px 0 10px; font-size: var(--k-12); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); }
.k-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.k-picker label.k-mod { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px 18px 18px 16px; border-radius: 18px;
  background: var(--k-surface); box-shadow: var(--k-shadow); cursor: pointer; font-weight: 400; border: 1px solid transparent; white-space: normal; }
.k-picker label.k-mod:hover { border-color: var(--k-line); }
.k-picker label.k-mod.on { border-color: var(--k-accent); background: color-mix(in srgb, var(--k-accent) 7%, var(--k-surface)); }
.k-picker label.k-mod.have { cursor: default; }
.k-mod-art { width: 44px; height: 44px; }
.k-mod-words { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-right: 30px; }
.k-mod-words b { font-size: var(--k-16); font-weight: 700; line-height: 1.3; }
.k-mod-line { color: var(--k-muted); font-size: var(--k-13); line-height: 1.5; }
.k-mod-needs { align-self: flex-start; font-size: var(--k-12); font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--k-chip); color: var(--k-text); margin-top: 2px; }
.k-mod-price { font-size: var(--k-13); font-weight: 600; color: var(--k-accent-text); margin-top: 4px; }
.k-mod-on { position: absolute; top: 18px; right: 18px; font-size: var(--k-12); font-weight: 600; color: var(--k-green); }
.k-picker label.k-mod input[type="checkbox"] { position: absolute; top: 18px; right: 18px; width: 22px; height: 22px; accent-color: var(--k-accent); }
.k-pick-sum { position: sticky; top: 20px; padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; margin: 0; }
.k-pick-sum h2 { font-size: var(--k-18); font-weight: 700; margin: 0; }
.k-pick-added { display: flex; flex-wrap: wrap; gap: 6px; }
.k-pick-added i { font-style: normal; font-size: var(--k-12); font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--k-accent-soft); color: var(--k-accent-text); }
.k-pick-lines { display: flex; flex-direction: column; gap: 6px; font-size: var(--k-14); color: var(--k-muted); }
.k-pick-lines div, .k-pick-total { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.k-pick-lines b { color: var(--k-text); }
.k-pick-total { border-top: 1px solid var(--k-hair); padding-top: 12px; align-items: baseline; }
.k-pick-total b { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.k-pick-more { font-size: var(--k-13); color: var(--k-green); font-weight: 600; }
.k-pick-sum .btn { width: 100%; }
.k-pick-sum .btn[disabled] { opacity: .5; }
.k-sub { font-size: var(--k-14); font-weight: 700; margin: 14px 0 4px; }
.k-year .k-help { max-width: 72ch; }
.k-credits { display: flex; flex-direction: column; gap: 14px; }
.k-credits-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.k-credits-head p { margin: 4px 0 0; color: var(--k-muted); font-size: var(--k-14); }
.k-fold-help > summary { cursor: pointer; font-size: var(--k-14); font-weight: 600; color: var(--k-accent-text); width: fit-content; }
.k-fold-help[open] > summary { margin-bottom: 6px; }
.k-support { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.k-support p { margin: 2px 0 0; }
.k-support-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
@media (max-width: 768px) { .k-credits-head, .k-support { grid-template-columns: 40px minmax(0, 1fr); } .k-credits-head > .tag, .k-support-form { grid-column: 1 / -1; } }
.k-parts { width: 100%; max-width: 560px; }
.k-parts td { padding: 8px 0; }
.k-parts td:last-child { text-align: right; font-weight: 600; }
@media (max-width: 1100px) { .k-picker { grid-template-columns: 1fr; } .k-pick-sum { position: static; } }

/* Home for a firm just starting (mockup 4): the steps, the next one lit, "Need a hand?" beside them. */
.k-start-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.k-start-head h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; margin: 0; text-wrap: balance; }
.k-start-head .k-eyebrow { color: var(--k-accent-text); }
.k-start-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.k-steps { padding: 0; margin: 0; overflow: hidden; }
.k-steps-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 24px 28px 12px; }
.k-steps-head h2 { font-size: var(--k-18); font-weight: 700; margin: 0; }
.k-steps-head span { color: var(--k-muted); font-size: var(--k-14); }
.k-steps-head b { color: var(--k-text); }
.k-steps-bar { height: 8px; margin: 0 28px 16px; border-radius: 999px; background: color-mix(in srgb, var(--k-line) 80%, var(--k-surface)); overflow: hidden; }
.k-steps-bar i { display: block; height: 100%; border-radius: 999px; background: var(--k-action); }
.k-steps ol { list-style: none; margin: 0; padding: 0; }
.k-step { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px 28px; border-top: 1px solid var(--k-hair); }
.k-step.next { background: color-mix(in srgb, var(--k-accent) 7%, var(--k-surface)); box-shadow: inset 4px 0 0 var(--k-accent); }
.k-step-art { width: 56px; height: 56px; }
.k-step-words { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.k-step-words b { font-size: var(--k-16); font-weight: 700; }
.k-step-words > span { color: var(--k-muted); font-size: var(--k-14); line-height: 1.5; overflow-wrap: anywhere; }
.k-step-addr { color: var(--k-text); font-weight: 600; }
.k-step-next { font-size: var(--k-12); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--k-accent-text); }
.k-step-optional { font-size: var(--k-12); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); }
.k-steps-more { margin: 0; padding: 18px 28px 6px; border-top: 1px solid var(--k-hair); font-size: var(--k-14); font-weight: 700; color: var(--k-muted); }
.k-steps-optional .k-step:first-child { border-top: 0; }
.k-step.done .k-step-words b { text-decoration: line-through; color: var(--k-muted); }
.k-step.done .k-step-art { opacity: .6; }
.k-step-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.k-step-done { display: inline-flex; align-items: center; gap: 6px; color: var(--k-green); font-weight: 600; font-size: var(--k-14); }
.k-start-side { display: flex; flex-direction: column; gap: 20px; }
.k-start-glance { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.k-start-glance h2 { font-size: var(--k-16); font-weight: 700; margin: 0 0 6px; }
.k-start-glance a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--k-hair); color: var(--k-text); text-decoration: none; font-size: var(--k-14); }
.k-start-glance a b { font-variant-numeric: tabular-nums; }
.k-hand { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.k-hand h2 { font-size: var(--k-18); font-weight: 700; margin: 0; }
.k-hand p { margin: 0; color: var(--k-muted); font-size: var(--k-14); line-height: 1.55; }
.k-hand .k-empty-acts { margin-top: 4px; }
.k-hand-support { display: flex; gap: 12px; align-items: center; justify-content: space-between; border-top: 1px solid var(--k-hair); padding-top: 14px; margin-top: 6px; }
.k-hand-support b { display: block; font-size: var(--k-14); }
.k-hand-support span { display: block; color: var(--k-muted); font-size: var(--k-13); }
.k-hand-support form { margin: 0; flex: none; }
.k-start-alarms { display: flex; flex-direction: column; padding: 6px; margin-bottom: 20px; }
.k-start-alarm { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; border-radius: 16px; color: var(--k-text); text-decoration: none; }
.k-start-alarm:hover { background: color-mix(in srgb, var(--k-line) 45%, transparent); }
.k-start-alarm > b { font-size: var(--k-18); font-weight: 800; color: var(--k-amber); font-variant-numeric: tabular-nums; }
.k-start-alarm.bad > b { color: var(--k-red); }
.k-start-alarm span { display: flex; flex-direction: column; font-weight: 600; }
.k-start-alarm small { font-weight: 400; color: var(--k-muted); font-size: var(--k-13); }
.k-startcard { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 24px; margin-bottom: 20px;
    box-shadow: var(--k-shadow), inset 4px 0 0 var(--k-accent); }
@media (max-width: 768px) { .k-startcard { grid-template-columns: 44px minmax(0, 1fr); padding: 16px; } .k-startcard .k-step-acts { grid-column: 1 / -1; justify-content: flex-start; } }
@media (max-width: 1100px) { .k-start-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
    .k-start-head h1 { font-size: var(--k-24); }
    .k-step { grid-template-columns: 44px minmax(0, 1fr); padding: 18px; gap: 14px; }
    .k-step-art { width: 44px; height: 44px; }
    .k-step-acts { grid-column: 1 / -1; justify-content: flex-start; }
    .k-step-acts .btn { flex: 1 1 auto; }
    .k-steps-head { padding: 20px 18px 10px; } .k-steps-bar { margin: 0 18px 14px; }
}
@media (max-width: 1100px) {
    .k-firstrun-card { grid-template-columns: minmax(0, 1fr) 160px; padding: 32px; }
    .k-firstrun-art .k-empty-art { width: 150px; height: 150px; }
}
@media (max-width: 900px) {
    .k-filterbar { flex-wrap: wrap; }
    .k-fb-search { flex: 1 1 100%; }
    .k-fb-select { flex: 1 1 0; }
}
@media (max-width: 768px) {
    .k-empty.k-empty-pic { grid-template-columns: 1fr; gap: 12px; padding: 24px 20px; }
    .k-empty-pic .k-empty-art { width: 84px; height: 84px; }
    .k-empty.k-empty-small { grid-template-columns: 56px minmax(0, 1fr); }
    .k-empty-small .k-empty-art { width: 56px; height: 56px; }
    .k-empty-acts .btn { flex: 1 1 100%; }
    .k-firstrun-card { grid-template-columns: 1fr; padding: 26px 22px; gap: 8px; }
    .k-firstrun-art { order: -1; justify-items: start; }
    .k-firstrun-art .k-empty-art { width: 96px; height: 96px; }
    .k-firstrun-steps { grid-template-columns: 1fr; }
    .k-views { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .k-filterbar > .k-dates { flex: 1 1 0; min-width: 0; }
    .k-filterbar > .k-dates > summary { width: 100%; }
    .k-filterbar > .k-dates > summary .k-caret { margin-left: auto; }
    .k-dates-pop { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; max-width: none; grid-template-columns: 1fr; max-height: calc(100vh - 32px); overflow: auto; }
    .k-dates-quick { flex-direction: row; flex-wrap: wrap; }
    .k-cal button { width: 40px; height: 40px; }
    .k-more-list { right: 0; }
}

/* A Klonza support visit: one line across the top of every Admin page, with the way out (16 Nov 2026). */
.k-support-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin: 0 0 16px; border-radius: 14px; background: var(--k-blue-soft); color: var(--k-blue); }
.k-support-bar .k-support-words { flex: 1 1 260px; min-width: 0; font-size: var(--k-14); line-height: 1.45; }
.k-support-bar .k-support-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--k-blue); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--k-blue) 22%, transparent); }
.k-support-bar form { margin: 0; }
/* Home: letting Klonza support in, one quiet line once Getting started is done (16 Nov 2026). */
.k-home-support { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: var(--k-14); color: var(--k-muted); }
.k-home-support svg { flex: none; }
.k-home-support a { font-weight: 600; }
.k-support-pointer { margin: 0; }
