/* ============================================
   DChat Dashboard - Design System
   Calm, neutral surfaces; black primary actions; serif page titles.
   DChat green is kept for the logo mark and for online / success status only.
   ============================================ */

/* Self-hosted fonts (SIL Open Font License 1.1 - licence texts sit beside the
   files in ../fonts). No CDN: installs are self-hosted and may be offline, and
   the dashboard's CSP only allows same-origin fonts. */
@font-face {
    font-family: 'Geist';
    src: url('../fonts/Geist-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Geist';
    src: url('../fonts/Geist-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Geist';
    src: url('../fonts/Geist-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Geist';
    src: url('../fonts/Geist-Bold.woff2') format('woff2');
    font-weight: 700 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Crimson Text';
    src: url('../fonts/CrimsonText-Regular-latin.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-ui: Geist, "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Microsoft YaHei", sans-serif;
    --font-display: "Crimson Text", Georgia, "Times New Roman", serif;

    /* Brand green: logo mark, online / success status, positive deltas. */
    --dchat-green: #72c02c;
    --dchat-green-dark: #5da024;
    /* The brand green is 2.3:1 under white text and 3.2:1 as text on white, so
       green TEXT uses a darker shade of it (>= 4.5:1, WCAG 1.4.3). */
    --dchat-green-text: #3b7a14;
    --dchat-green-strong: #3d7c16;
    --dchat-green-strong-hover: #2f6310;
    --dchat-green-light: #e8f5e0;

    /* Neutral accent: primary actions, links, active states. */
    --accent: #0d0d0d;
    --accent-hover: #262626;
    --hover-bg: rgba(0,0,0,.04);
    --active-bg: rgba(0,0,0,.05);

    --sidebar-bg: #f8f8f8;
    --sidebar-hover: rgba(0,0,0,.04);
    --sidebar-active: rgba(0,0,0,.05);
    --sidebar-active-border: #0d0d0d;
    --topbar-bg: #f8f8f8;
    --topbar-border: rgba(0,0,0,.06);
    --body-bg: #f8f8f8;
    --card-bg: #ffffff;
    --text-primary: #0d0d0d;
    /* Both >= 4.5:1 on #f8f8f8 and on white. */
    --text-secondary: #595959;
    --text-muted: #666666;
    --border-color: #e5e5e5;
    --card-border: #dbdbdb;
    --input-border: rgba(0,0,0,.12);
    --focus-ring: 0 0 0 3px rgba(0,0,0,.08);
    --shadow-sm: none;
    --shadow-md: 0 4px 16px -8px rgba(0,0,0,.12);
    --shadow-lg: 0 16px 48px -16px rgba(0,0,0,.22), 0 2px 8px -4px rgba(0,0,0,.08);
    --radius: 8px;
    --radius-btn: 6px;
    --radius-lg: 12px;

    --bs-body-font-family: var(--font-ui);
    --bs-font-sans-serif: var(--font-ui);
    --bs-body-color: #0d0d0d;
    --bs-primary: #0d0d0d;
    --bs-primary-rgb: 13,13,13;
}

html, body {
    font-family: var(--font-ui);
    background: var(--body-bg);
    color: var(--text-primary);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--body-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-primary);
}

h1:focus { outline: none; }

/* Links & Buttons */
a, .btn-link {
    color: var(--accent);
    text-decoration-color: rgba(13,13,13,.35);
    text-underline-offset: 2px;
}
a:hover, .btn-link:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
/* Bootstrap's own muted grey is 4.49:1 on the light panels. */
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--accent) !important; }
.bg-primary { background-color: var(--accent) !important; }
/* Bootstrap's #198754 is 4.3:1 on the #f8f8f8 page. */
.text-success { color: #157347 !important; }

.btn {
    border-radius: var(--radius-btn);
    font-weight: 500;
}
.btn-sm, .btn-group-sm > .btn { border-radius: var(--radius-btn); }

/* Primary actions are black. btn-success is the codebase's "Save / Create /
   Publish" button, so it is a primary action too, not a status colour. */
.btn-primary,
.btn-success {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active,
.btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active {
    color: #fff;
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}
.btn-primary:disabled, .btn-primary.disabled,
.btn-success:disabled, .btn-success.disabled {
    color: #fff;
    background: #8c8c8c;
    border-color: #8c8c8c;
}

/* Secondary / outline: white, hairline border, black text. */
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success {
    color: var(--text-primary);
    background: #fff;
    border-color: var(--card-border);
}
.btn-outline-primary:hover, .btn-outline-primary:active, .btn-outline-primary.active,
.btn-outline-secondary:hover, .btn-outline-secondary:active, .btn-outline-secondary.active,
.btn-outline-success:hover, .btn-outline-success:active, .btn-outline-success.active,
.btn-check:checked + .btn-outline-primary,
.btn-check:checked + .btn-outline-secondary {
    color: var(--text-primary);
    background: #f3f3f3;
    border-color: #c2c2c2;
}
.btn-check:checked + .btn-outline-primary,
.btn-check:checked + .btn-outline-secondary { background: #ebebeb; border-color: #0d0d0d; }
.btn-outline-primary:disabled, .btn-outline-secondary:disabled, .btn-outline-success:disabled {
    color: #6b6b6b;
    background: #fff;
}
/* Bootstrap's #dc3545 outline is 4.05:1 on the grey page background. */
.btn-outline-danger { color: #b02a37; border-color: #b02a37; background: #fff; }
.btn-outline-danger:hover { color: #fff; background: #b02a37; border-color: #b02a37; }
.btn-danger { background: #b02a37; border-color: #b02a37; }
.btn-danger:hover { background: #8f222d; border-color: #8f222d; }
/* Text-only buttons in the shared layout still get a 24px target (WCAG 2.5.8). */
.btn-target {
    min-width: 24px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Skip link (WCAG 2.4.1): the first Tab stop on every signed-in page, shown
   only while focused. */
.skip-link {
    position: absolute;
    left: 8px;
    top: -48px;
    z-index: 2000;
    padding: 8px 14px;
    border-radius: var(--radius-btn);
    background: #0d0d0d;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus {
    top: 8px;
    color: #fff;
    outline: 2px solid #0d0d0d;
    outline-offset: 2px;
}
main:focus { outline: none; }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: var(--focus-ring);
    border-color: rgba(0,0,0,.45);
}
/* Keyboard focus stays clearly visible on the calmer palette (WCAG 2.4.7). */
.btn:focus-visible, a:focus-visible, .nav-link:focus-visible, .page-link:focus-visible {
    outline: 2px solid #0d0d0d;
    outline-offset: 2px;
    box-shadow: none;
}

/* Checkboxes, radios, switches, ranges, progress */
.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}
.form-check-input[type=checkbox]:indeterminate {
    background-color: var(--accent);
    border-color: var(--accent);
}
.form-switch .form-check-input:focus:not(:checked) {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280,0,0,0.45%29'/%3e%3c/svg%3e");
}
.form-range::-webkit-slider-thumb { background-color: var(--accent); }
.form-range::-moz-range-thumb { background-color: var(--accent); }
.progress { background-color: #ebebeb; border-radius: 999px; }
.progress-bar { background-color: var(--accent); }

/* Tabs, pills, chips */
.nav-tabs { border-bottom-color: var(--border-color); gap: 2px; }
.nav-tabs .nav-link,
.nav-pills .nav-link {
    color: #595959;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--radius);
}
.nav-tabs .nav-link { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.nav-tabs .nav-link:hover,
.nav-pills .nav-link:hover {
    color: #333;
    background: var(--hover-bg);
    border-color: transparent;
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: #333;
    background: #fff;
    border-color: var(--card-border) var(--card-border) #fff;
}
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    color: #333;
    background: var(--hover-bg);
    border-color: var(--card-border);
}
.list-group-item.active {
    color: var(--text-primary);
    background: var(--active-bg);
    border-color: var(--card-border);
}
.dropdown-menu { border-color: var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.dropdown-item.active, .dropdown-item:active { color: var(--text-primary); background: var(--active-bg); }
.page-link { color: var(--text-primary); border-color: var(--card-border); }
.page-link:hover { color: var(--text-primary); background: var(--hover-bg); }
.page-item.active .page-link { color: #fff; background: var(--accent); border-color: var(--accent); }

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: none;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
}
.card-footer { background: transparent; border-top-color: var(--border-color); }

.card-body { padding: 1.25rem; }

/* Tables */
.table { font-size: .875rem; --bs-table-hover-bg: rgba(0,0,0,.025); }
.table thead th {
    background: #fafafa;
    border-bottom: 1px solid var(--card-border);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: .8rem;
    letter-spacing: 0;
    padding: .75rem 1rem;
}
/* Row headers (<th scope="row">) line up with the cells beside them. */
.table tbody td,
.table tbody th {
    padding: .875rem 1rem;
    vertical-align: middle;
    border-color: var(--border-color);
}
.table-hover > tbody > tr:hover { background-color: rgba(0,0,0,.025); }
/* Bootstrap draws a 2px currentColor rule between thead and tbody. */
.table > :not(:first-child) { border-top: 1px solid var(--card-border); }

/* Forms */
.form-control, .form-select {
    border-radius: var(--radius);
    border: 1px solid var(--input-border);
    background-color: #fff;
    color: var(--text-primary);
    font-size: .875rem;
    padding: .5rem .75rem;
}
textarea.form-control { border-radius: var(--radius-lg); }
/* The shorthand above also cut Bootstrap's right padding, so long option
   text in every drop-down ran under the arrow. */
.form-select {
    padding-right: 2.25rem;
}
.form-control::placeholder { color: #767676; }
.input-group-text { background: #f3f3f3; border-color: var(--input-border); }
.form-label {
    font-weight: 500;
    font-size: .875rem;
    color: var(--text-primary);
    margin-bottom: .375rem;
}
.form-text {
    font-size: .8rem;
    color: var(--text-muted);
}

/* Content area */
.content {
    padding-top: 1.5rem;
}

/* Badges */
.badge {
    font-weight: 500;
    font-size: .75rem;
    padding: .35em .65em;
    border-radius: 6px;
}
/* "Premium" / "Enterprise" tier marker (Shared/PlanBadge.razor): neutral. */
.badge.plan-badge {
    background: rgba(0,0,0,.06) !important;
    color: #0d0d0d !important;
    border: 1px solid rgba(0,0,0,.08);
    font-weight: 500;
    letter-spacing: .01em;
}

/* Alerts */
.alert { border-radius: var(--radius-lg); font-size: .875rem; }
.alert-info {
    color: #0d0d0d;
    background: #f3f3f3;
    border-color: var(--card-border);
}
.alert-link { color: inherit; }

/* Modal */
.modal-content {
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-lg);
}
.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem;
}
.modal-footer { border-top: 1px solid var(--border-color); }
.modal-backdrop.show { opacity: .3; }

/* Stats cards: white, hairline border, big serif numbers. */
.stat-card {
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    background: #fff;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    min-height: 132px;
}
.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 400;
    letter-spacing: -.03em;
    line-height: 1.05;
    margin-top: .35rem;
}
.stat-card .stat-label {
    font-size: .8125rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.stat-card .stat-icon {
    font-size: 1.5rem;
    color: #8a8a8a;
}
.stat-hint {
    margin-top: .4rem;
    font-size: .75rem;
    color: var(--text-muted);
}

/* The colour variants used to be gradients; they now only tint the icon, and
   only "green" (online / answered) keeps the brand colour. */
.stat-green .stat-icon { color: var(--dchat-green-text); }
.stat-blue, .stat-amber, .stat-cyan, .stat-purple, .stat-rose { background: #fff; }

/* Login page */
.login-container {
    width: 100%;
    max-width: 400px;
}
.login-card {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2.5rem 2.25rem;
}
.login-card h1,
.login-card h3 {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 400;
    letter-spacing: -.03em;
}
.login-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.5rem;
}
.login-brand svg { width: 32px; height: 32px; }

/* Page headers: serif display titles. */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.page-header h1,
.page-header h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -.025em;
    line-height: 1.15;
    margin: 0;
}

.dashboard-hero {
    padding: .25rem 0;
}
.eyebrow {
    display: inline-block;
    margin-bottom: .15rem;
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.dashboard-live-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .75rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}
.live-dot {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34,197,94,.18);
}

/* Validation states */
.valid.modified:not([type=checkbox]) { outline: 1px solid var(--dchat-green); }
.invalid { outline: 1px solid #ef4444; }
.validation-message { color: #b02a37; }

/* Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none;
    left: 0;
    padding: .6rem 1.25rem .7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: .75rem;
    top: .5rem;
}
.blazor-error-boundary {
    background: #b02a37;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: var(--radius);
}
.blazor-error-boundary::after { content: "An error has occurred."; }

/* Loading */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem;
}
.loading-progress circle {
    fill: none;
    stroke: #e5e5e5;
    stroke-width: .6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}
.loading-progress circle:last-child {
    stroke: var(--accent);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * .8), 500%;
    transition: stroke-dasharray .05s ease-in-out;
}
.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto .2rem;
    color: var(--text-secondary);
}
.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* Utilities */
.text-green { color: var(--dchat-green) !important; }
.bg-green-light { background: var(--dchat-green-light) !important; }
.fw-600 { font-weight: 600; }
.fs-sm { font-size: .875rem; }
.gap-3 { gap: 1rem; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}
.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: .45;
}
.empty-state h2, .empty-state h5 {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: -.02em;
    margin-bottom: .5rem;
}
.empty-state p { max-width: 320px; margin: 0 auto; }

code { color: #0d0d0d; background: rgba(0,0,0,.05); padding: .1em .3em; border-radius: 4px; }
pre code { background: none; padding: 0; color: inherit; }
kbd { background: #0d0d0d; border-radius: 4px; }

@media (max-width: 767.98px) {
    .page-header,
    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: .85rem;
    }

    .page-header h1,
    .page-header h3 {
        font-size: 1.75rem;
    }

    .table {
        min-width: 720px;
    }

    .card-body.p-0 {
        overflow-x: auto;
    }
}

/* Collision warning (Shared/ConversationCollision.razor): another agent has the
   same conversation open, or is typing a reply in it. */
.collision-banner {
    font-size: .8rem;
    padding: .35rem .75rem;
    background: #eff6ff;
    color: #1e3a8a;
    border-bottom: 1px solid #bfdbfe;
}
.collision-banner.collision-typing {
    background: #fef3c7;
    color: #78350f;
    border-bottom-color: #fcd34d;
}
.live-updated > td {
    background: #f3f3f3;
}

/* WhatsApp template preview under the reply box (Sessions.razor). */
.template-preview {
    white-space: pre-wrap;
    background: #fafafa;
    border: 1px dashed #c2c2c2;
    border-radius: 6px;
    padding: .4rem .6rem;
    max-width: 520px;
}

/* ---- Phones (wave 7) ------------------------------------------------------
   Tables marked .mobile-cards turn each row into a card below 576px: the
   .mobile-title cell leads, cells with data-label show their label, and
   .mobile-hide cells (ids, rarely needed columns) are dropped. */
@media (max-width: 575.98px) {
    .mobile-cards thead { display: none; }
    .mobile-cards, .mobile-cards tbody, .mobile-cards tr { display: block; width: 100%; min-width: 0 !important; }
    .mobile-cards tr {
        position: relative;
        margin: .5rem;
        width: auto;
        padding: .6rem .75rem .6rem 2.25rem;
        border: 1px solid var(--card-border);
        border-radius: 10px;
        background: #fff;
    }
    .mobile-cards td { display: block; border: none !important; padding: .1rem 0 !important; max-width: none !important; white-space: normal !important; }
    .mobile-cards td.mobile-hide { display: none; }
    .mobile-cards td.mobile-inline { display: inline-block; margin-right: .5rem; }
    .mobile-cards td.mobile-title { font-size: 1rem; padding-bottom: .25rem !important; }
    .mobile-cards td.mobile-check { position: absolute; left: .75rem; top: .75rem; padding: 0 !important; }
    .mobile-cards td.mobile-action { position: absolute; right: .6rem; top: .55rem; }
    .mobile-cards td[data-label]::before {
        content: attr(data-label) " ";
        color: var(--text-muted);
        font-size: .7rem;
        text-transform: uppercase;
        letter-spacing: .03em;
        margin-right: .35rem;
    }
    .mobile-cards td:empty { display: none; }
    .mobile-cards tr:has(td.mobile-action) { padding-right: 5rem; }
    .mobile-cards tr:not(:has(td.mobile-check)) { padding-left: .75rem; }
    /* Only around a card list: unscoped, this undid the phone scroller above
       for every other p-0 table, and their 720px tables widened the page. */
    .card-body.p-0:has(.mobile-cards) { overflow-x: visible; }
}

/* Live Chat on a phone: the visitor list and the open chat take turns. */
.live-back { display: none; }
@media (max-width: 767.98px) {
    .live-chat-row { height: calc(100dvh - 150px) !important; min-height: 360px !important; }
    .live-chat-row.has-selection > .live-list { display: none !important; }
    .live-chat-row:not(.has-selection) > .live-chat { display: none !important; }
    .live-back { display: inline-block; }
}

/* Install prompt and offline notice (Layout/PwaBanner.razor). */
.pwa-banner {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    padding: .45rem .9rem;
    font-size: .82rem;
    border-radius: var(--radius-lg, 10px);
    margin-bottom: .75rem;
}
.pwa-banner.pwa-offline { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.pwa-banner.pwa-install { background: #fff; color: #0d0d0d; border: 1px solid var(--card-border); }

/* ---- Command palette, shortcut sheet (wave 11) ---- */
.palette-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 1090; }
.palette {
    position: fixed; top: 12vh; left: 50%; transform: translateX(-50%);
    width: min(640px, calc(100vw - 32px)); max-height: 70vh; display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); z-index: 1091; overflow: hidden;
}
.palette-head { display: flex; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border-color); }
.palette-input { border: 0; box-shadow: none !important; font-size: 1rem; padding: 4px 2px; }
.palette-snooze { padding: 8px 14px; font-size: .85rem; background: #f6f6f6; border-bottom: 1px solid var(--border-color); }
.palette-list { overflow-y: auto; padding: 4px 0; }
.palette-group { padding: 8px 14px 2px; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.palette-item {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%;
    border: 0; background: transparent; text-align: left; padding: 7px 14px; font-size: .9rem; color: var(--text-primary);
}
.palette-item.active { background: var(--active-bg); }
.palette-hint { font-size: .75rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50%; }
.palette-empty { padding: 14px; color: var(--text-muted); font-size: .85rem; }
.palette-foot { padding: 6px 14px; border-top: 1px solid var(--border-color); font-size: .75rem; }
.shortcut-sheet { padding: 16px; }
.shortcut-sheet kbd { background: #f3f3f3; color: var(--text-primary); border: 1px solid var(--card-border); font-size: .75rem; }
.palette-toast {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 1092;
    background: #0d0d0d; color: #fff; padding: 8px 16px; border-radius: var(--radius); font-size: .85rem; box-shadow: var(--shadow-md);
}
.palette-trigger { font-size: .8rem; color: var(--text-secondary); }
.palette-trigger kbd { background: #f3f3f3; color: var(--text-secondary); border: 1px solid var(--card-border); font-size: .7rem; padding: 1px 5px; }
@media (max-width: 640px) { .palette { top: 8px; max-height: calc(100vh - 16px); } .palette-trigger .palette-trigger-text { display: none; } }

/* Companies and the activity timeline (round 22) */
.stat-chip { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: .35rem .75rem; font-size: .85rem; }
.stat-chip strong { margin-left: .35rem; }
.note-card { background: #fffbeb; border: 1px dashed #b45309; border-radius: 8px; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.activity-timeline li:last-child { border-bottom: 0 !important; }
