/* Brandolini's Law — Review Dashboard Styles */

:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --surface-2: #242736;
    --border: #2d3148;
    --text: #e2e4eb;
    --text-muted: #8b8fa3;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --green: #22c55e;
    --red: #ef4444;
    --amber: #f59e0b;
    --blue: #3b82f6;
    --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Navigation */
nav {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 32px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    text-decoration: none;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    margin-left: auto;
}

.nav-link:hover { color: var(--text); }
.nav-link + .nav-link { margin-left: 16px; }

/* Main content */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px;
}

h1 { font-size: 28px; margin-bottom: 24px; font-weight: 600; }
h2 { font-size: 20px; margin-bottom: 16px; font-weight: 600; }
h3 { font-size: 16px; margin-bottom: 8px; font-weight: 600; }

/* Login page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    background: var(--surface);
    padding: 48px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border);
}

.login-container h1 { text-align: center; margin-bottom: 8px; }
.subtitle { text-align: center; color: var(--text-muted); margin-bottom: 32px; }

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-muted);
}

input[type="text"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius);
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s;
}

.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-success { background: var(--green); color: white; }
.btn-danger { background: var(--red); color: white; }
.btn-small { padding: 6px 12px; font-size: 12px; }

/* Flash messages */
.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
}

.flash.error { background: rgba(239, 68, 68, 0.15); border: 1px solid var(--red); color: var(--red); }
.flash.success { background: rgba(34, 197, 94, 0.15); border: 1px solid var(--green); color: var(--green); }
.flash.warning { background: rgba(245, 158, 11, 0.15); border: 1px solid var(--amber); color: var(--amber); }

/* Episode cards */
.episodes-grid {
    display: grid;
    gap: 16px;
}

.episode-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

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

.episode-header h2 { font-size: 18px; margin-bottom: 0; }

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--surface-2);
    color: var(--text-muted);
}

.episode-meta {
    display: flex;
    gap: 16px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.episode-pipeline {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.pipeline-step {
    flex: 1;
    padding: 6px 8px;
    text-align: center;
    font-size: 11px;
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--text-muted);
}

.pipeline-step.done {
    background: rgba(34, 197, 94, 0.15);
    color: var(--green);
}

/* Sections */
.section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

/* Claims table */
.claims-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 16px;
}

.claims-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
}

.claims-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.claims-table small { color: var(--text-muted); }

.verdict-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.verdict-badge.large { font-size: 16px; padding: 4px 16px; }

.verdict-true .verdict-badge, .verdict-mostly_true .verdict-badge { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.verdict-false .verdict-badge, .verdict-mostly_false .verdict-badge { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.verdict-misleading .verdict-badge, .verdict-exaggerated .verdict-badge { background: rgba(245, 158, 11, 0.15); color: var(--amber); }
.verdict-unverifiable .verdict-badge { background: rgba(59, 130, 246, 0.15); color: var(--blue); }

/* Claim cards */
.claim-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.claim-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.claim-body { margin-bottom: 20px; }

.claim-field {
    margin-bottom: 12px;
}

.claim-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.claim-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--surface-2);
    border-radius: 4px;
}

blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 16px;
    color: var(--text-muted);
    font-style: italic;
}

.claim-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-start;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.inline-form select { width: auto; }
.inline-form textarea { width: 300px; font-size: 12px; }

.badge-adjusted {
    font-size: 12px;
    color: var(--amber);
}

/* Files grid */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.file-item.exists { background: var(--surface-2); }
.file-item.missing { background: transparent; color: var(--text-muted); }
.file-name { flex: 1; font-family: monospace; }
.file-size { color: var(--text-muted); font-size: 12px; }

/* Actions row */
.actions-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Script editor */
.script-editor textarea {
    width: 100%;
    min-height: 600px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.7;
    padding: 20px;
    resize: vertical;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
}

.word-count {
    color: var(--text-muted);
    font-size: 14px;
}

.cost-estimate {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.script-tips {
    margin-top: 24px;
    padding: 16px;
    background: var(--surface);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-muted);
}

.script-tips code {
    background: var(--surface-2);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}
