/* ============================================================
   Clean Analytics — design system
   Light-first. Colour carries meaning:
     accent (blue)  = actions / active state
     green          = revenue / positive
     red            = spend / negative
     amber          = warning / mid ROI
   ============================================================ */

:root {
  /* Light theme (default) */
  --bg: #ffffff;
  --panel: #fafbfc;
  --bg-elev: #ffffff;
  --bg-elev-2: #f4f6f9;
  --border: #e6e9ef;
  --border-soft: #eef1f5;
  --border-strong: #d7dce4;
  --zebra: #fbfcfd;
  --row-hover: #f5f8fc;

  --text: #1a1d23;
  --text-dim: #5b6472;
  --text-faint: #98a1b0;

  --green: #16a34a;
  --green-dim: #e7f6ec;
  --red: #dc2626;
  --red-dim: #fdecec;
  --amber: #d97706;

  --accent: #2f6bff;
  --accent-hover: #1e56e0;
  --accent-dim: #eaf0ff;
  --on-accent: #ffffff;

  --purple: #7c3aed;
  --magenta: #c026a3;

  --radius: 10px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,0.04);
  --shadow: 0 4px 16px rgba(16,24,40,0.06);

  --page-accent: var(--accent);
}

html[data-theme="dark"] {
  --bg: #0f1216;
  --panel: #14181e;
  --bg-elev: #161b22;
  --bg-elev-2: #1b222c;
  --border: #262d38;
  --border-soft: #202731;
  --border-strong: #313a47;
  --zebra: rgba(255,255,255,0.018);
  --row-hover: #1b2431;

  --text: #e7e9ee;
  --text-dim: #9aa4b2;
  --text-faint: #69727f;

  --green: #34d17f;
  --green-dim: #14311f;
  --red: #ff5c73;
  --red-dim: #351820;
  --amber: #f5a623;

  --accent: #5285ff;
  --accent-hover: #6b98ff;
  --accent-dim: #17253f;
  --on-accent: #06122b;

  --purple: #b78bff;
  --magenta: #e857be;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 10px 26px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "tnum" 1, "ss01" 1;
}
a { color: inherit; text-decoration: none; }

/* ---------------- Top navbar ---------------- */
.topbar-accent { height: 2px; background: var(--page-accent); opacity: .9; }
.topnav {
  display: flex; align-items: center; gap: 14px;
  padding: 0 14px; height: 44px;
  background: var(--bg-elev); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.brand .logo { width: 18px; height: 18px; display: inline-flex; }
.navlinks { display: flex; align-items: center; gap: 1px; flex: 1; }
.navlinks a {
  padding: 5px 9px; border-radius: 6px; color: var(--text-dim);
  font-weight: 500; font-size: 12px; white-space: nowrap; transition: background .12s, color .12s;
}
.navlinks a:hover { color: var(--text); background: var(--bg-elev-2); }
.navlinks a.active { color: var(--accent); background: var(--accent-dim); }
.navlinks .sep { flex: 1; }
.userbox { display: flex; align-items: center; gap: 14px; }
.toggle { width: 40px; height: 22px; border-radius: 20px; background: var(--accent);
  position: relative; border: none; padding: 0; cursor: pointer; transition: background .15s; }
.toggle::after { content: ""; position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: all .15s; box-shadow: var(--shadow-sm); }
.toggle.off { background: var(--border-strong); }
.toggle.off::after { right: auto; left: 2px; }
.userchip { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; }
.userchip .caret { color: var(--text-faint); font-size: 10px; }
.userchip a.logout { color: var(--text-faint); font-size: 12px; font-weight: 500; }
.userchip a.logout:hover { color: var(--accent); }

.page { padding: 12px 14px 28px; max-width: none; margin: 0; width: 100%; }
.page-title { font-size: 16px; font-weight: 600; margin: 0 0 12px; letter-spacing: -0.01em; }
.page-title .sub { font-size: 11.5px; color: var(--text-dim); font-weight: 400; margin-top: 2px; }

/* ---------------- Cards / KPI ---------------- */
.grid { display: grid; gap: 12px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 18px; }
.card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow-sm); }
.kpi .label { color: var(--text-faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
.kpi .value { font-size: 22px; font-weight: 600; margin-top: 6px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .value.sm { font-size: 16px; }
.kpi .foot { font-size: 11.5px; color: var(--text-faint); margin-top: 5px; }
.pos { color: var(--green); } .neg { color: var(--red); } .warn { color: var(--amber); }

/* ---------------- Filter panel ---------------- */
.controls { margin-bottom: 4px; }
.filter-row { display: grid; grid-template-columns: repeat(6, 1fr) 110px; gap: 8px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px; align-items: end; }
.filter-row.custom-dates { grid-template-columns: repeat(6, 1fr); margin-top: 8px; padding: 10px; }
@media (max-width: 1100px) { .filter-row { grid-template-columns: repeat(3, 1fr); } }
.ff { display: flex; flex-direction: column; gap: 4px; }
.ff label { font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }
input, select, button, textarea {
  font-family: inherit; font-size: 12px; background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 6px; padding: 6px 9px; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
input::placeholder { color: var(--text-faint); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }
select { cursor: pointer; }

.btn { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; color: var(--text-dim); border-color: var(--border-strong); }
.btn.ghost:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.btn.sm { padding: 5px 10px; font-size: 11px; }
.search-cell { align-self: stretch; }
.btn.search-btn { width: 100%; height: 100%; min-height: 32px; font-weight: 600; }

.toolbar2 { display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; flex-wrap: wrap; }
.stats-label { color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }
.chip-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 16px;
  border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--text-dim); font-size: 11.5px;
  font-weight: 500; cursor: pointer; transition: all .12s; }
.chip-toggle:hover { border-color: var(--accent); color: var(--accent); }
.chip-toggle.on { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.team-filter { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; }
.team-filter label { color: var(--text-faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }
.team-filter select { padding: 5px 8px; border-radius: 6px; min-width: 140px; font-size: 12px; }

/* ---------------- Tables ---------------- */
.table-wrap { overflow: auto; max-height: calc(100vh - 200px);
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg-elev); }
table { width: 100%; border-collapse: collapse; font-size: 11.5px; font-family: "Inter", sans-serif; }
thead th {
  text-align: right; padding: 7px 8px; color: var(--text-faint);
  font-weight: 500; font-size: 10px; text-transform: uppercase; letter-spacing: 0.03em;
  background: var(--panel); border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border-soft);
  white-space: nowrap; position: sticky; top: 0; z-index: 3;
}
thead th:first-child, tbody td:first-child { text-align: left; }
thead th.tl, tbody td.tl { text-align: left; }
thead th:last-child, tbody td:last-child, tfoot td:last-child { border-right: none; }
tbody td {
  padding: 6px 8px; text-align: right; color: var(--text); font-weight: 400;
  border-bottom: 1px solid var(--border-soft); border-right: 1px solid var(--border-soft);
  white-space: nowrap; vertical-align: middle; font-variant-numeric: tabular-nums;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--row-hover); }
tfoot td { padding: 8px; text-align: right; font-weight: 600; background: var(--panel);
  border-top: 1px solid var(--border); border-right: 1px solid var(--border-soft);
  font-variant-numeric: tabular-nums;
  position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -3px 10px rgba(16,24,40,0.06); }
tfoot td.tl { text-align: left; }
html[data-theme="dark"] tfoot td { box-shadow: 0 -3px 10px rgba(0,0,0,0.35); }

.cell-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cell-main .t { font-weight: 400; color: var(--text); font-size: 11.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.cell-main .s { font-size: 10.5px; color: var(--text-faint); }
.idx { color: var(--text-faint); font-variant-numeric: tabular-nums; }

.cc { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; vertical-align: middle; }
.cc .caret { color: var(--text-faint); }
.tag { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 4px; font-size: 10px;
  font-weight: 500; line-height: 1.5; letter-spacing: 0.02em; flex: 0 0 auto;
  background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text-dim); }
.tag.src-facebook { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.tag.src-tiktok { color: var(--magenta); border-color: var(--magenta); }
.tag.flex { color: var(--purple); border-color: var(--purple); }

/* SUB5 — blue chip like reference */
.sub5 {
  display: inline-block; padding: 2px 7px; border-radius: 5px; font-size: 11px; font-weight: 500;
  font-family: "Inter", sans-serif; line-height: 1.45;
  background: #eff6ff; border: 1px solid #dbeafe; color: #2563eb;
  max-width: 280px; white-space: normal; word-break: break-word; vertical-align: middle;
}
html[data-theme="dark"] .sub5 {
  background: rgba(47,107,255,0.14); border-color: #2a457a; color: #8fb6ff;
}
.grp-label { color: var(--text-faint); font-weight: 500; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; }
td.wrapcell { white-space: normal; min-width: 140px; max-width: 280px; }
.code { font-family: "Inter", sans-serif; font-size: 11.5px; color: var(--text-dim); }

/* ROI pills + money colors (as on reference) */
.roi {
  display: inline-block; min-width: 42px; text-align: center; padding: 2px 6px; border-radius: 5px;
  font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.roi.g { background: #e8f8ef; color: #16a34a; border: 1px solid #b7e4c7; }
.roi.r { background: #fdecec; color: #dc2626; border: 1px solid #f5c2c7; }
.roi.y { background: #fff7e6; color: #b45309; border: 1px solid #f0d59a; }
.roi.z { background: var(--bg-elev-2); color: var(--text-faint); border: 1px solid var(--border); }
html[data-theme="dark"] .roi.g { background: #14311f; color: #34d17f; border-color: #235f38; }
html[data-theme="dark"] .roi.r { background: #351820; color: #ff5c73; border-color: #6b2333; }
html[data-theme="dark"] .roi.y { background: rgba(245,166,35,0.12); color: #f5a623; border-color: #6b5220; }
.money-rev { color: var(--green); }
.money-spend { color: var(--red); }

.empty { padding: 48px; text-align: center; color: var(--text-faint); }

/* group rows */
tr.grp { cursor: pointer; background: var(--panel); }
tr.grp:hover { background: var(--bg-elev-2); }
tr.grp td { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-weight: 600; padding: 7px 8px; }
tr.grp .caret { display: inline-block; width: 12px; color: var(--text-faint); transition: transform .12s; }
tr.grp.collapsed .caret { transform: rotate(-90deg); }
tr.subtotal td { background: var(--bg-elev-2); font-weight: 600; color: var(--text);
  border-bottom: 1px solid var(--border); border-top: 1px solid var(--border-soft); padding: 7px 8px; }
tr.grp-gap td { height: 10px; padding: 0; background: var(--bg); border: none; }
tbody.group { border-radius: 6px; }

/* sortable */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th.sortable::after { content: " ⇅"; opacity: .35; }
th.sortable[data-dir=asc]::after { content: " ▲"; opacity: 1; color: var(--accent); }
th.sortable[data-dir=desc]::after { content: " ▼"; opacity: 1; color: var(--accent); }

/* charts / misc */
.chart-card { margin-bottom: 18px; }
.chart-card h3 { margin: 0 0 12px; font-size: 15px; }
canvas { max-height: 260px; }
.notice { background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--page-accent); color: var(--text-dim);
  padding: 11px 14px; border-radius: var(--radius-sm); font-size: 12.5px; margin-bottom: 14px; }
.notice b { color: var(--text); }
.live-note { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.section-title { margin: 26px 0 14px; font-size: 15px; font-weight: 600; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* segmented radios */
.segmented { display: inline-flex; background: var(--bg-elev-2); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); overflow: hidden; }
.segmented .seg { position: relative; padding: 9px 20px; color: var(--text-dim); font-weight: 500; font-size: 13px; cursor: pointer; }
.segmented .seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented .seg:has(input:checked) { background: var(--accent); color: var(--on-accent); }

/* dropzones */
ol.howto { margin: 0; padding-left: 20px; color: var(--text-dim); font-size: 13px; line-height: 1.9; }
ol.howto b { color: var(--text); }
.howto-note { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--accent-dim); border-left: 3px solid var(--accent); color: var(--text-dim);
  font-size: 12.5px; line-height: 1.7; }
.dropzone { border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 18px; background: var(--panel); }
.dropzone:hover { border-color: var(--accent); }
.dropzone .dz-title { font-weight: 600; font-size: 14px; }
.dropzone .dz-sub { color: var(--text-faint); font-size: 12.5px; margin: 3px 0 12px; }
.dropzone input[type=file] { width: 100%; font-size: 12.5px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: var(--text-faint); }
.label { color: var(--text-dim); font-size: 12.5px; }
.value { font-weight: 600; }
.result-ok { border-color: var(--green); } .result-err { border-color: var(--red); }
.file-report { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-elev-2, var(--panel)); border: 1px solid var(--border-soft); }
.file-report-head { font-size: 12.5px; color: var(--text-dim); margin-bottom: 6px; }
.col-report-msg { font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.col-report-ok .col-report-msg { color: var(--green); }
.col-report-partial .col-report-msg { color: var(--text); }
.col-report-bad .col-report-msg { color: var(--red); }
.col-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.col-chip { font-size: 11.5px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-dim); }
.col-chip.ok { background: var(--green-dim, rgba(36,209,106,.12)); border-color: var(--green); color: var(--green); }
.col-chip.bad { background: var(--red-dim); border-color: var(--red); color: var(--red); }
.col-chip.miss { opacity: .75; }
.field select, .field input { padding: 9px 11px; font-size: 13px; }
.inline-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 6px; }
.inline-edit select, .inline-edit input { padding: 6px 9px; font-size: 12.5px; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--text-dim); }
.mini { width: 100%; border-collapse: collapse; }
.mini td { padding: 8px 6px; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.mini td form { margin: 0; }
.empty-state { text-align: center; padding: 48px; }
.empty-state h3 { margin: 0 0 8px; } .empty-state p { color: var(--text-dim); margin: 0 0 18px; }
.alert { background: var(--red-dim); border: 1px solid var(--red); color: var(--red); padding: 10px 13px; border-radius: var(--radius-sm); font-size: 13px; }

/* spy */
.spy-filters { grid-template-columns: repeat(7, 1fr) 110px; }
@media (max-width: 1200px) { .spy-filters { grid-template-columns: repeat(4, 1fr); } }
.spy-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.spy-card { padding: 0; overflow: hidden; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.spy-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.spy-thumb { height: 160px; background: var(--bg-elev-2); position: relative; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.spy-thumb img, .spy-thumb video { width: 100%; height: 100%; object-fit: cover; }
.spy-thumb .no-media { color: var(--text-faint); font-size: 12px; text-align: center; padding: 12px; }
.profit-badge { position: absolute; top: 10px; right: 10px; padding: 5px 10px; border-radius: 8px;
  background: var(--green); color: #fff; font-weight: 600; font-size: 13px; box-shadow: var(--shadow-sm); }
.profit-badge.neg { background: var(--red); }
.profit-badge.pos { background: var(--green); }
.spy-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.spy-body h3 { margin: 0; font-size: 14px; font-weight: 600; }
.spy-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.spy-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--border-soft); padding-top: 10px; }
.spy-stats .s .l { color: var(--text-faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.spy-stats .s .v { font-weight: 600; font-size: 12.5px; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* spy detail modal */
.spy-modal[hidden] { display: none !important; }
.spy-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 24px; }
.spy-modal-backdrop { position: absolute; inset: 0; background: rgba(15,18,22,0.55); }
.spy-modal-card { position: relative; z-index: 1; width: min(1180px, 100%); max-height: calc(100vh - 48px);
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); overflow: auto; }
.spy-modal-close { position: absolute; top: 12px; right: 14px; z-index: 2; width: 34px; height: 34px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg-elev); color: var(--text-dim);
  font-size: 22px; line-height: 1; cursor: pointer; }
.spy-modal-close:hover { color: var(--text); border-color: var(--accent); }
.spy-modal-body { padding: 22px; }
.spy-detail { display: grid; grid-template-columns: minmax(280px, 34%) 1fr; gap: 22px; }
@media (max-width: 900px) { .spy-detail { grid-template-columns: 1fr; } }
.spy-detail-left { display: flex; flex-direction: column; gap: 12px; }
.spy-player { width: 100%; aspect-ratio: 9/16; max-height: 420px; object-fit: contain; background: #0c1119;
  border-radius: 10px; border: 1px solid var(--border); }
.spy-player.empty-media { display: flex; align-items: center; justify-content: center; color: var(--text-faint); }
.spy-detail-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spy-section-label { margin: 16px 0 10px; font-size: 11px; font-weight: 500; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.06em; }
.spy-detail-left .spy-section-label { margin-top: 4px; }
.spy-detail-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 600; }
.spy-detail-head .sub { color: var(--text-faint); font-size: 13px; margin-bottom: 4px; }
.spy-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.spy-stat-card { border: 1px solid var(--border); border-radius: 8px; padding: 12px 10px; text-align: center; background: var(--panel); }
.spy-stat-card .v { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.spy-stat-card .l { margin-top: 4px; font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; }
.spy-mini-table { max-height: 280px; margin-bottom: 4px; }
.spy-mini-table table { font-size: 12px; }
.spy-media-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.spy-media-card { flex: 0 0 118px; display: flex; flex-direction: column; gap: 4px; text-align: left;
  padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-elev); cursor: pointer; }
.spy-media-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }
.spy-media-card .n { font-weight: 600; font-size: 13px; }
.spy-media-card .t { font-size: 11px; color: var(--text-faint); }
.spy-media-card .thumb { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--bg-elev-2); }
.spy-media-card .thumb img, .spy-media-card .thumb video { width: 100%; height: 100%; object-fit: cover; }

/* creative library */
.crea-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.crea-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.crea-thumb { position: relative; aspect-ratio: 4/3; background: var(--bg-elev-2); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.crea-thumb img, .crea-thumb video { width: 100%; height: 100%; object-fit: cover; }
.crea-thumb .no-media { color: var(--text-faint); font-size: 13px; text-align: center; }
.crea-thumb .no-media span { font-size: 11px; }
.play-badge { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; color: #fff;
  font-size: 16px; pointer-events: none; }
.crea-body { padding: 13px; display: flex; flex-direction: column; gap: 10px; }
.crea-title { display: flex; align-items: center; gap: 6px; }
.crea-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--text-dim); }
.asset-strip { display: flex; gap: 6px; flex-wrap: wrap; }
.asset-thumb { position: relative; width: 46px; height: 46px; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-elev-2); }
.asset-thumb img, .asset-thumb video { width: 100%; height: 100%; object-fit: cover; }
.asset-thumb .mini-play { position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; color: #fff;
  font-size: 9px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.asset-thumb .del { position: absolute; top: 1px; right: 1px; width: 16px; height: 16px; padding: 0; line-height: 1;
  background: rgba(0,0,0,.7); border: none; color: #fff; border-radius: 4px; cursor: pointer; font-size: 12px; }
.crea-upload { display: flex; gap: 6px; align-items: center; margin-top: auto; }
.crea-upload input[type=file] { flex: 1; font-size: 11.5px; padding: 6px; }
.crea-upload .btn { white-space: nowrap; padding: 9px 11px; }

/* login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 390px; box-shadow: var(--shadow); }
.login-card h1 { display: flex; align-items: center; gap: 10px; font-size: 23px; margin: 0 0 4px; }
.login-card p.sub { color: var(--text-dim); margin: 0 0 22px; }
.login-card label { display: block; font-size: 12.5px; color: var(--text-dim); margin: 14px 0 6px; }
.login-card input { width: 100%; }
.login-card .btn { width: 100%; margin-top: 22px; padding: 12px; }
.hint { font-size: 12.5px; color: var(--text-faint); margin-top: 18px; text-align: center; line-height: 1.7; }
