/* Painel VSL: tema claro simples, sem framework. */
:root {
  --bg: #f6f7f9; --surface: #fff; --text: #14181f; --muted: #5d6675; --line: #e3e6eb;
  --accent: #2563eb; --accent-ink: #fff; --danger: #c62828; --ok: #1b7f3b; --warn: #a86200;
  --radius: 12px; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-decoration: none; }
h1 { font-size: 24px; margin: 0; }
h2 { font-size: 17px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top__brand { font-weight: 700; color: var(--text); }
.top__nav { display: flex; align-items: center; gap: 16px; }
.main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 80px; display: flex; flex-direction: column; gap: 20px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 820px) { .grid2 { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; padding: 10px 16px;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; font-size: 14px; line-height: 1.2; cursor: pointer; }
.btn--sm { padding: 7px 12px; font-size: 13px; }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn--danger { background: transparent; color: var(--danger); border: 1px solid var(--line); }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }

label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
label.f small { font-weight: 400; }
input, select, textarea { font: inherit; color: var(--text); padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; width: 100%; }
input[type="color"] { padding: 2px; height: 40px; }
input[type="checkbox"] { width: auto; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text); font-weight: 500; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.vid { display: flex; flex-direction: column; overflow: hidden; padding: 0; color: var(--text); }
.vid__thumb { aspect-ratio: 16 / 9; background: #11151c center / cover no-repeat; position: relative; }
.vid__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.vid__name { font-weight: 600; }
.vid__nums { display: flex; gap: 14px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef1f5; color: var(--muted); }
.badge--pronto { background: #e6f4ea; color: var(--ok); }
.badge--erro { background: #fdecea; color: var(--danger); }
.badge--processando, .badge--enviando { background: #fff3e0; color: var(--warn); }
.vid__thumb .badge { position: absolute; left: 10px; top: 10px; }

.preview { position: relative; background: #000; border-radius: 10px; overflow: hidden; }
.preview iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.code { position: relative; }
.code pre { margin: 0; padding: 12px 84px 12px 14px; background: #0f1420; color: #dfe6f3; border-radius: 10px; font: 12.5px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
.code .btn { position: absolute; right: 8px; top: 8px; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tabs button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--text); color: #fff; border-color: var(--text); }

.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 30px; text-align: center; color: var(--muted); cursor: pointer; }
.drop.is-over { border-color: var(--accent); background: #eef4ff; }
.progress { height: 8px; background: #eef1f5; border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* Analytics */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters select, .filters input { width: auto; padding: 7px 9px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.tile span { font-size: 13px; color: var(--muted); }
.tile b { font-size: 26px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile small { color: var(--muted); font-variant-numeric: tabular-nums; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; touch-action: none; }
.chart .grid { stroke: #e9ecf0; stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart .area { fill: var(--accent); opacity: .1; }
.chart .bar { fill: var(--accent); }
.chart .bar.is-hover { fill: #1d4ed8; }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.chart .cta { stroke: var(--warn); stroke-width: 1.5; stroke-dasharray: 4 3; }
.chart .cta-label { fill: var(--warn); font-size: 11px; font-weight: 600; }
.tip { position: absolute; top: 0; transform: translateX(-50%); padding: 6px 10px; border-radius: 8px; white-space: nowrap; pointer-events: none;
  background: #14181f; color: #fff; font-size: 12.5px; font-variant-numeric: tabular-nums; }
table.t { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; }
table.t th, table.t td { text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t th:first-child, table.t td:first-child { text-align: left; }
table.t th { font-size: 12.5px; color: var(--muted); font-weight: 600; }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #14181f; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 20; }
.toast.is-err { background: var(--danger); }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.login { max-width: 360px; margin: 60px auto; }
