/* Youvo Live admin — the app's own palette, from the mockups. */
:root {
  --bg: #0b0f16;
  --surface: rgba(255, 255, 255, 0.07);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --divider: rgba(229, 231, 235, 0.07);
  --gold: #f7d27a;
  --gold-border: rgba(247, 210, 122, 0.55);
  --on-gold: #1a1206;
  --cyan: #00d1ff;
  --text: #e5e7eb;
  --muted: #9aa3b2;
  --faint: #8c95a5;
  --danger: #f87171;
  --success: #34d399;
  --purple: #6a3dff;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: linear-gradient(180deg, #0f1522 0%, var(--bg) 60%);
  color: var(--text);
  font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--cyan); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 600; margin: 0; }
h1 { font-size: 26px; color: var(--gold); }
h2 { font-size: 20px; }
h3 { font-size: 16px; color: var(--gold); }

/* --- shell ---------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side {
  padding: 22px 16px; border-right: 1px solid var(--divider);
  display: flex; flex-direction: column; gap: 6px;
}
.side .brand { margin: 4px 8px 18px; }
.side .brand small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.side nav a {
  display: block; padding: 10px 12px; border-radius: 10px; color: var(--muted);
  text-decoration: none;
}
.side nav a.active, .side nav a:hover { background: var(--surface); color: var(--gold); }
.side .me { margin-top: auto; padding: 12px; border-top: 1px solid var(--divider); font-size: 13px; color: var(--muted); }
.side .me strong { color: var(--text); display: block; }
.main { padding: 26px 32px 60px; max-width: 1240px; }
.main header { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.main header .sub { color: var(--muted); }

/* --- widgets -------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 26px; }
.card {
  background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius);
  padding: 16px 18px;
}
.card .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.card .value { font-size: 26px; font-family: "Playfair Display", Georgia, serif; color: var(--gold); margin-top: 6px; }
.card .value.plain { color: var(--text); }
.card .hint { color: var(--faint); font-size: 12px; margin-top: 4px; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
input[type=text], input[type=number], input[type=search], select, textarea {
  background: rgba(255,255,255,0.06); border: 1px solid var(--divider); border-radius: 10px;
  padding: 9px 12px; color: var(--text); outline: none; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold-border); }
select option { background: #131a26; }
.btn {
  border: 1px solid var(--gold-border); background: transparent; color: var(--text);
  border-radius: 20px; padding: 8px 16px; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface); }
.btn.primary { background: linear-gradient(180deg, #fff4cf, #f7d27a 45%, #d9a94e); color: var(--on-gold); border-color: transparent; font-weight: 600; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.small { padding: 5px 11px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: default; }

table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--divider); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
tr.row { cursor: pointer; }
tr.row:hover td { background: var(--surface-strong); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 13px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; border: 1px solid var(--divider); color: var(--muted); }
.pill.gold { color: var(--gold); border-color: var(--gold-border); }
.pill.danger { color: var(--danger); border-color: var(--danger); }
.pill.success { color: var(--success); border-color: var(--success); }
.pill.cyan { color: var(--cyan); border-color: var(--cyan); }
.pos { color: var(--success); } .neg { color: var(--danger); }
.empty { padding: 28px; text-align: center; color: var(--faint); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } .shell { grid-template-columns: 1fr; } .side { flex-direction: row; flex-wrap: wrap; } .side .me { margin: 0; border: 0; } }
.section { margin-top: 24px; }
.section h3 { margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.banner { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; }
.banner.error { border-color: var(--danger); color: var(--danger); background: rgba(248,113,113,.08); }
.banner.ok { border-color: var(--success); color: var(--success); background: rgba(52,211,153,.08); }
#toasts { position: fixed; top: 18px; right: 18px; display: grid; gap: 8px; z-index: 10; max-width: min(420px, 90vw); }
#toasts .banner { margin: 0; background: #131a26; box-shadow: 0 10px 30px rgba(0,0,0,.45); }

/* --- login ---------------------------------------------------------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login .box { width: min(420px, 100%); text-align: center; }
.login .box h1 { font-size: 34px; }
.login .box p { color: var(--muted); }
.login .gsi { display: flex; justify-content: center; margin: 26px 0 12px; min-height: 44px; }

/* --- dialog --------------------------------------------------------- */
dialog {
  background: #121826; color: var(--text); border: 1px solid var(--gold-border); border-radius: var(--radius);
  padding: 22px 24px; width: min(460px, 92vw);
}
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog form { display: grid; gap: 12px; }
dialog label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
dialog .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
dialog p { margin: 0; color: var(--muted); font-size: 14px; }
dialog .filefield { display: grid; gap: 6px; }
dialog .filefield .current { display: flex; align-items: center; gap: 10px; }
dialog .filefield .current img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; border: 1px solid var(--divider); }
dialog .filefield input[type=file] { color: var(--muted); }
dialog label.inline { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }

/* --- preview -------------------------------------------------------- */
dialog:has(form.pv) { width: min(680px, 92vw); }
dialog form.pv { width: 100%; }
.pv-stage { display: grid; place-items: center; background: #0b0f16; border: 1px solid var(--divider); border-radius: 12px; padding: 16px; min-height: 160px; }
.pv-big { max-width: 100%; max-height: 260px; }
.pv-mid { max-width: 100%; max-height: 160px; }
.pv-lottie { width: 240px; height: 240px; }
.pv-lottie.pv-mid { width: 160px; height: 160px; }
.pv-small { width: 40px; height: 40px; object-fit: contain; }
.pv-row { display: flex; align-items: center; gap: 10px; }
.pv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.pv-ctx { background: var(--surface); border: 1px solid var(--divider); border-radius: 12px; padding: 12px; display: grid; gap: 10px; justify-items: center; }
.pv-avatar { position: relative; width: 90px; height: 90px; display: grid; place-items: center; }
.pv-avatar-circle { width: 62px; height: 62px; border-radius: 50%; background: linear-gradient(180deg, #fff4cf, #f7d27a 45%, #d9a94e); color: var(--on-gold); display: grid; place-items: center; font: 600 24px "Playfair Display", Georgia, serif; }
.pv-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.pv-name { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.pv-badge { width: 22px; height: 22px; object-fit: contain; }
.pv-bubble { background-size: 100% 100%; background-repeat: no-repeat; padding: 10px 16px; border-radius: 14px; min-width: 160px; background-color: var(--surface-strong); }
.pv-tile { width: 88px; text-align: center; background: var(--surface); border: 1px solid var(--gold-border); border-radius: 12px; padding: 10px 4px; font-size: 13px; }
.pv-tile img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.pv-price { color: var(--gold); }
