/* ============================================
   ContentMAXXED — Premium Dark UI v3
   consulting.com aesthetic. Minimal. Intentional.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
    --bg-0: #0A0A0A;
    --bg-1: #111111;
    --bg-2: #171717;
    --bg-3: #1C1C1C;
    --bg-hover: #222222;
    --border: #2A2A2A;
    --border-light: #333333;

    --text-1: #FFFFFF;
    --text-2: #999999;
    --text-3: #666666;
    --text-4: #444444;

    --accent: #D4A853;
    --accent-dim: rgba(212, 168, 83, 0.08);
    --accent-border: rgba(212, 168, 83, 0.2);

    --info: #4A9EBF;
    --info-dim: rgba(74, 158, 191, 0.08);

    --green: #4ADE80;
    --green-dim: rgba(74, 222, 128, 0.06);
    --orange: #E8A040;
    --orange-dim: rgba(232, 160, 64, 0.06);
    --red: #EF4444;
    --red-dim: rgba(239, 68, 68, 0.06);
    --purple: #A78BFA;
    --purple-dim: rgba(167, 139, 250, 0.06);
    --blue: #60A5FA;
    --blue-dim: rgba(96, 165, 250, 0.06);

    --radius: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);

    --status-generated: #666; --status-generated-bg: rgba(102,102,102,0.08);
    --status-recorded: #4A9EBF; --status-recorded-bg: rgba(74,158,191,0.08);
    --status-edited: #E8A040; --status-edited-bg: rgba(232,160,64,0.08);
    --status-scheduled: #A78BFA; --status-scheduled-bg: rgba(167,139,250,0.08);
    --status-posted: #4ADE80; --status-posted-bg: rgba(74,222,128,0.08);
    --tier-s: #EF4444; --tier-a: #E8A040; --tier-b: #EAB308;
    --tier-c: #4ADE80; --tier-d: #60A5FA; --tier-f: #666;
}

body { font-family: var(--font); color: var(--text-1); background: var(--bg-0); line-height: 1.6; -webkit-font-smoothing: antialiased; }

a { color: var(--text-2); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: var(--text-1); }

/* ============================================
   NAVIGATION
   ============================================ */
.navbar { background: var(--bg-0); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 40px; height: 48px; display: flex; align-items: center; gap: 32px; }
.logo { font-weight: 500; font-size: 14px; color: var(--text-3); text-decoration: none; letter-spacing: 1.5px; text-transform: uppercase; }
.logo-accent { color: var(--text-1); font-weight: 800; }
.logo:hover { text-decoration: none; }

.nav-links { display: flex; gap: 0; margin-left: 8px; }
.nav-item { color: var(--text-3); font-size: 12px; font-weight: 500; text-decoration: none; padding: 14px 16px; transition: color 0.15s var(--ease); letter-spacing: 0.3px; }
.nav-item:hover { color: var(--text-2); text-decoration: none; }
.nav-active { color: var(--accent) !important; border-bottom-color: var(--accent); }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.org-badge { font-size: 11px; color: var(--text-3); letter-spacing: 0.3px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: default; }
.usage-badge { font-size: 11px; color: var(--text-4); }
.role-badge { font-size: 9px; font-weight: 600; padding: 3px 8px; border-radius: var(--radius); text-transform: uppercase; letter-spacing: 1px; border: 1px solid var(--border); color: var(--text-3); background: transparent; }
.role-creator, .role-editor, .role-admin, .role-superadmin { color: var(--text-3); }

.admin-toolbar { background: var(--bg-1); border-bottom: 1px solid var(--border); padding: 0 40px; height: 32px; }
.admin-toolbar-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 12px; height: 100%; }
.admin-toolbar-label { font-size: 9px; font-weight: 700; color: var(--accent); letter-spacing: 1.5px; background: var(--accent-dim); padding: 2px 6px; border-radius: 2px; }
.admin-toolbar-org { font-size: 11px; font-weight: 600; color: var(--text-2); }
.admin-toolbar-switcher { font-size: 10px; padding: 2px 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-0); color: var(--text-3); font-family: var(--font); cursor: pointer; outline: none; }
.admin-toolbar-exit { font-size: 10px; font-weight: 600; color: var(--text-4); margin-left: auto; letter-spacing: 0.3px; }
.admin-toolbar-exit:hover { color: var(--accent); }

/* Notifications */
.notif-bell { position: relative; cursor: pointer; padding: 4px; }
.notif-icon { font-size: 16px; opacity: 0.6; }
.notif-badge { position: absolute; top: -2px; right: -6px; font-size: 9px; font-weight: 800; color: var(--bg-0); background: var(--accent); padding: 1px 5px; border-radius: 8px; min-width: 16px; text-align: center; }
.notif-dropdown { position: absolute; top: 48px; right: 20px; width: 280px; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 8px 32px rgba(0,0,0,0.4); z-index: 200; overflow: hidden; }
.notif-dropdown-header { padding: 10px 14px; font-size: 11px; font-weight: 700; color: var(--text-4); text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--border); }
.notif-list { max-height: 240px; overflow-y: auto; }
.notif-item { display: block; padding: 10px 14px; font-size: 13px; color: var(--text-2); border-bottom: 1px solid var(--border); text-decoration: none; transition: background 0.15s; }
.notif-item:hover { background: var(--bg-2); text-decoration: none; }

.org-switcher-select { font-size: 11px; font-weight: 500; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--font); color: var(--text-3); background: var(--bg-0); cursor: pointer; outline: none; }

/* ============================================
   LAYOUT
   ============================================ */
.container { max-width: 920px; margin: 0 auto; padding: 56px 40px 100px; }

/* ============================================
   BUTTONS
   ============================================ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; border-radius: var(--radius); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s var(--ease); padding: 11px 24px; font-family: var(--font); text-decoration: none; letter-spacing: 0.02em; }
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent); color: var(--bg-0); font-weight: 700; }
.btn-primary:hover { background: #C09540; }
.btn-primary:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }

.btn-coral { background: var(--accent); color: var(--bg-0); font-weight: 700; }

.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-2); }
.btn-outline:hover { border-color: var(--border-light); color: var(--text-1); }

.btn-ghost { background: transparent; color: var(--text-3); padding: 8px 12px; font-size: 12px; }
.btn-ghost:hover { color: var(--text-2); }

.btn-lg { padding: 13px 32px; font-size: 14px; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-full { width: 100%; }

/* ============================================
   HERO & LANDING
   ============================================ */
.hero { text-align: center; padding: 140px 0 100px; }
.hero h1 { font-size: 52px; font-weight: 900; line-height: 1.05; letter-spacing: -2.5px; margin-bottom: 24px; }
.hero-sub { font-size: 16px; color: var(--text-3); margin-bottom: 48px; line-height: 1.7; letter-spacing: 0.2px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; }

/* ============================================
   AUTH
   ============================================ */
.auth-card { max-width: 360px; margin: 100px auto; }
.auth-card h2 { font-size: 32px; font-weight: 800; margin-bottom: 4px; letter-spacing: -1px; }
.auth-sub { color: var(--text-3); margin-bottom: 36px; font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.auth-form label { font-size: 10px; font-weight: 600; color: var(--text-4); text-transform: uppercase; letter-spacing: 1.5px; }
.auth-form input[type="email"], .auth-form input[type="password"] { padding: 13px 16px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; font-family: var(--font); outline: none; transition: border-color 0.15s var(--ease); background: var(--bg-3); color: var(--text-1); }
.auth-form input:focus { border-color: var(--accent-border); }
.auth-form .btn { margin-top: 4px; }
.auth-footer { margin-top: 28px; font-size: 13px; color: var(--text-3); }
.form-error { color: var(--red); font-size: 12px; }

/* ============================================
   PAGE STRUCTURE
   ============================================ */
.page-header { margin-bottom: 48px; }
.page-header h1 { font-size: 36px; font-weight: 800; letter-spacing: -1px; }
.text-muted { color: var(--text-3); font-size: 13px; }
.text-link { font-size: 13px; font-weight: 500; color: var(--accent); }
.back-link { font-size: 10px; color: var(--text-4); display: inline-block; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.back-link:hover { color: var(--text-3); }

.section { margin-bottom: 56px; }
.section-title { font-weight: 600; color: var(--text-4); text-transform: uppercase; letter-spacing: 1.5px; font-size: 10px; margin-bottom: 24px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }

/* ============================================
   ALERTS & ERRORS
   ============================================ */
.alert { padding: 16px 20px; border-radius: var(--radius-md); margin-bottom: 28px; font-size: 13px; display: flex; align-items: center; gap: 12px; }
.alert-info { background: var(--bg-2); border: 1px solid var(--border); color: var(--text-2); }
.error-box { padding: 16px 20px; border-radius: var(--radius-md); background: var(--red-dim); border: 1px solid rgba(239,68,68,0.1); color: var(--red); margin: 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.error-box p { margin: 0; font-size: 13px; font-weight: 500; flex: 1; }
.profile-block-banner { text-align: center; padding: 64px 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); margin: 28px 0; background: var(--bg-1); }
.profile-block-banner h3 { font-size: 18px; margin-bottom: 8px; font-weight: 700; }
.profile-block-banner p { font-size: 13px; color: var(--text-3); margin-bottom: 28px; }

/* ============================================
   DASHBOARD
   ============================================ */
.dash-hero { margin-bottom: 56px; }
.dash-hero h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.7px; }
.dash-subtitle { color: var(--text-3); font-size: 14px; margin-top: 6px; }
.dash-stats-row { display: flex; gap: 20px; margin-top: 16px; }
.dash-stat { font-size: 12px; color: var(--text-3); }
.dash-stat-num { font-weight: 800; color: var(--text-1); font-size: 13px; margin-right: 2px; }

.dash-alert { display: flex; align-items: center; gap: 20px; padding: 18px 24px; border-radius: var(--radius-md); background: var(--bg-2); border: 1px solid var(--border); margin-bottom: 48px; }
.dash-alert-icon { font-size: 18px; opacity: 0.6; }
.dash-alert strong { font-size: 14px; display: block; margin-bottom: 2px; }
.dash-alert p { font-size: 12px; color: var(--text-3); margin: 0; }

.dash-format-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.dash-format-card { border: 1px solid #333; border-radius: var(--radius-lg); text-decoration: none; color: var(--text-1); transition: all 0.2s var(--ease); background: #1A1A1A; overflow: hidden; display: flex; flex-direction: column; }
.dash-format-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.dash-format-preview { height: 80px; display: flex; align-items: center; justify-content: center; }
.dash-format-big-icon { font-size: 32px; }
.dash-format-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.dash-format-name { font-weight: 700; font-size: 15px; margin-bottom: 6px; color: #FFFFFF; }
.dash-format-desc { font-size: 11px; color: #999; margin-bottom: 10px; line-height: 1.5; flex: 1; }
.dash-format-badge { font-size: 10px; color: #666; letter-spacing: 0.2px; }

.smart-start-row { display: flex; gap: 10px; flex-wrap: wrap; }
.smart-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--bg-1); color: var(--text-3); font-size: 12px; font-weight: 500; text-decoration: none; transition: all 0.15s var(--ease); }
.smart-btn:hover { border-color: var(--border-light); color: var(--text-2); text-decoration: none; }
.smart-icon { font-size: 13px; }

.empty-hero { text-align: center; padding: 72px 20px; }
.empty-hero-icon { font-size: 32px; margin-bottom: 20px; opacity: 0.3; }
.empty-hero h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.empty-hero p { color: var(--text-3); font-size: 14px; }

.format-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.format-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 16px; text-align: center; text-decoration: none; color: var(--text-1); transition: all 0.15s var(--ease); background: var(--bg-1); }
.format-card--active { cursor: pointer; }
.format-card--active:hover { border-color: var(--accent-border); text-decoration: none; }
.format-icon { font-size: 24px; margin-bottom: 8px; opacity: 0.6; }
.format-name { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.format-desc { font-size: 11px; color: var(--text-3); }

/* ============================================
   SCRIPT CARDS
   ============================================ */
.script-list { display: flex; flex-direction: column; gap: 0; }
.script-card { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text-1); transition: all 0.15s var(--ease); }
.script-card:first-child { padding-top: 0; }
.script-card:hover { opacity: 0.8; text-decoration: none; }
.script-card-topic { font-weight: 600; font-size: 14px; }
.script-card-meta { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.script-card-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.script-card-date { font-size: 11px; color: var(--text-4); }

/* ============================================
   STATUS
   ============================================ */
.status-badge { font-size: 9px; font-weight: 600; padding: 3px 8px; border-radius: var(--radius); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.8px; }
.status-generating { color: var(--accent); background: var(--accent-dim); display: inline-flex; align-items: center; gap: 4px; }
.status-failed { color: var(--red); background: rgba(239,68,68,0.08); }
.status-generated { color: var(--status-generated); background: var(--status-generated-bg); }
.status-recorded { color: var(--status-recorded); background: var(--status-recorded-bg); }
.status-edited { color: var(--status-edited); background: var(--status-edited-bg); }
.status-scheduled { color: var(--status-scheduled); background: var(--status-scheduled-bg); }
.status-posted { color: var(--status-posted); background: var(--status-posted-bg); }
.status-select { font-size: 12px; font-weight: 500; padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--border); font-family: var(--font); cursor: pointer; outline: none; background: var(--bg-3); color: var(--text-2); }

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 28px; }
.form-group label { display: block; font-size: 10px; font-weight: 600; margin-bottom: 10px; color: var(--text-4); text-transform: uppercase; letter-spacing: 1.5px; }
.form-row { display: flex; gap: 20px; }
.input-lg { width: 100%; padding: 13px 16px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; font-family: var(--font); outline: none; transition: border-color 0.15s var(--ease); background: var(--bg-3); color: var(--text-1); }
.input-lg:focus { border-color: var(--accent-border); }
.input-sm { padding: 9px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 12px; font-family: var(--font); outline: none; background: var(--bg-3); color: var(--text-1); }
.input-sm:focus { border-color: var(--accent-border); }
.input-hint { font-size: 11px; color: var(--text-4); margin-top: 8px; display: block; }
textarea { width: 100%; padding: 13px 16px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; font-family: var(--font); outline: none; resize: vertical; transition: border-color 0.15s var(--ease); line-height: 1.7; background: var(--bg-3); color: var(--text-1); }
textarea:focus { border-color: var(--accent-border); }
select { padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 12px; font-family: var(--font); outline: none; background: var(--bg-3); color: var(--text-1); width: 100%; }

/* ============================================
   GENERATION FORM
   ============================================ */
.gen-section { margin-bottom: 36px; }
.gen-section-label { font-size: 10px; font-weight: 600; color: var(--text-4); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 14px; }

.format-row { display: flex; gap: 6px; flex-wrap: wrap; }
.fmt-card { padding: 9px 18px; border: 1px solid #444; border-radius: var(--radius); cursor: pointer; font-size: 13px; font-weight: 600; transition: all 0.15s var(--ease); display: flex; align-items: center; gap: 6px; background: #1E1E1E; color: #CCC; }
.fmt-card:hover { border-color: #666; color: #FFF; background: #252525; }
.fmt-selected, .fmt-on { border-color: var(--accent); background: var(--accent); color: var(--bg-0); }
.fmt-selected:hover, .fmt-on:hover { background: #C09540; }

/* Multi-select pills */
.ms-pill { display: inline-block; padding: 9px 18px; border: 1px solid #444; border-radius: var(--radius); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s var(--ease); background: #1E1E1E; color: #CCC; user-select: none; }
.ms-pill:hover { border-color: #666; color: #FFF; background: #252525; }
.ms-on { background: var(--accent); color: var(--bg-0); border-color: var(--accent); font-weight: 700; }
.ms-on:hover { background: #C09540; }
.fmt-icon { font-size: 14px; }

.pill-row, .tone-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill, .tone-pill { cursor: pointer; }
.pill input, .tone-pill input { display: none; }
.pill span, .tone-pill span { display: inline-block; padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 12px; font-weight: 500; transition: all 0.15s var(--ease); user-select: none; background: var(--bg-2); color: var(--text-3); }
.pill input:checked + span, .tone-pill input:checked + span { background: var(--accent); color: var(--bg-0); border-color: var(--accent); font-weight: 600; }
.pill span:hover, .tone-pill span:hover { border-color: var(--border-light); color: var(--text-2); }

.brand-voice-preview { font-size: 12px; color: var(--text-4); margin-bottom: 12px; }

.funnel-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.funnel-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; cursor: pointer; transition: all 0.15s var(--ease); text-align: center; background: var(--bg-1); }
.funnel-card:hover { border-color: var(--border-light); }
.funnel-selected { border-color: var(--accent); }
.funnel-tag { font-size: 9px; font-weight: 700; letter-spacing: 1.2px; padding: 3px 10px; border-radius: var(--radius); display: inline-block; margin-bottom: 8px; text-transform: uppercase; }
.funnel-tofu { background: var(--blue-dim); color: var(--blue); }
.funnel-mofu { background: var(--orange-dim); color: var(--orange); }
.funnel-bofu { background: var(--green-dim); color: var(--green); }
.funnel-title { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.funnel-desc { font-size: 11px; color: var(--text-3); }

.cta-row { display: flex; gap: 10px; align-items: center; }

.settings-tabs, .topic-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab-btn { padding: 12px 20px; font-size: 12px; font-weight: 600; border: none; background: none; color: var(--text-4); cursor: pointer; border-bottom: 2px solid transparent; font-family: var(--font); transition: color 0.15s var(--ease); letter-spacing: 0.3px; }
.tab-btn:hover { color: var(--text-2); }
.tab-active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-content { animation: fadeIn 0.2s var(--ease); }

.ideas-grid-simple { display: flex; flex-direction: column; gap: 4px; }
.idea-chip { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all 0.15s var(--ease); background: var(--bg-1); }
.idea-chip:hover { border-color: var(--border-light); }
.idea-chip-on { border-color: var(--accent); background: var(--accent-dim); }
.idea-chip-check { width: 16px; height: 16px; border: 1px solid var(--border-light); border-radius: 3px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; transition: all 0.15s var(--ease); }
.idea-chip-on .idea-chip-check { background: var(--accent); border-color: var(--accent); color: var(--bg-0); }
.idea-chip-on .idea-chip-check::after { content: '\2713'; font-weight: 800; }
.idea-chip-text { font-size: 13px; font-weight: 500; color: var(--text-2); }

.strategist-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.select-all-toggle { font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text-3); }
.gen-bottom-bar { margin-top: 44px; }

.mode-toggle { display: flex; gap: 0; margin-bottom: 20px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; width: fit-content; }
.mode-btn { padding: 8px 20px; font-size: 12px; font-weight: 600; border: none; background: var(--bg-2); color: var(--text-3); cursor: pointer; font-family: var(--font); transition: all 0.15s var(--ease); }
.mode-btn:hover { color: var(--text-2); }
.mode-active { background: var(--accent); color: var(--bg-0); }
.batch-textarea { font-family: var(--font); font-size: 13px; line-height: 1.8; }

.topics-selected-bar { padding: 12px 0; margin: 8px 0 4px; font-size: 13px; color: var(--accent); font-weight: 600; }
.config-divider { text-align: center; margin: 32px 0 28px; position: relative; }
.config-divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--border); }
.config-divider span { background: var(--bg-0); padding: 0 20px; position: relative; color: var(--text-4); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; }
.divider-or { text-align: center; margin: 40px 0; position: relative; }
.divider-or::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--border); }
.divider-or span { background: var(--bg-0); padding: 0 20px; position: relative; color: var(--text-4); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; }

.surprise-box { padding: 36px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-1); text-align: center; }
.surprise-icon { font-size: 28px; margin-bottom: 16px; opacity: 0.4; }
.surprise-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.surprise-options { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.qty-row { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.qty-btn { width: 48px; height: 38px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); color: var(--text-3); font-weight: 700; font-size: 13px; cursor: pointer; transition: all 0.15s var(--ease); font-family: var(--font); }
.qty-btn:hover { border-color: var(--border-light); color: var(--text-2); }
.qty-active { background: var(--accent); color: var(--bg-0); border-color: var(--accent); }

/* ============================================
   LOADING
   ============================================ */
.loading-state { text-align: center; padding: 56px 0; color: var(--text-3); font-size: 13px; }
.loading-sm { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 24px 0; }
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--text-3); border-radius: 50%; margin: 0 auto 14px; animation: spin 0.8s linear infinite; }
.spinner-sm { width: 14px; height: 14px; border-width: 2px; margin: 0; }
.spinner-inline { width: 12px; height: 12px; border: 2px solid var(--border); border-top-color: var(--text-3); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   CONTENT SECTIONS (Script Detail)
   ============================================ */
.content-section { border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 10px; overflow: hidden; background: var(--bg-1); }
.content-section-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.content-section-header h3 { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-4); }
.content-body { padding: 18px; font-size: 14px; line-height: 1.7; color: var(--text-2); }
.content-hook { font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--text-1); }
.content-controversy { font-style: italic; color: var(--text-2); }

.tier-row { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.tier-row:last-child { border-bottom: none; }
.tier-badge { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); font-weight: 900; font-size: 13px; color: white; flex-shrink: 0; }
.tier-s .tier-badge { background: var(--tier-s); } .tier-a .tier-badge { background: var(--tier-a); }
.tier-b .tier-badge { background: var(--tier-b); } .tier-c .tier-badge { background: var(--tier-c); }
.tier-d .tier-badge { background: var(--tier-d); } .tier-f .tier-badge { background: var(--tier-f); }
.tier-content { flex: 1; } .tier-content strong { display: block; font-size: 14px; }
.tier-reason { font-size: 12px; color: var(--text-3); }

.step-row { padding: 14px 0; border-bottom: 1px solid var(--border); display: flex; gap: 14px; align-items: flex-start; }
.step-row:last-child { border-bottom: none; }
.step-num { width: 24px; height: 24px; background: var(--accent); color: var(--bg-0); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11px; flex-shrink: 0; }
.step-content { flex: 1; } .step-content strong { display: block; margin-bottom: 4px; font-size: 14px; }
.step-content p { margin: 0; color: var(--text-3); font-size: 13px; }
.pro-tip { font-size: 12px; color: var(--orange); margin-top: 8px; padding: 8px 12px; background: var(--orange-dim); border-radius: var(--radius); }

.copy-btn { font-size: 10px; font-weight: 600; color: var(--text-4); background: transparent; border: 1px solid var(--border); border-radius: var(--radius); padding: 3px 10px; cursor: pointer; transition: all 0.15s var(--ease); font-family: var(--font); letter-spacing: 0.3px; }
.copy-btn:hover { border-color: var(--border-light); color: var(--text-3); }
.copy-btn.copied { color: var(--green); border-color: rgba(74,222,128,0.2); }
.copy-btn-sm { font-size: 9px; padding: 2px 8px; }

/* Options */
.option-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.option-row:last-child { border-bottom: none; }
.option-num { font-weight: 800; color: var(--text-4); font-size: 12px; }
.option-text { flex: 1; font-size: 14px; color: var(--text-2); }

/* Script teleprompter */
.script-teleprompter { border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 16px; background: var(--bg-1); overflow: hidden; }
.script-teleprompter-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; background: var(--bg-2); border-bottom: 1px solid var(--border); font-size: 10px; font-weight: 600; color: var(--text-4); text-transform: uppercase; letter-spacing: 1.2px; }
.script-teleprompter-body { padding: 24px; font-size: 16px; line-height: 1.8; color: var(--text-2); }
.script-teleprompter-body strong { color: var(--text-1); font-weight: 700; }
.teleprompter-line { margin: 0 0 1.4em; }
.teleprompter-line:last-child { margin-bottom: 0; }
.teleprompter-emphasis strong { font-size: 1.15em; }

/* Streaming state — subtle amber pulse on the frame while rewriting live */
.teleprompter-streaming {
    position: relative;
    animation: streamPulse 1.6s ease-in-out infinite;
}
.teleprompter-streaming::after {
    content: '✨ rewriting…';
    position: absolute;
    top: 8px;
    right: 14px;
    padding: 4px 10px;
    border-radius: 10px;
    background: rgba(212, 168, 83, 0.15);
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
}
@keyframes streamPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 168, 83, 0); }
    50% { box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.12); }
}

/* Headlines */
.script-headlines { margin-bottom: 16px; }
.script-headline-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.script-headline-row:last-child { border-bottom: none; }

/* Editing notes — green-tinted distinct box */
.script-editing-notes { border: 1px solid #1E3A1E; border-radius: var(--radius-lg); margin-bottom: 16px; background: #121E12; overflow: hidden; }
.script-editing-notes-header { padding: 10px 18px; background: #162016; border-bottom: 1px solid #1E3A1E; font-size: 10px; font-weight: 600; color: #5A9E5A; text-transform: uppercase; letter-spacing: 1.2px; }
.script-editing-notes-body { padding: 18px; font-size: 13px; line-height: 1.7; color: #8CB88C; }

.meta-grid { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 16px; }
.meta-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; background: var(--bg-1); }
.meta-label { font-size: 9px; font-weight: 600; color: var(--text-4); text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 6px; }
.meta-value { font-size: 28px; font-weight: 900; color: var(--text-1); }
.meta-value-sm { font-size: 13px; font-weight: 400; line-height: 1.6; color: var(--text-3); }

.detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.assign-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 28px; padding: 14px 18px; background: var(--bg-1); border-radius: var(--radius-md); border: 1px solid var(--border); }
.result-area { margin-top: 28px; animation: fadeIn 0.3s var(--ease); }
.result-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }

/* ============================================
   SETTINGS & FORMS
   ============================================ */
.settings-form { max-width: 600px; }
.settings-section { margin-bottom: 36px; }
.settings-section-header { margin-bottom: 10px; }
.settings-section-header h3 { font-size: 15px; font-weight: 700; }
.save-status { padding: 10px 0; font-size: 13px; font-weight: 500; }
.save-success { color: var(--green); }
.save-error { color: var(--red); }

/* ============================================
   STATS
   ============================================ */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 48px; }
.stat-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; text-align: center; background: var(--bg-1); position: relative; overflow: hidden; }
.stat-card::after { content: ''; position: absolute; bottom: 0; left: 20%; right: 20%; height: 2px; background: var(--accent); opacity: 0.15; border-radius: 1px; }
.stat-value { font-size: 48px; font-weight: 900; color: var(--text-1); letter-spacing: -2px; line-height: 1; }
.stat-label { font-size: 9px; color: var(--text-4); margin-top: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; }

/* ============================================
   LIBRARY / KNOWLEDGE BASE
   ============================================ */
.add-transcript-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; margin-bottom: 36px; background: var(--bg-1); }
.add-transcript-card h3 { font-size: 14px; font-weight: 600; }
.add-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.add-header:hover h3 { color: var(--text-2); }
.transcript-list { display: flex; flex-direction: column; gap: 8px; }
.transcript-card-full { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; background: var(--bg-1); cursor: pointer; transition: all 0.15s var(--ease); }
.transcript-card-full:hover { border-color: var(--accent-border); }
.transcript-card-full .transcript-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.transcript-card-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.transcript-summary { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 8px; }
.transcript-preview { font-size: 12px; color: var(--text-4); line-height: 1.5; }
.transcript-analysis { font-size: 12px; line-height: 1.6; margin-bottom: 8px; padding: 10px 14px; background: var(--bg-2); border-radius: var(--radius); }
.transcript-analysis strong { color: var(--text-2); }
.transcript-full { font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; background: var(--bg-0); padding: 14px; border-radius: var(--radius); max-height: 300px; overflow-y: auto; font-family: var(--font); color: var(--text-3); }
.format-tag-sm { font-size: 9px; background: var(--bg-2); padding: 3px 8px; border-radius: var(--radius); color: var(--info); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.virality-badge { font-size: 10px; font-weight: 700; color: var(--orange); background: var(--orange-dim); padding: 3px 8px; border-radius: var(--radius); }

.library-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding: 14px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 10px; }
.library-count { font-size: 11px; color: var(--text-4); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.library-filters { display: flex; gap: 6px; flex-wrap: wrap; }

.analysis-card { margin-top: 20px; padding: 18px; border: 1px solid rgba(74,222,128,0.1); border-radius: var(--radius-lg); background: var(--green-dim); }
.analysis-card h4 { margin-bottom: 10px; color: var(--green); font-weight: 700; font-size: 13px; }
.analysis-row { font-size: 12px; margin-bottom: 8px; line-height: 1.6; color: var(--text-3); }

.import-steps { padding: 16px 0; }
.import-step { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 12px; color: var(--text-3); }
.import-step-icon { font-size: 13px; width: 20px; text-align: center; }

.invite-form { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-1); }
.invite-form h3 { font-size: 13px; font-weight: 600; }

/* Knowledge Base */
.kb-stats-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.kb-sources-section { margin-top: 20px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-1); }
.kb-sources-label { font-size: 10px; font-weight: 600; color: var(--text-4); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
.kb-sources-list { display: flex; gap: 6px; flex-wrap: wrap; }
.kb-source-chip { font-size: 10px; font-weight: 600; color: var(--purple); background: var(--purple-dim); padding: 3px 10px; border-radius: var(--radius); }

/* ============================================
   MODAL
   ============================================ */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.75); }
.modal-content { position: relative; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-lg); max-width: 640px; width: 90%; max-height: 85vh; overflow-y: auto; padding: 32px; }
.modal-content-sm { max-width: 380px; }
.modal-content-sm p { font-size: 14px; line-height: 1.6; color: var(--text-2); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.modal-header h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.modal-footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.detail-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }

/* ============================================
   CALENDAR
   ============================================ */
.calendar-controls { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.calendar-controls h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.calendar-filters { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-pill { display: flex; align-items: center; gap: 6px; font-size: 11px; cursor: pointer; user-select: none; color: var(--text-3); }
.filter-pill input { display: none; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.status-dot-generated { background: var(--status-generated); } .status-dot-recorded { background: var(--status-recorded); }
.status-dot-edited { background: var(--status-edited); } .status-dot-scheduled { background: var(--status-scheduled); }
.status-dot-posted { background: var(--status-posted); }
.filter-pill input:not(:checked) ~ * { opacity: 0.25; }

.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.cal-header { background: var(--bg-2); padding: 10px; text-align: center; font-size: 9px; font-weight: 600; color: var(--text-4); text-transform: uppercase; letter-spacing: 1px; }
.cal-day { background: var(--bg-1); min-height: 88px; padding: 6px; }
.cal-day-empty { background: var(--bg-0); }
.cal-day-today { background: var(--accent-dim); }
.cal-day-dragover { outline: 1px dashed var(--accent); outline-offset: -1px; }
.cal-day-num { font-size: 11px; font-weight: 700; color: var(--text-4); margin-bottom: 4px; }
.cal-chip { display: block; font-size: 9px; padding: 2px 5px; border-radius: 2px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: grab; text-decoration: none; color: white; font-weight: 600; }
.cal-chip.status-generated { background: var(--status-generated); } .cal-chip.status-recorded { background: var(--status-recorded); }
.cal-chip.status-edited { background: var(--status-edited); } .cal-chip.status-scheduled { background: var(--status-scheduled); }
.cal-chip.status-posted { background: var(--status-posted); }
.cal-chip.dragging { opacity: 0.4; }

/* ============================================
   BATCH / SCRAPER PROGRESS
   ============================================ */
.batch-tracker { margin-top: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-1); }
.batch-tracker-header, .scraper-progress-header { padding: 20px; border-bottom: 1px solid var(--border); }
.batch-tracker-header h3, .scraper-progress-header h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.batch-progress-bar { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
.batch-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.4s var(--ease); }
.batch-progress-text { font-size: 11px; color: var(--text-4); }
.batch-failed-count { color: var(--red); }
.batch-items { max-height: 420px; overflow-y: auto; }
.batch-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--border); transition: background 0.15s var(--ease); }
.batch-item:last-child { border-bottom: none; }
.batch-item-generating { background: var(--accent-dim); }
.batch-item-done { background: var(--green-dim); }
.batch-item-failed { background: var(--red-dim); }
.batch-item-topic { font-size: 13px; font-weight: 500; flex: 1; margin-right: 12px; color: var(--text-2); }
.batch-item-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.bi-status { font-size: 9px; font-weight: 600; padding: 3px 8px; border-radius: var(--radius); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.8px; }
.bi-pending { color: var(--text-4); background: var(--bg-3); }
.bi-generating { color: var(--text-2); background: var(--accent-dim); display: flex; align-items: center; gap: 6px; }
.bi-done { color: var(--green); background: var(--green-dim); }
.bi-failed { color: var(--red); background: var(--red-dim); }
.batch-summary { text-align: center; padding: 44px 20px; margin-top: 28px; border: 1px solid rgba(74,222,128,0.1); border-radius: var(--radius-lg); background: var(--green-dim); }
.batch-summary-icon { font-size: 24px; margin-bottom: 8px; opacity: 0.6; }
.batch-summary h3 { font-size: 18px; font-weight: 800; color: var(--green); margin-bottom: 4px; }
.batch-summary-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }
.batch-bar { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: var(--accent-dim); border: 1px solid var(--accent-border); border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; }

/* ============================================
   TRANSCRIPT CARDS (Global Library)
   ============================================ */
.t-card { display: flex; gap: 14px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-2); margin-bottom: 12px; cursor: pointer; transition: all 0.15s var(--ease); }
.t-card:hover { border-color: var(--accent-border); }
.t-card-left { flex-shrink: 0; padding-top: 2px; }
.t-checkbox { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }
.t-card-body { flex: 1; min-width: 0; }
.t-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; gap: 12px; }
.t-card-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.t-card-title-row strong { font-size: 14px; color: var(--text-1); }
.t-format-tag { font-size: 9px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius); text-transform: uppercase; letter-spacing: 0.8px; border: 1px solid; background: transparent; }
.t-rating { font-size: 13px; font-weight: 800; color: var(--orange); }
.t-card-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.t-date { font-size: 11px; color: var(--text-4); }
.t-delete-btn { width: 24px; height: 24px; border: none; background: transparent; color: var(--text-4); font-size: 14px; cursor: pointer; border-radius: var(--radius); transition: all 0.15s var(--ease); display: flex; align-items: center; justify-content: center; }
.t-delete-btn:hover { background: var(--red-dim); color: var(--red); }
.t-metrics { display: flex; gap: 14px; margin-bottom: 8px; }
.t-metric { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 3px; font-weight: 600; }
.t-metric-icon { font-size: 11px; opacity: 0.7; }
.t-summary { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 6px; }
.t-preview { font-size: 12px; color: #AAAAAA; line-height: 1.5; }

/* Detail stats bar */
.detail-stats-bar { display: flex; gap: 20px; padding: 16px 0; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.detail-stat { text-align: center; }
.detail-stat-val { font-size: 20px; font-weight: 800; color: var(--text-1); }
.detail-stat-label { font-size: 9px; font-weight: 600; color: var(--text-4); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }

.bulk-bar { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 16px; font-size: 13px; color: var(--text-2); }

/* ============================================
   REELS GRID (Library)
   ============================================ */
.reels-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.reel-card { position: relative; aspect-ratio: 9/16; border-radius: var(--radius-md); overflow: hidden; cursor: pointer; background: var(--bg-2); transition: transform 0.2s var(--ease); }
.reel-card:hover { transform: scale(1.03); z-index: 2; }

/* Background — thumbnail or styled fallback */
.reel-card-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.reel-card-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; text-align: center; }
.reel-card-fallback-icon { font-size: 28px; margin-bottom: 10px; opacity: 0.4; }
.reel-card-fallback-title { font-size: 13px; font-weight: 700; color: var(--text-1); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* Gradient overlays */
.reel-card-top { position: absolute; top: 0; left: 0; right: 0; padding: 8px 10px; display: flex; justify-content: space-between; background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%); z-index: 1; }
.reel-card-bottom { position: absolute; bottom: 0; left: 0; right: 0; padding: 10px; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%); z-index: 1; }

/* Badges */
.reel-badge { font-size: 8px; font-weight: 700; padding: 2px 6px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.5px; backdrop-filter: blur(4px); }
.reel-badge-format { background: rgba(212,168,83,0.3); color: var(--accent); }
.reel-badge-tier_list { background: rgba(212,168,83,0.3); color: #D4A853; }
.reel-badge-educational { background: rgba(74,158,191,0.3); color: #4A9EBF; }
.reel-badge-step_by_step { background: rgba(74,222,128,0.3); color: #4ADE80; }
.reel-badge-talking_head { background: rgba(167,139,250,0.3); color: #A78BFA; }
.reel-badge-viral_trend { background: rgba(239,68,68,0.3); color: #EF4444; }
.reel-badge-funnel { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); }

/* Bottom stats */
.reel-stats { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.reel-stat { font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.9); display: flex; align-items: center; gap: 3px; }
.reel-stat-icon { font-size: 10px; opacity: 0.7; }
.reel-virality { font-size: 12px; font-weight: 800; color: var(--accent); }
.reel-title-sm { font-size: 11px; color: rgba(255,255,255,0.6); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Checkbox */
.reel-check { position: absolute; top: 8px; left: 8px; z-index: 3; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.4); border-radius: 4px; background: rgba(0,0,0,0.3); cursor: pointer; opacity: 0; transition: opacity 0.15s; display: flex; align-items: center; justify-content: center; font-size: 11px; color: white; backdrop-filter: blur(4px); }
.reel-card:hover .reel-check { opacity: 1; }
.reel-check.checked { opacity: 1; background: var(--accent); border-color: var(--accent); color: var(--bg-0); }

/* Bulk action bar */
.bulk-float { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 8px 32px rgba(0,0,0,0.5); z-index: 50; font-size: 13px; }

/* Detail modal — two column */
.reel-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.reel-detail-left { }
.reel-detail-video { width: 100%; aspect-ratio: 9/16; border-radius: var(--radius-md); overflow: hidden; background: var(--bg-0); }
.reel-detail-video video { width: 100%; height: 100%; object-fit: cover; }
.reel-detail-video iframe { width: 100%; height: 100%; border: none; }
.reel-detail-thumb { width: 100%; aspect-ratio: 9/16; border-radius: var(--radius-md); background-size: cover; background-position: center; background-color: var(--bg-2); }
.reel-detail-right { overflow-y: auto; max-height: 80vh; }
.reel-detail-right h2 { font-size: 18px; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.3px; }

/* Filter pills row */
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.filter-chip { font-size: 12px; font-weight: 600; padding: 7px 16px; border: 1px solid #444; border-radius: var(--radius); cursor: pointer; transition: all 0.15s var(--ease); background: #1E1E1E; color: #CCC; user-select: none; }
.filter-chip:hover { border-color: #666; color: #FFF; background: #252525; }
.filter-chip-on { background: var(--accent); color: var(--bg-0); border-color: var(--accent); }

/* Scraper */
.scraper-form { padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-1); margin-bottom: 36px; }

/* ============================================
   TOAST
   ============================================ */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 20px; border-radius: var(--radius); font-size: 13px; font-weight: 500; animation: slideIn 0.2s var(--ease); }
.toast-success { background: var(--bg-1); color: var(--green); border: 1px solid rgba(74,222,128,0.1); }
.toast-error { background: var(--bg-1); color: var(--red); border: 1px solid rgba(239,68,68,0.1); }
@keyframes slideIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }

/* ============================================
   EMPTY / ANIMATIONS
   ============================================ */
.empty-state { text-align: center; padding: 64px 0; color: var(--text-4); }
.empty-state p { margin-bottom: 16px; font-size: 14px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 168, 83, 0); }
    50% { box-shadow: 0 0 16px 2px rgba(212, 168, 83, 0.15); }
}
.btn-pulse { animation: pulseGlow 2.5s ease-in-out infinite; }
.btn-pulse:active, .btn-pulse:disabled { animation: none; }

/* ============================================
   FUNNEL V2 (rich cards)
   ============================================ */
.funnel-row-v2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.funnel-card-v2 {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 20px 20px;
    cursor: pointer;
    transition: all 0.18s var(--ease);
    background: var(--bg-1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}
.funnel-card-v2:hover { border-color: var(--border-light); transform: translateY(-1px); }
.funnel-card-v2.funnel-selected { border-color: var(--accent); background: var(--bg-2); box-shadow: 0 0 0 1px var(--accent) inset; }
.funnel-diagram {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    color: var(--text-4);
    opacity: 0.6;
}
.funnel-card-v2.funnel-selected .funnel-diagram { color: var(--accent); opacity: 0.85; }
.funnel-icon-v2 { font-size: 22px; line-height: 1; margin-bottom: 2px; }
.funnel-card-v2 .funnel-tag { align-self: flex-start; margin-bottom: 2px; }
.funnel-title-v2 { font-size: 18px; font-weight: 700; color: #FFFFFF; line-height: 1.2; }
.funnel-desc-v2 { font-size: 14px; font-weight: 400; color: #BBBBBB; line-height: 1.55; }
.funnel-example { font-size: 13px; font-style: italic; color: #999999; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--border); }

/* ============================================
   IDEA CHIPS — rate buttons / states
   ============================================ */
.idea-chip { position: relative; }
.idea-chip-rate { margin-left: auto; display: flex; gap: 4px; opacity: 0; transition: opacity 0.15s var(--ease); }
.idea-chip:hover .idea-chip-rate, .idea-chip .rate-btn.on { opacity: 1; }
.idea-chip.idea-starred .idea-chip-rate, .idea-chip.idea-rejected .idea-chip-rate { opacity: 1; }
.rate-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-4);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s var(--ease);
    padding: 0;
    line-height: 1;
}
.rate-btn:hover { border-color: var(--border-light); color: var(--text-1); }
.rate-btn.rate-star.on { background: var(--accent); border-color: var(--accent); color: var(--bg-0); }
.rate-btn.rate-bad.on { background: #b33a3a; border-color: #b33a3a; color: #FFF; }
.idea-chip.idea-starred { border-color: var(--accent); background: rgba(212, 168, 83, 0.06); }
.idea-chip.idea-starred .idea-chip-text::before { content: '★ '; color: var(--accent); }
.idea-chip.idea-rejected { opacity: 0.5; }
.idea-chip.idea-rejected .idea-chip-text { text-decoration: line-through; color: var(--text-4); }
.idea-chip.idea-rejected { cursor: not-allowed; }
.idea-chip.idea-used { opacity: 0.7; }

/* ============================================
   AI CHAT TAB
   ============================================ */
.chat-wrap { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-1); padding: 14px; }
.chat-messages { display: flex; flex-direction: column; gap: 12px; max-height: 480px; overflow-y: auto; padding: 4px; }
.chat-msg { display: flex; }
.chat-msg-user { justify-content: flex-end; }
.chat-msg-assistant { justify-content: flex-start; }
.chat-bubble { max-width: 82%; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; }
.chat-msg-user .chat-bubble { background: var(--accent); color: var(--bg-0); border-bottom-right-radius: 4px; font-weight: 500; }
.chat-msg-assistant .chat-bubble { background: var(--bg-2); color: var(--text-1); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-ideas-wrap { margin-top: 12px; }
.chat-ideas-label { font-size: 11px; color: var(--text-4); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-bottom: 8px; }
.chat-ideas-list { display: flex; flex-direction: column; gap: 6px; }
.chat-idea-btn {
    text-align: left;
    padding: 10px 14px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s var(--ease);
}
.chat-idea-btn:hover { border-color: var(--accent); color: #FFF; background: var(--bg-2); }
.chat-idea-btn:disabled { opacity: 0.6; cursor: default; border-color: var(--accent); color: var(--accent); }
.chat-input-row { display: flex; gap: 8px; align-items: flex-end; padding-top: 10px; border-top: 1px solid var(--border); }
.chat-input-row textarea { flex: 1; resize: none; font-family: var(--font); font-size: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-0); color: var(--text-1); }
.chat-input-row textarea:focus { outline: none; border-color: var(--accent); }

/* ============================================
   IDEA BANK
   ============================================ */
.idea-bank-section { margin-top: 48px; border-top: 1px solid var(--border); padding-top: 28px; }
.idea-bank-header { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.idea-bank-body { margin-top: 18px; display: flex; flex-direction: column; gap: 22px; }
.idea-bank-group {}
.bank-group-title { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.bank-group-title.rejected-title { cursor: pointer; color: var(--text-4); }
.bank-count { background: var(--bg-2); padding: 2px 8px; border-radius: 10px; font-size: 10px; color: var(--text-3); font-weight: 600; }
.bank-grid { max-height: 260px; overflow-y: auto; }
.bank-chip { display: flex; align-items: center; gap: 10px; }
.bank-chip .idea-chip-text { flex: 1; }

/* ============================================
   TIER SYSTEM (Global Library)
   ============================================ */
.tier-breakdown { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tier-chip {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
    background: var(--bg-1);
    transition: all 0.15s var(--ease);
    display: flex;
    align-items: center;
    gap: 8px;
}
.tier-chip:hover { border-color: var(--border-light); }
.tier-chip strong { font-size: 14px; font-weight: 800; }
.tier-chip-S strong { color: #D4A853; }
.tier-chip-A strong { color: #10B981; }
.tier-chip-B strong { color: #9CA3AF; }
.tier-chip-C strong { color: #EF4444; }
.tier-chip-all strong { color: var(--text-1); }
.tier-chip-on { border-color: var(--accent); background: var(--bg-2); }

.tier-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0a0a0a;
}
.tier-badge-S { background: linear-gradient(135deg, #D4A853 0%, #F5C871 100%); color: #1a1200; box-shadow: 0 0 12px rgba(212, 168, 83, 0.35); }
.tier-badge-A { background: linear-gradient(135deg, #10B981 0%, #34D399 100%); color: #03271a; }
.tier-badge-B { background: #4B5563; color: #D1D5DB; }
.tier-badge-C { background: linear-gradient(135deg, #991B1B 0%, #EF4444 100%); color: #FFFFFF; }

.tier-override { display: inline-flex; align-items: center; gap: 6px; }

/* Per-org Library selection (user-facing view of Global Library) */
.library-status-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-1);
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--text-2);
}
.library-status-bar strong { color: var(--text-1); }

.reel-card-selected { box-shadow: 0 0 0 2px var(--accent) inset; }
.reel-card-selected::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(212,168,83,0.12) 0%, rgba(212,168,83,0) 50%);
    pointer-events: none;
    border-radius: inherit;
}
.library-select-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.72);
    color: #FFF;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    z-index: 5;
    backdrop-filter: blur(8px);
    transition: all 0.15s var(--ease);
    font-family: var(--font);
}
.library-select-btn:hover { background: rgba(0,0,0,0.9); border-color: rgba(255,255,255,0.4); }
.library-select-btn-on {
    background: var(--accent);
    color: var(--bg-0);
    border-color: var(--accent);
}
.library-select-btn-on:hover { background: #C09540; border-color: #C09540; }

/* Rich fallback card for Library transcripts without thumbnails */
.reel-card-fallback-rich {
    justify-content: space-between;
    align-items: stretch;
    padding: 16px 14px;
    position: relative;
    overflow: hidden;
}
.reel-card-fallback-rich::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(255,255,255,0.08) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 80%, rgba(0,0,0,0.45) 0%, transparent 55%);
    pointer-events: none;
}
.reel-fallback-fmt {
    position: relative;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 8px;
    text-align: left;
}
.reel-fallback-title {
    position: relative;
    font-size: 14px;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.35;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 12px rgba(0,0,0,0.45);
    flex: 1;
}
.reel-fallback-virality {
    position: relative;
    font-size: 18px;
    font-weight: 900;
    color: #FFD27A;
    margin-top: 10px;
    text-align: left;
}
.reel-fallback-virality span { font-size: 10px; color: rgba(255,255,255,0.55); font-weight: 500; margin-left: 2px; }
.reel-fallback-views {
    position: relative;
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    font-weight: 600;
    margin-top: 2px;
    text-align: left;
}

/* Per-card quick-jump Instagram link */
.reel-card-ig-link {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.72);
    color: #FFFFFF;
    border: 1px solid rgba(255,255,255,0.18);
    padding: 5px 10px;
    border-radius: 14px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-decoration: none;
    z-index: 6;
    backdrop-filter: blur(8px);
    transition: all 0.15s var(--ease);
}
.reel-card-ig-link:hover { background: #E1306C; border-color: #E1306C; }

/* When both "+ Use" button and IG link are on a card, stack the IG link above the Use button. */
.reel-card .library-select-btn { top: 44px; }

/* Generate-from-reference button on Library cards — bottom-left corner */
.library-generate-btn {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 8px 14px;
    background: var(--accent);
    color: var(--bg-0);
    border: none;
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.15s var(--ease);
    opacity: 0;
    transform: translateY(4px);
    z-index: 6;
}
.reel-card:hover .library-generate-btn {
    opacity: 1;
    transform: translateY(0);
}
.library-generate-btn:hover { background: #C09540; }

/* Reference banner on the Generate page when arriving with ?from_reference= */
.reference-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    margin-bottom: 16px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    background: rgba(212, 168, 83, 0.08);
    font-size: 13px;
    color: var(--text-1);
    line-height: 1.5;
}

/* Library controls row — one horizontal line: search | format | tier pills | date | sort */
.library-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0 10px;
}
.library-search { flex: 1 1 220px; min-width: 200px; }
.library-format-select { flex: 0 0 180px; }
.library-date-select { flex: 0 0 150px; }
.library-sort-select { flex: 0 0 210px; }
.library-tiers { display: flex; gap: 6px; margin: 0; flex: 0 0 auto; }
.library-tiers .tier-chip { padding: 7px 11px; font-size: 11px; }
.library-tiers .tier-chip strong { font-size: 12px; }
.library-meta-row { font-size: 12px; color: var(--text-3); margin-bottom: 14px; }
.library-meta-row strong { color: var(--text-1); }

/* View Transition — smooth reflow when re-sorting the grid.
   Each card renders with its own inline view-transition-name (see library.html renderCard). */
::view-transition-group(*) { animation-duration: 0.3s; }
::view-transition-old(*), ::view-transition-new(*) { animation-duration: 0.25s; }

@media (max-width: 768px) {
    .library-controls { flex-direction: column; align-items: stretch; }
    .library-search, .library-format-select, .library-date-select, .library-sort-select { flex: 1 1 auto; }
    .library-tiers { flex-wrap: wrap; }
}

/* Dashboard v2 */
.dash-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.dash-hero-text h1 { font-size: 32px; letter-spacing: -1px; margin-bottom: 6px; }
.dash-subtitle { color: var(--text-3); font-size: 15px; }
.dash-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}
.dash-stat-card {
    padding: 20px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-1);
}
.dash-stat-card-accent {
    border-color: var(--accent);
    background: rgba(212, 168, 83, 0.06);
}
.dash-stat-num {
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    color: var(--text-1);
    letter-spacing: -1px;
    margin-bottom: 6px;
}
.dash-stat-card-accent .dash-stat-num { color: var(--accent); }
.dash-stat-label {
    font-size: 11px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.dash-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    margin-bottom: 36px;
}
.dash-quick-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-1);
    text-decoration: none;
    color: inherit;
    transition: all 0.15s var(--ease);
}
.dash-quick-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
    background: var(--bg-2);
}
.dash-quick-icon { font-size: 28px; flex-shrink: 0; }
.dash-quick-body { min-width: 0; }
.dash-quick-name { font-size: 14px; font-weight: 800; color: var(--text-1); margin-bottom: 2px; }
.dash-quick-desc { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.dash-quick-card-accent { border-color: var(--accent); background: rgba(212, 168, 83, 0.05); }
.dash-quick-card-accent:hover { background: rgba(212, 168, 83, 0.10); }

.dash-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.dash-col .section-header { margin-bottom: 14px; }
@media (max-width: 900px) {
    .dash-two-col { grid-template-columns: 1fr; }
}

/* Idea bank snapshot rows */
.idea-bank-snapshot {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-1);
    padding: 8px;
}
.ib-snap-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius);
}
.ib-snap-row-muted { opacity: 0.5; }
.ib-snap-icon {
    width: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-3);
    font-weight: 700;
}
.ib-snap-icon.ib-snap-star { color: var(--accent); }
.ib-snap-label { flex: 1; font-size: 13px; color: var(--text-2); font-weight: 500; }
.ib-snap-count { font-size: 15px; font-weight: 800; color: var(--text-1); }

/* Record Mode — full-screen teleprompter */
.record-overlay {
    position: fixed;
    inset: 0;
    background: #000000;
    z-index: 500;
    display: flex;
    flex-direction: column;
}
.record-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 28px;
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}
.record-ctrl-btn {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.15s;
}
.record-ctrl-btn:hover { background: rgba(255, 255, 255, 0.15); }
.record-ctrl-speed {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}
.record-ctrl-speed input[type="range"] { width: 120px; accent-color: var(--accent); }
.record-ctrl-speed span { color: var(--accent); font-size: 13px; min-width: 40px; }
.record-scroll {
    flex: 1;
    overflow-y: auto;
    scroll-behavior: auto;
    outline: none;
}
.record-padding { height: 50vh; }
.record-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px;
    font-size: 48px;
    line-height: 1.45;
    color: #FFFFFF;
    font-weight: 500;
    text-align: center;
    font-family: var(--font);
}
.record-line {
    margin: 0 0 1.2em;
    letter-spacing: -0.01em;
}
.record-line-bold {
    font-weight: 800;
    color: var(--accent);
}
@media (max-width: 768px) {
    .record-content { font-size: 36px; padding: 0 20px; }
    .record-ctrl-speed input[type="range"] { width: 80px; }
}

/* Scrape schedule + competitor cards */
.schedule-add-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.schedule-card {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-1);
    margin-bottom: 10px;
}
.schedule-card-main { flex: 1; min-width: 0; }
.schedule-card-username { font-size: 14px; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.schedule-card-meta { font-size: 12px; color: var(--text-3); }
.schedule-card-error { font-size: 11px; color: #FCA5A5; margin-top: 6px; font-family: monospace; }
.schedule-card-right { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Competitor analysis sections */
.analysis-subheader {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 24px 0 12px;
}
.analysis-bars { display: flex; flex-direction: column; gap: 6px; }
.analysis-bar-row { display: flex; align-items: center; gap: 10px; }
.analysis-bar-label { width: 140px; font-size: 12px; color: var(--text-2); }
.analysis-bar-track { flex: 1; height: 20px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.analysis-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent) 0%, #F5C871 100%); border-radius: 4px; }
.analysis-bar-count { font-size: 12px; font-weight: 600; color: var(--text-2); width: 32px; text-align: right; }

.analysis-hook-list { display: flex; flex-direction: column; gap: 10px; }
.analysis-hook-card { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-1); }
.analysis-hook-title { font-size: 13px; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.analysis-hook-meta { font-size: 11px; color: var(--text-4); margin-bottom: 8px; }
.analysis-hook-analysis { font-size: 13px; color: var(--text-2); line-height: 1.5; }

.analysis-topic-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.analysis-topic-pill {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-1);
    font-size: 12px;
    color: var(--text-2);
}

.analysis-gap-list { display: flex; flex-direction: column; gap: 6px; }
.analysis-gap-card {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-left: 3px solid #EF4444;
    border-radius: var(--radius);
    background: var(--bg-1);
    font-size: 13px;
}

/* Recommended card */
.recommended-card { position: relative; }
.recommended-reason {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 56px;
    background: rgba(0,0,0,0.85);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 11px;
    color: #E5E5E5;
    line-height: 1.4;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 168, 83, 0.4);
}
.library-create-similar-btn {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 9px 14px;
    background: var(--accent);
    color: var(--bg-0);
    border: none;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.15s var(--ease);
}
.library-create-similar-btn:hover { background: #C09540; }

/* Global Library stats bar (admin) */
.library-stat-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.stat-pill {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-1);
    min-width: 0;
}
.stat-pill-val {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-1);
    line-height: 1;
}
.stat-pill-label {
    font-size: 11px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}
.stat-pill-s .stat-pill-val { color: #D4A853; }

/* Anti-patterns panel */
.ap-panel { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-1); padding: 14px 18px; margin-bottom: 20px; }
.ap-summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-1); list-style: none; }
.ap-summary::-webkit-details-marker { display: none; }
.ap-summary::before { content: '▸ '; color: var(--text-4); }
.ap-panel[open] .ap-summary::before { content: '▾ '; }
.ap-body { margin-top: 14px; }
.ap-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 6px; background: var(--bg-2); }
.ap-rule { flex: 1; font-size: 13px; color: var(--text-2); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero h1 { font-size: 32px; letter-spacing: -1.5px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .nav-links { display: none; }
    .nav-inner { padding: 0 20px; }
    .container { padding: 32px 20px 60px; }
    .dash-format-grid, .format-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-header { flex-direction: column; }
    .meta-grid { grid-template-columns: 1fr; }
    .script-card { flex-direction: column; align-items: flex-start; gap: 8px; }
    .script-card-right { width: 100%; justify-content: space-between; }
    .form-row { flex-direction: column; }
    .funnel-row { grid-template-columns: 1fr; }
    .funnel-row-v2 { grid-template-columns: 1fr; }
    .chat-wrap { height: auto; }
    .chat-messages { max-height: 360px; }
    .cta-row { flex-direction: column; align-items: stretch; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .library-toolbar { flex-direction: column; align-items: flex-start; }
    .modal-content { width: 95%; padding: 24px; }
    .smart-start-row { flex-direction: column; }
    .cal-day { min-height: 60px; }
    .page-header h1 { font-size: 28px; }
    .reels-grid { grid-template-columns: repeat(2, 1fr); }
    .reel-detail { grid-template-columns: 1fr; }
    .reel-check { opacity: 1; }
}
