:root{
  --bg:#0f1115;
  --card:#151923;
  --muted:#9aa4b2;
  --text:#e7ecf3;
  --primary:#7b42f6;
  --primary2:#b01eff;
  --success:#3ccf91;
  --danger:#ff5d5d;
  --border:rgba(255,255,255,0.08);
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --radius:14px;
}
*{ box-sizing:border-box; }
html, body{ margin:0; padding:0; font-family:'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color:var(--text); }
.bg{ background: radial-gradient(1200px 800px at 10% -10%, rgba(176,30,255,.18), transparent 40%), radial-gradient(900px 600px at 100% 0%, rgba(123,66,246,.15), transparent 40%), var(--bg); min-height:100vh; }
.container{ width:min(1100px, 92%); margin:0 auto; }
.center-vh{ min-height:100vh; display:flex; align-items:center; justify-content:center; }

.topbar{ position:sticky; top:0; background:rgba(15,17,21, .75); backdrop-filter: blur(10px); border-bottom:1px solid var(--border); }
.topbar-inner{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; }
.brand{ display:flex; align-items:center; gap:10px; letter-spacing:.2px; }
.logo-dot{ width:14px; height:14px; border-radius:50%; background:linear-gradient(45deg, var(--primary), var(--primary2)); box-shadow:0 0 16px rgba(176,30,255,.7); display:inline-block; }

.nav a{ color:var(--text); opacity:.9; text-decoration:none; padding:8px 10px; border-radius:10px; }
.nav a:hover{ background:rgba(255,255,255,.06); }
.nav a.danger{ color:#ffd1d1; }

.footer{ border-top:1px solid var(--border); padding:20px 0; margin-top:40px; text-align:center; }

.card{ background: var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:18px; box-shadow: var(--shadow); }
.card-narrow{ width:min(420px, 92%); }

.h1{ font-size:2rem; margin:0 0 10px; }
.h2{ font-size:1.6rem; margin:0 0 6px; }
.h3{ font-size:1.3rem; margin:0 0 6px; }
.h4{ font-size:1.1rem; margin:0 0 6px; }
.h5{ font-size:1rem; margin:0 0 6px; }

.mt-1{ margin-top:.5rem; } .mt-2{ margin-top:1rem; } .mt-3{ margin-top:1.5rem; }
.w-100{ width:100%; } .small{ font-size:.9rem; }
.muted{ color:var(--muted); }

.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:10px 14px; border-radius:12px; border:1px solid var(--border); background:#1a1f2b; color:#fff; cursor:pointer; text-decoration:none; }
.btn:hover{ filter:brightness(1.1); }
.btn-primary{ background: linear-gradient(90deg, var(--primary), var(--primary2)); border:0; }
.btn-success{ background: linear-gradient(90deg, #22c55e, #16a34a); border:0; }
.btn-ghost{ background:transparent; border:1px solid var(--border); color:#ddd; }

.alert{ padding:10px 12px; border-radius:10px; border:1px solid var(--border); background:rgba(255,255,255,.05); }
.alert-danger{ border-color: rgba(255,0,0,.25); background: rgba(255,0,0,.08); }

.form-grid{ display:grid; gap:10px; }
label{ display:block; font-size:.95rem; color:#d8deea; margin-bottom:4px; }
input, select{ width:100%; padding:10px 12px; border-radius:10px; border:1px solid var(--border); background:#101521; color:#eaf0ff; outline:none; }
input:focus, select:focus{ border-color: rgba(123,66,246,.55); box-shadow: 0 0 0 3px rgba(123,66,246,.15); }

.row{ display:flex; gap:10px; flex-wrap:wrap; }
.flex-1{ flex:1 1 260px; }

.grid{ display:grid; }
.cols-2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-4{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-1{ gap:12px; } .gap-2{ gap:20px; }
.col-span-2 { grid-column: span 2; }

.table-responsive{ width:100%; overflow:auto; border-radius:12px; border:1px solid var(--border); }
.table{ width:100%; border-collapse:collapse; }
.table th, .table td{ padding:10px 12px; border-bottom:1px solid var(--border); text-align:left; }
.table thead th{ background:#0f1420; position:sticky; top:0; }

.details{ margin-bottom:14px; border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.details > summary{ padding:12px 14px; cursor:pointer; background:#121726; font-weight:600; }
.details[open] > summary{ border-bottom:1px solid var(--border); }
.details .table-responsive{ border:0; border-radius:0; }

.chip{ display:inline-block; padding:4px 8px; background:rgba(255,255,255,.08); border:1px solid var(--border); border-radius:999px; font-size:.8rem; color:#d7dbff; }

code{ background:#0f1420; border:1px solid var(--border); padding:2px 6px; border-radius:8px; }

@media (max-width: 900px){
  .cols-4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-2{ grid-template-columns: 1fr; }
}
@media (max-width: 520px){
  .cols-4{ grid-template-columns: 1fr; }
}
.tv-card:focus { outline: none; }
/* Admin playlist file strip */
.file-strip{ display:flex; gap:12px; overflow:auto; padding:8px 2px; }
.file-card{ min-width:220px; max-width:240px; background:#121726; border:1px solid var(--border); border-radius:12px; padding:10px; }
.file-thumb{ height:110px; border:1px solid var(--border); border-radius:10px; background:#0f1420; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.file-thumb img, .file-thumb video{ max-width:100%; max-height:100%; object-fit:cover; }
.file-name{ margin-top:6px; font-size:.9rem; word-break:break-word; }
.file-meta{ color:var(--muted); font-size:.82rem; }
.file-actions{ display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.small-btn{ padding:6px 10px; border-radius:10px; border:1px solid var(--border); background:#101521; color:#e7ecf3; font-size:.85rem; cursor:pointer; text-decoration:none; }
.small-btn:hover{ filter:brightness(1.1); }
.small-btn.danger{ background:transparent; color:#ffd1d1; }
.small-input{ width:86px; padding:8px 10px; border-radius:10px; border:1px solid var(--border); background:#101521; color:#eaf0ff; }
.count-chip{ display:inline-block; padding:2px 8px; background:rgba(255,255,255,.06); border:1px solid var(--border); border-radius:999px; font-size:.8rem; color:#d7dbff; margin-left:8px; }

