/* assets/app.css — tampilan panel & halaman publik */
:root {
  --bg: #0b0f16; --bg2: #0f141d; --surface: #141b26; --surface2: #1a2331;
  --line: #222d3d; --line2: #2e3b4f;
  --text: #e8edf5; --muted: #8b9ab1; --faint: #62718a;
  --accent: #5b8cff; --accent-dim: #33518f;
  --ok: #34d399; --warn: #fbbf24; --bad: #f87171;
  --radius: 12px;
  --gp-accent: #5b8cff;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text); min-height: 100vh;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14.5px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 10px; line-height: 1.25; letter-spacing: -.015em; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* ---------- layout ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 18px;
  padding: 0 22px; height: 58px; background: rgba(11,15,22,.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15.5px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), #8b5cf6); color: #fff;
}
.brand-mark svg { width: 15px; height: 15px; fill: currentColor; }
.nav { display: flex; gap: 3px; margin-left: 8px; }
.nav a {
  padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 13.5px;
}
.nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--surface2); color: var(--text); }
.topbar .spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface2); border: 1px solid var(--line2); color: var(--text);
  font-size: 12px; font-weight: 700;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 26px 22px 80px; }
.wrap.narrow { max-width: 760px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.page-head .spacer { flex: 1; }

/* ---------- kartu & form ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 18px; }
.card-tight { padding: 14px 16px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.hint { font-size: 12.5px; color: var(--faint); margin-top: 6px; }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 9px; font-size: 14px; font-family: inherit;
  background: var(--bg2); border: 1px solid var(--line2); color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,140,255,.18); }
textarea { resize: vertical; min-height: 76px; }
.field + .field { margin-top: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text); font-weight: 500; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: 9px; border: 1px solid transparent; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 600; background: var(--accent); color: #fff;
  transition: filter .15s, background .15s, border-color .15s;
}
.btn:hover { filter: brightness(1.09); text-decoration: none; }
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.btn-ghost { background: var(--surface2); color: var(--text); border-color: var(--line2); }
.btn-ghost:hover { background: var(--line); }
.btn-danger { background: transparent; color: var(--bad); border-color: rgba(248,113,113,.4); }
.btn-danger:hover { background: rgba(248,113,113,.12); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.alert { padding: 11px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 16px; border: 1px solid; }
.alert-ok  { background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.35); color: #a7f3d0; }
.alert-bad { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.35); color: #fecaca; }
.alert-info{ background: rgba(91,140,255,.1); border-color: rgba(91,140,255,.32); color: #c7d8ff; }

/* ---------- statistik ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; }
.stat .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat .v { font-size: 25px; font-weight: 700; margin-top: 5px; letter-spacing: -.02em; }
.stat .s { font-size: 12px; color: var(--faint); margin-top: 2px; }

/* ---------- daftar video ---------- */
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input[type=text] { max-width: 300px; }
.toolbar select { max-width: 170px; }

.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); gap: 18px; }
.vcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, transform .15s; }
.vcard:hover { border-color: var(--line2); transform: translateY(-2px); }
.vthumb {
  display: block; aspect-ratio: 16/9; background: #0a0e15 center/cover no-repeat; position: relative;
  display: grid; place-items: center; color: var(--faint);
}
.vthumb svg { width: 34px; height: 34px; fill: currentColor; opacity: .5; }
.vthumb .badge {
  position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.78); color: #fff;
  padding: 2px 6px; border-radius: 5px; font-size: 11.5px; font-variant-numeric: tabular-nums;
}
.vbody { padding: 12px 13px 13px; }
.vtitle { font-size: 14px; font-weight: 600; margin: 0 0 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); }
.vtitle:hover { color: var(--accent); text-decoration: none; }
.vmeta { font-size: 12px; color: var(--faint); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.vactions { display: flex; gap: 6px; margin-top: 11px; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 20px;
  font-size: 11px; font-weight: 600; border: 1px solid var(--line2); color: var(--muted);
}
.tag-pub  { color: #86efac; border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.08); }
.tag-priv { color: #fca5a5; border-color: rgba(248,113,113,.35); background: rgba(248,113,113,.07); }
.tag-pass { color: #fcd34d; border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.07); }

.empty { text-align: center; padding: 56px 20px; color: var(--muted); border: 1px dashed var(--line2); border-radius: var(--radius); }
.empty h3 { color: var(--text); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.pager a, .pager span {
  min-width: 34px; padding: 6px 10px; text-align: center; border-radius: 8px;
  border: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.pager a:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.pager .cur { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- kotak salin ---------- */
.copybox { display: flex; gap: 8px; align-items: stretch; }
.copybox input { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.copybox textarea { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; min-height: 68px; }

/* ---------- halaman publik ---------- */
.watch { max-width: 1000px; margin: 0 auto; padding: 26px 20px 70px; }
.watch .gp { box-shadow: 0 22px 60px rgba(0,0,0,.5); }
.watch-info { margin-top: 18px; display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.watch-info h1 { font-size: 19px; margin-bottom: 4px; }
.watch-desc { margin-top: 14px; color: var(--muted); font-size: 14px; white-space: pre-wrap; }
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.center-card { width: 100%; max-width: 380px; }
.center-card .brand { justify-content: center; margin-bottom: 18px; }

body.embed { background: #000; }
body.embed .gp { border-radius: 0; height: 100vh; aspect-ratio: auto; }

@media (max-width: 720px) {
  .topbar { gap: 10px; padding: 0 14px; }
  .nav a { padding: 7px 9px; font-size: 13px; }
  .who span { display: none; }
  .wrap { padding: 20px 14px 60px; }
  .row2 { grid-template-columns: 1fr; }
}
