/* Minimal local dashboard styling. No external CSS framework. */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-size: 13px;
    background: #0f1419;
    color: #d8dee9;
}

/* ── Left sidebar ──────────────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 180px;
    background: #161b22;
    border-right: 1px solid #232932;
    padding: 18px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 15;
}
.sidebar-brand {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #4d8eba;
    padding: 0 18px 18px 18px;
    border-bottom: 1px solid #232932;
    margin-bottom: 12px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 4px;
    color: #98a3b3;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}
.sidebar-link:hover { background: #1c2129; color: #d8dee9; }
.sidebar-link.active {
    background: #2a313c;
    color: #fff;
}
.sidebar-glyph {
    display: inline-block;
    width: 16px;
    text-align: center;
    color: #6b7689;
}
.sidebar-link.active .sidebar-glyph { color: #4d8eba; }

/* VPN pill at the bottom of the sidebar */
.vpn-pill {
    margin: auto 12px 12px 12px;
    padding: 8px 10px;
    border-radius: 4px;
    background: #0f1419;
    border: 1px solid #232932;
    color: #98a3b3;
    font-size: 11px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: help;
    word-break: break-word;
}
.vpn-pill .vpn-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6b7689;
    flex-shrink: 0;
}
.vpn-pill .vpn-text { font-weight: 500; }
.vpn-pill.vpn-ok    { border-color: #2c5d2f; }
.vpn-pill.vpn-ok    .vpn-dot { background: #5a9b5e; box-shadow: 0 0 6px rgba(90,155,94,.5); }
.vpn-pill.vpn-ok    .vpn-text { color: #9bc8a9; }
.vpn-pill.vpn-bad   { border-color: #6c3535; background: #2a1717; }
.vpn-pill.vpn-bad   .vpn-dot { background: #c25a5a; box-shadow: 0 0 6px rgba(194,90,90,.6); }
.vpn-pill.vpn-bad   .vpn-text { color: #e08d8d; }
.vpn-pill.vpn-error { border-color: #6b5a2a; }
.vpn-pill.vpn-error .vpn-dot { background: #d4a847; }
.vpn-pill.vpn-error .vpn-text { color: #d4a847; }

.page { margin-left: 180px; }

.topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: #1c2129;
    border-bottom: 1px solid #2a313c;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar h1 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.summary { display: flex; gap: 14px; flex-wrap: wrap; flex: 1; }
.counter { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }

.dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}
.dot-total      { background: #4c5663; }
.dot-succeeded  { background: #5a9b5e; }
.dot-queued     { background: #4c5663; }
.dot-running    { background: #4d8eba; }
.dot-failed     { background: #c25a5a; }
.dot-neutral    { background: #d4a847; }

.meta { display: flex; gap: 8px; align-items: center; color: #6b7689; font-size: 11px; }
.user-badge {
    background: #2a313c;
    color: #c8d0dc;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
}
.user-badge .role {
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
}
.user-badge .role.admin  { background: #4d6f8a; color: #fff; }
.user-badge .role.viewer { background: #5a6f78; color: #d8dee9; }
.logout-link { color: #6b7689; text-decoration: none; }
.logout-link:hover { color: #d8dee9; text-decoration: underline; }
.hidden { display: none !important; }
.meta label { color: #98a3b3; }
.meta select {
    background: #2a313c;
    color: #d8dee9;
    border: 1px solid #3a424f;
    border-radius: 3px;
    padding: 3px 6px;
    font-size: 11px;
}
.meta button {
    background: #2a313c;
    color: #d8dee9;
    border: 1px solid #3a424f;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}
.meta button:hover { background: #3a424f; }

#grid-container { padding: 12px 16px 80px 16px; }
.hint { color: #6b7689; padding: 40px; text-align: center; }

.category-section {
    margin-bottom: 18px;
    background: #181d24;
    border: 1px solid #232932;
    border-radius: 4px;
}

.category-header {
    padding: 8px 12px;
    background: #1c2129;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    user-select: none;
}
.category-header .chevron { display: inline-block; width: 12px; transition: transform 0.15s; }
.category-section.collapsed .chevron { transform: rotate(-90deg); }
.category-section.collapsed .grid-table { display: none; }
.category-header .pill {
    background: #2a313c;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 10px;
    font-weight: 400;
}

.grid-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}
.grid-table th, .grid-table td {
    border: 1px solid #232932;
    padding: 0;
    vertical-align: middle;
    text-align: center;
}
.grid-table th {
    background: #1c2129;
    color: #98a3b3;
    font-weight: 500;
    padding: 5px 4px;
}
.grid-table th.session-group { background: #20262f; }
.grid-table .prompt-cell {
    text-align: left;
    padding: 5px 8px;
    background: #1c2129;
    color: #c8d0dc;
    white-space: nowrap;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.grid-table .prompt-cell .pid { color: #6b7689; font-family: ui-monospace, SFMono-Regular, monospace; margin-right: 6px; }
.grid-table .prompt-cell .funnel {
    display: inline-block;
    width: 32px;
    text-align: center;
    margin-right: 6px;
    padding: 1px 0;
    background: #2a313c;
    border-radius: 2px;
    font-size: 10px;
    color: #98a3b3;
}

/* Status cells in the grid */
.status-cell {
    width: 38px;
    height: 22px;
    cursor: pointer;
    position: relative;
}
.status-cell:hover { outline: 2px solid #4d8eba; outline-offset: -1px; z-index: 2; }
.status-cell .swatch {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.85);
    font-variant-numeric: tabular-nums;
}
.status-cell.empty .swatch { background: #181d24; color: #4c5663; }
.status-cell.all-done .swatch { background: #4a7d50; }
.status-cell.partial .swatch { background: #5a6f78; }
.status-cell.has-failures .swatch { background: #8a4444; }
.status-cell.running .swatch { background: #4d6f8a; }
.status-cell.queued .swatch { background: #2a313c; color: #98a3b3; }

/* Side panel */
#side-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 480px;
    max-width: 90vw;
    background: #1c2129;
    border-left: 1px solid #2a313c;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    z-index: 20;
}
#side-panel.hidden, #modal.hidden { display: none; }
#side-panel header {
    padding: 12px 16px;
    border-bottom: 1px solid #2a313c;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: #1c2129;
}
#side-panel h2 { margin: 0; font-size: 14px; font-weight: 600; }
#side-panel button {
    background: transparent;
    color: #d8dee9;
    border: 1px solid #3a424f;
    border-radius: 3px;
    cursor: pointer;
    padding: 3px 9px;
    font-size: 13px;
}
#side-panel button:hover { background: #2a313c; }

#side-actions {
    padding: 10px 16px;
    border-bottom: 1px solid #2a313c;
    display: flex;
    gap: 8px;
}
#side-actions button.danger {
    background: #6c3535;
    border-color: #8a4444;
}
#side-actions button.danger:hover { background: #8a4444; }

#side-content { padding: 8px 16px 24px 16px; }
.day-row {
    display: grid;
    grid-template-columns: 100px 1fr 1fr 1fr;
    gap: 4px;
    padding: 4px 0;
    border-bottom: 1px solid #232932;
    align-items: center;
}
.day-row .day-label { color: #98a3b3; font-family: ui-monospace, monospace; font-size: 11px; }
.run-pill {
    padding: 3px 6px;
    border-radius: 3px;
    text-align: center;
    cursor: pointer;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.85);
}
.run-pill:hover { outline: 1px solid #4d8eba; }
.run-pill.succeeded { background: #4a7d50; }
.run-pill.failed,
.run-pill.captcha_blocked,
.run-pill.login_wall,
.run-pill.rate_limited { background: #8a4444; }
.run-pill.running { background: #4d6f8a; }
.run-pill.queued { background: #2a313c; color: #98a3b3; }
.run-pill.no_overview_shown { background: #a08438; }
.run-pill.empty-slot { background: transparent; color: #4c5663; cursor: default; }

/* Modal */
#modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-inner {
    background: #1c2129;
    border: 1px solid #2a313c;
    border-radius: 4px;
    width: 720px;
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}
.modal-inner header {
    padding: 12px 16px;
    border-bottom: 1px solid #2a313c;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-inner h2 { margin: 0; font-size: 14px; font-weight: 600; }
.modal-inner button {
    background: transparent;
    color: #d8dee9;
    border: 1px solid #3a424f;
    border-radius: 3px;
    cursor: pointer;
    padding: 3px 9px;
}
.modal-inner button:hover { background: #2a313c; }
.modal-inner button.primary {
    background: #4d6f8a;
    border-color: #5d7f9a;
}
.modal-inner button.primary:hover { background: #5d7f9a; }
#modal-content {
    padding: 12px 16px;
    overflow-y: auto;
    font-size: 12px;
}
#modal-content dl { display: grid; grid-template-columns: 140px 1fr; gap: 4px 12px; margin: 0 0 12px 0; }
#modal-content dt { color: #98a3b3; }
#modal-content dd { margin: 0; font-family: ui-monospace, monospace; }
#modal-content pre {
    background: #0f1419;
    padding: 12px;
    border-radius: 3px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 11px;
    line-height: 1.5;
    color: #c8d0dc;
}

/* ── Setup (Home) page ────────────────────────────────────────────────── */
.setup-root { padding: 0 24px 80px 24px; max-width: 1280px; margin: 0 auto; }
.setup-section { margin-top: 28px; }
.setup-section-head h2 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: #d8dee9;
    letter-spacing: 0.2px;
}
.setup-section-head .subtitle {
    margin: 0 0 14px 0;
    color: #6b7689;
    font-size: 12px;
    line-height: 1.5;
    max-width: 820px;
}

/* Hero */
.hero {
    margin-top: 24px;
    padding: 22px 24px;
    background: linear-gradient(180deg, #1c2129, #181d24);
    border: 1px solid #232932;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.hero-headline .hero-title {
    font-size: 18px;
    font-weight: 600;
    color: #d8dee9;
    line-height: 1.4;
    max-width: 900px;
}
.hero-headline .hero-subtitle {
    margin-top: 6px;
    font-size: 12px;
    color: #98a3b3;
}
.hero-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.tile {
    background: #0f1419;
    border: 1px solid #232932;
    padding: 14px 16px;
    border-radius: 4px;
    text-align: center;
}
.tile-num {
    font-size: 26px;
    font-weight: 700;
    color: #4d8eba;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.tile-label {
    font-size: 11px;
    color: #6b7689;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}
.hero-bars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    border-top: 1px solid #232932;
    padding-top: 16px;
}
@media (max-width: 760px) {
    .hero-bars { grid-template-columns: 1fr; gap: 14px; }
}

/* Generic progress-bar component — used in hero AND in Data page strip */
.progressbar { display: flex; flex-direction: column; gap: 6px; }
.progressbar-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.progressbar-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #98a3b3;
    font-weight: 600;
}
.progressbar-pct {
    font-size: 16px;
    font-weight: 700;
    color: #d8dee9;
    font-variant-numeric: tabular-nums;
    margin-left: auto;
}
.progressbar-detail {
    font-size: 11px;
    color: #6b7689;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, monospace;
}
.progressbar-track {
    height: 8px;
    background: #0f1419;
    border: 1px solid #232932;
    border-radius: 4px;
    overflow: hidden;
}
.progressbar-fill {
    height: 100%;
    transition: width 0.4s ease;
}
.progressbar-fill.amber { background: linear-gradient(90deg, #a08438, #d4a847); }
.progressbar-fill.blue  { background: linear-gradient(90deg, #4d6f8a, #4d8eba); }
.progressbar-fill.green { background: linear-gradient(90deg, #4a7d50, #5a9b5e); }

/* Data page progress strip (just below topbar) */
.progress-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 14px 16px 12px 16px;
    background: #161b22;
    border-bottom: 1px solid #232932;
}
@media (max-width: 760px) {
    .progress-strip { grid-template-columns: 1fr; gap: 12px; }
}

/* Matrix */
.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.matrix-table th, .matrix-table td {
    border: 1px solid #232932;
    padding: 8px 10px;
    text-align: center;
}
.matrix-table th {
    background: #1c2129;
    color: #98a3b3;
    font-weight: 500;
}
.matrix-table th.matrix-corner { background: #181d24; color: #6b7689; text-align: left; }
.matrix-table th.subhead { background: #1c2129; font-size: 10px; color: #98a3b3; }
.matrix-table th.subhead-empty { background: #181d24; }
.matrix-table th.matrix-llm { text-align: left; }
.matrix-table th.matrix-llm .llm-name { display: block; font-weight: 600; color: #d8dee9; font-size: 12px; }
.matrix-table th.matrix-llm .llm-model { display: block; font-size: 10px; color: #6b7689; font-family: ui-monospace, monospace; margin-top: 2px; }
.matrix-table .matrix-cell {
    background: #0f1419;
    color: #c8d0dc;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, monospace;
}
.matrix-note {
    margin-top: 10px;
    padding: 8px 12px;
    background: #1c2129;
    border-left: 3px solid #5a6f78;
    color: #98a3b3;
    font-size: 11px;
    border-radius: 0 3px 3px 0;
}
.matrix-note strong { color: #d8dee9; margin-right: 6px; }

/* Card grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.card-grid.three-col { grid-template-columns: repeat(3, 1fr); }
.card-grid.four-col  { grid-template-columns: repeat(5, 1fr); }
.card {
    background: #181d24;
    border: 1px solid #232932;
    border-radius: 4px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.card-title { font-weight: 600; color: #d8dee9; font-size: 13px; }
.card-body { color: #98a3b3; font-size: 12px; line-height: 1.5; }
.card-foot { display: flex; gap: 4px; flex-wrap: wrap; }
.cat-badge {
    background: #2a313c;
    color: #98a3b3;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}
.provider-chip {
    background: #0f1419;
    color: #6b7689;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    border: 1px solid #232932;
}

/* LLM cards */
.llm-card .llm-detail { display: flex; gap: 8px; font-size: 11px; }
.llm-card .llm-detail .k { color: #6b7689; min-width: 56px; }
.llm-card .llm-detail .v { color: #c8d0dc; font-family: ui-monospace, monospace; }
.llm-card .llm-note {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #232932;
    color: #98a3b3;
    font-size: 11px;
    line-height: 1.4;
}
.llm-card.excluded { opacity: 0.55; }
.excluded-tag {
    background: #6c3535;
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

/* Priming list */
.priming-list { display: flex; flex-direction: column; gap: 6px; }
.priming-block {
    background: #181d24;
    border: 1px solid #232932;
    border-radius: 4px;
    overflow: hidden;
}
.priming-head {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.priming-head:hover { background: #1c2129; }
.priming-head .chevron { color: #6b7689; transition: transform 0.15s; display: inline-block; width: 12px; }
.priming-block.open .priming-head .chevron { transform: rotate(90deg); }
.priming-head .persona-name { font-weight: 600; color: #d8dee9; font-size: 12px; }
.priming-head .surface-counts { color: #98a3b3; font-size: 11px; margin-left: auto; font-variant-numeric: tabular-nums; }
.priming-head .surface-counts .total { color: #c8d0dc; font-weight: 600; }
.priming-body {
    display: none;
    padding: 4px 14px 14px 36px;
    border-top: 1px solid #232932;
    background: #0f1419;
}
.priming-block.open .priming-body { display: block; }
.surface-block { margin-top: 10px; }
.surface-block h4 {
    font-size: 11px;
    font-weight: 600;
    color: #4d8eba;
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.surface-block h4 .count { color: #6b7689; font-weight: 400; margin-left: 4px; }
.query-list {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 24px;
}
.query-list li {
    color: #c8d0dc;
    font-size: 11px;
    padding: 2px 0;
    break-inside: avoid;
}

/* Calibration callout */
.callout {
    background: #181d24;
    border: 1px solid #232932;
    border-left: 3px solid #4d8eba;
    border-radius: 0 4px 4px 0;
    padding: 14px 18px;
}
.callout-head { font-size: 12px; color: #98a3b3; margin-bottom: 8px; }
.callout-head strong { color: #d8dee9; }
.callout p { font-size: 12px; line-height: 1.6; color: #c8d0dc; margin: 0 0 10px 0; }
.callout p strong { color: #d8dee9; }
.callout p.callout-aside {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px dashed #232932;
    color: #98a3b3;
    font-size: 11px;
}
.callout-prompts h4 {
    margin: 14px 0 6px 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #4d8eba;
    font-weight: 600;
}
.callout-prompts ol { margin: 0; padding-left: 20px; color: #c8d0dc; font-size: 12px; line-height: 1.7; }

/* Prompts */
.prompt-block {
    background: #181d24;
    border: 1px solid #232932;
    border-radius: 4px;
    margin-bottom: 6px;
    overflow: hidden;
}
.prompt-head {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}
.prompt-head:hover { background: #1c2129; }
.prompt-head .chevron { color: #6b7689; transition: transform 0.15s; display: inline-block; width: 12px; }
.prompt-block.open .prompt-head .chevron { transform: rotate(90deg); }
.prompt-head .cat-name { font-weight: 600; color: #d8dee9; font-size: 12px; }
.prompt-head .cat-summary { color: #98a3b3; font-size: 11px; margin-left: auto; }
.prompt-body {
    display: none;
    border-top: 1px solid #232932;
    padding: 4px 18px 18px 18px;
    background: #0f1419;
}
.prompt-block.open .prompt-body { display: block; }
.stage-block { margin-top: 14px; }
.stage-block h4 {
    margin: 0 0 8px 0;
    font-size: 11px;
    color: #98a3b3;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.stage-pill {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.stage-pill.stage-top    { background: #2a4a3a; color: #9bc8a9; }
.stage-pill.stage-mid    { background: #2a3f55; color: #9bc0e0; }
.stage-pill.stage-bottom { background: #4a3a2a; color: #d4a847; }

.prompt-list { list-style: none; padding: 0; margin: 0; }
.prompt-list li {
    padding: 6px 0;
    border-bottom: 1px solid #232932;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.prompt-list li:last-child { border-bottom: none; }
.prompt-list .pid {
    font-family: ui-monospace, monospace;
    color: #6b7689;
    font-size: 10px;
}
.prompt-list .prompt-text {
    color: #d8dee9;
    font-size: 12px;
    line-height: 1.5;
}
.prompt-list .prompt-intent {
    color: #6b7689;
    font-size: 11px;
    font-style: italic;
}

/* Daily runs */
.daily-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 760px) { .daily-grid { grid-template-columns: 1fr; } }
.daily-card {
    background: #181d24;
    border: 1px solid #232932;
    border-left: 3px solid #4d8eba;
    border-radius: 0 4px 4px 0;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.daily-card-head { display: flex; align-items: center; gap: 10px; }
.daily-card-head h3 { margin: 0; font-size: 13px; font-weight: 600; color: #d8dee9; }
.status-pill {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
}
.status-pill.pill-idle    { background: #2a313c; color: #98a3b3; }
.status-pill.pill-running { background: #2a4a5e; color: #9bc0e0; }
.status-pill.pill-done    { background: #2c5d2f; color: #9bc8a9; }
.daily-card-desc { margin: 0; font-size: 12px; color: #98a3b3; line-height: 1.5; }
.daily-card-meta { font-size: 11px; color: #6b7689; font-family: ui-monospace, monospace; }
.daily-card-actions { display: flex; gap: 8px; margin-top: 4px; }
.daily-card-actions button {
    border: 1px solid #3a424f;
    border-radius: 3px;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    color: #d8dee9;
    background: #2a313c;
}
.daily-card-actions button:hover:not(:disabled) { background: #3a424f; }
.daily-card-actions button.primary { background: #4d6f8a; border-color: #5d7f9a; color: #fff; }
.daily-card-actions button.primary:hover:not(:disabled) { background: #5d7f9a; }
.daily-card-actions button.ghost { background: transparent; }
.daily-card-actions button:disabled { opacity: 0.4; cursor: not-allowed; }

/* Live log panel */
#log-panel {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 600px;
    max-width: 90vw;
    background: #1c2129;
    border-left: 1px solid #2a313c;
    box-shadow: -4px 0 12px rgba(0,0,0,0.4);
    z-index: 30;
    display: none;
    flex-direction: column;
}
#log-panel.open { display: flex; }
#log-panel header {
    padding: 12px 16px;
    border-bottom: 1px solid #2a313c;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#log-panel h2 { margin: 0; font-size: 14px; font-weight: 600; }
#log-panel button {
    background: transparent;
    color: #d8dee9;
    border: 1px solid #3a424f;
    border-radius: 3px;
    padding: 3px 9px;
    cursor: pointer;
    font-size: 13px;
}
#log-panel-content {
    margin: 0;
    padding: 12px 16px;
    overflow-y: auto;
    flex: 1;
    background: #0f1419;
    color: #c8d0dc;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Methodology footer */
.methodology-footer {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid #232932;
}
.meth-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 12px 16px;
    background: #1c2129;
    border-radius: 4px;
    font-size: 11px;
    color: #98a3b3;
}
.meth-item strong { color: #d8dee9; font-weight: 600; }

/* Responsive: collapse cards on narrow viewports */
@media (max-width: 980px) {
    .card-grid, .card-grid.three-col, .card-grid.four-col { grid-template-columns: repeat(2, 1fr); }
    .hero-tiles { grid-template-columns: repeat(2, 1fr); }
    .query-list { columns: 1; }
}
@media (max-width: 700px) {
    .sidebar { width: 60px; }
    .sidebar-link { font-size: 0; padding: 9px 14px; }
    .sidebar-glyph { font-size: 16px; width: auto; }
    .sidebar-brand { font-size: 14px; padding: 0 14px 18px 14px; }
    .page { margin-left: 60px; }
    .card-grid, .card-grid.three-col, .card-grid.four-col { grid-template-columns: 1fr; }
}
