/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─── Design tokens ─────────────────────────────────────────── */
:root {
    --bg: #f5f2ee;
    --bg2: #ede9e3;
    --surface: #faf8f5;
    --border: #d4cec5;
    --border2: #c4bdb2;
    --sage: #7d9e8a;
    --sage-dark: #6b8a77;
    --text: #1c1a17;
    --text-mid: #6b6459;
    --text-dim: #a09890;
    --white: #fefcfa;
    --term-bg: #1a1a17;
    --term-green: #4ade80;
    --term-dim: #2a6640;
    --urgent-bg: #fef2f2;
    --urgent-fg: #dc2626;
    --routine-bg: #fffbeb;
    --routine-fg: #d97706;
    --low-bg: #f0fdf4;
    --low-fg: #16a34a;
}

/* ─── Base ───────────────────────────────────────────────────── */
html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

main {
    min-height: 100vh;
}

/* Subtle grain overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    background-repeat: repeat;
}

/* ─── Two-column layout ──────────────────────────────────────── */
.dispatch-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ─── Panels ─────────────────────────────────────────────────── */
.panel {
    padding: 3.25rem 3.5rem;
    display: flex;
    flex-direction: column;
}

.panel-form,
.panel-results {
    background: var(--surface);
    border-right: 1px solid var(--border);
}

.panel-info {
    background: var(--bg);
}

/* ─── Brand ──────────────────────────────────────────────────── */
.brand {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 2.75rem;
    text-decoration: none;
}

.brand-mark {
    font-size: 18px;
    line-height: 1;
}

.brand-name {
    font-family: 'Cabinet Grotesk', sans-serif;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
}

/* ─── Panel typography ───────────────────────────────────────── */
.panel-heading {
    font-family: 'Cabinet Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 6px;
}

.panel-sub {
    font-size: 14px;
    color: var(--text-mid);
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* ─── Form fields ────────────────────────────────────────────── */
.form-fields {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.field-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.field-input {
    padding: 10px 13px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

.field-input:focus {
    border-color: var(--sage);
    box-shadow: 0 0 0 3px rgba(125, 158, 138, 0.12);
}

.field-input:disabled {
    opacity: 0.5;
    cursor: default;
}

.form-locked {
    opacity: 0.75;
    pointer-events: none;
}

.field-input::placeholder {
    color: var(--border);
}

.field-textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.55;
}

.field-hint {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.45;
    margin-top: 3px;
}

/* Consent checkbox */
.consent-group { margin-top: 4px; }
.consent-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.consent-checkbox { margin-top: 2px; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--sage); cursor: pointer; }
.consent-text { font-size: 11px; color: var(--text-dim); line-height: 1.55; }
.consent-link { color: var(--sage); text-decoration: none; }
.consent-link:hover { text-decoration: underline; }

/* Legal pages */
.legal-shell { max-width: 640px; margin: 0 auto; padding: 32px 20px 64px; }
.legal-brand { margin-bottom: 32px; }
.legal-brand-link { text-decoration: none; color: var(--text); font-weight: 700; font-size: 17px; }
.legal-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); margin-bottom: 4px; }
.legal-updated { font-size: 12px; color: var(--text-dim); margin-bottom: 32px; }
.legal-content h2 { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-mid); margin: 28px 0 8px; }
.legal-content p, .legal-content li { font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 8px; }
.legal-content ul { padding-left: 20px; margin-bottom: 8px; }

.form-error {
    font-size: 13px;
    color: var(--urgent-fg);
    margin-top: 2px;
}

/* ─── Submit button ──────────────────────────────────────────── */
.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--text);
    color: var(--surface);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.1s ease;
    margin-top: 6px;
    letter-spacing: -0.01em;
}

.submit-btn:hover {
    opacity: 0.82;
}

.submit-btn:active {
    transform: scale(0.98);
}

/* ─── Agent step list ────────────────────────────────────────── */
.agent-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 0 4px;
}

.agent-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    transition: color 0.2s;
}

.agent-step-waiting {
    color: var(--text-dim);
}

.agent-step-active {
    color: var(--text);
    font-weight: 500;
}

.agent-step-done {
    color: var(--text-mid);
}

.agent-step-warning {
    color: var(--routine-fg);
    font-weight: 500;
}

.agent-step-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.agent-step-waiting .agent-step-icon {
    border: 1px solid var(--border);
    color: var(--text-dim);
}

.agent-step-active .agent-step-icon {
    background: var(--sage);
}

.agent-step-done .agent-step-icon {
    background: var(--low-bg);
    color: var(--low-fg);
}

.agent-step-warning .agent-step-icon {
    background: var(--routine-bg);
    color: var(--routine-fg);
}

.step-dot-active {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    animation: step-pulse 1.2s ease-in-out infinite;
}

@keyframes step-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.75); }
}

.step-num-idle {
    color: var(--border2);
    font-size: 11px;
    font-weight: 600;
}

.btn-arrow {
    font-size: 16px;
    line-height: 1;
}

/* ─── Info panel (right, state 1) ────────────────────────────── */
.info-panel-inner {
    padding-top: 1rem;
}

.info-badge {
    display: inline-flex;
    padding: 4px 11px;
    background: rgba(125, 158, 138, 0.13);
    color: var(--sage);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.info-heading {
    font-family: 'Cabinet Grotesk', sans-serif;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.18;
}

.info-desc {
    font-size: 14px;
    color: var(--text-mid);
    line-height: 1.65;
    margin-bottom: 2.5rem;
    max-width: 380px;
}

.info-steps {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.info-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.step-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    color: var(--sage);
    padding-top: 3px;
    min-width: 22px;
    letter-spacing: 0;
}

.step-content h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
    letter-spacing: -0.01em;
}

.step-content p {
    font-size: 13px;
    color: var(--text-mid);
    line-height: 1.55;
}

/* ─── Terminal (state 2) ─────────────────────────────────────── */
.terminal-container {
    min-height: 100vh;
    background: var(--term-bg);
    display: flex;
    flex-direction: column;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.terminal-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red    { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green  { background: #28c840; }

.terminal-title {
    flex: 1;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.02em;
    margin-right: 54px; /* balance the dots width */
}

.terminal-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 3rem;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 222, 128, 0.2) transparent;
}

.terminal-body::-webkit-scrollbar {
    width: 4px;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: rgba(74, 222, 128, 0.2);
    border-radius: 2px;
}

.terminal-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--term-green);
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

/* Blinking cursor on the last char */
.terminal-cursor {
    display: inline-block;
    width: 9px;
    height: 16px;
    background: var(--term-green);
    margin-left: 1px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ─── Triage processing modal ────────────────────────────────── */
.triage-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(2px);
}

.triage-modal {
    background: var(--term-bg);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

.triage-modal-body {
    padding: 20px 24px 24px;
    height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 222, 128, 0.2) transparent;
}

.triage-modal-body::-webkit-scrollbar { width: 4px; }
.triage-modal-body::-webkit-scrollbar-thumb {
    background: rgba(74, 222, 128, 0.2);
    border-radius: 2px;
}

/* ─── Results panel (state 3, left) ──────────────────────────── */
.results-header {
    margin-bottom: 1.75rem;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 1.25rem;
}

.result-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 9px;
}

.result-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-mid);
}

.result-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.3;
}

/* Priority badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    align-self: flex-start;
}

.badge-urgent  { background: var(--urgent-bg);  color: var(--urgent-fg);  }
.badge-routine { background: var(--routine-bg); color: var(--routine-fg); }
.badge-low     { background: var(--low-bg);     color: var(--low-fg);     }

/* Draft response box */
.draft-response {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 9px;
    margin-bottom: 1.5rem;
}

.draft-text {
    font-size: 13.5px;
    color: var(--text-mid);
    line-height: 1.65;
    font-style: italic;
}

/* Confirmation pills */
.confirmation-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 13px;
    border-radius: 100px;
    font-size: 12.5px;
    font-weight: 500;
}

.pill-success { background: var(--low-bg);     color: var(--low-fg);     }
.pill-warn    { background: var(--routine-bg); color: var(--routine-fg); }
.pill-error   { background: var(--urgent-bg);  color: var(--urgent-fg);  }

/* Reset button */
.reset-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
    transition: border-color 0.15s, background 0.15s;
    letter-spacing: -0.01em;
}

.reset-btn:hover {
    background: var(--bg);
    border-color: var(--text-mid);
}

/* ─── Board link panel (right, state 3) ─────────────────────── */
.board-panel {
    justify-content: center;
}

.board-eyebrow {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sage);
    margin-bottom: 0.6rem;
}

.board-heading {
    font-family: 'Cabinet Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.board-desc {
    font-size: 14px;
    color: var(--text-mid);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.board-card-preview {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bcp-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-mid);
}

.bcp-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.bcp-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bcp-list {
    font-size: 12px;
    color: var(--text-mid);
}

.bcp-vendor {
    font-size: 12px;
    color: var(--text-mid);
    font-family: 'JetBrains Mono', monospace;
}

.board-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.board-btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 11px 22px;
    background: var(--text);
    color: var(--surface);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
    letter-spacing: -0.01em;
}

.board-btn-primary:hover { opacity: 0.82; }

.board-btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 11px 20px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
}

.board-btn-secondary:hover {
    background: var(--bg);
    border-color: var(--text-mid);
}

/* ─── Escalation notice ──────────────────────────────────────── */
.escalation-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--urgent-bg);
    border: 1px solid var(--urgent-fg);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--urgent-fg);
    margin-bottom: 1rem;
}

.escalation-icon { font-size: 16px; }

.pill-info {
    background: #eff6ff;
    color: #2563eb;
}

/* ─── Admin shell ────────────────────────────────────────────── */
.admin-shell {
    min-height: 100vh;
    background: var(--bg);
    padding-bottom: 4rem;
}

.admin-unauth {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 1rem;
}

.unauth-msg {
    font-size: 14px;
    color: var(--text-mid);
}

/* ─── Admin header ───────────────────────────────────────────── */
.admin-header {
    display: flex;
    flex-direction: column;
    padding: 1rem 2.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-nav {
    display: flex;
    gap: 4px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.admin-nav-link {
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-mid);
    transition: background 0.15s, color 0.15s;
}

.admin-nav-link:hover {
    background: var(--bg2);
    color: var(--text);
}

.admin-nav-link-active {
    background: var(--text);
    color: var(--white);
}

.job-page-link {
    color: var(--sage);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.job-page-link:hover {
    text-decoration: underline;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 7px;
}

.admin-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sage);
    background: rgba(125, 158, 138, 0.12);
    padding: 2px 8px;
    border-radius: 100px;
    margin-left: 4px;
}

.admin-refresh-btn {
    font-size: 12px;
    font-weight: 500;
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
    color: var(--text-mid);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 12px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.admin-refresh-btn:hover {
    border-color: var(--text-mid);
    color: var(--text);
}

/* ─── Stats bar ──────────────────────────────────────────────── */
.stats-bar {
    display: flex;
    gap: 12px;
    padding: 1.5rem 2.5rem;
    overflow-x: auto;
}

.stat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 14px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 90px;
    flex-shrink: 0;
}

.stat-num {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--text);
    line-height: 1;
}

.stat-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-mid);
}

.stat-urgent .stat-num  { color: #d97706; }
.stat-urgent             { border-color: #fde68a; background: #fffbeb; }

.stat-escalated .stat-num { color: var(--urgent-fg); }
.stat-escalated           { border-color: #fca5a5; background: var(--urgent-bg); }

.stat-inprogress .stat-num { color: #2563eb; }
.stat-inprogress           { border-color: #bfdbfe; background: #eff6ff; }

.stat-done .stat-num { color: var(--text-mid); }
.stat-done           { border-color: var(--border); }

/* ─── Admin sections ─────────────────────────────────────────── */
.admin-section {
    padding: 0 2.5rem 2.5rem;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vendor-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    animation: toast-in 0.25s ease;
    max-width: 360px;
}

.vendor-toast-accept {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.vendor-toast-decline {
    background: #fefce8;
    border: 1px solid #fde68a;
    color: #854d0e;
}

.vendor-toast-icon {
    font-size: 16px;
    flex-shrink: 0;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.archive-all-btn {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
    cursor: pointer;
    background: #f5f2ee;
    color: #6b6459;
    border: 1px solid #d4cec5;
    transition: opacity 0.15s;
}

.archive-all-btn:hover { opacity: 0.75; }

.section-title {
    font-family: 'Cabinet Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-top: 1.5rem;
}

/* ─── Filter row ─────────────────────────────────────────────── */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.filter-pill {
    padding: 4px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-mid);
    cursor: pointer;
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.filter-pill:hover {
    border-color: var(--text-mid);
    color: var(--text);
}

.filter-pill-active {
    background: var(--text);
    border-color: var(--text);
    color: var(--surface);
}

.sort-select {
    padding: 5px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text);
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
    cursor: pointer;
    outline: none;
}

/* ─── Log cards ──────────────────────────────────────────────── */
.log-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty-state {
    padding: 2rem;
    text-align: center;
    font-size: 14px;
    color: var(--text-mid);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.log-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.15s;
}

.log-card:hover {
    border-color: var(--text-mid);
}

.log-card-expanded {
    border-color: var(--sage);
}

.log-card-main {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
}

.log-card-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
    min-width: 110px;
}

.log-card-center {
    flex: 1;
    min-width: 0;
}

.log-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.log-card-sub {
    font-size: 12px;
    color: var(--text-mid);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.log-card-desc { opacity: 0.8; }

.log-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
}

.log-card-vendor {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.log-card-time {
    font-size: 11px;
    color: var(--text-mid);
    font-family: 'JetBrains Mono', monospace;
}

.expand-toggle {
    font-size: 11px;
    color: var(--text-mid);
    margin-top: 2px;
}

/* ─── Status badges ──────────────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.status-new {
    background: #eff6ff;
    color: #2563eb;
    animation: pulse-dot 2s ease-in-out infinite;
}

.status-analyzing {
    background: var(--routine-bg);
    color: var(--routine-fg);
}

.status-assigned {
    background: var(--low-bg);
    color: var(--low-fg);
}

.status-jobinprogress {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-done {
    background: var(--bg);
    color: var(--text-mid);
    border: 1px solid var(--border);
}

.status-escalated {
    background: var(--urgent-bg);
    color: var(--urgent-fg);
    font-weight: 800;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.65; }
}

/* ─── Priority badges ────────────────────────────────────────── */
.priority-badge {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.priority-urgent  { background: var(--urgent-bg);  color: var(--urgent-fg);  }
.priority-routine { background: var(--routine-bg); color: var(--routine-fg); }
.priority-low     { background: var(--low-bg);     color: var(--low-fg);     }

/* ─── Expanded card detail ───────────────────────────────────── */
.log-card-detail {
    padding: 16px 18px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: slideDown 0.18s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.detail-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-mid);
}

.detail-value {
    font-size: 13px;
    color: var(--text);
    line-height: 1.45;
}

.vendor-accepted { color: var(--low-fg); font-weight: 600; }
.vendor-pending  { color: var(--routine-fg); }

.reasoning-block, .draft-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.reasoning-quote {
    font-size: 13px;
    color: var(--text);
    line-height: 1.65;
    font-style: italic;
    padding: 10px 14px;
    background: var(--surface);
    border-left: 3px solid var(--sage);
    border-radius: 0 6px 6px 0;
    margin: 0;
}

.draft-text {
    font-size: 13px;
    color: var(--text-mid);
    line-height: 1.65;
    font-style: italic;
}

/* ─── Vendor notification preview ───────────────────────────── */
.vendor-preview-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.vendor-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: #f0f0ec;
}

.vendor-preview-sub {
    font-size: 11px;
    color: var(--text-mid);
    margin-top: 2px;
}

.vendor-preview-btn {
    padding: 6px 14px;
    background: var(--text);
    color: var(--surface);
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.vendor-preview-btn:hover:not(:disabled) { opacity: 0.8; }
.vendor-preview-btn:disabled { opacity: 0.5; cursor: default; }

.vendor-preview-btn-sent {
    background: var(--sage);
}

.vendor-preview-btn-failed {
    background: var(--urgent-bg);
    color: var(--urgent-fg);
    border: 1px solid var(--urgent-fg);
}

.vendor-preview-body {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    padding: 14px 16px;
}

.status-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.status-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity 0.15s;
}

.status-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.status-btn-progress {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.status-btn-done {
    background: var(--low-bg);
    color: var(--low-fg);
    border-color: #bbf7d0;
}

.vendor-pending-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde68a;
    vertical-align: middle;
}

.vendor-status-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

.vendor-status-pending {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde68a;
}

.vendor-status-assigned {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.vendor-card-pending {
    border-color: #fde68a !important;
}

.vendor-card-assigned {
    border-color: #bfdbfe !important;
}

.status-btn-archive {
    background: #f5f2ee;
    color: #6b6459;
    border-color: #d4cec5;
}

.status-btn-unarchive {
    background: #f5f2ee;
    color: #6b6459;
    border-color: #d4cec5;
}

.status-btn:not(:disabled):hover { opacity: 0.8; }

/* ─── Vendor management ──────────────────────────────────────── */
.vendor-category-group {
    margin-bottom: 1.75rem;
}

.vendor-category-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sage);
    margin-bottom: 10px;
}

.vendor-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.vendor-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.15s;
}

.vendor-card-available { border-color: #bbf7d0; }
.vendor-card-unavailable { opacity: 0.65; }

.vendor-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vendor-info {
    flex: 1;
    min-width: 0;
}

.vendor-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.vendor-category-tag {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--sage);
    background: rgba(125, 158, 138, 0.12);
    padding: 1px 6px;
    border-radius: 4px;
}

.vendor-card-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.vendor-meta {
    font-size: 11px;
    color: var(--text-mid);
    font-family: 'JetBrains Mono', monospace;
}

.vendor-phone-clickable {
    cursor: pointer;
    text-decoration: underline dotted;
}
.vendor-phone-clickable:hover { color: var(--text); }

.vendor-phone-edit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.vendor-phone-input {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
    width: 130px;
}
.vendor-phone-btn {
    font-size: 11px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
    cursor: pointer;
    color: var(--text-mid);
}
.vendor-phone-btn:hover { background: var(--surface); color: var(--text); }
.vendor-phone-btn-cancel:hover { color: #e53e3e; }

.vendor-reset-btn {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    background: none;
    border: 1px solid #f59e0b;
    border-radius: 4px;
    padding: 1px 6px;
    cursor: pointer;
    color: #b45309;
}
.vendor-reset-btn:hover { background: #fef3c7; }

/* ─── Toggle switch ──────────────────────────────────────────── */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-track {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 100px;
    transition: background 0.2s;
}

.toggle-switch input:checked ~ .toggle-track {
    background: var(--sage);
}

.toggle-thumb {
    position: absolute;
    left: 3px;
    top: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked ~ .toggle-track .toggle-thumb {
    transform: translateX(16px);
}

/* ─── Blazor error UI — hidden ───────────────────────────────── */
#blazor-error-ui {
    display: none !important;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .dispatch-layout {
        grid-template-columns: 1fr;
    }

    .panel-form,
    .panel-results {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .panel {
        padding: 2.5rem 2rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .terminal-body {
        padding: 1.5rem 1.25rem;
    }

    .terminal-text {
        font-size: 12px;
    }

    /* Admin responsive */
    .admin-header {
        padding: 1rem 1.25rem;
    }

    .stats-bar {
        padding: 1rem 1.25rem;
        gap: 8px;
    }

    .stat-pill {
        min-width: 70px;
        padding: 10px 14px;
    }

    .admin-section {
        padding: 0 1.25rem 2rem;
    }

    .log-card-main {
        flex-wrap: wrap;
        gap: 10px;
    }

    .log-card-right {
        align-items: flex-start;
        flex-direction: row;
        gap: 8px;
    }

    .vendor-cards {
        grid-template-columns: 1fr;
    }
}

/* ─── Track request link (results screen) ───────────────────── */
.track-request-link {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, border-color 0.15s;
    margin-bottom: 4px;
}

.track-request-link:hover {
    background: var(--bg2);
    border-color: var(--border2);
}

.track-request-icon { font-size: 16px; }

/* ─── Requester Status Page ──────────────────────────────────── */
.req-shell {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    max-width: 480px;
    margin: 0 auto;
    padding: 28px 20px 48px;
}

.req-shell .req-brand {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.req-header { margin-bottom: 28px; }

.req-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.req-location {
    font-size: 16px;
    color: var(--text-mid);
}

/* Timeline */
.req-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 28px;
    position: relative;
}

.req-milestone {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 24px;
    position: relative;
}

.req-milestone:last-child { padding-bottom: 0; }

.req-milestone::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 20px;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.req-milestone:last-child::before { display: none; }

.req-milestone-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 1px;
    border: 2px solid var(--border);
    background: var(--bg);
    position: relative;
    z-index: 1;
}

.req-milestone-done .req-milestone-dot {
    background: var(--sage);
    border-color: var(--sage);
}

.req-milestone-done .req-milestone-dot::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #fff;
}

.req-milestone-active .req-milestone-dot {
    border-color: var(--sage);
    animation: milestone-pulse 1.5s ease-in-out infinite;
}

@keyframes milestone-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(125, 158, 138, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(125, 158, 138, 0); }
}

.req-milestone-done::before { background: var(--sage); }

.req-milestone-content { flex: 1; padding-top: 1px; }

.req-milestone-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-mid);
    line-height: 1.3;
}

.req-milestone-done .req-milestone-label { color: var(--text); font-weight: 600; }
.req-milestone-active .req-milestone-label { color: var(--sage-dark); font-weight: 600; }

.req-milestone-time {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 2px;
}

/* Sections */
.req-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.req-note-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 20px;
}

.req-note-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.req-note-text {
    font-size: 14px;
    color: var(--text);
    font-style: italic;
    line-height: 1.5;
}

.req-vendor-block { margin-bottom: 20px; }

.req-vendor-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.req-tap-call {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    text-decoration: none;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    min-height: 52px;
    transition: background 0.15s, border-color 0.15s;
}

.req-tap-call:hover {
    background: var(--bg2);
    border-color: var(--border2);
}

.req-issue-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
}

.req-issue-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 6px;
}

.req-issue-meta {
    font-size: 12px;
    color: var(--text-dim);
}

.req-state-block {
    text-align: center;
    padding: 32px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.req-state-icon { font-size: 44px; }
.req-state-title { font-size: 22px; font-weight: 700; color: var(--text); }
.req-state-sub { font-size: 15px; color: var(--text-mid); max-width: 280px; line-height: 1.5; }
.req-loading { color: var(--text-dim); font-size: 15px; }

/* ─── Vendor Job Page ────────────────────────────────────────── */
.job-shell {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    max-width: 480px;
    margin: 0 auto;
    padding: 28px 20px 48px;
}

.job-shell .job-brand {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.job-header {
    margin-bottom: 20px;
}

.job-status-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 8px;
    background: var(--bg2);
    color: var(--text-mid);
}

.job-status-assigned { background: var(--routine-bg); color: var(--routine-fg); }
.job-status-jobinprogress { background: #eff6ff; color: #2563eb; }
.job-status-done { background: var(--low-bg); color: var(--low-fg); }
.job-status-escalated { background: var(--urgent-bg); color: var(--urgent-fg); }

.job-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.job-location {
    font-size: 16px;
    color: var(--text-mid);
}

.job-details-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.job-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.job-detail-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    min-width: 72px;
    padding-top: 1px;
    flex-shrink: 0;
}

.job-detail-value {
    font-size: 14px;
    color: var(--text);
    flex: 1;
    line-height: 1.4;
}

.job-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.job-contact-block {
    margin-bottom: 32px;
}

.job-contact-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.job-tap-call {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--text);
    font-size: 16px;
    font-weight: 500;
    min-height: 56px;
    transition: background 0.15s, border-color 0.15s;
}

.job-tap-call:hover {
    background: var(--bg2);
    border-color: var(--border2);
}

.job-tap-call-icon {
    font-size: 20px;
}

.job-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.job-btn {
    width: 100%;
    min-height: 56px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.15s;
    font-family: inherit;
}

.job-btn:active { opacity: 0.82; }

.job-btn-primary { background: var(--sage); color: #fff; }
.job-btn-secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.job-btn-complete { background: var(--text); color: var(--white); }
.job-btn-cancel { background: var(--bg2); color: var(--text-mid); font-weight: 500; }
.job-btn-overdue { background: #d97706; color: #fff; animation: overdue-pulse 2s ease-in-out infinite; }
@keyframes overdue-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4); }
    50%       { box-shadow: 0 0 0 8px rgba(217, 119, 6, 0); }
}

.job-note-field {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--text);
    resize: none;
    font-family: inherit;
    line-height: 1.5;
}

.job-note-field:focus {
    outline: none;
    border-color: var(--sage);
}

.job-confirm-prompt {
    text-align: center;
    font-size: 13px;
    color: var(--text-mid);
}

.job-state-block {
    text-align: center;
    padding: 32px 0 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.job-state-icon { font-size: 44px; margin-bottom: 4px; }

.job-state-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.job-state-sub {
    font-size: 15px;
    color: var(--text-mid);
    line-height: 1.5;
    max-width: 300px;
}

.job-state-note {
    font-size: 14px;
    color: var(--text-mid);
    font-style: italic;
}

.job-loading-text {
    color: var(--text-dim);
    font-size: 15px;
}

/* ─── Live Board ─────────────────────────────────────────────── */
.board-shell {
    min-height: 100vh;
    background: var(--bg);
    padding: 24px;
}

.board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.board-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
}

.board-tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-mid);
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: 20px;
}

.board-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.board-last-updated {
    font-size: 12px;
    color: var(--text-dim);
}

.board-admin-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-mid);
    text-decoration: none;
}

.board-admin-link:hover { color: var(--text); }

.board-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.board-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.board-stat-num {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.board-stat-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    margin-top: 4px;
}

.board-stat-urgent .board-stat-num { color: var(--urgent-fg); }
.board-stat-done .board-stat-num { color: var(--low-fg); }

.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.board-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.board-card-status-escalated { border-left: 3px solid var(--urgent-fg); }
.board-card-status-jobinprogress { border-left: 3px solid #2563eb; }
.board-card-priority-urgent { background: var(--urgent-bg); border-color: #fca5a5; }

.board-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.board-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.board-card-category {
    font-size: 13px;
    color: var(--text-mid);
    font-weight: 500;
}

.board-card-requestor {
    font-size: 14px;
    color: var(--text);
}

.board-card-vendor {
    font-size: 13px;
    color: var(--sage-dark);
    font-weight: 500;
}

.board-card-time {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}

.board-empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-dim);
    font-size: 16px;
}

/* ── Demo Banner ─────────────────────────────────── */
.demo-banner {
    background: #2d2a25;
    color: #8a8070;
    font-size: 11px;
    text-align: center;
    padding: 6px 16px;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #3a3730;
}

.demo-reset-btn {
    font-size: 11px;
    padding: 4px 10px;
    border: 1px solid #d4cec5;
    border-radius: 6px;
    background: transparent;
    color: var(--text-mid);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.demo-reset-btn:hover { background: var(--border); }
.demo-reset-btn.demo-reset-confirm {
    border-color: var(--urgent-fg);
    color: var(--urgent-fg);
}

/* ── Demo Split View ─────────────────────────────── */
.demo-view-shell {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

.demo-view-header {
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}

.demo-view-brand {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.demo-view-tagline {
    font-size: 13px;
    color: var(--text-mid);
    margin: 0;
}

.demo-view-split {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.demo-view-panel {
    padding: 36px 32px;
}

.demo-view-panel-right {
    background: var(--surface);
    border-left: 1px solid var(--border);
}

.demo-view-panel-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 24px;
}

/* Waiting sub-label on active milestones */
.req-milestone-sub {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 3px;
    font-style: italic;
}

/* Admin panel — right side */
.demo-admin-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.demo-admin-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.demo-admin-meta {
    font-size: 14px;
    color: var(--text-mid);
    margin-bottom: 20px;
}

.demo-admin-vendor {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.demo-admin-vendor-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.demo-admin-vendor-meta {
    font-size: 13px;
    color: var(--text-mid);
}

.demo-activity-log { margin-bottom: 20px; }

.demo-activity-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.demo-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #16a34a;
}

.demo-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    animation: live-pulse 1.6s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.75); }
}

.demo-activity-item {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    line-height: 1.4;
    animation: activity-in 0.22s ease-out;
}

@keyframes activity-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.demo-activity-item:last-child { border-bottom: none; }

.demo-activity-time {
    font-size: 12px;
    color: var(--text-dim);
    width: 62px;
    flex-shrink: 0;
    padding-top: 1px;
}

.demo-activity-text { color: var(--text); flex: 1; }
.demo-activity-text.pending { color: var(--text-dim); font-style: italic; }

.demo-reasoning {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
}

.demo-reasoning-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.demo-reasoning-text {
    font-size: 13px;
    color: var(--text-mid);
    line-height: 1.6;
    font-style: italic;
}

@media (max-width: 768px) {
    .demo-view-split { grid-template-columns: 1fr; }
    .demo-view-panel-right {
        border-left: none;
        border-top: 1px solid var(--border);
    }
    .demo-view-panel { padding: 28px 20px; }
}
