:root{
  --bg0:#070A12;
  --bg1:#0B1020;

  --card: rgba(255,255,255,.035);
  --card2: rgba(255,255,255,.055);

  --stroke: rgba(255,255,255,.10);
  --stroke2: rgba(255,255,255,.16);

  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.72);

  --primary: rgba(77,163,255,.95);
  --primary2: rgba(77,163,255,.18);

  --gold: rgba(244,210,122,.95);
  --gold2: rgba(244,210,122,.16);

  --ok: rgba(76,217,100,.95);
  --ok2: rgba(76,217,100,.14);

  --danger: rgba(255,77,109,.95);
  --danger2: rgba(255,77,109,.16);

  --shadow: 0 20px 60px rgba(0,0,0,.40);
  --shadow2: 0 14px 30px rgba(0,0,0,.30);

  --r: 26px;
  --r2: 18px;

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

/* ===== Light Theme (otomatis via JS: body[data-theme="light"]) ===== */
body[data-theme="light"]{
  --bg0:#F7F8FB;
  --bg1:#EEF1F8;

  --card: rgba(255,255,255,.85);
  --card2: rgba(255,255,255,.92);

  --stroke: rgba(0,0,0,.08);
  --stroke2: rgba(0,0,0,.12);

  --text: rgba(10,12,18,.92);
  --muted: rgba(10,12,18,.62);

  --shadow: 0 22px 55px rgba(0,0,0,.10);
  --shadow2: 0 12px 24px rgba(0,0,0,.10);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 15% 10%, rgba(77,163,255,.18), transparent 55%),
    radial-gradient(900px 700px at 85% 15%, rgba(244,210,122,.13), transparent 60%),
    radial-gradient(1000px 800px at 60% 90%, rgba(76,217,100,.07), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

/* ===== Layout helpers ===== */
.wrap{ width: min(1100px, 92vw); margin: 0 auto; padding: 22px 0 44px; }
.row{ display:flex; align-items:center; }
.gap{ gap:10px; }
.small{ font-size: 12px; }
.muted{ color: var(--muted); }
.mono{ font-family: var(--mono); }

/* ===== Topbar ===== */
.topbar{
  position: sticky; top:0; z-index: 50;
  background: rgba(8,10,18,.58);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
body[data-theme="light"] .topbar{
  background: rgba(250,251,255,.78);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.topbar-inner{
  width: min(1100px, 92vw);
  margin: 0 auto;
  height: 64px;
  display:flex; align-items:center; justify-content:space-between;
  gap: 12px;
}
.brand{
  display:flex; align-items:center; gap: 10px;
  text-decoration:none; color: var(--text);
}
.mark{
  width: 14px; height: 14px; border-radius: 6px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.75), transparent 55%),
    linear-gradient(135deg, rgba(77,163,255,.95), rgba(244,210,122,.75));
  box-shadow: 0 12px 26px rgba(0,0,0,.35);
}
.name{ font-weight: 950; letter-spacing: .2px; }
.name span{ color: var(--gold); }
.actions{ display:flex; align-items:center; gap: 10px; flex-wrap:wrap; }

/* ===== Card ===== */
.card{
  border-radius: var(--r);
  border: 1px solid var(--stroke);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 16px;
}
.card-head{
  display:flex; align-items:center; justify-content:space-between;
  gap: 12px; flex-wrap:wrap;
}
.card-head h2{ margin:0; font-size: 16px; letter-spacing: .2px; }

/* ===== Divider ===== */
.hr{ height:1px; background: rgba(255,255,255,.10); margin: 14px 0; }
body[data-theme="light"] .hr{ background: rgba(0,0,0,.08); }

/* ===== Badge / Pill ===== */
.badge{
  font-size: 11px; font-weight: 900; letter-spacing: .45px;
  padding: 7px 10px; border-radius: 999px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.82);
}
body[data-theme="light"] .badge{
  background: rgba(0,0,0,.04);
  color: rgba(10,12,18,.72);
}
.pill{
  font-size: 12px;
  padding: 7px 10px; border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.78);
}
body[data-theme="light"] .pill{
  background: rgba(0,0,0,.04);
  color: rgba(10,12,18,.72);
}

/* ===== Buttons ===== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 10px 14px;
  font-weight: 900; font-size: 13px;
  text-decoration:none;
  cursor:pointer;
  user-select:none;
  box-shadow: var(--shadow2);
  transition: transform .10s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.22);
}
body[data-theme="light"] .btn{
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.12);
}
body[data-theme="light"] .btn:hover{
  background: rgba(0,0,0,.06);
  border-color: rgba(0,0,0,.16);
}
.btn:active{ transform: translateY(0px); }
.btn:disabled{ opacity: .55; cursor:not-allowed; transform:none; }

.btn.primary{
  border-color: rgba(77,163,255,.45);
  background: linear-gradient(135deg, rgba(77,163,255,.95), rgba(77,163,255,.55));
  color: rgba(8,10,18,.92);
}
.btn.primary:hover{
  border-color: rgba(77,163,255,.60);
  background: linear-gradient(135deg, rgba(77,163,255,1), rgba(77,163,255,.62));
}

.btn.ghost{
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.12);
  box-shadow: none;
}
.btn.ghost:hover{ background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.18); }
body[data-theme="light"] .btn.ghost{
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.10);
}
body[data-theme="light"] .btn.ghost:hover{
  background: rgba(0,0,0,.05);
  border-color: rgba(0,0,0,.14);
}

.btn.danger{
  border-color: rgba(255,77,109,.40);
  background: linear-gradient(135deg, rgba(255,77,109,.95), rgba(255,77,109,.55));
  color: rgba(8,10,18,.92);
}

/* ===== Inputs ===== */
.inp{
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--stroke2);
  background: rgba(0,0,0,.18);
  color: var(--text);
  padding: 11px 12px;
  outline:none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition: border-color .15s ease, background .15s ease;
}
.inp::placeholder{ color: rgba(255,255,255,.45); }
.inp:focus{ border-color: rgba(77,163,255,.45); background: rgba(0,0,0,.24); }
body[data-theme="light"] .inp{
  background: rgba(255,255,255,.88);
  border-color: rgba(0,0,0,.12);
}
body[data-theme="light"] .inp::placeholder{ color: rgba(10,12,18,.40); }
body[data-theme="light"] .inp:focus{ border-color: rgba(77,163,255,.45); }

/* ===== Dropzone ===== */
.drop{
  display:block;
  cursor:pointer;
  border-radius: 22px;
  border: 1px dashed rgba(255,255,255,.18);
  background: rgba(255,255,255,.03);
  padding: 16px;
  text-align:center;
  transition: border-color .15s ease, background .15s ease, transform .10s ease;
}
.drop:hover{
  border-color: rgba(77,163,255,.40);
  background: rgba(77,163,255,.07);
  transform: translateY(-1px);
}
body[data-theme="light"] .drop{
  border-color: rgba(0,0,0,.12);
  background: rgba(0,0,0,.03);
}
.drop .icon{ font-size: 26px; line-height: 1; margin-bottom: 8px; }
.drop .title{ font-weight: 950; letter-spacing:.2px; }
.drop .sub{ margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.drop input{ display:none; }

/* ===== Progress ===== */
.progress .track{
  width:100%; height: 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.03);
  overflow:hidden;
}
.progress .fill{
  height:100%;
  width:0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(77,163,255,.95), rgba(244,210,122,.85));
  transition: width .12s ease;
}

/* ===== Result box ===== */
.result{
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.03);
  padding: 12px;
  color: rgba(255,255,255,.82);
  line-height:1.45;
}
body[data-theme="light"] .result{
  background: rgba(0,0,0,.03);
  color: rgba(10,12,18,.80);
}
.result.premium{
  border-color: rgba(244,210,122,.22);
  background: linear-gradient(135deg, rgba(244,210,122,.10), rgba(77,163,255,.08));
}
body[data-theme="light"] .result.premium{
  background: linear-gradient(135deg, rgba(244,210,122,.22), rgba(77,163,255,.14));
}
.result a{ color: var(--gold); text-decoration:none; border-bottom: 1px dashed rgba(244,210,122,.35); }
.result a:hover{ border-bottom-color: rgba(244,210,122,.65); }

/* ===== List items (folder file list) ===== */
.list{ display:flex; flex-direction:column; gap:10px; }
.item{
  display:flex; align-items:center; justify-content:space-between; gap: 12px;
  padding: 12px; border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.02);
}
body[data-theme="light"] .item{ background: rgba(0,0,0,.03); }
.item .name{ font-weight: 950; }
.item .sub{ font-size: 12px; color: var(--muted); margin-top:4px; }
.item:hover{ background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.16); }
body[data-theme="light"] .item:hover{ background: rgba(0,0,0,.05); border-color: rgba(0,0,0,.14); }

/* ===== Admin upload file list ===== */
.file-list{ margin-top: 12px; display:flex; flex-direction:column; gap: 10px; }
.file-item{
  display:flex; align-items:center; justify-content:space-between; gap: 10px;
  padding: 12px; border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.02);
}
body[data-theme="light"] .file-item{ background: rgba(0,0,0,.03); }
.file-item .name{
  font-weight: 900;
  max-width: 70%;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.status{
  font-size: 12px; font-weight: 900;
  padding: 7px 10px; border-radius: 999px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.80);
}
body[data-theme="light"] .status{
  background: rgba(0,0,0,.04);
  color: rgba(10,12,18,.70);
}
.status.wait{ opacity:.75; }
.status.up{ border-color: rgba(77,163,255,.35); background: rgba(77,163,255,.10); }
.status.ok{ border-color: rgba(76,217,100,.35); background: rgba(76,217,100,.12); }

/* ===== Links ===== */
a{ color: rgba(77,163,255,.95); }
a:hover{ color: rgba(244,210,122,.95); }

/* ===== Scrollbar (optional) ===== */
::-webkit-scrollbar{ width: 10px; }
::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.10);
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,.20);
}
::-webkit-scrollbar-thumb:hover{ background: rgba(255,255,255,.16); }
body[data-theme="light"] ::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.12);
  border: 2px solid rgba(255,255,255,.50);
}

/* ===== Selection ===== */
::selection{ background: rgba(77,163,255,.30); color: rgba(255,255,255,.98); }

/* =============================================================================
   TOAST NOTIFICATIONS
============================================================================= */
.toast-wrap{
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 9999;
  display:flex;
  flex-direction:column;
  gap:10px;
  pointer-events:none;
}
.toast{
  pointer-events:auto;
  min-width: 240px;
  max-width: min(420px, 92vw);
  border-radius: 18px;
  border: 1px solid var(--stroke2);
  background: rgba(10,12,18,.72);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow2);
  padding: 12px 12px;
  display:flex;
  gap: 10px;
  align-items:flex-start;
  animation: toastIn .18s ease-out;
}
body[data-theme="light"] .toast{
  background: rgba(255,255,255,.88);
}
@keyframes toastIn{
  from{ transform: translateY(8px); opacity:0; }
  to{ transform: translateY(0); opacity:1; }
}
.toast .ticon{ font-size: 18px; line-height: 1.1; margin-top:2px; }
.toast .tmain{ flex:1; }
.toast .ttitle{ font-weight: 950; font-size: 13px; }
.toast .tmsg{ margin-top:4px; font-size: 12px; color: var(--muted); line-height:1.35; }
.toast .tclose{
  border:none;
  background: transparent;
  color: rgba(255,255,255,.70);
  cursor:pointer;
  font-size: 16px;
  padding: 0 4px;
}
body[data-theme="light"] .toast .tclose{ color: rgba(10,12,18,.55); }
.toast.ok{ border-color: rgba(76,217,100,.35); }
.toast.err{ border-color: rgba(255,77,109,.35); }
.toast.info{ border-color: rgba(77,163,255,.35); }

/* =============================================================================
   SHIMMER / SKELETON LOADING
============================================================================= */
@keyframes shimmerMove{
  0%{ background-position: -600px 0; }
  100%{ background-position: 600px 0; }
}
.shimmer{
  position: relative;
  overflow:hidden;
}
.shimmer::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.10) 45%,
    rgba(255,255,255,0) 100%);
  background-size: 600px 100%;
  animation: shimmerMove 1.2s linear infinite;
  pointer-events:none;
}
body[data-theme="light"] .shimmer::after{
  background: linear-gradient(90deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,.08) 45%,
    rgba(0,0,0,0) 100%);
}
.skeleton{
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.03);
  height: 12px;
}
body[data-theme="light"] .skeleton{ background: rgba(0,0,0,.04); }
.skeleton.lg{ height: 18px; border-radius: 14px; }
.skeleton.xl{ height: 34px; border-radius: 16px; }