:root { --bg:#f5f7fb; --panel:#fff; --text:#182033; --muted:#667085; --line:#d9dee8; --primary:#b42318; --primary-dark:#8f1d14; --success-bg:#ecfdf3; --success-text:#027a48; --warning-bg:#fffaeb; --warning-text:#b54708; --error-bg:#fef3f2; --error-text:#b42318; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); font-family:Arial,Helvetica,sans-serif; line-height:1.5; }
a { color:var(--primary); font-weight:700; text-decoration:none; }
a:hover { text-decoration:underline; }
h1,h2,h3,p { margin-top:0; }
h2 { font-size:22px; }
h3 { font-size:14px; line-height:1.3; margin:0 0 6px; }
.login-page { min-height:100vh; display:grid; place-items:center; padding:24px; }
.login-card,.panel,.stat-card,.compact-video-card { background:var(--panel); border:1px solid var(--line); border-radius:8px; box-shadow:0 10px 30px rgba(24,32,51,.08); }
.login-card { width:100%; max-width:420px; padding:28px; }
.login-card.wide { max-width:520px; }
.stack { display:grid; gap:16px; }
label { display:grid; gap:6px; color:var(--text); font-weight:700; }
input,textarea,select { width:100%; border:1px solid var(--line); border-radius:6px; padding:10px 12px; color:var(--text); font:inherit; background:#fff; }
textarea { resize:vertical; }
input:focus,textarea:focus,select:focus { outline:3px solid rgba(180,35,24,.18); border-color:var(--primary); }
button,.button { display:inline-block; border:0; border-radius:6px; background:var(--primary); color:#fff; cursor:pointer; font:inherit; font-weight:700; padding:10px 14px; text-align:center; }
button:hover,.button:hover { background:var(--primary-dark); text-decoration:none; }
button.secondary,.secondary-link { background:#344054; color:#fff; }
.danger-button { background:#a61b1b; }
.danger-link { color:#a61b1b; }
.danger-zone { border-color:#fda29b; background:#fffbfa; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 28px; background:#fff; border-bottom:1px solid var(--line); }
.topbar h1 { margin-bottom:2px; font-size:22px; }
.nav { display:flex; gap:8px; padding:0 28px; background:#fff; border-bottom:1px solid var(--line); }
.nav a { color:#344054; padding:12px 10px; border-bottom:3px solid transparent; }
.nav a.active { color:var(--primary); border-bottom-color:var(--primary); }
.container { width:min(1320px, calc(100% - 32px)); margin:24px auto; }
.panel { padding:20px; margin-bottom:18px; }
.panel.narrow { max-width:760px; }
.section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.grid,.summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.summary-grid { margin-top:12px; }
.summary-grid>div { border:1px solid var(--line); border-radius:8px; padding:14px; background:#fff; }
.stat-card { display:block; padding:20px; color:var(--text); }
.stat-card:hover { text-decoration:none; border-color:#c7cfdd; }
.stat-number { display:block; font-size:32px; font-weight:800; }
.stat-label,.muted { color:var(--muted); }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.compact-form { grid-template-columns:repeat(4,minmax(0,1fr)); }
.wide-field { grid-column:1/-1; }
.checkbox-row { display:flex; align-items:center; gap:8px; align-self:end; font-weight:700; }
.checkbox-row input { width:auto; }
.check-panel { border:1px solid var(--line); border-radius:8px; padding:14px; display:grid; gap:8px; }
.check-panel legend { padding:0 6px; font-weight:800; }
.form-actions,.actions,.split-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.split-actions { justify-content:space-between; }
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; }
th,td { border-bottom:1px solid var(--line); padding:11px 10px; text-align:left; vertical-align:top; }
th { color:#344054; font-size:12px; text-transform:uppercase; }
.right { text-align:right; }
.table-actions { white-space:nowrap; display:flex; justify-content:flex-end; align-items:center; gap:12px; }
.table-actions .inline-form { display:inline-flex; }
.table-actions .text-button { line-height:1.5; }
.status,.pill { display:inline-block; border-radius:999px; font-size:12px; font-weight:800; padding:2px 8px; }
.status.on { background:#ecfdf3; color:#027a48; }
.status.off { background:#f2f4f7; color:#667085; }
.pill { margin-left:8px; background:#eef4ff; color:#3538cd; }
.alert { border-radius:6px; margin:16px 0; padding:12px 14px; }
.alert-success { background:var(--success-bg); color:var(--success-text); }
.alert-warning { background:var(--warning-bg); color:var(--warning-text); }
.alert-error { background:var(--error-bg); color:var(--error-text); }
.alert-info { background:#eff8ff; color:#175cd3; }
.channel-hero { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; background:#fff; border:1px solid var(--line); border-radius:8px; padding:22px; margin-bottom:14px; box-shadow:0 10px 30px rgba(24,32,51,.06); }
.channel-hero h2 { margin-bottom:4px; }
.back-link { display:inline-block; margin-bottom:8px; font-size:13px; }
.summary-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.summary-strip div { background:#fff; border:1px solid var(--line); border-radius:8px; padding:14px; }
.summary-strip span { display:block; font-size:22px; font-weight:800; }
.summary-strip small { color:var(--muted); font-weight:700; }
.controls-panel { padding:14px; }
.toolbar-form { display:flex; align-items:end; gap:12px; flex-wrap:wrap; }
.toolbar-form label { min-width:190px; }
.compact-video-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:24px; }
.compact-video-card { position:relative; overflow:hidden; box-shadow:none; }
.compact-video-card.has-notes-card { border-color:#12b76a; box-shadow:0 0 0 2px rgba(18,183,106,.18); }
.thumb-wrap { position:relative; background:#eef2f6; }
.thumb-wrap img,.thumb-placeholder { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; }
.thumb-placeholder { display:grid; place-items:center; color:#667085; font-weight:700; }
.duration-badge { position:absolute; right:6px; bottom:6px; background:rgba(16,24,40,.88); color:#fff; border-radius:4px; padding:2px 5px; font-size:12px; font-weight:800; }
.compact-card-body { padding:10px; }
.card-date { font-size:12px; margin-bottom:8px; }
.metric-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(72px,1fr)); gap:5px; margin:8px 0; }
.metric-row span { background:#f2f4f7; border-radius:5px; padding:4px 5px; font-size:11px; color:#344054; font-weight:800; text-align:center; }
.card-actions { display:flex; gap:8px; flex-wrap:wrap; font-size:12px; margin-top:8px; }
.inline-form { display:inline; }
.text-button { background:transparent; color:var(--primary); padding:0; border:0; font-weight:700; }
.text-button:hover { background:transparent; text-decoration:underline; }
.bulk-bar { position:sticky; top:0; z-index:5; display:flex; align-items:center; gap:10px; flex-wrap:wrap; background:#fff; border:1px solid var(--line); border-radius:8px; padding:10px 12px; margin:0 0 14px; box-shadow:0 8px 20px rgba(24,32,51,.06); }
.bulk-bar select { width:auto; min-width:180px; }
.bulk-bar button { padding:9px 12px; }
.bulk-bar button:disabled { background:#98a2b3; cursor:not-allowed; }
.bulk-help { color:#b54708; font-size:12px; font-weight:800; }
.bulk-help.ready { color:#027a48; }
.card-select { position:absolute; z-index:2; margin:8px; background:rgba(255,255,255,.92); border-radius:6px; padding:4px; line-height:1; }
.card-select input { width:auto; }
.bucket-tags { display:flex; flex-wrap:wrap; gap:5px; margin:7px 0; }
.bucket-tags span { border:1px solid #d0d5dd; border-radius:999px; color:#344054; background:#fff; font-size:11px; font-weight:800; padding:2px 7px; }
.research-tags { display:flex; flex-wrap:wrap; gap:5px; margin:7px 0; }
.research-tag { display:inline-block; border:1px solid #b2ccff; border-radius:999px; color:#344054; background:#eef4ff; font-size:11px; font-weight:800; padding:2px 7px; }
a.research-tag:hover { text-decoration:none; border-color:#84adff; filter:brightness(.98); }
.notes-layout { display:grid; grid-template-columns:360px minmax(0,1fr); gap:18px; align-items:start; }
.notes-video-panel { background:#fff; border:1px solid var(--line); border-radius:8px; overflow:hidden; box-shadow:0 10px 30px rgba(24,32,51,.08); }
.notes-video-panel img,.notes-video-panel .thumb-placeholder { width:100%; aspect-ratio:16/9; object-fit:contain; display:block; background:#101828; }
.notes-video-meta { padding:16px; }
.notes-video-meta h2 { font-size:18px; line-height:1.3; }
.compact-actions { margin-top:12px; }
.notes-editor { margin-bottom:0; }
.notes-list { display:grid; gap:14px; }
.note-card { display:grid; grid-template-columns:220px minmax(0,1fr); gap:0; background:#fff; border:1px solid var(--line); border-radius:8px; overflow:hidden; box-shadow:0 10px 30px rgba(24,32,51,.06); }
.note-card img { width:100%; height:100%; min-height:150px; object-fit:contain; background:#101828; }
.note-card-body { padding:16px; }
.small-heading { margin-bottom:10px; }
.ray-note-preview { background:#f9fafb; border-left:3px solid var(--primary); padding:8px 10px; }
.dashboard-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.note-status { display:inline-block; border-radius:999px; padding:2px 7px; font-size:11px; font-weight:800; background:#dcfae6; color:#027a48; border:1px solid #75e0a7; }
.note-status.empty { background:#f2f4f7; color:#667085; border-color:#d0d5dd; }
.transcript-status { display:inline-block; border-radius:999px; padding:2px 7px; font-size:11px; font-weight:800; background:#eff8ff; color:#175cd3; border:1px solid #84caff; }
.transcript-status.empty { background:#f2f4f7; color:#667085; border-color:#d0d5dd; }
.comment-status { display:inline-block; border-radius:999px; padding:2px 7px; font-size:11px; font-weight:800; background:#fef7c3; color:#854a0e; border:1px solid #fdb022; }
.comment-status.empty { background:#f2f4f7; color:#667085; border-color:#d0d5dd; }
.has-notes-row td { background:#f6fef9; }
pre { white-space:pre-wrap; overflow:auto; background:#101828; color:#f9fafb; border-radius:8px; padding:16px; }
@media (max-width:1180px) { .compact-video-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:900px) { .compact-video-grid,.summary-strip { grid-template-columns:repeat(2,minmax(0,1fr)); } .channel-hero { flex-direction:column; } .notes-layout,.dashboard-columns { grid-template-columns:1fr; } .note-card { grid-template-columns:1fr; } .note-card img { height:auto; aspect-ratio:16/9; object-fit:contain; } }
@media (max-width:860px) { .topbar,.section-heading { align-items:flex-start; flex-direction:column; } .grid,.summary-grid,.compact-form { grid-template-columns:repeat(2,minmax(0,1fr)); } .form-grid { grid-template-columns:1fr; } }
@media (max-width:560px) { .grid,.summary-grid,.compact-form,.compact-video-grid,.summary-strip { grid-template-columns:1fr; } .nav { overflow-x:auto; padding:0 16px; } .toolbar-form { display:grid; } }
.maintenance-actions { display:flex; flex-wrap:wrap; gap:14px; align-items:center; }
.copy-source { position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }
.copy-button { white-space:nowrap; }
.export-actions { margin:12px 0; }
.comments-list { display:grid; gap:12px; }
.comment-card { border:1px solid var(--line); border-radius:8px; padding:14px; background:#fff; }
.comment-card p { margin-bottom:0; }

.youtube-tags { margin:10px 0 12px; display:grid; gap:6px; }
.youtube-tags strong { font-size:12px; text-transform:uppercase; color:#344054; }
.youtube-tags div { display:flex; flex-wrap:wrap; gap:6px; }
.youtube-tags span { border:1px solid #d0d5dd; border-radius:999px; color:#344054; background:#fff; font-size:11px; font-weight:800; padding:2px 7px; }
