/* ============================================
   Riff - Professional UI
   Dark sidebar + Light content + Glassmorphism
   ============================================ */

/* --- Variables --- */
:root {
    /* Sidebar (dark) */
    --gs-sidebar-bg: #0a0a0a;
    --gs-sidebar-width: 260px;
    --gs-sidebar-text: rgba(255,255,255,0.65);
    --gs-sidebar-text-hover: rgba(255,255,255,0.95);
    --gs-sidebar-border: rgba(255,255,255,0.06);

    /* Content area (light) */
    --gs-bg: #f0f2f5;
    --gs-surface: #ffffff;
    --gs-surface-2: #f8f9fb;
    --gs-surface-hover: #f0f1f3;
    --gs-border: #e2e4e9;
    --gs-border-hover: #cfd2d8;

    /* Text */
    --gs-text: #1a1d23;
    --gs-text-secondary: #3d4251;
    --gs-text-muted: #6b7084;
    --gs-text-dim: #9ca0ae;

    /* Accent — tiffany */
    --gs-accent: #0abab5;
    --gs-accent-hover: #089e9a;
    --gs-accent-bg: #e6faf9;

    /* Brand — yellow-green (logo) */
    --gs-brand-yellow: #D4F200;
    --gs-brand-yellow-dim: #a8c200;
    --gs-brand-yellow-bg: #f8fde6;

    /* Semantic colors */
    --gs-green: #059669;
    --gs-green-bg: #ecfdf5;
    --gs-red: #dc2626;
    --gs-red-bg: #fef2f2;
    --gs-orange: #d97706;
    --gs-orange-bg: #fffbeb;
    --gs-blue: #2563eb;
    --gs-blue-bg: #eff6ff;
    --gs-purple: #7c3aed;
    --gs-purple-bg: #f5f3ff;
    --gs-pink: #db2777;

    /* Shape */
    --gs-radius: 12px;
    --gs-radius-sm: 8px;
    --gs-radius-xs: 6px;
    --gs-shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --gs-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --gs-shadow-md: 0 4px 12px rgba(0,0,0,0.07);
    --gs-shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
    --gs-transition: 0.2s ease;

    /* Glass */
    --gs-glass-bg: rgba(255,255,255,0.72);
    --gs-glass-border: rgba(255,255,255,0.25);
    --gs-glass-blur: blur(16px);
}

/* ========================================
   DARK MODE
   ======================================== */
html[data-theme="dark"] {
    --gs-sidebar-bg: #050505;
    --gs-sidebar-border: rgba(255,255,255,0.04);

    --gs-bg: #0f1117;
    --gs-surface: #1a1c23;
    --gs-surface-2: #22252e;
    --gs-surface-hover: #2a2d37;
    --gs-border: #2e3039;
    --gs-border-hover: #3d4050;

    --gs-text: #e4e5e9;
    --gs-text-secondary: #b0b3bf;
    --gs-text-muted: #7d8096;
    --gs-text-dim: #555869;

    --gs-accent: #0abab5;
    --gs-accent-hover: #3dd4cf;
    --gs-accent-bg: rgba(10,186,181,0.12);

    --gs-green: #34d399;
    --gs-green-bg: rgba(52,211,153,0.1);
    --gs-red: #f87171;
    --gs-red-bg: rgba(248,113,113,0.1);
    --gs-orange: #fbbf24;
    --gs-orange-bg: rgba(251,191,36,0.1);
    --gs-blue: #60a5fa;
    --gs-blue-bg: rgba(96,165,250,0.1);
    --gs-purple: #a78bfa;
    --gs-purple-bg: rgba(167,139,250,0.1);
    --gs-pink: #f472b6;

    --gs-shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --gs-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --gs-shadow-md: 0 4px 12px rgba(0,0,0,0.35);
    --gs-shadow-lg: 0 8px 24px rgba(0,0,0,0.4);

    --gs-glass-bg: rgba(26,28,35,0.8);
    --gs-glass-border: rgba(255,255,255,0.06);
}

/* Dark mode — hardcoded color overrides */
html[data-theme="dark"] .pass-reason {
    background: var(--gs-surface-2);
    border-color: var(--gs-border);
}
html[data-theme="dark"] .card-actions {
    border-top-color: var(--gs-border);
}
html[data-theme="dark"] .title-preview {
    border-color: var(--gs-border);
}
html[data-theme="dark"] .video-row {
    border-bottom-color: var(--gs-border);
}
html[data-theme="dark"] .data-table tbody td {
    border-bottom-color: var(--gs-border);
}
html[data-theme="dark"] .dg-label,
html[data-theme="dark"] .dg-value {
    border-bottom-color: var(--gs-border);
}
html[data-theme="dark"] .title-list li {
    border-bottom-color: var(--gs-border);
}
html[data-theme="dark"] .badge-rejected {
    background: rgba(255,255,255,0.06);
    color: var(--gs-text-muted);
}
html[data-theme="dark"] .badge-rejected::before {
    background: var(--gs-text-muted);
}
html[data-theme="dark"] .badge-passed {
    background: rgba(255,255,255,0.06);
}
html[data-theme="dark"] .stat-icon-wrap.pink {
    background: rgba(244,114,182,0.1);
}
html[data-theme="dark"] .btn-action:hover {
    border-color: rgba(10,186,181,0.3);
}
html[data-theme="dark"] .btn-accept {
    background: var(--gs-green-bg);
    border-color: rgba(10,186,181,0.2);
}
html[data-theme="dark"] .btn-accept:hover {
    background: rgba(52,211,153,0.15);
    box-shadow: none;
}
html[data-theme="dark"] .btn-reject:hover {
    border-color: rgba(248,113,113,0.3);
}
html[data-theme="dark"] .auto-poll-bar.auto-poll-active {
    background: rgba(52,211,153,0.08);
    border-bottom-color: rgba(52,211,153,0.15);
}
html[data-theme="dark"] .trend-highlight {
    border-color: rgba(10,186,181,0.2);
}
html[data-theme="dark"] .transcript-box {
    background: #0f1117;
}

/* --- Pico Reset --- */
html[data-theme="light"],
html[data-theme="dark"] {
    --pico-background-color: var(--gs-bg);
    --pico-card-background-color: var(--gs-surface);
    --pico-muted-border-color: var(--gs-border);
    --pico-color: var(--gs-text);
    --pico-muted-color: var(--gs-text-muted);
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }
body {
    background: var(--gs-bg);
    color: var(--gs-text);
    font-family: 'Inter', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
    min-height: 100vh;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--gs-sidebar-width);
    background: var(--gs-sidebar-bg) url("./monogram.svg") repeat;
    background-size: 100px 100px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


/* Logo area */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1.25rem 1.3rem;
    border-bottom: 1px solid var(--gs-sidebar-border);
    position: relative;
}
.sidebar-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}
.sidebar-brand-studio {
    font-size: 0.7rem;
    font-weight: 600;
    color: #e6ff4b;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gs-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}
.sidebar-brand-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}
.sidebar-brand-sub {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.35);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0.75rem;
    overflow-y: auto;
    list-style: none !important;
    list-style-type: none !important;
    margin: 0;
}
.sidebar-nav li {
    list-style: none !important;
    margin-bottom: 2px;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    color: var(--gs-sidebar-text);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    transition: all var(--gs-transition);
    position: relative;
}
.sidebar-nav a:hover {
    color: var(--gs-sidebar-text-hover);
    background: rgba(255,255,255,0.06);
}
.sidebar-nav a.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-weight: 600;
}
.sidebar-nav a .nav-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
    transition: all var(--gs-transition);
}
.sidebar-nav a:not(.active) .nav-icon {
    background: rgba(255,255,255,0.05);
}
.sidebar-nav a.active .nav-icon {
    background: rgba(255,255,255,0.18);
}
/* Active indicator bar */
.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--gs-accent);
}

/* Sidebar footer */
.sidebar-footer {
    padding: 1rem 1.3rem;
    border-top: 1px solid var(--gs-sidebar-border);
    font-size: 0.68rem;
    color: rgba(255,255,255,0.25);
}

/* Mobile sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 199;
}

/* ========================================
   CONTENT AREA
   ======================================== */
.app-content {
    margin-left: var(--gs-sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Content header */
.content-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--gs-glass-bg);
    backdrop-filter: var(--gs-glass-blur);
    -webkit-backdrop-filter: var(--gs-glass-blur);
    border-bottom: 1px solid var(--gs-border);
    padding: 0 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.content-header-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gs-text);
}
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: var(--gs-radius-xs);
    color: var(--gs-text-secondary);
    transition: background var(--gs-transition);
}
.hamburger:hover {
    background: var(--gs-surface-hover);
}

/* Theme toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--gs-border);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: var(--gs-radius-xs);
    color: var(--gs-text-muted);
    transition: all var(--gs-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
}
.theme-toggle:hover {
    background: var(--gs-surface-hover);
    color: var(--gs-text);
    border-color: var(--gs-border-hover);
}

/* --- Main Content --- */
main.container {
    max-width: 1120px;
    padding: 1.75rem 1.75rem;
    flex: 1;
}

/* --- Page Header --- */
.page-header {
    margin-bottom: 1.5rem;
}
.page-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: var(--gs-text);
    letter-spacing: -0.01em;
}
.page-header .subtitle {
    color: var(--gs-text-muted);
    font-size: 0.82rem;
    margin-top: 0.2rem;
}

/* ========================================
   HERO BANNER (Dashboard)
   ======================================== */
.hero-banner {
    background: var(--gs-surface);
    border: 1px solid var(--gs-border);
    border-left: 4px solid var(--gs-accent);
    border-radius: var(--gs-radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--gs-shadow);
}
.hero-banner h2 {
    font-size: 0.78rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: var(--gs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.hero-banner p {
    display: none;
}
.hero-stats {
    display: flex;
    gap: 0;
}
.hero-stat {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0 1.25rem;
    border-right: 1px solid var(--gs-border);
}
.hero-stat:first-child {
    padding-left: 0;
}
.hero-stat:last-child {
    border-right: none;
    padding-right: 0;
}
.hero-stat-value {
    font-size: 1.65rem;
    font-weight: 800;
    font-family: 'Inter', monospace;
    line-height: 1;
    color: var(--gs-text);
}
.hero-stat-label {
    font-size: 0.72rem;
    color: var(--gs-text-muted);
    margin-top: 0.3rem;
    font-weight: 500;
}

/* ========================================
   STAT CARDS
   ======================================== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}
.stat-card {
    background: var(--gs-surface);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius);
    padding: 1.15rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--gs-shadow-sm);
}
.stat-card:hover {
    box-shadow: var(--gs-shadow-md);
    transform: translateY(-2px);
    border-color: var(--gs-border-hover);
}
.stat-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.stat-icon-wrap.purple { background: var(--gs-accent-bg); color: var(--gs-accent); }
.stat-icon-wrap.green { background: var(--gs-green-bg); color: var(--gs-green); }
.stat-icon-wrap.orange { background: var(--gs-orange-bg); color: var(--gs-orange); }
.stat-icon-wrap.pink { background: #fdf2f8; color: var(--gs-pink); }
.stat-info .stat-number {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1;
    color: var(--gs-text);
    font-family: 'Inter', monospace;
}
.stat-info .stat-label {
    font-size: 0.72rem;
    color: var(--gs-text-muted);
    margin-top: 0.2rem;
    font-weight: 500;
}

/* ========================================
   SECTION (Glass Card)
   ======================================== */
.section {
    background: var(--gs-surface);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius);
    margin-bottom: 1.25rem;
    box-shadow: var(--gs-shadow);
    overflow: hidden;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid var(--gs-border);
    background: var(--gs-surface-2);
}
.section-header h3 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gs-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.section-header .section-count {
    font-size: 0.7rem;
    padding: 0.15rem 0.55rem;
    border-radius: 99px;
    background: var(--gs-accent-bg);
    color: var(--gs-accent);
    font-weight: 600;
}
.section-body { padding: 1.15rem; }
.section-body.no-pad { padding: 0; }

/* ========================================
   BADGES
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.65rem;
    border-radius: 99px;
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.01em;
}
.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.badge-done, .badge-accepted { background: var(--gs-green-bg); color: var(--gs-green); }
.badge-done::before, .badge-accepted::before { background: var(--gs-green); }
.badge-new, .badge-pending { background: var(--gs-blue-bg); color: var(--gs-blue); }
.badge-new::before, .badge-pending::before { background: var(--gs-blue); }
.badge-error { background: var(--gs-red-bg); color: var(--gs-red); }
.badge-error::before { background: var(--gs-red); }
.badge-downloading, .badge-transcribing { background: var(--gs-orange-bg); color: var(--gs-orange); }
.badge-downloading::before, .badge-transcribing::before { background: var(--gs-orange); }
.badge-rejected { background: #f3f4f6; color: #6b7280; }
.badge-rejected::before { background: #9ca3af; }
.badge-published { background: var(--gs-purple-bg); color: var(--gs-purple); }
.badge-published::before { background: var(--gs-purple); }
.badge-passed { background: #f3f4f6; color: var(--gs-text-dim); }
.badge-passed::before { background: var(--gs-text-dim); }

/* ========================================
   RANK BADGES
   ======================================== */
.rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.82rem;
    flex-shrink: 0;
}
.rank-S { background: #e11d48; color: #fff; }
.rank-A { background: #d97706; color: #fff; }
.rank-B { background: #4f46e5; color: #fff; }
.rank-P { background: var(--gs-text-muted); color: #fff; }

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: var(--gs-radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.3;
    font-family: inherit;
}
.btn-primary {
    background: var(--gs-accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--gs-accent-hover);
    box-shadow: 0 2px 8px rgba(37,99,235,0.2);
}
.btn-ghost {
    background: var(--gs-surface);
    color: var(--gs-text-secondary);
    border: 1px solid var(--gs-border);
}
.btn-ghost:hover {
    background: var(--gs-surface-hover);
    border-color: var(--gs-border-hover);
}
.btn-action {
    background: var(--gs-surface);
    color: var(--gs-text-secondary);
    border: 1px solid var(--gs-border);
}
.btn-action:hover {
    background: var(--gs-accent-bg);
    color: var(--gs-accent);
    border-color: #c7d2fe;
}
.btn-accept {
    background: #FFE600;
    color: #000;
    border: 1px solid #000;
    font-weight: 700;
}
.btn-accept:hover {
    background: #FFF066;
    box-shadow: 0 2px 8px rgba(255, 230, 0, 0.4);
}
.btn-reject {
    background: var(--gs-surface);
    color: var(--gs-text-dim);
    border: 1px solid var(--gs-border);
}
.btn-reject:hover {
    background: var(--gs-red-bg);
    color: var(--gs-red);
    border-color: #fecaca;
}
.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.72rem;
}
.btn-group {
    display: inline-flex;
    gap: 0.35rem;
}
.btn-pair {
    display: inline-flex;
    border-radius: var(--gs-radius-sm);
    overflow: hidden;
    border: 1px solid var(--gs-border);
}
.btn-pair .btn {
    border: none;
    border-radius: 0;
    padding: 0.35rem 0.7rem;
    font-size: 0.72rem;
}
.btn-pair .btn + .btn { border-left: 1px solid var(--gs-border); }
.btn-pair .btn-accept { background: var(--gs-surface); color: var(--gs-green); }
.btn-pair .btn-accept:hover { background: var(--gs-green-bg); }
.btn-pair .btn-reject { background: var(--gs-surface); color: var(--gs-text-dim); }
.btn-pair .btn-reject:hover { background: var(--gs-red-bg); color: var(--gs-red); }

/* ========================================
   DATA TABLE
   ======================================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table thead th {
    padding: 0.7rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gs-text-muted);
    border-bottom: 1px solid var(--gs-border);
    text-align: left;
    background: var(--gs-surface-2);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.data-table tbody td {
    padding: 0.7rem 1rem;
    font-size: 0.83rem;
    border-bottom: 1px solid #f0f1f3;
    vertical-align: middle;
    color: var(--gs-text-secondary);
}
.data-table tbody tr { transition: background var(--gs-transition); }
.data-table tbody tr:hover { background: var(--gs-surface-2); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table a { color: var(--gs-text); text-decoration: none; font-weight: 500; }
.data-table a:hover { color: var(--gs-accent); }
.data-table .badge { min-width: 52px; justify-content: center; font-size: 0.65rem; }

/* ========================================
   PROPOSAL CARD
   ======================================== */
.proposal-card {
    background: var(--gs-surface);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius);
    padding: 1.15rem;
    margin-bottom: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: var(--gs-shadow-sm);
}
.proposal-card:hover {
    box-shadow: var(--gs-shadow-md);
    border-color: var(--gs-border-hover);
    transform: translateY(-1px);
}
.card-top {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}
.card-content { flex: 1; min-width: 0; }
.card-title {
    font-size: 0.92rem;
    font-weight: 600;
    margin: 0 0 0.35rem 0;
    line-height: 1.45;
}
.card-title a { color: var(--gs-text); text-decoration: none; }
.card-title a:hover { color: var(--gs-accent); }
.card-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    color: var(--gs-text-muted);
    flex-wrap: wrap;
}
.meta-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--gs-text-dim);
}
.pass-reason {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding: 0.45rem 0.7rem;
    background: #f9fafb;
    border: 1px solid #f0f1f3;
    border-radius: var(--gs-radius-xs);
    font-size: 0.75rem;
    color: var(--gs-text-muted);
    line-height: 1.5;
}
.pass-reason i, .pass-reason svg { margin-top: 0.1rem; color: var(--gs-text-dim); }
.proposal-card.is-passed { opacity: 0.7; }
.proposal-card.is-passed:hover { opacity: 1; }
.card-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding-top: 0.55rem;
    border-top: 1px solid #f0f1f3;
}
.title-preview {
    margin-top: 0.65rem;
    padding: 0.65rem 0.85rem;
    background: var(--gs-surface-2);
    border: 1px solid #f0f1f3;
    border-radius: var(--gs-radius-sm);
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--gs-text-secondary);
}
.title-preview ol { margin: 0; padding-left: 1.1rem; }
.title-preview li { margin: 0.15rem 0; }

.clip-preview {
    margin-top: 0.65rem;
    padding: 0.55rem 0.85rem;
    background: var(--gs-surface-2);
    border: 1px solid #f0f1f3;
    border-radius: var(--gs-radius-sm);
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--gs-text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.clip-line {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}
.clip-label {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    background: var(--gs-accent-bg);
    color: var(--gs-accent);
    white-space: nowrap;
    flex-shrink: 0;
}
.clip-label.climax {
    background: var(--gs-orange-bg);
    color: var(--gs-orange);
}

/* Thumbnail 3-line preview */
.thumbnail-preview {
    background: #1a1a1a;
    border-radius: var(--gs-radius-sm);
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.thumb-line {
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.4;
}
.thumb-line-1 { color: #e6ff4b; }
.thumb-line-2 { color: #ffffff; }
.thumb-line-3 { color: #ff3b3b; }

/* ========================================
   FILTER BAR / PILL TABS
   ======================================== */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.filter-bar select,
.filter-bar input[type="search"] {
    background: var(--gs-surface);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius-sm);
    color: var(--gs-text);
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    margin: 0;
    transition: border-color var(--gs-transition);
    font-family: inherit;
}
.filter-bar select:focus,
.filter-bar input:focus {
    border-color: var(--gs-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Pill tab filter */
.pill-tabs {
    display: flex;
    gap: 0;
    border-radius: var(--gs-radius-sm);
    overflow: hidden;
    border: 1px solid var(--gs-border);
    background: var(--gs-surface);
}
.pill-tab {
    padding: 0.42rem 0.85rem;
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--gs-text-muted);
    cursor: pointer;
    transition: all var(--gs-transition);
    text-decoration: none;
    border: none;
    background: none;
    font-family: inherit;
    border-right: 1px solid var(--gs-border);
}
.pill-tab:last-child { border-right: none; }
.pill-tab:hover { color: var(--gs-text); background: var(--gs-surface-hover); }
.pill-tab.active {
    background: var(--gs-accent);
    color: #fff;
    font-weight: 600;
}

/* ========================================
   OPERATIONS PANEL (Dashboard)
   ======================================== */
.ops-panel {
    background: var(--gs-surface);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius);
    margin-bottom: 1.25rem;
    box-shadow: var(--gs-shadow);
    overflow: hidden;
}
.ops-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.15rem;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gs-text-secondary);
    transition: background var(--gs-transition);
}
.ops-toggle:hover { background: var(--gs-surface-2); }
.ops-toggle .toggle-icon {
    transition: transform 0.3s ease;
    color: var(--gs-text-dim);
}
.ops-toggle .toggle-icon.rotated {
    transform: rotate(180deg);
}
.ops-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.85rem 1.1rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--gs-border);
}
.ops-divider {
    width: 1px;
    height: 22px;
    background: var(--gs-border);
    margin: 0 0.25rem;
}
.ops-url-form {
    display: flex;
    gap: 0.35rem;
    flex: 1;
    min-width: 180px;
}
.ops-url-form input {
    flex: 1;
    background: var(--gs-surface-2);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius-sm);
    color: var(--gs-text);
    padding: 0.45rem 0.7rem;
    font-size: 0.78rem;
    margin: 0;
    font-family: inherit;
    width: auto !important;
}
.ops-url-form .btn { flex-shrink: 0; width: auto !important; }
.ops-url-form input:focus {
    border-color: var(--gs-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.ops-panel #action-result:not(:empty) { padding: 0 1.1rem 0.85rem; }

/* --- Action Result --- */
.action-result {
    margin-top: 0.65rem;
    padding: 0.55rem 0.85rem;
    border-radius: var(--gs-radius-xs);
    font-size: 0.8rem;
    background: var(--gs-surface-2);
    border: 1px solid var(--gs-border);
    animation: fadeIn 0.25s ease;
}

/* --- Video Row (dashboard) --- */
.video-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1.15rem;
    border-bottom: 1px solid #f0f1f3;
    transition: background var(--gs-transition);
}
.video-row .badge { min-width: 52px; justify-content: center; font-size: 0.65rem; }
.video-row:hover { background: var(--gs-surface-2); }
.video-row:last-child { border-bottom: none; }
.video-title { flex: 1; min-width: 0; font-size: 0.83rem; font-weight: 500; }
.video-title a { color: var(--gs-text); text-decoration: none; }
.video-title a:hover { color: var(--gs-accent); }
.video-channel { font-size: 0.75rem; color: var(--gs-text-muted); white-space: nowrap; }
.video-date { font-size: 0.72rem; color: var(--gs-text-dim); white-space: nowrap; }

/* ========================================
   DETAIL PAGE
   ======================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--gs-text-muted);
    margin-bottom: 1rem;
    list-style: none !important;
    list-style-type: none !important;
    padding: 0;
}
.breadcrumb li { list-style: none !important; list-style-type: none !important; }
.breadcrumb a { color: var(--gs-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--gs-accent); }
.breadcrumb .sep { color: var(--gs-text-dim); }

.detail-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.detail-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1.25rem 0;
    line-height: 1.4;
    color: var(--gs-text);
}
.detail-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    background: var(--gs-surface);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius);
    overflow: hidden;
    margin-bottom: 1.25rem;
    box-shadow: var(--gs-shadow);
}
.dg-label {
    padding: 0.7rem 0.9rem;
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--gs-text-muted);
    border-bottom: 1px solid #f0f1f3;
    background: var(--gs-surface-2);
}
.dg-value {
    padding: 0.7rem 0.9rem;
    font-size: 0.83rem;
    border-bottom: 1px solid #f0f1f3;
    color: var(--gs-text-secondary);
}
.dg-label:last-of-type, .dg-value:last-of-type { border-bottom: none; }
.detail-grid a { color: var(--gs-accent); text-decoration: none; }
.detail-grid a:hover { text-decoration: underline; }

/* ========================================
   INFO BLOCK (Glassmorphism Cards)
   ======================================== */
.info-block {
    background: var(--gs-surface);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius);
    padding: 1.15rem;
    margin-bottom: 0.85rem;
    box-shadow: var(--gs-shadow);
    transition: all 0.3s ease;
}
.info-block:hover {
    box-shadow: var(--gs-shadow-md);
}
.info-block h4 {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--gs-text-muted);
    margin: 0 0 0.55rem 0;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.info-block p {
    font-size: 0.85rem;
    line-height: 1.65;
    margin: 0;
    color: var(--gs-text-secondary);
}
.info-block blockquote {
    border-left: 3px solid var(--gs-accent);
    padding-left: 0.85rem;
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--gs-text-secondary);
    font-style: normal;
}
.title-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: tc;
}
.title-list li {
    counter-increment: tc;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f1f3;
    font-size: 0.83rem;
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    color: var(--gs-text-secondary);
}
.title-list li:last-child { border-bottom: none; }
.title-list li::before {
    content: counter(tc);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gs-accent);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* ========================================
   TRANSCRIPT (Dark Theme)
   ======================================== */
.transcript-box {
    max-height: 600px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.78rem;
    line-height: 1.8;
    padding: 1.25rem;
    background: #1a1c23;
    color: rgba(255,255,255,0.82);
    border-radius: 0 0 var(--gs-radius) var(--gs-radius);
}
.transcript-box::-webkit-scrollbar { width: 6px; }
.transcript-box::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.transcript-box::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
.transcript-box::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ========================================
   NOTES
   ======================================== */
.notes-form textarea {
    background: var(--gs-surface-2);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius-sm);
    color: var(--gs-text);
    padding: 0.65rem 0.75rem;
    font-size: 0.83rem;
    width: 100%;
    resize: vertical;
    min-height: 72px;
    font-family: inherit;
}
.notes-form textarea:focus {
    border-color: var(--gs-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.notes-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

/* ========================================
   CHANNEL
   ======================================== */
.channel-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
}
.channel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.channel-dot.resolved { background: var(--gs-green); box-shadow: 0 0 6px rgba(5,150,105,0.3); }
.channel-dot.unresolved { background: var(--gs-red); box-shadow: 0 0 6px rgba(220,38,38,0.3); }

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--gs-text-muted);
}
.empty-state .empty-icon { margin-bottom: 0.4rem; opacity: 0.35; color: var(--gs-text-muted); }
.empty-state .empty-text { font-size: 0.85rem; }

/* ========================================
   HTMX
   ======================================== */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { display: inline-block; }
.spinner {
    width: 13px;
    height: 13px;
    border: 2px solid var(--gs-border);
    border-top-color: var(--gs-accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    text-align: center;
    padding: 1.5rem 1.75rem;
    color: var(--gs-text-dim);
    font-size: 0.72rem;
}

/* ========================================
   AUTO-POLL BAR
   ======================================== */
.auto-poll-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 1.1rem;
    background: var(--gs-surface-2);
    border-bottom: 1px solid var(--gs-border);
    animation: fadeIn 0.2s ease;
}
.auto-poll-bar.auto-poll-active {
    background: #ecfdf5;
    border-bottom-color: #a7f3d0;
}
.auto-poll-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    color: var(--gs-text-muted);
    font-weight: 500;
}
.auto-poll-info strong, .auto-poll-info > span {
    font-weight: 600;
    color: var(--gs-text-secondary);
    font-size: 0.76rem;
}
.auto-poll-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gs-text-dim);
    flex-shrink: 0;
}
.auto-poll-dot.active {
    background: var(--gs-green);
    box-shadow: 0 0 6px rgba(5, 150, 105, 0.4);
    animation: pulse 2s ease infinite;
}
.auto-poll-times {
    font-size: 0.7rem;
    color: var(--gs-text-muted);
    font-weight: 400;
}

/* ========================================
   REPORT CARDS
   ======================================== */
.report-card {
    background: var(--gs-surface);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius);
    padding: 1.15rem;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--gs-shadow);
}
.report-card:hover {
    box-shadow: var(--gs-shadow-md);
    border-color: var(--gs-border-hover);
    transform: translateY(-1px);
}
.report-card-body { flex: 1; min-width: 0; }
.report-card-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.report-card-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--gs-text);
    text-decoration: none;
}
.report-card-title:hover { color: var(--gs-accent); }
.report-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.73rem;
    color: var(--gs-text-muted);
    margin-bottom: 0.4rem;
}
.report-card-preview {
    font-size: 0.8rem;
    color: var(--gs-text-secondary);
    line-height: 1.55;
}
.report-card-actions { flex-shrink: 0; }

/* Report Detail */
.report-detail-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--gs-text-muted);
    margin-bottom: 0.75rem;
}
.report-detail-actions {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1rem;
}
.report-content {
    font-size: 0.88rem;
    line-height: 1.8;
    color: var(--gs-text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}
.report-nav-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Report Summary (dashboard) */
.report-summary-card { padding: 0; }
.report-summary-title { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.25rem; }
.report-summary-title a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gs-text);
    text-decoration: none;
}
.report-summary-title a:hover { color: var(--gs-accent); }
.report-summary-meta { font-size: 0.72rem; color: var(--gs-text-muted); margin-bottom: 0.4rem; }
.report-summary-preview { font-size: 0.8rem; color: var(--gs-text-secondary); line-height: 1.55; }

/* Trend Highlight */
.trend-highlight {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.1rem;
    border-radius: var(--gs-radius);
    background: var(--gs-accent-bg);
    border: 1px solid #c7d2fe;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease;
}
.trend-highlight-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gs-accent);
}
.trend-highlight-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gs-text-secondary);
}

/* ========================================
   REPORT FORM
   ======================================== */
.report-form .form-group { margin-bottom: 1rem; }
.report-form label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gs-text-secondary);
    margin-bottom: 0.35rem;
}
.report-form input[type="text"],
.report-form textarea {
    width: 100%;
    background: var(--gs-surface-2);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius-sm);
    color: var(--gs-text);
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
    font-family: inherit;
}
.report-form input[type="text"]:focus,
.report-form textarea:focus {
    border-color: var(--gs-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.report-form input[type="file"] { font-size: 0.82rem; color: var(--gs-text-secondary); }
.report-form .form-actions { display: flex; gap: 0.5rem; margin-top: 1.25rem; }

/* ========================================
   SEARCH PANEL
   ======================================== */
.search-panel {
    background: var(--gs-surface);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius);
    margin-bottom: 1.25rem;
    box-shadow: var(--gs-shadow);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}
.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
}
.search-form .btn { flex-shrink: 0; width: auto !important; }
.search-input-wrap {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--gs-surface-2);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius-sm);
    padding: 0.55rem 0.85rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input-wrap:focus-within {
    border-color: var(--gs-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.search-input-wrap svg { color: var(--gs-text-dim); flex-shrink: 0; }
.search-input-wrap input,
.search-input-wrap input[type="text"] {
    flex: 1;
    border: none !important;
    background: transparent !important;
    color: var(--gs-text);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-shadow: none !important;
    height: auto !important;
    line-height: normal;
    --pico-border-width: 0;
}
.search-input-wrap input::placeholder { color: var(--gs-text-dim); }
.search-panel #search-result:not(:empty) { padding: 0 0.85rem 0.75rem; font-size: 0.82rem; }
.search-result-notfound {
    color: var(--gs-text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.25rem;
}
.search-result-found { padding: 0.25rem 0; }
.search-hit {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid var(--gs-surface-hover);
}
.search-hit:last-child { border-bottom: none; }
.search-hit a {
    color: var(--gs-text);
    text-decoration: none;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-hit a:hover { color: var(--gs-accent); }

/* ========================================
   TWO COL
   ======================================== */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

/* ========================================
   LINKS
   ======================================== */
a { color: var(--gs-accent); }
a:hover { color: var(--gs-accent-hover); }

/* ========================================
   FORM OVERRIDES
   ======================================== */
select, input[type="search"], input[type="url"], input[type="text"], textarea {
    --pico-background-color: var(--gs-surface);
    --pico-border-color: var(--gs-border);
    --pico-color: var(--gs-text);
    color: var(--gs-text);
    margin-bottom: 0 !important;
}
html[data-theme="dark"] select,
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] textarea {
    background-color: var(--gs-surface);
    border-color: var(--gs-border);
    color: var(--gs-text);
}
html[data-theme="dark"] select option {
    background-color: var(--gs-surface);
    color: var(--gs-text);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Page content fade-in */
main.container > * {
    animation: fadeIn 0.35s ease;
}

/* Card list staggered fade-in */
.proposal-card, .report-card, .video-row {
    animation: fadeIn 0.3s ease backwards;
}
.proposal-card:nth-child(1), .report-card:nth-child(1) { animation-delay: 0s; }
.proposal-card:nth-child(2), .report-card:nth-child(2) { animation-delay: 0.04s; }
.proposal-card:nth-child(3), .report-card:nth-child(3) { animation-delay: 0.08s; }
.proposal-card:nth-child(4), .report-card:nth-child(4) { animation-delay: 0.12s; }
.proposal-card:nth-child(5), .report-card:nth-child(5) { animation-delay: 0.16s; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay.show {
        display: block;
    }
    .app-content {
        margin-left: 0;
    }
    .hamburger {
        display: flex;
    }
    main.container {
        padding: 1.25rem 1rem;
    }
}

@media (max-width: 768px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-grid { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; }
    .card-top { flex-direction: column; }
    .auto-poll-bar { flex-wrap: wrap; gap: 0.4rem; }
    .ops-actions { flex-direction: column; gap: 0.4rem; }
    .ops-actions .btn { width: 100%; justify-content: center; }
    .ops-divider { display: none; }
    .ops-url-form { min-width: 0; width: 100%; }
    .trend-highlight { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
    .report-card { flex-direction: column; }
    .hero-stats { flex-wrap: wrap; gap: 1rem; }
    .pill-tabs { flex-wrap: wrap; }
    .content-header { padding: 0 1rem; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar select, .filter-bar input[type="search"] { max-width: none !important; }
}

/* ── Guide Page ── */
.guide-steps { display: flex; flex-direction: column; gap: 0.75rem; }
.guide-step {
    display: flex; gap: 0.75rem; align-items: flex-start;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--gs-border);
}
.guide-step:last-child { border-bottom: none; }
.guide-step-num {
    display: flex; align-items: center; justify-content: center;
    min-width: 28px; height: 28px;
    background: var(--gs-accent); color: #fff;
    border-radius: 50%; font-size: 0.75rem; font-weight: 700;
}
.guide-step-content { flex: 1; }
.guide-step-title { font-weight: 600; font-size: 0.85rem; margin-bottom: 0.2rem; }
.guide-step-desc { font-size: 0.78rem; color: var(--gs-text-dim); line-height: 1.5; margin-top: 0.3rem; }
.guide-cmd {
    display: inline-block;
    background: var(--gs-bg-offset);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--gs-accent);
}

.guide-cycle { display: flex; flex-direction: column; align-items: center; gap: 0; }
.guide-cycle-step {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; padding: 0.6rem 1rem;
    width: 100%; max-width: 400px;
}
.guide-cycle-icon {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: var(--gs-bg-offset); border-radius: 50%;
    margin-bottom: 0.3rem; color: var(--gs-accent);
}
.guide-cycle-label { font-weight: 600; font-size: 0.85rem; }
.guide-cycle-desc { font-size: 0.75rem; color: var(--gs-text-dim); margin-top: 0.2rem; }
.guide-cycle-arrow { color: var(--gs-text-muted); padding: 0.1rem 0; }

/* ============================================
   Onboarding Wizard
   ============================================ */

.onboarding-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--gs-bg);
}

.onboarding-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.onboarding-logo {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--gs-accent);
    margin: 0;
}

.onboarding-subtitle {
    color: var(--gs-text-dim);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.onboarding-card {
    background: var(--gs-surface);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius);
    padding: 2rem;
    width: 100%;
    max-width: 520px;
    box-shadow: var(--gs-shadow);
}

.onboarding-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--gs-text);
}

.onboarding-desc {
    color: var(--gs-text-dim);
    font-size: 0.82rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.onboarding-input {
    font-size: 0.85rem !important;
    padding: 0.55rem 0.75rem !important;
    margin: 0 !important;
    border-radius: 8px !important;
}

.onboarding-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    border: 2px solid var(--gs-border);
    color: var(--gs-text-muted);
    transition: all 0.2s;
}

.step-dot.active {
    border-color: var(--gs-accent);
    background: var(--gs-accent);
    color: #fff;
}

.step-dot.done {
    border-color: var(--gs-green);
    background: var(--gs-green);
    color: #fff;
}

/* Channel Chips */
.channel-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.channel-input-group input { flex: 1; }

.channel-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-height: 2rem;
}

.channel-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--gs-bg-offset, var(--gs-surface-2));
    border: 1px solid var(--gs-border);
    border-radius: 20px;
    padding: 0.25rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gs-text);
}

.channel-chip.competitor {
    border-color: var(--gs-purple);
    background: rgba(124, 58, 237, 0.08);
}

.chip-remove {
    background: none;
    border: none;
    color: var(--gs-text-muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    margin: 0;
}

.chip-remove:hover { color: var(--gs-red); }

/* Mission Form */
.mission-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mission-form label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mission-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gs-text-dim);
}

/* Progress */
.setup-progress {
    padding: 1rem 0;
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background: var(--gs-border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gs-accent);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-message {
    font-size: 0.82rem;
    color: var(--gs-text-dim);
    margin-top: 0.75rem;
    text-align: center;
}

.progress-error {
    color: var(--gs-red);
    font-size: 0.82rem;
    margin-top: 0.5rem;
    text-align: center;
}

.progress-complete {
    color: var(--gs-green);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
    text-align: center;
}

/* Detail fold (details/summary) */
.detail-fold {
    margin-top: 1rem;
    border: 1px solid var(--gs-border);
    border-radius: 6px;
}

.detail-fold summary {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gs-text-secondary);
    cursor: pointer;
    padding: 0.6rem 0.75rem;
    user-select: none;
}

.detail-fold-body {
    padding: 0.25rem 0.75rem 0.75rem 1.25rem;
}
