/* ==========================================================================
   Studio admin — deliberately plain so the marketing site stays the star.
   ========================================================================== */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/Inter-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/Inter-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/Inter-Bold.woff2') format('woff2'); }

:root {
  --bg: #08090e; --panel: #111320; --panel-2: #171a2b; --line: rgba(255,255,255,.1);
  --text: #eef1f8; --muted: #98a0b6; --dim: #6b7286;
  --accent: #6ee7ff; --accent-2: #a78bfa; --grad: linear-gradient(115deg,#6ee7ff,#a78bfa);
  --ok: #34d399; --warn: #fbbf24; --bad: #f87171; --radius: 14px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.025em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* login */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(60% 60% at 20% 0%, rgba(110,231,255,.12), transparent 60%), radial-gradient(50% 50% at 80% 20%, rgba(167,139,250,.14), transparent 60%); }
.auth { width: 100%; max-width: 420px; padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: rgba(17,19,32,.9); backdrop-filter: blur(14px); }
.auth__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth__mark { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: #06070b; display: grid; place-items: center; font-weight: 800; }
.auth h1 { font-size: 1.3rem; }
.auth p.sub { color: var(--muted); font-size: .9rem; margin-top: 4px; }

/* shell */
.admin { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 22px 16px; background: rgba(255,255,255,.015); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; }
.side__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 18px; }
.side__brand .auth__mark { width: 32px; height: 32px; border-radius: 10px; font-size: .85rem; }
.side a.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; }
.side a.nav-item:hover { background: rgba(255,255,255,.05); color: var(--text); text-decoration: none; }
.side a.nav-item.is-active { background: rgba(110,231,255,.12); color: var(--text); }
.side__foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; font-size: .82rem; color: var(--dim); }
.side__foot strong { display: block; color: var(--text); font-size: .85rem; }

.main { padding: 26px clamp(18px, 3vw, 38px) 60px; min-width: 0; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between; margin-bottom: 22px; }
.topbar h1 { font-size: 1.5rem; }
.topbar p { color: var(--muted); font-size: .88rem; }

/* cards, grid */
.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
@media (max-width: 1080px) { .admin { grid-template-columns: 1fr; } .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; } .side__foot { margin: 0; border: 0; padding: 0; } .grid--2 { grid-template-columns: 1fr; } }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 20px; }
.panel > h2 { font-size: 1.03rem; margin-bottom: 4px; }
.panel > .hint { color: var(--muted); font-size: .85rem; margin-bottom: 16px; }

/* forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.field .help { font-size: .78rem; color: var(--dim); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; padding: 10px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(0,0,0,.35); transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(110,231,255,.6); box-shadow: 0 0 0 3px rgba(110,231,255,.12); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) { .row, .row--3 { grid-template-columns: 1fr; } }
input[type=file] { padding: 10px; border: 1px dashed var(--line); border-radius: 10px; background: rgba(0,0,0,.25); width: 100%; }
.check { display: flex; align-items: center; gap: 9px; font-size: .9rem; color: var(--muted); }
.check input { width: auto; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid transparent; border-radius: 10px; background: var(--grad); color: #06070b; font-weight: 700; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 16px 34px -18px rgba(110,231,255,.9); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn--ghost { background: rgba(255,255,255,.05); border-color: var(--line); color: var(--text); }
.btn--danger { background: rgba(248,113,113,.15); border-color: rgba(248,113,113,.4); color: #fecaca; }
.btn--sm { padding: 7px 12px; font-size: .83rem; border-radius: 8px; }
.btn--icon { padding: 7px; }

.alert { padding: 12px 15px; border-radius: 10px; font-size: .88rem; margin-bottom: 16px; border: 1px solid; }
.alert--ok   { background: rgba(52,211,153,.1);  border-color: rgba(52,211,153,.35);  color: #a7f3d0; }
.alert--warn { background: rgba(251,191,36,.1);  border-color: rgba(251,191,36,.35);  color: #fde68a; }
.alert--bad  { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.35); color: #fecaca; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; border: 1px solid var(--line); color: var(--muted); }
.pill--ok { color: #a7f3d0; border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.12); }
.pill--bad { color: #fecaca; border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.12); }
.pill--warn { color: #fde68a; border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.12); }

/* video list */
.vlist { display: grid; gap: 12px; }
.video-row { display: grid; grid-template-columns: 92px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.video-row__thumb { width: 92px; aspect-ratio: 16/10; border-radius: 9px; overflow: hidden; background: #0a0c15; position: relative; }
.video-row__thumb video, .video-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-row__thumb span { position: absolute; left: 5px; bottom: 5px; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; background: rgba(0,0,0,.7); }
.video-row h3 { font-size: .98rem; }
.video-row p { color: var(--muted); font-size: .82rem; }
.video-row__meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.video-row__actions { display: flex; gap: 6px; }
@media (max-width: 720px) { .video-row { grid-template-columns: 74px 1fr; } .video-row__actions { grid-column: 1 / -1; } }

/* play counts */
.play-rank { display: grid; gap: 10px; padding: 13px 15px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.play-rank__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.play-rank__head strong { font-size: .9rem; }
.play-rank ol { display: grid; gap: 7px; margin: 0; padding-left: 18px; }
.play-rank li { font-size: .84rem; }
.play-rank__title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.play-rank__bar { display: block; height: 5px; margin: 4px 0 2px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.play-rank__bar > span { display: block; height: 100%; background: var(--grad); }

/* editor + repeaters */
.repeater { display: grid; gap: 10px; }
.rep-row { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--panel-2); display: grid; gap: 10px; }
.rep-row__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .82rem; color: var(--dim); }
details { border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); margin-bottom: 10px; }
details summary { padding: 12px 15px; cursor: pointer; font-weight: 600; font-size: .92rem; }
details .inner { padding: 0 15px 15px; }

table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: var(--dim); }
.table-wrap { overflow-x: auto; }

.progress { height: 6px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 10px; display: none; }
.progress.is-on { display: block; }
.progress span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .15s linear; }

code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
pre { background: rgba(0,0,0,.45); border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow: auto; font-size: .82rem; color: #cfe3ef; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 60; padding: 13px 18px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 24px 50px -24px #000; font-size: .9rem; display: none; }
.toast.is-on { display: block; }
.toast--ok { border-color: rgba(52,211,153,.45); }
.toast--bad { border-color: rgba(248,113,113,.45); }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
