/* Dev console — dark mode. */

.dev-shell {
    max-width: var(--wci-app-max);
    margin: 0 auto;
    padding: var(--wci-space-5) var(--wci-space-4);
}

.dev-page-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--wci-space-5);
    gap: var(--wci-space-4);
}
.dev-page-title h1 {
    font-size: 22px;
    margin: 0;
}
.dev-page-title .subtitle {
    color: var(--wci-text-muted);
    font-size: 13px;
    margin-top: 4px;
}

/* ── split pane ─────────────────────────────────────────────────────────── */

.split {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: var(--wci-space-4);
    min-height: calc(100vh - 200px);
}

.session-list {
    background: var(--wci-surface-0);
    border: 1px solid var(--wci-surface-3);
    border-radius: var(--wci-radius-lg);
    overflow: hidden;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}
.session-row {
    padding: var(--wci-space-3) var(--wci-space-4);
    border-bottom: 1px solid var(--wci-surface-3);
    cursor: pointer;
    transition: background 100ms ease;
}
.session-row:hover { background: var(--wci-surface-2); }
.session-row.active {
    background: rgba(243, 118, 33, 0.10);
    border-left: 3px solid var(--wci-orange);
    padding-left: calc(var(--wci-space-4) - 3px);
}
.session-row__top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--wci-space-2);
    margin-bottom: 4px;
}
.session-row__id {
    font-family: var(--wci-font-mono);
    font-size: 11px;
    color: var(--wci-text-faint);
}
.session-row__when {
    font-size: 12px;
    color: var(--wci-text-muted);
}
.session-row__meta {
    display: flex;
    gap: var(--wci-space-3);
    font-size: 12px;
    color: var(--wci-text-body);
}
.session-row__meta strong { color: var(--wci-text-strong); }

/* ── session detail ──────────────────────────────────────────────────────── */

.session-detail {
    background: var(--wci-surface-0);
    border: 1px solid var(--wci-surface-3);
    border-radius: var(--wci-radius-lg);
    padding: var(--wci-space-5);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.session-detail__empty {
    color: var(--wci-text-muted);
    text-align: center;
    padding: var(--wci-space-7);
}

.turn {
    border-top: 1px solid var(--wci-surface-3);
    padding-top: var(--wci-space-4);
    margin-top: var(--wci-space-4);
}
.turn:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.turn__header {
    display: flex;
    justify-content: space-between;
    gap: var(--wci-space-3);
    align-items: center;
    margin-bottom: var(--wci-space-3);
}
.turn__trace {
    font-family: var(--wci-font-mono);
    font-size: 11px;
    color: var(--wci-text-faint);
}
.turn__time {
    font-size: 12px;
    color: var(--wci-text-muted);
}

.turn__row {
    background: var(--wci-surface-2);
    border-radius: var(--wci-radius-md);
    padding: var(--wci-space-3);
    margin-bottom: var(--wci-space-2);
}
.turn__row-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--wci-text-muted);
    margin-bottom: var(--wci-space-2);
    letter-spacing: 0.7px;
    font-weight: 700;
}
.turn__row-text {
    color: var(--wci-text-strong);
    white-space: pre-wrap;
    line-height: 1.55;
}

.turn__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wci-space-2);
    margin-top: var(--wci-space-3);
    font-size: 12px;
}

/* ── trace block ─────────────────────────────────────────────────────────── */

.trace-block {
    margin-top: var(--wci-space-3);
}
.trace-block summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--wci-text-body);
    font-size: 13px;
    padding: var(--wci-space-2) 0;
}
.trace-block summary::marker { color: var(--wci-text-faint); }

.trace-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    margin-top: var(--wci-space-2);
    border: 1px solid var(--wci-surface-3);
    border-radius: var(--wci-radius-md);
    overflow: hidden;
}
.trace-table th, .trace-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--wci-surface-3);
}
.trace-table th {
    background: var(--wci-navy);
    color: #F8FAFC;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.trace-table td.num {
    font-family: var(--wci-font-mono);
    text-align: right;
    color: var(--wci-text-body);
}
.trace-table tr.passed { background: rgba(74, 222, 128, 0.06); }
.trace-table tr.passed td:last-child { color: var(--wci-success); font-weight: 700; }
.trace-table tr:last-child td { border-bottom: none; }
.trace-table tbody tr:hover { background: rgba(243, 118, 33, 0.06); }
.trace-table td.preview {
    color: var(--wci-text-muted);
    font-size: 11px;
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── feedback page ──────────────────────────────────────────────────────── */

.feedback-stats {
    display: flex;
    gap: var(--wci-space-4);
    margin-bottom: var(--wci-space-5);
}
.stat-card {
    flex: 1;
    background: var(--wci-surface-0);
    border: 1px solid var(--wci-surface-3);
    border-radius: var(--wci-radius-lg);
    padding: var(--wci-space-4);
    text-align: center;
}
.stat-card__value {
    font-size: 32px;
    font-weight: 700;
    color: var(--wci-text-strong);
    font-family: var(--wci-font-serif);
}
.stat-card__label {
    font-size: 12px;
    color: var(--wci-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-top: 4px;
}

.feedback-list { display: flex; flex-direction: column; gap: var(--wci-space-3); }
.feedback-card {
    background: var(--wci-surface-0);
    border: 1px solid var(--wci-surface-3);
    border-radius: var(--wci-radius-lg);
    padding: var(--wci-space-4);
}
.feedback-card__header {
    display: flex;
    align-items: center;
    gap: var(--wci-space-3);
    margin-bottom: var(--wci-space-3);
    flex-wrap: wrap;
}
.rating-badge {
    padding: 4px 12px;
    border-radius: var(--wci-radius-pill);
    font-weight: 600;
    font-size: 12px;
}
.rating-badge--up   { background: rgba(74, 222, 128, 0.18); color: var(--wci-success); }
.rating-badge--down { background: rgba(248, 113, 113, 0.18); color: var(--wci-error); }

/* content-generator rows in the sessions/history/feedback views */
.pill--content { background: rgba(139, 92, 246, 0.16); color: #b6a2f7; border-color: rgba(139, 92, 246, 0.36); }
.feedback-card__row {
    margin-top: var(--wci-space-2);
    padding: var(--wci-space-3);
    background: var(--wci-surface-2);
    border-radius: var(--wci-radius-md);
}
.feedback-card__row-label {
    font-size: 11px;
    color: var(--wci-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 4px;
    font-weight: 700;
}

/* ── login ──────────────────────────────────────────────────────────────── */

.login-shell {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 64px);
    padding: var(--wci-space-5);
}
.login-card {
    background: var(--wci-surface-0);
    border: 1px solid var(--wci-surface-3);
    border-radius: var(--wci-radius-xl);
    padding: var(--wci-space-7);
    width: min(420px, 100%);
    box-shadow: var(--wci-shadow-md);
}
.login-card h1 { font-size: 22px; margin-bottom: var(--wci-space-2); }
.login-card .subtitle { color: var(--wci-text-muted); font-size: 13px; margin-bottom: var(--wci-space-5); }
.login-card label { display: block; font-size: 13px; font-weight: 600; color: var(--wci-text-strong); margin: var(--wci-space-3) 0 var(--wci-space-2); }
.login-card input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--wci-surface-3);
    border-radius: var(--wci-radius-md);
    background: var(--wci-surface-2);
    color: var(--wci-text-strong);
}
.login-card .error { color: var(--wci-error); font-size: 13px; margin: var(--wci-space-3) 0 0; }
