@import url("fonts.1bdd76c9c762.css");
@import url("normalize.f7e0ded72920.css");
@import url("tables.cc25d6ce1859.css");
@import url("forms.4f46af198a75.css");
@import url("app.43854502b7bb.css");
@import url("login.9674632e209f.css");
@import url("dashboard.d29e7610c1cd.css");
@import url("modal.75c0cf364ea4.css");
@import url("feedback.888bf5e8c0b9.css");
@import url("messages.a39ef7453e47.css");
@import url("custom_dropdown.ba9f162a5090.css");

/* ═══════════════════════════════════════════════════════════════════════════
   Design tokens — aligned with the shared Avendar design language.
   Neutrals are the zinc ramp, the accent is the mint brand green.

   NOTE ON NAMING: the source design system calls its text colour "--foreground",
   while CaselinQ's legacy "--foreground-color" is a *surface*. To avoid that
   collision this file uses --text / --text-muted for type and --surface /
   --surface-sunken for surfaces. The legacy names are kept as aliases at the
   bottom of the block so the other stylesheets keep working.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    /* ── Surfaces ────────────────────────────────────────────────────────── */
    --surface: #ffffff;          /* main panel, cards, popovers, table head */
    --surface-sunken: #f4f4f5;   /* page canvas, sidebar, hover fills       */
    --border: #e4e4e7;
    --ring: #9f9fa9;

    /* ── Text ────────────────────────────────────────────────────────────── */
    --text: #09090b;
    --text-muted: #71717b;

    /* ── Accents ─────────────────────────────────────────────────────────── */
    --primary: #18181b;          /* default button, active markers */
    --primary-fg: #fafafa;
    --primary-hover: #27272a;
    --brand: #75fb90;            /* mint CTA */
    --brand-fg: #00330d;
    --brand-hover: #8ffca5;
    --brand-100: #d8ffdf;
    --brand-600: #06b32a;
    --destructive: #e7000b;

    /* ── Scales ──────────────────────────────────────────────────────────── */
    /* Square corners everywhere; badges are the only exception. */
    --radius: 0;
    --radius-sm: 0;
    --radius-pill: 12px;

    --h-control: 32px;
    --h-control-sm: 28px;

    --text-xs: 12px;
    --text-sm: 13px;
    --text-md: 14px;
    --text-lg: 16px;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;

    /* Cards and buttons carry no shadow — a 1px border defines them.
       Only floating surfaces get one, as a hairline ring plus a soft drop. */
    --shadow-panel: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1);
    --shadow-popover: 0 0 0 1px rgba(9, 9, 11, .1),
                      0 4px 6px -1px rgba(0, 0, 0, .1),
                      0 2px 4px -2px rgba(0, 0, 0, .1);
    --focus-ring: 0 0 0 1px rgba(159, 159, 169, .5);

    /* ── Status ──────────────────────────────────────────────────────────── */
    --success-dark: var(--brand-600);

    --error-bg: #fef2f2;
    --error-text: var(--destructive);

    --warning-bg: #fef3c7;
    --warning-border: #fcd34d;
    --warning-text: #b45309;

    /* ── Priority ────────────────────────────────────────────────────────── */
    /* Unchanged on purpose: operators read these at a glance, and the same
       hexes are baked into the inline SVGs in lucide/templatetags/lucide_tags.py */
    --priority-low: #4caf50;
    --priority-medium: #ffa726;
    --priority-high: #f44336;
    --priority-undetermined: #808080;

    /* ── Confidence pills ────────────────────────────────────────────────── */
    --confidence-default-bg: var(--surface-sunken);
    --confidence-default-text: var(--text-muted);
    --confidence-high-bg: var(--brand-100);
    --confidence-high-text: var(--brand-600);
    --confidence-medium-bg: var(--warning-bg);
    --confidence-medium-text: var(--warning-text);
    --confidence-low-bg: var(--error-bg);
    --confidence-low-text: var(--error-text);

    /* ── Dropdowns ───────────────────────────────────────────────────────── */
    --dropdown-hover: var(--surface-sunken);
    --dropdown-hover-alt: var(--border);
    --dropdown-selected: var(--border);
    --dropdown-auto-selected: var(--brand-100);

    /* ── Modal & overlay ─────────────────────────────────────────────────── */
    --modal-overlay: rgba(9, 9, 11, .5);
    --modal-border: var(--border);
    --modal-shadow: var(--shadow-popover);

    /* ── Neutrals kept for existing call sites ───────────────────────────── */
    --white: #fff;
    --transparent: rgba(0, 0, 0, 0);
}

html {
    background-color: var(--surface-sunken);
}

body {
    margin: 0; padding: 0;
    overflow: hidden;
    font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-weight: 400;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-size: var(--text-sm);
    color: var(--text);
}

.hidden {
    display: none !important;
}

a {
    color: var(--text);
}

svg.priority-pending {
    color: #999;
    width: 14px;
    height: 14px;
}

.tip-history-timeline {
    list-style: none;
    padding: 1em;
    margin: 0;
}

.tip-history-event {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    padding-bottom: 18px;
}

.tip-history-event:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 28px;
    bottom: -4px;
    width: 1px;
    background: var(--border-color);
}

.tip-history-marker {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--highlight-color);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
}

.tip-history-marker svg {
    width: 14px;
    height: 14px;
    color: var(--primary);
}

.tip-history-body {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.tip-history-when {
    font-size: 12px;
    color: var(--secondary-color);
}

.tip-history-title {
    font-weight: 600;
    font-size: 14px;
    margin-top: 2px;
}

.tip-history-description {
    font-size: 13px;
    margin-top: 4px;
    color: var(--text-color);
}

.tip-history-empty {
    color: var(--secondary-color);
    font-style: italic;
}

.inference-debug-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1em;
    padding: 1em;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.inference-debug-summary label {
    display: block;
    font-size: 12px;
    color: var(--secondary-color);
    margin-bottom: 2px;
}

.inference-debug-summary p {
    margin: 0;
}

.inference-debug-section {
    padding: 1em;
    border-bottom: 1px solid var(--border-color);
}

.inference-debug-section:last-child {
    border-bottom: none;
}

.inference-debug-section h2 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 0.5em 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.inference-debug-section h2 svg {
    width: 16px;
    height: 16px;
    color: #c0392b;
}

.inference-debug-hint {
    font-size: 12px;
    color: var(--secondary-color);
    margin: 0 0 0.5em 0;
}

.inference-debug-kind summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    padding: 4px 0;
}

.inference-debug-count {
    color: var(--secondary-color);
    font-weight: 400;
    font-size: 12px;
}

.inference-debug-hits {
    list-style: none;
    padding: 0;
    margin: 0;
}

.inference-debug-hit {
    padding: 8px 0;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
}

.inference-debug-hit:first-child {
    border-top: none;
}

.inference-debug-hit-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.inference-debug-label {
    color: var(--secondary-color);
    font-size: 12px;
}

.inference-debug-score {
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: var(--text-color);
    background: var(--highlight-color);
    border-radius: 4px;
    padding: 1px 6px;
}

.inference-debug-source {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
}

.inference-debug-source-pattern {
    background: #fff8e1;
    color: #7a5a00;
    border-color: #f0c674;
}

.inference-debug-source-regex {
    background: #e3f2fd;
    color: #155a8a;
    border-color: #9ec8e8;
}

.inference-debug-context {
    font-size: 12px;
    color: var(--secondary-color);
    margin-top: 4px;
    line-height: 1.4;
}

.inference-debug-context mark {
    background: #fff3a3;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.inference-debug-nearmisses {
    background: #fafafa;
}

.matched-patterns-banner,
.search-patterns .hint {
    background: #fff8e1;
    border: 1px solid #f0c674;
    color: #7a5a00;
    border-radius: 5px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.4;
}

.matched-patterns-banner {
    margin-top: 1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.matched-patterns-banner svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #b07700;
}

.matched-patterns-banner strong {
    margin-right: 4px;
}

.search-patterns .hint {
    margin: 4px 0 8px;
}

.tip-details {
    padding-top: 2em;
    padding-bottom: 1em;

    label {
        padding-left: 5px;
        font-weight: 500;
        font-size: var(--text-xs);
        color: var(--text-muted);
    }

    p {
        display: block;
        /* White against the sunken side panel, so read-only values read as fields */
        background-color: var(--surface);
        padding: var(--space-2) 10px;
        margin: 0;
        border-radius: var(--radius);
        border: 1px solid var(--border);
        font-size: var(--text-xs);
    }

    p.tip-message {
        width: 390px;
    }

    .twocol {
        > div:has(p.tip-message) {
            width: 400px;
        }
    }
    

    p:has(input[type="checkbox"]) {
        padding: 10px 10px 6px 10px;

        input {
            background-color: var(--surface);
        }
    }
}

.home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;

    .form {
        width: 300px;
        margin-bottom: 10px;
    }
}

.warning {
    background-color: var(--warning-bg);
    padding: 10px var(--space-3);
    border-radius: var(--radius);
    border: 1px solid var(--warning-border);
    color: var(--warning-text);
    font-size: var(--text-xs);

    margin-bottom: var(--space-5);
    margin-right: var(--space-5);
}