/*
 * Content design layer for the Flask pages (everything inside .content).
 * Loaded after the page's inline <style>, so it restyles the existing class
 * vocabulary — cards, tables, forms, tabs, boards, stat tiles — in one place
 * instead of editing every template. The sidebar and top bar live in
 * static/shell (React + Tailwind) and are not touched here.
 */

/* ---------------------------------------------------------------- tokens */
:root {
    --ink: #10253b;
    --ink-2: #44566b;
    --mute: #74869a;
    --line: #e2e9f0;
    --line-2: #edf2f7;
    --surface: #ffffff;
    --surface-2: #f5f8fb;
    --canvas: #edf1f6;
    --brand: #1d9d5f;
    --brand-2: #0f8650;
    --brand-3: #34cf91;
    --brand-soft: #e4f6ed;
    --navy-1: #14324e;
    --navy-2: #0d2236;
    --blue: #2f6fd0;
    --blue-soft: #e6eefb;
    --amber: #c98412;
    --amber-soft: #fdf1d6;
    --red: #d24a4a;
    --red-soft: #fde8e8;
    --violet: #6d58b0;
    --violet-soft: #ece8f7;
    --teal: #0f8a7e;
    --teal-soft: #dcf3ef;
    --r-lg: 20px;
    --r-md: 14px;
    --r-sm: 11px;
    --shadow: 0 1px 2px rgba(16, 37, 63, .04), 0 14px 34px -22px rgba(16, 37, 63, .26);
    --shadow-hover: 0 2px 4px rgba(16, 37, 63, .05), 0 20px 40px -20px rgba(16, 37, 63, .34);
    --ring: 0 0 0 4px rgba(29, 157, 95, .16);

    /* the page's older rules read these */
    --bg: var(--canvas);
    --text: var(--ink);
    --muted: var(--mute);
    --border: var(--line);
    --white: var(--surface);
}

html[data-theme="dark"] {
    --ink: #e8eff7;
    --ink-2: #b6c4d3;
    --mute: #8a9db2;
    --line: #243548;
    --line-2: #1b2a3a;
    --surface: #111e2c;
    --surface-2: #16273a;
    --canvas: #09121c;
    --brand-soft: rgba(52, 207, 145, .14);
    --blue: #7fb0f5;
    --blue-soft: rgba(79, 140, 230, .16);
    --amber: #f0c060;
    --amber-soft: rgba(240, 192, 96, .14);
    --red: #f08a8a;
    --red-soft: rgba(240, 100, 100, .15);
    --violet: #b3a3ee;
    --violet-soft: rgba(150, 130, 230, .16);
    --teal: #6fdccd;
    --teal-soft: rgba(80, 210, 195, .14);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -22px rgba(0, 0, 0, .7);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 20px 40px -20px rgba(0, 0, 0, .8);
    --ring: 0 0 0 4px rgba(52, 207, 145, .22);
}

/* ------------------------------------------------------------ foundation */
body {
    font-family: "DM Sans", Inter, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink);
    background:
        radial-gradient(900px 420px at 92% -8%, rgba(29, 157, 95, .08), transparent 70%),
        radial-gradient(1000px 520px at 8% -12%, rgba(47, 111, 208, .08), transparent 70%),
        var(--canvas);
    background-attachment: fixed;
}
html[data-theme="dark"] body {
    background:
        radial-gradient(900px 420px at 92% -8%, rgba(52, 207, 145, .07), transparent 70%),
        radial-gradient(1000px 520px at 8% -12%, rgba(60, 110, 200, .09), transparent 70%),
        var(--canvas);
    background-attachment: fixed;
    color: var(--ink);
}

.content {
    max-width: 1560px;
    padding: 28px 14px 56px 18px;
}
@media (max-width: 1023px) { .content { padding: 18px 14px 40px; } }

.content h1, .content h2, .content h3, .content h4 { color: var(--ink); letter-spacing: -.015em; }
.content ::selection { background: rgba(29, 157, 95, .25); }

.ix {
    display: inline-block;
    width: 1.18em;
    height: 1.18em;
    vertical-align: -.2em;
    line-height: 1;
    flex-shrink: 0;
}
.ix svg { display: block; width: 100%; height: 100%; }
.ix.ix-rot { transform: rotate(90deg); }
.sort .ix { width: .95em; height: .95em; vertical-align: -.15em; }

/* ------------------------------------------------------------ page header */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px 20px;
    margin: 0 0 22px;
}
.page-head > :first-child { flex: 1 1 340px; min-width: 0; }
.page-head > .toolbar, .page-head > div:last-child:not(:first-child) { flex: 0 1 auto; }
.page-head h2 { font-size: 26px; letter-spacing: -.02em; }

.page-title {
    margin: 0;
    font-family: inherit;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.025em;
    color: var(--ink);
}
.page-subtitle {
    max-width: 78ch;
    margin: 6px 0 0;
    color: var(--mute);
    font-size: 14px;
    line-height: 1.5;
}

/* section labels (SALES PIPELINE, QUICK ACTIONS …) */
.panel-label {
    gap: 9px;
    margin: 30px 2px 12px;
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
}
.panel-label::before {
    content: "";
    width: 4px;
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--brand-3), var(--brand-2));
}
.panel-label .ix { color: var(--brand-2); }
.panel-label:first-child, .content > .panel-label:first-of-type { margin-top: 6px; }

/* ----------------------------------------------------------------- cards */
.card, .form-card, .section-body {
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
}
html[data-theme="dark"] .card,
html[data-theme="dark"] .section-body,
html[data-theme="dark"] .form-card { background: var(--surface); box-shadow: var(--shadow); }

a.card, a.stat-card, a.pipe-card, .count-card {
    transition: transform .2s cubic-bezier(.22, 1, .36, 1), box-shadow .2s ease, border-color .2s ease;
}
a.stat-card:hover, a.pipe-card:hover, a.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
}

/* ------------------------------------------------------------ stat tiles */
.stats { gap: 16px; margin-bottom: 4px; }
.stat-card {
    container-type: inline-size;
    gap: 14px;
    padding: 18px 20px;
    min-width: 0;
}
.stat-card > div:not(.stat-ico) { min-width: 0; }
.stat-ico {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 21px;
    color: var(--navy-1);
    background: linear-gradient(145deg, #eef3f9, #e0e9f3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}
html[data-theme="dark"] .stat-ico { color: var(--ink); background: linear-gradient(145deg, #1c3047, #172a40); box-shadow: none; }
.stat-label {
    color: var(--mute);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.35;
    text-transform: uppercase;
}
.stat-value {
    margin-top: 6px;
    font-size: clamp(19px, 8.5cqi, 28px);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}
.stat-sub { margin-top: 6px; color: var(--mute); font-size: 12px; }
.stat-sub a { color: var(--brand-2); font-weight: 600; }
.stat-sub a:hover { text-decoration: underline; }

/* tinted icon tiles used across finance / operations / reports */
.tint-blue   { color: var(--blue);   background: var(--blue-soft); }
.tint-green  { color: var(--brand-2); background: var(--brand-soft); }
.tint-yellow { color: var(--amber);  background: var(--amber-soft); }
.tint-red    { color: var(--red);    background: var(--red-soft); }
.tint-teal   { color: var(--teal);   background: var(--teal-soft); }
.tint-navy   { color: var(--navy-1); background: #e3eaf3; }
.tint-orange { color: #c2611d;       background: #fdeadb; }
.tint-maroon { color: #9a4a63;       background: #f6e6ec; }
.tint-grey   { color: var(--ink-2);  background: var(--surface-2); }
html[data-theme="dark"] .tint-navy   { color: #b7cbe3; background: rgba(120, 160, 210, .16); }
html[data-theme="dark"] .tint-orange { color: #f2b27c; background: rgba(242, 150, 80, .15); }
html[data-theme="dark"] .tint-maroon { color: #e6a1b8; background: rgba(220, 130, 160, .15); }

/* --------------------------------------------------------- pipeline cards */
.pipeline { gap: 16px; }
.pipe-card {
    position: relative;
    gap: 14px;
    padding: 18px 20px 18px 24px;
    border-left: 1px solid var(--line);
    overflow: hidden;
}
.pipe-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 4px;
    border-radius: 0 6px 6px 0;
    background: var(--accent, var(--brand));
}
.pipe-ico {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 20px;
    background: color-mix(in srgb, var(--accent, #1d9d5f) 13%, var(--surface));
}
.pipe-title { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.pipe-sub { margin-top: 2px; color: var(--mute); font-size: 12.5px; }
.pipe-count { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pipe-caret { color: var(--mute); font-size: 16px; transition: transform .2s ease; }
a.pipe-card:hover .pipe-caret { transform: translateX(3px); color: var(--brand-2); }

/* ---------------------------------------------------------- quick actions */
.actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
    overflow: visible;
    border: 0;
    background: none;
    box-shadow: none;
}
.action-row {
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: transform .2s cubic-bezier(.22, 1, .36, 1), box-shadow .2s ease, border-color .2s ease;
}
.action-row:last-child { border-bottom: 1px solid var(--line); }
.action-row:hover {
    transform: translateY(-2px);
    background: var(--surface);
    box-shadow: var(--shadow-hover);
    border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
}
.action-ico {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 20px;
    color: var(--brand-2);
    background: var(--brand-soft);
}
.action-title { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.action-sub { margin-top: 2px; color: var(--mute); font-size: 12.5px; }
.action-caret { color: var(--mute); transition: transform .2s ease; }
.action-row:hover .action-caret { transform: translateX(3px); color: var(--brand-2); }

/* ---------------------------------------------------------- tables */
.table-card { padding: 4px 10px 10px; overflow-x: auto; }
table { border-collapse: separate; border-spacing: 0; }
th, td {
    padding: 14px 14px;
    border-bottom: 1px solid var(--line-2);
    font-size: 13.5px;
    vertical-align: middle;
}
th {
    padding-top: 16px;
    padding-bottom: 12px;
    color: var(--mute);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    line-height: 1.35;
    border-bottom: 1px solid var(--line);
}
tbody tr { transition: background .15s ease; }
tbody tr:hover td { background: var(--surface-2); }
tbody tr:hover td:first-child { border-radius: 12px 0 0 12px; }
tbody tr:hover td:last-child { border-radius: 0 12px 12px 0; }
tr:last-child td { border-bottom: 0; }
td a { color: var(--ink); }
td a:hover { color: var(--brand-2); }
td strong, td b { font-weight: 700; color: var(--ink); }
.sort { color: var(--mute); opacity: .7; margin-left: 4px; }
.muted { color: var(--mute); }
.price-total { color: var(--amber); font-weight: 700; }
html[data-theme="dark"] th { color: var(--mute); }
html[data-theme="dark"] tbody tr:hover td { background: rgba(255, 255, 255, .03); }

.table-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--line);
    color: var(--mute);
    font-size: 13px;
}
.pg {
    min-width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-2);
    font-size: 13px;
    transition: all .15s ease;
}
a.pg:hover { border-color: var(--brand); color: var(--brand-2); }
.pg.active { color: #fff; background: linear-gradient(135deg, var(--navy-1), #1d4a73); border-color: transparent; box-shadow: 0 8px 16px -8px rgba(20, 50, 78, .6); }

/* -------------------------------------------------------------- badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 999px;
    color: var(--brand-2);
    background: var(--brand-soft);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}
.badge.yellow { color: var(--amber); background: var(--amber-soft); }
.badge.red    { color: var(--red);   background: var(--red-soft); }
.badge.grey   { color: var(--ink-2); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.badge.mint   { color: var(--teal);  background: var(--teal-soft); }
html[data-theme="dark"] .badge { color: #7fe0b3; background: var(--brand-soft); }
html[data-theme="dark"] .badge.yellow { color: var(--amber); background: var(--amber-soft); }
html[data-theme="dark"] .badge.red { color: var(--red); background: var(--red-soft); }
html[data-theme="dark"] .badge.grey { color: var(--ink-2); background: var(--surface-2); }
html[data-theme="dark"] .badge.mint { color: var(--teal); background: var(--teal-soft); }

/* ------------------------------------------------------------- buttons */
.toolbar { gap: 10px; }
.tb-btn, .button, .outline-btn, .view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border-radius: var(--r-sm);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.tb-btn:active, .button:active { transform: translateY(1px); }

/* primary */
.tb-navy, .button, .tb-maroon {
    color: #fff;
    border: 0;
    background: linear-gradient(135deg, #25b673 0%, #1d9d5f 52%, #0f8650 100%);
    box-shadow: 0 10px 22px -12px rgba(15, 134, 80, .9), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.tb-navy:hover, .button:hover, .tb-maroon:hover {
    color: #fff;
    background: linear-gradient(135deg, #2cc47f 0%, #20a965 52%, #0f8650 100%);
    transform: translateY(-1px);
    box-shadow: 0 14px 26px -12px rgba(15, 134, 80, .95), inset 0 1px 0 rgba(255, 255, 255, .3);
}
/* secondary */
.tb-green, .tb-red, .tb-tan, .tb-outline, .outline-btn, .button.secondary, .view-btn {
    color: var(--ink);
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(16, 37, 63, .04);
}
.tb-green:hover, .tb-red:hover, .tb-tan:hover, .tb-outline:hover, .outline-btn:hover, .button.secondary:hover, .view-btn:hover {
    color: var(--ink);
    border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
    background: var(--surface);
    box-shadow: 0 8px 18px -12px rgba(16, 37, 63, .35);
    transform: translateY(-1px);
}
.tb-green .ix { color: var(--brand-2); }
.tb-red .ix { color: var(--red); }
.tb-tan .ix { color: var(--amber); }
.tb-outline.active { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--navy-1), #1d4a73); }
.button.secondary { box-shadow: none; }
.button.danger { background: linear-gradient(135deg, #e36a6a, #c93d3d); box-shadow: 0 10px 22px -12px rgba(201, 61, 61, .9); }
.view-btn { height: 34px; padding: 0 14px; font-size: 12.5px; }

.act-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink-2);
    font-size: 16px;
    transition: all .15s ease;
}
.act-btn:hover { background: var(--surface-2); border-color: var(--brand); color: var(--brand-2); }
.act-btn.red:hover { border-color: var(--red); color: var(--red); }

/* -------------------------------------------------------- forms & filters */
label { color: var(--ink-2); font-size: 12.5px; font-weight: 600; letter-spacing: .005em; }

input, select, textarea {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background-color: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
textarea { height: auto; min-height: 110px; padding: 12px 14px; line-height: 1.55; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; padding: 0; accent-color: var(--brand); }
input[type="color"] { padding: 4px; }
input[type="file"] { height: auto; padding: 9px 12px; }
input::placeholder, textarea::placeholder { color: #9aa9b9; }
input:hover, select:hover, textarea:hover { border-color: #c8d4e0; }
input:focus, select:focus, textarea:focus {
    outline: 0;
    border-color: var(--brand);
    box-shadow: var(--ring);
    background-color: var(--surface);
}
select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2374869a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    cursor: pointer;
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea { background-color: var(--surface-2); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] input:hover, html[data-theme="dark"] select:hover { border-color: #33485f; }
html[data-theme="dark"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a9db2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
html[data-theme="dark"] label { color: var(--ink-2); }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #61758a; }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8); }

.form-card { max-width: none; padding: 28px; }
.form-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px 22px; }
.field { gap: 8px; }
.form-footer { gap: 12px; margin-top: 24px; }
.form-card .form-footer { padding-top: 22px; border-top: 1px solid var(--line-2); }

.filters {
    gap: 14px;
    padding: 16px 18px;
    margin-bottom: 16px;
    align-items: flex-end;
}
.filters-grid { gap: 14px; }
.ff label { margin-bottom: 7px; color: var(--mute); font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.ff input, .ff select { height: 42px; font-size: 13.5px; padding-top: 0; padding-bottom: 0; }
.ff input[type="search"], .ff input[type="text"] { padding-left: 14px; }
.filters-side { gap: 8px; }
.fbtn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink-2);
    font-size: 17px;
    transition: all .15s ease;
}
.fbtn:hover { border-color: var(--brand); color: var(--brand-2); background: var(--surface); }
.fbtn-go, .fbtn.fbtn-go {
    color: #fff;
    border: 0;
    background: linear-gradient(135deg, #25b673, #0f8650);
    box-shadow: 0 10px 20px -12px rgba(15, 134, 80, .9);
}
.fbtn-go:hover { color: #fff; background: linear-gradient(135deg, #2cc47f, #0f8650); }

/* ---------------------------------------------------------- tabs & chips */
.tabs { gap: 8px; margin-bottom: 16px; }
.tab, .chip, .seat-pill, .switch, .legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
    transition: all .18s ease;
}
.tab:hover, .chip:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); color: var(--ink); background: var(--surface); }
.tab.active, .chip.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--navy-1), #1d4a73);
    box-shadow: 0 10px 20px -12px rgba(20, 50, 78, .8);
}
.tab-count, .chip-n {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--mute);
    font-size: 11.5px;
    font-weight: 700;
}
.tab.active .tab-count, .chip.active .chip-n { background: rgba(255, 255, 255, .2); color: #fff; }
html[data-theme="dark"] .chip { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
html[data-theme="dark"] .chip.active { color: #fff; background: linear-gradient(135deg, #1d4a73, #2a6aa3); }

.seg { border-radius: var(--r-sm); border-color: var(--line); background: var(--surface); padding: 3px; gap: 2px; }
.seg a, .seg span { padding: 7px 14px; border-radius: 9px; background: transparent; color: var(--ink-2); font-weight: 600; }
.seg a:hover { background: var(--surface-2); }
.seg a.active { color: #fff; background: linear-gradient(135deg, var(--navy-1), #1d4a73); }
.seg a.today { color: #fff; background: linear-gradient(135deg, #25b673, #0f8650); }

.period-box {
    min-height: 46px;
    padding: 6px 14px;
    border-color: var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--mute);
    font-size: 10.5px;
    letter-spacing: .08em;
}
.period-box strong { color: var(--ink); font-size: 13px; }
.period-box select { height: auto; padding: 0 22px 0 0; border: 0; background-color: transparent; box-shadow: none; font-weight: 700; font-size: 13px; background-position: right 0 center; }

.switch { cursor: pointer; }
.switch.on { color: var(--brand-2); border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); background: var(--brand-soft); }

/* --------------------------------------------------------------- board */
.board { gap: 16px; align-items: stretch; }
.board > div { display: flex; flex-direction: column; min-width: 0; }
.board-head {
    gap: 9px;
    padding: 12px 16px;
    border-radius: var(--r-md) var(--r-md) 0 0;
    font-size: 12px;
    letter-spacing: .1em;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .14);
}
.bh-grey   { background: linear-gradient(135deg, #6a7f93, #55697c); }
.bh-blue   { background: linear-gradient(135deg, #3f7ae0, #2d62bd); }
.bh-amber  { background: linear-gradient(135deg, #d29a2e, #b57a13); }
.bh-purple { background: linear-gradient(135deg, #7d68c4, #5f4ba4); }
.bh-green  { background: linear-gradient(135deg, #22a977, #14815a); }
.bh-maroon { background: linear-gradient(135deg, #bf5d77, #9a3f58); }
.bh-count { background: rgba(255, 255, 255, .24); }
.board-body {
    flex: 1;
    min-height: 340px;
    margin-top: 0;
    padding: 14px 12px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 var(--r-md) var(--r-md);
    background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}
.bcard {
    padding: 14px 15px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}
.bcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.bcard-top { gap: 8px; font-size: 14px; flex-wrap: wrap; }
.bcard-meta { margin-top: 9px; color: var(--mute); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.bcard-agent { margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--line); color: var(--ink-2); }
.grip { color: var(--mute); opacity: .55; }
.board-empty { padding: 56px 10px; color: var(--mute); }
.board-empty .cloud { font-size: 26px; opacity: .5; }

.stage-dot { border-radius: 999px; }

/* ---------------------------------------------------- ops / finance bits */
.duo { gap: 16px; }
.duo-head, .chart-head {
    gap: 9px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
}
.up-row, .alert-row { padding: 14px 20px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.up-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.alert-ico { width: 34px; height: 34px; border-radius: 10px; font-size: 16px; }
.alert-row a, .up-row a { color: var(--brand-2); font-weight: 600; }

.count-cards { gap: 16px; }
.count-card.active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 157, 95, .16), var(--shadow); }

.report-grid { gap: 16px; }
.chart { height: 250px; padding: 18px 20px 0; }
.bar { border-radius: 5px 5px 0 0; }
.b-collected { background: linear-gradient(180deg, #34cf91, #1d9d5f); }
.b-paid { background: linear-gradient(180deg, #ef7a7a, #d24a4a); }
.b-internal { background: linear-gradient(180deg, #e7b34a, #c98412); }
.b-operating, .b-inquiries { background: linear-gradient(180deg, #5b93ec, #2f6fd0); }
.chart-x { color: var(--mute); font-size: 11px; }

.report-empty { padding: 70px 20px; color: var(--mute); }
.report-empty .ico { font-size: 34px; color: var(--mute); opacity: .55; }
.report-empty strong { color: var(--ink); font-size: 15px; }
.empty, .empty-state { color: var(--mute); }
.empty-state .big { font-size: 28px; opacity: .6; }

table.cal th { background: var(--surface-2); }
table.cal td.cal-res { background: var(--surface-2); }

/* ------------------------------------------------------------- settings */
.section-bar {
    margin: 26px 0 0;
    padding: 13px 20px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    color: var(--ink);
    background: linear-gradient(135deg, var(--surface-2), var(--surface));
    font-size: 12.5px;
    letter-spacing: .09em;
}
.section-bar .ix { color: var(--brand-2); }
html[data-theme="dark"] .section-bar { color: var(--ink); background: var(--surface-2); }
.section-body { padding: 22px 24px; border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: var(--shadow); }
.editor-toolbar { border-color: var(--line); border-radius: var(--r-sm) var(--r-sm) 0 0; background: var(--surface-2); }
.editor-toolbar button { color: var(--ink-2); }
.editor-toolbar button:hover { background: var(--line); }
.editor-area { border-color: var(--line); border-radius: 0 0 var(--r-sm) var(--r-sm); background: var(--surface); color: var(--ink); height: auto; }
.var-chip { border-color: var(--line); background: var(--surface); color: var(--ink-2); }
.var-chip:hover { border-color: var(--brand); background: var(--surface); }

.spotlight { border-left: 4px solid var(--brand); }
.spot-link { border-color: var(--line); background: var(--surface-2); color: var(--brand-2); }
.spot-link:hover { background: var(--brand-soft); }

/* ------------------------------------------------------- flash + promo */
.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 14px 18px;
    border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent);
    border-radius: var(--r-md);
    color: var(--brand-2);
    background: var(--brand-soft);
    font-weight: 600;
}
html[data-theme="dark"] .flash { color: #7fe0b3; background: var(--brand-soft); }

.promo {
    margin-bottom: 26px;
    padding: 18px 24px;
    border-radius: var(--r-lg);
    box-shadow: 0 18px 36px -22px rgba(11, 107, 63, .75);
}
.promo .plans-btn { height: 40px; padding: 0 18px; border-radius: var(--r-sm); line-height: 40px; }

.viewas-bar { margin: 0 16px; border-radius: var(--r-md); border: 1px solid #f0e3b8; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
    .board { grid-template-columns: repeat(2, 1fr); }
    .report-grid, .duo { grid-template-columns: 1fr; }
    .count-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
    .page-title { font-size: 24px; }
    .board { grid-template-columns: 1fr; }
    .count-cards { grid-template-columns: 1fr; }
    .actions { grid-template-columns: 1fr; }
    .form-card { padding: 20px; }
    .table-card { padding: 2px 4px 8px; }
}

/* headers nested inside cards (Recent inquiries …) stay on one line */
.card .page-head { flex-wrap: nowrap; align-items: center; gap: 12px; margin: 14px 0 6px; padding: 0 10px; }
.card .page-head > :first-child { flex: 1 1 auto; }
.card .page-head h2 { font-size: 16px; font-weight: 700; }
.card .page-head .button, .card .page-head .tb-btn { height: 36px; font-size: 13px; }
.grid-two { align-items: stretch; }
.grid-two > .card { display: flex; flex-direction: column; }

/* board cards: name + priority on one line */
.bcard-top { flex-wrap: nowrap; }
.bcard-top > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard-top .badge { flex-shrink: 0; margin-left: auto; }

/* dashboard: team activity */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.team-card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.team-avatar { position: relative; display: inline-block; flex: none; }
.team-avatar .avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 8px 16px -8px rgba(160, 74, 94, .8), inset 0 1px 0 rgba(255, 255, 255, .3); }
.team-online-dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border: 2px solid var(--surface); border-radius: 50%; background: var(--brand); }
.team-who { flex: 1; min-width: 0; }
.team-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 14.5px; color: var(--ink); }
.team-meta { color: var(--mute); font-size: 12.5px; }
.team-status { flex: none; color: var(--mute); font-size: 12px; text-align: right; }
.team-status.online { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; color: var(--brand-2); background: var(--brand-soft); font-weight: 700; }
.team-status.online::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px rgba(29, 157, 95, .2); }

.avatar { background: linear-gradient(135deg, #e08a3c, #a04a5e); }

.badge.blue { color: var(--blue); background: var(--blue-soft); }
html[data-theme="dark"] .badge.blue { color: var(--blue); background: var(--blue-soft); }
.tf-per select { width: auto; min-width: 76px; height: 36px; padding: 0 30px 0 12px; font-size: 13px; background-position: right 10px center; }
.tf-per { gap: 10px; }

.nowrap { white-space: nowrap; }

/* grid children may shrink instead of pushing the page wider */
.report-grid > *, .duo > *, .grid-two > *, .pipeline > *, .stats > *, .count-cards > * { min-width: 0; }
.card:has(> table), .card:has(> .cal-wrap) { overflow-x: auto; }

/* chart / panel titles read as headings, not tracked-out labels */
.chart-head {
    gap: 10px;
    flex-wrap: wrap;
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
    text-transform: none;
}
.chart-head .legend-chip, .chart-legend { letter-spacing: 0; text-transform: none; font-weight: 600; }
.legend-chip { height: 30px; padding: 0 12px; font-size: 12px; }
.chart-head > :last-child:not(:first-child) { margin-left: auto; }

.filters { flex-wrap: wrap; }
.filters .filters-grid { flex: 1 1 520px; min-width: 0; }
.filters-grid > *, .filters > * { min-width: 0; }
input[type="file"]::file-selector-button {
    margin-right: 12px;
    height: 32px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface-2);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
input[type="file"] { display: flex; align-items: center; height: 46px; padding: 6px 10px; }

/* the page's older dark rule resets `background` on selects; keep the arrow placed */
html[data-theme="dark"] select {
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 16px;
}
html[data-theme="dark"] .period-box select { background-color: transparent; background-position: right 0 center; }
html[data-theme="dark"] .tf-per select { background-position: right 10px center; }
html[data-theme="dark"] input[type="file"]::file-selector-button { background: var(--line); color: var(--ink); }

/* settings pages wrap several section-bar / section-body pairs in one outer card;
   each pair is already its own card, so the wrapper steps out of the way */
.card:has(> .section-bar), .card:has(> form > .section-bar), .card:has(> form > .section-body) {
    border: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
}
.card:has(> .section-bar) > .section-bar:first-child,
.card:has(> form > .section-bar) > form > .section-bar:first-child { margin-top: 0; }
.card > form > .form-footer, .card > .form-footer { margin-top: 22px; }

/* inline notices (e.g. "No SMTP configured yet") */
.notice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 18px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    color: var(--ink-2);
    box-shadow: var(--shadow);
}
.notice strong { color: var(--ink); }
.notice.warn { border-color: color-mix(in srgb, var(--amber) 35%, var(--line)); background: var(--amber-soft); }

/* search fields: leading magnifier */
.content input[name="q"]:not([type="hidden"]),
.content input[type="search"] {
    padding-left: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%2374869a%22 stroke-width=%221.5%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2211.5%22 cy=%2211.5%22 r=%229.5%22/%3E%3Cpath d=%22M22 22l-2-2%22/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
    background-size: 18px;
}

.ix-dot { display: inline-block; width: .5em; height: .5em; margin-right: .35em; border-radius: 50%; background: currentColor; vertical-align: .08em; }

/* inline `display:inline-block` on buttons must not break their icon + label row */
.tb-btn, .button, .outline-btn, .view-btn { display: inline-flex !important; }

/* subscription: current plan */
.plan-card { padding: 28px; }
.plan-grid { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 28px 48px; align-items: start; }
.plan-main { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.plan-name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; font-size: 32px; font-weight: 700; letter-spacing: -.025em; }
.plan-name .badge { font-size: 11px; letter-spacing: .06em; }
.plan-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; padding-left: 40px; border-left: 1px solid var(--line); }
.pm-label { color: var(--mute); font-size: 11px; font-weight: 700; letter-spacing: .09em; }
.pm-value { margin-top: 6px; font-size: 17px; font-weight: 700; color: var(--ink); }
.plan-expiry-form { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.plan-expiry-form input { height: 38px; font-size: 13px; }
.plan-expiry-form .tb-btn { height: 38px; padding: 0 14px; font-size: 13px; }
@media (max-width: 900px) {
    .plan-grid { grid-template-columns: 1fr; }
    .plan-meta { padding-left: 0; border-left: 0; padding-top: 22px; border-top: 1px solid var(--line); }
}

/* subscription: usage + banners */
.trial-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
    margin-bottom: 18px; padding: 14px 18px;
    border: 1px solid color-mix(in srgb, var(--red) 25%, transparent);
    border-radius: var(--r-md);
    font-size: 13.5px; font-weight: 600;
}
.usage-grid { gap: 16px; }
.usage-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.usage-label { font-size: 12.5px; }
.usage-value { margin: 10px 0 12px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.usage-bar { height: 8px; background: var(--line); }

/* ------------------------------------------------ three-dots "more" menu */
.more { position: relative; display: inline-flex; flex-shrink: 0; }
.more-btn {
    display: grid; place-items: center;
    width: 42px; height: 42px;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    background: var(--surface); color: var(--ink-2); cursor: pointer;
    box-shadow: 0 1px 2px rgba(16, 37, 63, .04);
    transition: all .15s ease;
}
.more-btn:hover, .more-btn[aria-expanded="true"] { border-color: var(--brand); color: var(--brand-2); transform: translateY(-1px); }
.more-sm .more-btn { width: 34px; height: 34px; border-radius: 10px; box-shadow: none; }
.more-pop {
    position: fixed; z-index: 90;
    display: flex; flex-direction: column; gap: 2px;
    min-width: 210px; padding: 8px;
    border: 1px solid var(--line); border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: 0 24px 60px -18px rgba(13, 34, 54, .4), 0 6px 18px -8px rgba(13, 34, 54, .2);
    animation: more-pop .16s ease-out;
}
.more-pop[hidden] { display: none; }
@keyframes more-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.more-pop form { margin: 0; display: block; }
.more-pop a, .more-pop button, .more-pop form > button {
    display: flex !important; align-items: center; justify-content: flex-start;
    gap: 12px; width: 100%; height: 40px; padding: 0 12px;
    border: 0; border-radius: 10px; background: transparent; box-shadow: none;
    color: var(--ink); font-size: 13.5px; font-weight: 600; text-align: left; white-space: nowrap;
    transform: none; cursor: pointer;
}
.more-pop a:hover, .more-pop button:hover { background: var(--surface-2); color: var(--ink); transform: none; box-shadow: none; border: 0; }
.more-pop .ix { color: var(--mute); font-size: 1.15em; }
.more-pop .act-btn { width: 100%; height: 40px; font-size: 13.5px; border: 0; justify-content: flex-start; }
.more-pop .act-btn.red { color: var(--red); }
.more-pop .act-btn.red .ix { color: var(--red); }
.more-lbl { font-weight: 600; }
.row-acts { align-items: center; }

/* ------------------------------------------------ audit fixes */
.team-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.team-name { white-space: normal; overflow: visible; }
.bcard-top > :first-child { white-space: normal; overflow: visible; }
.section-body { overflow-x: auto; }
.form-footer { flex-wrap: wrap; }
.plan-expiry-form { flex-wrap: wrap; }
.plan-expiry-form input { flex: 1 1 140px; min-width: 0; width: auto; }

.more-btn svg { transform: rotate(90deg); }
.more-sm .more-btn svg { width: 20px; height: 20px; }

/* stat tiles reflow by available width, whatever column count a template hard-codes */
.stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important; }
.count-cards { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important; }

/* ---------------------------------------------- section tab bar */
.section-tabs {
    display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto;
    margin: 0 0 22px; padding: 0 2px;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
}
.section-tabs::-webkit-scrollbar { display: none; }
.section-tabs a {
    position: relative; flex: 0 0 auto;
    padding: 12px 16px 14px;
    color: var(--mute); font-size: 14px; font-weight: 600; white-space: nowrap;
    border-radius: 10px 10px 0 0;
    transition: color .15s ease, background .15s ease;
}
.section-tabs a:hover { color: var(--ink); background: color-mix(in srgb, var(--brand) 6%, transparent); }
.section-tabs a.active { color: var(--brand-2); }
.section-tabs a.active::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(90deg, var(--brand-3), var(--brand-2));
}
html[data-theme="dark"] .section-tabs a.active { color: var(--brand-3); }

/* ====================================================== restraint pass
   Plain surfaces, flat colour, small radii, quiet shadows. Last in the file on purpose. */
:root {
    --r-lg: 14px; --r-md: 10px; --r-sm: 8px;
    --shadow: 0 1px 2px rgba(16, 37, 63, .06);
    --shadow-hover: 0 2px 8px rgba(16, 37, 63, .10);
}
html[data-theme="dark"] { --shadow: 0 1px 2px rgba(0, 0, 0, .35); --shadow-hover: 0 2px 8px rgba(0, 0, 0, .45); }

body, html[data-theme="dark"] body { background: var(--canvas); }

/* no hover "lift" */
a.stat-card:hover, a.pipe-card:hover, a.card:hover, .bcard:hover,
.tb-btn:hover, .button:hover, .more-btn:hover, .fbtn:hover, .tb-navy:hover, .tb-maroon:hover { transform: none; }
a.stat-card:hover, a.pipe-card:hover, a.card:hover { box-shadow: var(--shadow-hover); }

/* buttons: flat */
.tb-navy, .button, .tb-maroon, .fbtn-go {
    background: var(--brand); color: #fff; box-shadow: none;
}
.tb-navy:hover, .button:hover, .tb-maroon:hover, .fbtn-go:hover { background: var(--brand-2); box-shadow: none; }
.tb-green, .tb-red, .tb-tan, .tb-outline, .outline-btn, .button.secondary, .view-btn,
.tb-green:hover, .tb-red:hover, .tb-tan:hover, .tb-outline:hover, .outline-btn:hover, .button.secondary:hover, .view-btn:hover,
.more-btn, .more-btn:hover { box-shadow: none; }
.button.danger { background: var(--red); box-shadow: none; }
.tb-outline.active, .tab.active, .chip.active, .seg a.active, html[data-theme="dark"] .chip.active { background: var(--navy-1); box-shadow: none; }
html[data-theme="dark"] .tab.active, html[data-theme="dark"] .seg a.active, html[data-theme="dark"] .tb-outline.active { background: #24476b; }
.seg a.today { background: var(--brand); }
.pg.active { background: var(--navy-1); box-shadow: none; }

/* decoration removed */
.panel-label::before { display: none; }
.panel-label { margin: 28px 2px 10px; letter-spacing: .06em; }
.pipe-card::before { display: none; }
.pipe-card { padding-left: 20px; }
.stat-ico, .pipe-ico, .action-ico { box-shadow: none; background-image: none; border-radius: 10px; }
.stat-ico { background: var(--surface-2); }
html[data-theme="dark"] .stat-ico { background: var(--surface-2); }
.section-bar, html[data-theme="dark"] .section-bar { background: var(--surface); }
.bh-grey { background: #5f7386; } .bh-blue { background: #3f6db5; } .bh-amber { background: #b57a2a; }
.bh-purple { background: #6b5a8e; } .bh-green { background: #17705a; } .bh-maroon { background: #a04a5e; }
.board-head { box-shadow: none; }
.b-collected { background: #1d9d5f; } .b-paid { background: #d24a4a; } .b-internal { background: #c98412; }
.b-operating, .b-inquiries { background: #2f6fd0; }
.avatar, .team-avatar .avatar { background: #c9753a; box-shadow: none; }
.team-status.online::before { box-shadow: none; }
.promo { display: none; }

/* quieter small caps */
.stat-label, th, .pm-label, .duo-head, .section-bar { letter-spacing: .04em; }
.stat-value { font-weight: 700; }
.more-pop { box-shadow: 0 8px 24px rgba(13, 34, 54, .18); animation: none; }
.section-tabs a.active::after { background: var(--brand); }
.ix-dot { width: .45em; height: .45em; }
.ix.chev { width: .95em; height: .95em; opacity: .6; vertical-align: -.15em; }
.bcard-top .chev, td strong + .chev, td > .ix.chev:last-child { display: none; }
.bcard-top > :first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-card .team-name { white-space: normal; overflow: visible; }

/* ================================================================ home */
.home-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.home-top:has(> .home-card:only-child) { grid-template-columns: 1fr; }
.home-bottom { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.home-kpis { margin-bottom: 16px; }
@media (max-width: 1000px) { .home-top, .home-bottom { grid-template-columns: 1fr; } }

.home-card { padding: 0; overflow: hidden; }
.home-card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px 12px; }
.home-card-head h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.home-link { margin-left: auto; color: var(--brand-2); font-size: 13px; font-weight: 600; }
.home-link:hover { text-decoration: underline; }
.home-card ul { list-style: none; margin: 0; padding: 0 8px 8px; }
.home-card li a { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 10px; transition: background .12s ease; }
.home-card li a:hover { background: var(--surface-2); }

.attn-count { display: grid; place-items: center; flex: none; min-width: 38px; height: 38px; padding: 0 8px; border-radius: 10px; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tone-red { color: var(--red); background: var(--red-soft); }
.tone-amber { color: var(--amber); background: var(--amber-soft); }
.tone-blue { color: var(--blue); background: var(--blue-soft); }
.attn-text, .dep-trip, .dep-date, .feed-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.attn-text { flex: 1; }
.attn-text strong, .dep-trip strong, .feed-text strong { font-weight: 600; color: var(--ink); font-size: 14px; }
.attn-text .muted, .dep-trip .muted, .dep-date .muted, .feed-text .muted { font-size: 12.5px; }
.attn-go { color: var(--mute); }

.money-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 4px 20px 6px; }
.money-figures > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mf-label { color: var(--mute); font-size: 12px; }
.mf-value { font-size: 17px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.money-bars { display: flex; align-items: flex-end; gap: 10px; height: 110px; margin: 14px 20px 18px; }
.mb-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.mb-bar { width: 100%; max-width: 38px; border-radius: 4px 4px 0 0; background: var(--line); min-height: 3px; }
.mb-col.now .mb-bar { background: var(--brand); }
.mb-x { color: var(--mute); font-size: 11px; }

.dep-row .dep-date { flex: 0 0 104px; }
.dep-row .dep-trip { flex: 1; }
.dep-state { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 190px; }
.feed-ico { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }
.feed-text { flex: 1; }
.feed-text .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; font-size: 12px; }

.team-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 14px 4px; font-size: 13px; }
.team-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; }
.team-chip .team-avatar .avatar { width: 28px; height: 28px; font-size: 11px; }
.team-chip .team-online-dot { width: 9px; height: 9px; }
.home-bottom { align-items: start; }
.home-top .home-card { display: flex; flex-direction: column; }
.home-top .money-bars { flex: 1; min-height: 120px; }

.home-bottom { align-items: stretch; }
.home-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.home-bottom > .home-card { align-self: start; }
.team-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 8px; }
.team-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; }
.team-item .team-avatar .avatar { width: 36px; height: 36px; font-size: 12px; }
.team-strip { display: none; }
