:root {
  --bg: #f4f5f7;
  --surface: #fff;
  --ink: #181922;
  --muted: #757887;
  --line: #e2e4ea;
  --blue: #4658ff;
  --cyan: #13b7b1;
  --red: #ed3f62;
  --shadow: 0 10px 28px rgba(25, 28, 42, .05);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(430px, 100%); padding: 42px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-lockup b { display: block; font-family: ui-monospace, monospace; font-size: 14px; letter-spacing: .04em; }
.brand-lockup span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; color: #fff; background: #191a22; border: 2px solid var(--cyan); box-shadow: 3px 3px 0 var(--red); font: 800 13px ui-monospace, monospace; }
.login-card .brand-lockup { margin-bottom: 72px; }
.overline, .sidebar-label { color: var(--blue); font: 700 10px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.login-card h1 { margin: 14px 0 8px; font-size: 32px; letter-spacing: -.04em; }
.login-card p, .page-heading p { color: var(--muted); font-size: 13px; line-height: 1.6; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 11px 12px; outline: none; }
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(70, 88, 255, .1); }
.button { border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 10px 14px; font-size: 12px; font-weight: 800; }
.button.dark, .button.primary, .primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.button:disabled { cursor: wait; opacity: .58; }
.login-card .primary { width: 100%; margin-top: 6px; padding: 12px; }
.error { min-height: 14px; color: var(--red); font-size: 11px; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; width: 236px; padding: 28px 16px 18px; display: flex; flex-direction: column; gap: 30px; background: #fff; border-right: 1px solid var(--line); }
.sidebar .brand-lockup { padding: 0 8px; }
.sidebar-label { padding: 0 12px; color: var(--muted); }
nav { display: grid; gap: 4px; }
.nav-item { display: flex; justify-content: space-between; width: 100%; padding: 12px; border: 0; border-left: 3px solid transparent; background: transparent; color: var(--muted); text-align: left; font-size: 12px; font-weight: 700; }
.nav-item span { color: #b4b7c2; font: 10px ui-monospace, monospace; }
.nav-item:hover, .nav-item.active { border-left-color: var(--blue); background: #f0f1ff; color: var(--blue); }
.sidebar-footer { margin-top: auto; padding: 14px; border: 1px solid var(--line); background: #fafafe; }
.sidebar-footer span, .sidebar-footer small { display: block; color: var(--muted); font-size: 10px; }
.sidebar-footer b { display: block; margin: 6px 0; font: 700 12px ui-monospace, monospace; }
.main { width: calc(100vw - 236px); min-height: 100vh; margin-left: 236px; padding: 0 48px 72px; }
.topbar { min-height: 82px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.topbar h2 { margin: 6px 0 0; font-size: 18px; }
.top-actions { display: flex; gap: 8px; width: 330px; }
.top-actions select { padding: 9px 10px; }
.page { display: none; max-width: 1500px; margin: 0 auto; padding-top: 38px; }
.page.active { display: block; }
.page-intro, .page-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.page h1 { max-width: 760px; margin: 12px 0 0; font-size: clamp(34px, 4vw, 58px); line-height: 1; letter-spacing: -.06em; }
.page-heading h1 { font-size: 40px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.metrics article { min-height: 122px; padding: 18px; border-right: 1px solid var(--line); }
.metrics article:last-child { border-right: 0; }
.metrics span, .metrics small { display: block; color: var(--muted); font-size: 11px; }
.metrics strong { display: block; margin: 14px 0 5px; font: 800 30px ui-monospace, monospace; }
.insight { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 16px 0 22px; padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--blue); background: var(--surface); box-shadow: var(--shadow); }
.insight b { display: block; margin-top: 7px; font: 700 13px ui-monospace, monospace; }
.overview-grid, .analysis-grid, .integration-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.surface { padding: 22px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.surface-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
h3 { margin: 7px 0 0; font-size: 18px; }
.text-button { border: 0; background: transparent; color: var(--blue); font-size: 11px; font-weight: 800; }
.compact-list { display: grid; gap: 0; }
.compact-row { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 12px; }
.compact-row span, .compact-row small { color: var(--muted); font-size: 10px; }
.empty-state { min-height: 150px; display: grid; place-content: center; gap: 8px; text-align: center; color: var(--muted); border: 1px dashed var(--line); font-size: 12px; }
.empty-state small { display: block; font-size: 11px; }
.data-table { overflow-x: auto; }
.table-head, .account-row { min-width: 720px; display: grid; grid-template-columns: 1.5fr 1.1fr .7fr 1.3fr; gap: 18px; align-items: center; }
.table-head { padding: 0 14px 10px; color: var(--muted); font: 700 10px ui-monospace, monospace; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.account-row { padding: 16px 14px; border-bottom: 1px solid var(--line); font-size: 12px; }
.account-row b, .account-row small { display: block; }
.account-row small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.success { color: var(--cyan); } .partial { color: #ba821e; } .error { color: var(--red); } .pending { color: var(--muted); }
table { width: 100%; min-width: 840px; border-collapse: collapse; font-size: 12px; }
.video-table { min-width: 1080px; }
th { padding: 10px 12px; color: var(--muted); text-align: left; font: 700 10px ui-monospace, monospace; text-transform: uppercase; border-bottom: 1px solid var(--line); }
td { padding: 15px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td b, td small { display: block; white-space: normal; } td small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.video-thumb { width: 92px; height: 124px; display: block; object-fit: cover; border: 1px solid var(--line); background: #f2f4f7; }
.thumb-link { display: block; width: max-content; }
.empty-thumb { display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--cyan), var(--blue) 55%, var(--red)); font: 800 12px ui-monospace, monospace; }
.title-link { display: block; max-width: 760px; color: var(--ink); font-weight: 800; line-height: 1.35; text-decoration: none; white-space: normal; }
.title-link:hover { color: var(--blue); text-decoration: underline; }
td small a { color: var(--blue); font-weight: 800; text-decoration: none; }
td small a:hover { text-decoration: underline; }
.accent { color: var(--blue); font-weight: 800; } .table-scroll { overflow-x: auto; }
.segmented { display: flex; gap: 4px; } .tab { padding: 9px 12px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 11px; font-weight: 800; } .tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.matrix-row { display: grid; grid-template-columns: 140px 1fr 90px; gap: 14px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); font-size: 12px; } .matrix-row i { height: 7px; background: #edf0f4; } .matrix-row em { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--blue)); } .matrix-row span { color: var(--muted); text-align: right; font: 11px ui-monospace, monospace; }
.action { display: grid; gap: 6px; padding: 16px 0; border-top: 1px solid var(--line); } .action span { color: var(--muted); font-size: 12px; line-height: 1.6; }
.integration-layout { grid-template-columns: minmax(0, 1.6fr) minmax(260px, .7fr); } .integration-layout .surface { display: grid; gap: 18px; } .note { padding: 24px; border: 1px solid var(--line); background: #191a22; color: #fff; } .note h3 { margin-bottom: 22px; } .note ol { margin: 0; padding-left: 20px; color: #c5c6cf; font-size: 12px; line-height: 2.2; } .badge { padding: 5px 8px; color: var(--muted); background: #f3f4f6; font: 700 10px ui-monospace, monospace; } .full { width: 100%; } .collector-status { min-height: 18px; color: var(--muted); font: 11px ui-monospace, monospace; line-height: 1.5; } .collector-status.loading::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border: 2px solid #dce0e8; border-top-color: var(--blue); border-radius: 50%; vertical-align: -2px; animation: spin .8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } .collection-log { display: grid; gap: 7px; color: var(--muted); font: 11px ui-monospace, monospace; } .collection-log .success { color: var(--cyan); } .collection-log .partial, .collection-log .error { color: var(--red); }
dialog { width: min(480px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.2); } dialog::backdrop { background: rgba(25, 26, 34, .32); } #accountForm { padding: 28px; } #accountForm h2 { margin: 10px 0 22px; } menu { display: flex; justify-content: flex-end; gap: 8px; margin: 10px 0 0; padding: 0; } .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .sidebar { position: relative; width: 100%; height: auto; padding: 16px; } .sidebar nav { display: flex; overflow-x: auto; } .nav-item { min-width: max-content; } .sidebar-footer { display: none; } .main { width: 100%; margin: 0; padding: 0 16px 60px; } .topbar { align-items: flex-start; flex-direction: column; padding: 18px 0; } .top-actions { width: 100%; } .page { padding-top: 28px; } .overview-grid, .analysis-grid, .integration-layout { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .metrics { grid-template-columns: 1fr 1fr; } .metrics article:nth-child(2) { border-right: 0; } .metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--line); } .page-intro, .page-heading, .insight { align-items: flex-start; flex-direction: column; } .page h1 { font-size: 36px; } .two-col { grid-template-columns: 1fr; } }
