* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #060913; --bg2: #0a0f1f;
  --panel: rgba(148, 163, 210, .055); --panel2: rgba(148, 163, 210, .11);
  --border: rgba(148, 163, 210, .16); --border2: rgba(103, 232, 249, .35);
  --text: #e7ecf7; --muted: #8b96ad;
  --cy: #22d3ee; --vi: #a855f7; --in: #6366f1;
  --grad: linear-gradient(100deg, #22d3ee, #6366f1 55%, #a855f7);
  --green: #34d399; --red: #fb7185;
  --glow: 0 0 24px rgba(34, 211, 238, .18);
  --shadow-lg: 0 18px 50px rgba(2, 6, 18, .65);
}
body.light {
  --bg: #eef1f8; --bg2: #e2e8f4;
  --panel: rgba(255, 255, 255, .72); --panel2: rgba(99, 102, 241, .08);
  --border: rgba(70, 90, 140, .18); --border2: rgba(99, 102, 241, .4);
  --text: #171f33; --muted: #5b6478;
  --glow: 0 0 24px rgba(99, 102, 241, .15);
  --shadow-lg: 0 18px 50px rgba(30, 40, 80, .18);
}
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 15px;
  overflow-x: hidden;
}
/* aurora latar bergerak */
body::before {
  content: ""; position: fixed; inset: -30%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(38% 30% at 22% 24%, rgba(34, 211, 238, .13), transparent 70%),
    radial-gradient(34% 30% at 78% 18%, rgba(168, 85, 247, .12), transparent 70%),
    radial-gradient(40% 34% at 55% 85%, rgba(99, 102, 241, .12), transparent 70%);
  animation: aurora 22s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate(3%, -2%) rotate(2deg) scale(1.06); }
  100% { transform: translate(-3%, 2%) rotate(-2deg) scale(1.02); }
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.err { color: var(--red); min-height: 1.2em; font-size: 13px; }

/* ================= LOGIN — dinding layar animasi ================= */
#login { position: fixed; inset: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
#wall {
  position: absolute; inset: -6%; z-index: 0; display: grid;
  grid-template-columns: repeat(9, 1fr); grid-auto-rows: 1fr; gap: 14px; padding: 10px;
  transform: perspective(1400px) rotateX(14deg) rotateY(-7deg) scale(1.12);
  opacity: .68; filter: saturate(1.15);
  animation: wallDrift 30s ease-in-out infinite alternate;
}
@keyframes wallDrift {
  0%   { transform: perspective(1400px) rotateX(14deg) rotateY(-7deg) scale(1.12) translateY(0); }
  100% { transform: perspective(1400px) rotateX(11deg) rotateY(-3deg) scale(1.17) translateY(-24px); }
}
.tile {
  border-radius: 9px; border: 1px solid rgba(148, 163, 210, .2);
  background: #0b1120; overflow: hidden; position: relative; min-height: 70px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .5);
}
.tile .face { position: absolute; inset: 0; opacity: 0; animation: tileCycle 12s linear infinite; }
.tile .face:nth-child(2) { animation-delay: 4s; }
.tile .face:nth-child(3) { animation-delay: 8s; }
@keyframes tileCycle {
  0% { opacity: 0; } 4% { opacity: 1; } 30% { opacity: 1; } 37% { opacity: 0; } 100% { opacity: 0; }
}
.face.f-grad1 { background: linear-gradient(120deg, #0ea5e9, #6366f1, #a855f7); background-size: 250% 250%; animation: tileCycle 12s linear infinite, gradMove 6s ease infinite alternate; }
.face.f-grad2 { background: linear-gradient(200deg, #f43f5e, #f59e0b); background-size: 250% 250%; animation: tileCycle 12s linear infinite, gradMove 7s ease infinite alternate; }
.face.f-grad3 { background: linear-gradient(160deg, #059669, #22d3ee); background-size: 250% 250%; animation: tileCycle 12s linear infinite, gradMove 5s ease infinite alternate; }
@keyframes gradMove { 0% { background-position: 0% 0%; } 100% { background-position: 100% 100%; } }
.face .bars { position: absolute; left: 12%; right: 12%; bottom: 14%; top: 30%; display: flex; align-items: flex-end; gap: 9%; }
.face .bars i { flex: 1; background: rgba(255, 255, 255, .85); border-radius: 2px 2px 0 0; animation: barGrow 2.6s ease-in-out infinite alternate; }
.face .bars i:nth-child(2) { animation-delay: .4s; } .face .bars i:nth-child(3) { animation-delay: .8s; }
.face .bars i:nth-child(4) { animation-delay: 1.2s; } .face .bars i:nth-child(5) { animation-delay: 1.6s; }
@keyframes barGrow { from { height: 18%; } to { height: 92%; } }
.face .tick { position: absolute; left: 0; right: 0; bottom: 8%; height: 16%; overflow: hidden; }
.face .tick i {
  position: absolute; white-space: nowrap; font-style: normal; font-size: 10px; color: #fff; opacity: .9;
  animation: ticker 7s linear infinite;
}
@keyframes ticker { from { left: 100%; } to { left: -220%; } }
.face .dot { position: absolute; width: 26%; aspect-ratio: 1; border-radius: 50%; border: 3px solid rgba(255,255,255,.8);
  top: 18%; left: 37%; animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(.9); opacity: .6; } 50% { transform: scale(1.08); opacity: 1; } }

/* ===== scene "siaran langsung" — presenter berbicara ===== */
.sc-live { background: linear-gradient(160deg, #1a2340, #0d1226 60%, #131b36); }
.sc-live .studio { position: absolute; inset: 0;
  background: radial-gradient(60% 55% at 70% 30%, rgba(99,102,241,.35), transparent 70%),
              radial-gradient(45% 45% at 20% 65%, rgba(34,211,238,.18), transparent 70%); }
.sc-live .person { position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%);
  width: 46%; height: 62%; animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-2px); } }
.sc-live .person .head { position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 42%; aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(150deg, #f0c8a0, #cf9f74); }
.sc-live .person .head::after { /* mulut berbicara */
  content: ""; position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%);
  width: 34%; height: 9%; border-radius: 40%; background: #7a4a35;
  animation: talk .42s ease-in-out infinite alternate; }
@keyframes talk { from { transform: translateX(-50%) scaleY(.4); } to { transform: translateX(-50%) scaleY(1.6); } }
.sc-live .person .torso { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; height: 58%; border-radius: 45% 45% 8% 8% / 70% 70% 8% 8%;
  background: linear-gradient(160deg, #2b3d66, #17203c); }
.sc-live .person .torso::before { /* kerah kemeja */
  content: ""; position: absolute; top: 6%; left: 50%; transform: translateX(-50%);
  width: 26%; height: 40%; background: linear-gradient(#e8ecf5, #c6cede);
  clip-path: polygon(50% 0, 100% 0, 50% 100%, 0 0); }
.sc-live .live-tag { position: absolute; top: 7%; left: 6%; font-size: 9px; font-weight: 800;
  color: #fff; background: #ef4444; padding: 2px 7px; border-radius: 4px; letter-spacing: .5px;
  animation: blinkTag 1.5s ease-in-out infinite; }
@keyframes blinkTag { 50% { opacity: .5; } }
.sc-live .wave { position: absolute; right: 8%; top: 30%; display: flex; gap: 2px; align-items: flex-end; height: 22%; }
.sc-live .wave i { width: 3px; background: #67e8f9; border-radius: 2px; animation: waveB .7s ease-in-out infinite alternate; }
.sc-live .wave i:nth-child(2) { animation-delay: .12s; } .sc-live .wave i:nth-child(3) { animation-delay: .24s; }
.sc-live .wave i:nth-child(4) { animation-delay: .36s; } .sc-live .wave i:nth-child(5) { animation-delay: .48s; }
@keyframes waveB { from { height: 18%; } to { height: 100%; } }
.sc-live .lower3 { position: absolute; left: 5%; right: 24%; bottom: 8%; height: 17%;
  background: linear-gradient(90deg, rgba(10,14,30,.92), rgba(10,14,30,.55)); border-left: 3px solid #ef4444;
  border-radius: 3px; padding: 2px 6px; }
.sc-live .lower3 b { display: block; height: 4px; width: 62%; background: #e7ecf7; border-radius: 2px; margin-top: 2px; }
.sc-live .lower3 u { display: block; height: 3px; width: 40%; background: #67a3f9; border-radius: 2px; margin-top: 3px; }

/* ===== scene film sinematik (letterbox + subtitle) ===== */
.sc-film { background: #000; }
.sc-film .scene { position: absolute; inset: 12% 0; overflow: hidden;
  background: linear-gradient(180deg, #2d1b4e 0%, #b83266 55%, #f5945c 78%, #2a1a3a 100%);
  animation: pan 14s ease-in-out infinite alternate; }
@keyframes pan { from { transform: scale(1.05) translateX(-2%); } to { transform: scale(1.12) translateX(2%); } }
.sc-film .sun { position: absolute; top: 26%; left: 58%; width: 26%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(#ffe9b0, #ff9f5a 65%, transparent 72%); filter: blur(1px);
  animation: sunset 18s ease-in-out infinite alternate; }
@keyframes sunset { from { transform: translateY(0); } to { transform: translateY(18%); } }
.sc-film .hill { position: absolute; bottom: -8%; width: 80%; height: 42%; border-radius: 50% 50% 0 0; background: #1b1030; }
.sc-film .hill.h1 { left: -22%; } .sc-film .hill.h2 { right: -28%; height: 34%; background: #241543; }
.sc-film .lbox { position: absolute; left: 0; right: 0; height: 12%; background: #000; z-index: 2; }
.sc-film .lbox.top { top: 0; } .sc-film .lbox.bot { bottom: 0; }
.sc-film .subt { position: absolute; bottom: 14%; left: 0; right: 0; text-align: center; z-index: 3;
  font-size: 8px; color: #ffe9b0; text-shadow: 0 1px 2px #000; font-style: normal;
  animation: subtCycle 9s linear infinite; }
@keyframes subtCycle { 0%,4% { opacity: 0; } 8%,44% { opacity: 1; } 48%,54% { opacity: 0; } 58%,94% { opacity: 1; } 98%,100% { opacity: 0; } }

/* ===== scene CCTV (scanline + REC + timestamp) ===== */
.sc-cctv { background: #0a120c; }
.sc-cctv .cam-scene { position: absolute; inset: 0; filter: saturate(.35) brightness(.9);
  background:
    linear-gradient(115deg, transparent 42%, rgba(140,180,150,.14) 42%, rgba(140,180,150,.14) 58%, transparent 58%),
    linear-gradient(65deg, transparent 30%, rgba(120,160,130,.1) 30%, rgba(120,160,130,.1) 44%, transparent 44%),
    radial-gradient(80% 90% at 50% 0%, #22371f 0%, #101d12 55%, #060c08 100%);
  animation: camZoom 16s ease-in-out infinite alternate; }
@keyframes camZoom { from { transform: scale(1); } to { transform: scale(1.09) translateX(-1.5%); } }
.sc-cctv .scan { position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px);
  animation: flick 4s steps(12) infinite; }
@keyframes flick { 0%,92% { opacity: .8; } 94% { opacity: .4; } 96% { opacity: .9; } 98% { opacity: .5; } 100% { opacity: .8; } }
.sc-cctv b { position: absolute; z-index: 3; font-size: 8px; font-weight: 600; color: #b7f7c2;
  font-family: Consolas, monospace; text-shadow: 0 0 4px rgba(0,0,0,.9); }
.sc-cctv .cam-id { top: 6%; left: 6%; }
.sc-cctv .cam-rec { top: 6%; right: 6%; color: #ff6b6b; animation: blinkTag 1.2s infinite; }
.sc-cctv .cam-ts { bottom: 6%; left: 6%; }

/* ===== scene grafik garis & donat ===== */
.sc-line { background: linear-gradient(160deg, #0c1428, #101b33); }
.sc-line svg { position: absolute; inset: 12%; width: 76%; height: 76%; }
.sc-line polyline { fill: none; stroke: #67e8f9; stroke-width: 2.4; stroke-linecap: round;
  stroke-dasharray: 220; stroke-dashoffset: 220; animation: drawLine 5s ease-out infinite;
  filter: drop-shadow(0 0 4px rgba(103,232,249,.8)); }
.sc-line polyline.p2 { stroke: #a78bfa; animation-delay: .6s; stroke-dasharray: 240; stroke-dashoffset: 240; }
@keyframes drawLine { 0% { stroke-dashoffset: 220; opacity: 1; } 55% { stroke-dashoffset: 0; opacity: 1; } 85% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.sc-donut { background: linear-gradient(160deg, #101228, #182036); }
.sc-donut .ring { position: absolute; top: 50%; left: 50%; width: 52%; aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: conic-gradient(#22d3ee 0 40%, #a855f7 40% 68%, #f59e0b 68% 85%, rgba(148,163,210,.25) 85%);
  animation: spinSlow 9s linear infinite; }
@keyframes spinSlow { to { transform: translate(-50%, -50%) rotate(360deg); } }
.sc-donut .ring::after { content: ""; position: absolute; inset: 26%; border-radius: 50%; background: #131b2e; }
#login::after { /* vignette agar kartu login menonjol */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(58% 58% at 50% 46%, rgba(6, 9, 19, .42) 0%, rgba(6, 9, 19, .85) 100%);
}
.login-card {
  position: relative; z-index: 2;
  background: rgba(10, 15, 31, .72); backdrop-filter: blur(18px);
  border: 1px solid var(--border); border-radius: 22px;
  padding: 40px 38px; width: 400px; display: flex; flex-direction: column; gap: 15px; text-align: center;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: cardIn .7s cubic-bezier(.2, .9, .25, 1.2) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) scale(.96); } }
.login-card .logo-img { width: 74px; margin: 0 auto; filter: drop-shadow(0 0 18px rgba(34, 211, 238, .5)); animation: floatY 4s ease-in-out infinite alternate; }
@keyframes floatY { from { transform: translateY(0); } to { transform: translateY(-7px); } }
.brand-name {
  font-size: 27px; font-weight: 800; letter-spacing: .5px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline { font-size: 12.5px; color: var(--muted); letter-spacing: .4px; line-height: 1.6; }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row svg { border-radius: 8px; flex-shrink: 0; }
.captcha-row input { flex: 1; min-width: 0; }
.captcha-refresh { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 8px; width: 40px; height: 44px; cursor: pointer; font-size: 16px; }
.captcha-refresh:hover { color: var(--cy); border-color: var(--border2); }
.lang-row { display: flex; justify-content: center; }

/* ================= LAYOUT ================= */
header {
  display: flex; align-items: center; gap: 22px; padding: 0 26px; height: 64px;
  background: rgba(10, 15, 31, .78); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
body.light header { background: rgba(255, 255, 255, .78); }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand img { width: 34px; filter: drop-shadow(0 0 10px rgba(34, 211, 238, .45)); }
.brand b {
  font-size: 17px; font-weight: 800; letter-spacing: .4px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
nav { display: flex; gap: 2px; flex: 1; }
nav button {
  background: none; border: none; color: var(--muted); padding: 8px 15px;
  border-radius: 9px; cursor: pointer; font-size: 14.5px; font-weight: 600;
  position: relative; transition: color .2s;
}
nav button:hover { color: var(--text); }
nav button.active { color: var(--text); }
nav button.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 1px; height: 2.5px;
  border-radius: 3px; background: var(--grad);
  box-shadow: 0 0 12px rgba(34, 211, 238, .7);
  animation: navIn .35s cubic-bezier(.2, .9, .3, 1.4) both;
}
@keyframes navIn { from { transform: scaleX(.2); opacity: 0; } }
.head-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  background: none; border: 1px solid var(--border); border-radius: 50%;
  width: 38px; height: 38px; cursor: pointer; font-size: 16px; transition: all .2s; color: var(--text);
}
.icon-btn:hover { border-color: var(--border2); box-shadow: var(--glow); }
select.lang-sel {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 7px 8px; cursor: pointer; font-size: 14px;
}
.admin-wrap { position: relative; }
main { padding: 26px 28px; max-width: 1520px; margin: 0 auto; }

/* ================= KONTROL ================= */
button { font-family: inherit; font-size: 14px; }
.primary {
  background: var(--grad); color: #fff; border: none; padding: 10px 20px;
  border-radius: 10px; cursor: pointer; font-weight: 700; letter-spacing: .2px;
  box-shadow: 0 4px 18px rgba(99, 102, 241, .4); transition: transform .15s, box-shadow .15s;
}
.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 26px rgba(99, 102, 241, .55); }
.primary:disabled { opacity: .5; transform: none; cursor: default; }
.ghost {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  padding: 9px 15px; border-radius: 10px; cursor: pointer; transition: all .2s;
}
.ghost:hover { border-color: var(--border2); box-shadow: var(--glow); }
.danger-text { color: var(--red) !important; }
input, select, textarea {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  padding: 10px 13px; border-radius: 10px; font-size: 14px; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--border2); box-shadow: 0 0 0 3px rgba(34, 211, 238, .12);
}
select option { background: var(--bg2); color: var(--text); }
textarea { min-height: 160px; font-family: Consolas, monospace; font-size: 13px; }

/* ================= TOOLBAR & KARTU ================= */
.toolbar { display: flex; align-items: center; margin-bottom: 24px; gap: 14px; flex-wrap: wrap; }
.toolbar h2 { font-size: 22px; margin-right: 4px; letter-spacing: .3px; }
.toolbar .spacer { flex: 1; }
.badge {
  font-size: 12px; background: var(--panel2); border: 1px solid var(--border);
  padding: 2px 10px; border-radius: 20px; color: var(--muted); vertical-align: middle;
}
.search-box { position: relative; }
.search-box input { padding-left: 34px; width: 220px; }
.search-box::before { content: "🔍"; position: absolute; left: 10px; top: 9px; font-size: 13px; opacity: .6; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 18px; }
.card {
  background: var(--panel); backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 15px;
  box-shadow: 0 6px 22px rgba(2, 6, 18, .35); transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative; animation: cardUp .45s ease both;
}
.cards .card:nth-child(2) { animation-delay: .05s; } .cards .card:nth-child(3) { animation-delay: .1s; }
.cards .card:nth-child(4) { animation-delay: .15s; } .cards .card:nth-child(5) { animation-delay: .2s; }
.cards .card:nth-child(6) { animation-delay: .25s; } .cards .card:nth-child(n+7) { animation-delay: .3s; }
@keyframes cardUp { from { opacity: 0; transform: translateY(16px); } }
.card:hover { transform: translateY(-3px); border-color: var(--border2); box-shadow: var(--glow), var(--shadow-lg); }
.card .thumb {
  height: 140px; background: linear-gradient(135deg, #1c2438, #0a0f1e);
  display: flex; align-items: center; justify-content: center; font-size: 40px;
  border-radius: 15px 15px 0 0; overflow: hidden; position: relative; cursor: pointer;
}
.card .thumb img, .card .thumb video { width: 100%; height: 100%; object-fit: cover; }
.card .meta { padding: 12px 14px; display: flex; align-items: flex-start; gap: 8px; }
.card .meta .info { flex: 1; min-width: 0; }
.card .meta .name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta .sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.pill {
  position: absolute; right: 8px; bottom: 8px; font-size: 12px; font-weight: 700;
  padding: 3px 11px; border-radius: 6px; color: #04121a;
}
.pill.on { background: var(--green); box-shadow: 0 0 14px rgba(52, 211, 153, .8); animation: pulse 2.4s ease-in-out infinite; }
.pill.off { background: var(--red); color: #2a060d; }
.pill.live { background: #f43f5e; color: #fff; animation: pulse 1.6s ease-in-out infinite; }
.dur-badge {
  position: absolute; right: 8px; bottom: 8px; font-size: 12px; font-weight: 600;
  background: rgba(0, 0, 0, .72); color: #fff; padding: 2px 8px; border-radius: 5px;
}
.tvframe {
  width: 82%; height: 78%; border: 5px solid #030509; border-radius: 7px; background: #121826;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .6), 0 0 0 1px rgba(148, 163, 210, .15); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.tvframe img { width: 100%; height: 100%; object-fit: cover; }
.tvframe .noimg { color: #39435c; font-size: 26px; }
.stack { position: relative; width: 120px; height: 84px; }
.stack span {
  position: absolute; width: 100px; height: 62px; border: 4px solid #030509; border-radius: 5px;
  background: linear-gradient(135deg, #303c5c, #121826);
}
.stack span:nth-child(1) { top: 0; left: 20px; opacity: .5; }
.stack span:nth-child(2) { top: 8px; left: 10px; opacity: .75; }
.stack span:nth-child(3) { top: 16px; left: 0; }

/* kebab */
.kebab { position: relative; flex-shrink: 0; }
.kebab > button {
  background: none; border: none; color: var(--muted); font-size: 18px;
  cursor: pointer; padding: 2px 7px; border-radius: 7px; line-height: 1;
}
.kebab > button:hover { background: var(--panel2); color: var(--text); }
.drop {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 90; min-width: 175px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 11px;
  box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column;
  animation: dropIn .18s ease both;
}
/* baris/kartu yang menunya terbuka diangkat di atas saudara-saudaranya
   (tiap .pl-item/.card punya stacking context sendiri karena animasi) */
.menu-open { position: relative !important; z-index: 80 !important; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } }
.drop button {
  background: none; border: none; text-align: left; padding: 9px 12px; cursor: pointer;
  color: var(--text); border-radius: 8px; font-size: 14px;
}
.drop button:hover { background: var(--panel2); }

/* playlist editor */
.pl-item {
  display: flex; align-items: center; gap: 12px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px;
  animation: cardUp .3s ease both; cursor: grab;
}
.pl-item:hover { border-color: var(--border2); }
.pl-item:active { cursor: grabbing; }
.pl-item .grip { color: var(--muted); font-size: 15px; letter-spacing: -2px; user-select: none; }
.pl-item.dragging { opacity: .4; border-style: dashed; }
.pl-item.drop-above { box-shadow: 0 -3px 0 0 var(--cy), 0 0 14px rgba(34,211,238,.35); }
.pl-item.drop-below { box-shadow: 0 3px 0 0 var(--cy), 0 0 14px rgba(34,211,238,.35); }
#plList.drag-over .empty { border-color: var(--cy); color: var(--cy); box-shadow: var(--glow); }
.lib-row { cursor: grab; }
.lib-row:active { cursor: grabbing; }
.pl-item .pl-thumb {
  width: 64px; height: 40px; background: #0a0f1e; border-radius: 7px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
}
.pl-item .pl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pl-item .pl-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-item .pl-kind { font-size: 12px; color: var(--muted); width: 64px; }
.pl-item input.dur { width: 78px; }
.mini { padding: 4px 10px; font-size: 13px; }

/* field durasi ala AbleSign: label di garis border + sufiks detik */
.dur-wrap {
  position: relative; display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px 7px;
  background: transparent; flex-shrink: 0;
}
.dur-wrap:focus-within { border-color: var(--border2); box-shadow: 0 0 0 3px rgba(34,211,238,.1); }
.dur-wrap label {
  position: absolute; top: -8px; left: 9px; font-size: 10px; font-weight: 700;
  letter-spacing: .08em; color: var(--muted); text-transform: uppercase;
  background: var(--bg); padding: 0 5px; border-radius: 4px; line-height: 1.3;
}
.dur-wrap input.dur {
  border: none; background: none; padding: 0; width: 46px; font-size: 15px; font-weight: 700;
  text-align: center; box-shadow: none; -moz-appearance: textfield; cursor: text;
}
.dur-wrap input.dur::-webkit-inner-spin-button,
.dur-wrap input.dur::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.dur-wrap input.dur:focus { box-shadow: none; border: none; }
.dur-wrap .sfx { color: var(--muted); font-size: 12.5px; }
/* tombol - / + yang besar dan jelas */
.step-btn {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  border: 1px solid var(--border); background: var(--panel2); color: var(--cy);
  font-size: 16px; font-weight: 800; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s; user-select: none;
}
.step-btn:hover { border-color: var(--border2); color: #fff; background: rgba(34,211,238,.18); box-shadow: 0 0 10px rgba(34,211,238,.35); }
.step-btn:active { transform: scale(.88); }
.pl-item .clock-ic { font-size: 13px; width: 16px; text-align: center; }

/* modal */
#modalWrap {
  position: fixed; inset: 0; background: rgba(4, 7, 16, .7); backdrop-filter: blur(6px);
  z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px;
}
#modal {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 18px;
  padding: 28px; width: 100%; max-width: 620px; max-height: 88vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); animation: cardIn .35s cubic-bezier(.2, .9, .3, 1.2) both;
}
#modal h3 { margin-bottom: 18px; font-size: 19px; }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 13px; color: var(--muted); font-weight: 600; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.mtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.mtabs button {
  background: none; border: none; padding: 9px 14px; cursor: pointer; color: var(--muted);
  border-bottom: 2px solid transparent; font-size: 14px; font-weight: 600;
}
.mtabs button.active { color: var(--cy); border-bottom-color: var(--cy); }

.dropzone {
  border: 2px dashed var(--border); border-radius: 15px; padding: 44px 20px;
  text-align: center; color: var(--muted); cursor: pointer; transition: all .2s; font-size: 15px;
}
.dropzone:hover, .dropzone.over { border-color: var(--cy); background: var(--panel2); box-shadow: var(--glow); }
.dropzone .up-ic { font-size: 42px; display: block; margin-bottom: 10px; }
.file-list { margin-top: 14px; font-size: 13px; color: var(--muted); text-align: left; max-height: 130px; overflow-y: auto; }

.sch-row {
  border: 1px solid var(--border); border-radius: 11px; padding: 12px; margin-bottom: 10px;
  display: flex; flex-direction: column; gap: 10px; background: var(--panel);
}
.sch-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.day-btn {
  width: 34px; height: 30px; border-radius: 7px; border: 1px solid var(--border);
  background: none; color: var(--muted); cursor: pointer; font-size: 12px; transition: all .15s;
}
.day-btn.on { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 0 10px rgba(99, 102, 241, .5); }
input[type="time"] { padding: 6px 8px; }

.check-list { display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 11px; padding: 10px; }
.check-list label { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px;
  cursor: pointer; font-size: 14px; color: var(--text); font-weight: 400; }
.check-list label:hover { background: var(--panel2); }

/* ---------- halaman detail layar (ala AbleSign) ---------- */
.scr-head {
  display: flex; align-items: center; gap: 18px; margin-bottom: 24px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 16px 20px;
  animation: cardUp .4s ease both;
}
.scr-head .mini-tv {
  width: 120px; height: 74px; border: 4px solid #030509; border-radius: 6px; background: #121826;
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.scr-head .mini-tv img { width: 100%; height: 100%; object-fit: cover; }
.scr-head .mini-tv .pill { right: 5px; bottom: 5px; font-size: 10px; padding: 2px 8px; }
.scr-head h2 { font-size: 21px; }
.scr-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.scr-head .head-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 1100px) { .detail-grid { grid-template-columns: 1fr; } }
.pane-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pane-title h3 { font-size: 18px; }
.count-bar {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 14px; text-align: center; color: var(--muted); font-size: 13.5px; margin-bottom: 12px;
}

/* baris pustaka konten (panel kanan) */
.lib-row {
  display: flex; align-items: center; gap: 13px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px; padding: 9px 13px; margin-bottom: 8px;
  cursor: pointer; transition: border-color .15s, transform .15s;
}
.lib-row:hover { border-color: var(--border2); transform: translateX(3px); box-shadow: var(--glow); }
.lib-row .lib-thumb {
  width: 86px; height: 52px; background: #0a0f1e; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 22px; position: relative;
}
.lib-row .lib-thumb img, .lib-row .lib-thumb video { width: 100%; height: 100%; object-fit: cover; }
.lib-row .lib-thumb .dur-badge { font-size: 10px; padding: 1px 5px; right: 4px; bottom: 4px; }
.lib-row .lib-info { flex: 1; min-width: 0; }
.lib-row .lib-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-row .lib-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.lib-row .add-ic { color: var(--cy); font-size: 20px; opacity: 0; transition: opacity .15s; }
.lib-row:hover .add-ic { opacity: 1; }
.lib-tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.lib-tabs button {
  background: none; border: none; padding: 9px 15px; cursor: pointer; color: var(--muted);
  border-bottom: 2px solid transparent; font-size: 14.5px; font-weight: 600;
}
.lib-tabs button.active { color: var(--cy); border-bottom-color: var(--cy); }

/* baris hari (jam operasional) */
.oh-row { display: grid; grid-template-columns: 90px 1fr 20px 1fr; gap: 10px; align-items: center; margin-bottom: 9px; }
.oh-row .dname { color: var(--muted); font-size: 14px; }

/* tabel user */
table.users { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); }
table.users th, table.users td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--border); }
table.users th { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; }
table.users tr:last-child td { border-bottom: none; }
table.users tr:hover td { background: var(--panel2); }
.role-chip { font-size: 12px; padding: 3px 11px; border-radius: 14px; font-weight: 700; }
.role-chip.admin { background: rgba(34, 211, 238, .15); color: var(--cy); border: 1px solid rgba(34, 211, 238, .4); }
.role-chip.operator { background: rgba(148, 163, 210, .12); color: var(--muted); border: 1px solid var(--border); }

#toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: rgba(10, 15, 31, .92); backdrop-filter: blur(10px); color: var(--text);
  border: 1px solid var(--border2);
  padding: 13px 24px; border-radius: 12px; z-index: 100; box-shadow: var(--glow), var(--shadow-lg); font-size: 14px;
  animation: cardIn .3s ease both;
}
.empty {
  text-align: center; color: var(--muted); padding: 70px 20px; background: var(--panel);
  border-radius: 16px; border: 1px dashed var(--border); font-size: 15px; line-height: 1.9;
}
code.k { background: var(--panel2); border: 1px solid var(--border); padding: 2px 8px; border-radius: 6px; letter-spacing: 1px; }

/* badge lisensi di header */
.lic-badge {
  font-size: 11.5px; font-weight: 700; padding: 5px 12px; border-radius: 14px; cursor: pointer;
  background: rgba(52, 211, 153, .13); color: #34d399; border: 1px solid rgba(52, 211, 153, .35);
  letter-spacing: .04em; white-space: nowrap;
}
.lic-badge.trial {
  background: rgba(251, 191, 36, .13); color: #fbbf24; border-color: rgba(251, 191, 36, .4);
  animation: licPulse 2.4s ease-in-out infinite;
}
@keyframes licPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(251,191,36,.25); } 50% { box-shadow: 0 0 10px 2px rgba(251,191,36,.18); } }
