/* MyDrive — tema gelap modern */
:root {
  --bg: #0b1020;
  --card: #151d3a;
  --card2: #1a2347;
  --line: #26315c;
  --txt: #e8ecff;
  --muted: #9aa3c7;
  --acc: #2dd4bf;
  --acc2: #818cf8;
  --danger: #f87171;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 800px at 80% -10%, #1b2450 0%, var(--bg) 55%);
  color: var(--txt);
  min-height: 100vh;
}

/* ---------- Background animasi (halaman login) ---------- */
#bg-orbs { position: fixed; inset: 0; overflow: hidden; z-index: 0; display: none; pointer-events: none; }
body.is-login #bg-orbs { display: block; }
#bg-orbs span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
  animation: drift 14s ease-in-out infinite alternate;
}
#bg-orbs span:nth-child(1) { width: 420px; height: 420px; background: #2dd4bf; left: -120px; top: -80px; }
#bg-orbs span:nth-child(2) { width: 520px; height: 520px; background: #818cf8; right: -160px; top: 20%; animation-delay: -5s; }
#bg-orbs span:nth-child(3) { width: 380px; height: 380px; background: #f472b6; left: 30%; bottom: -140px; animation-delay: -9s; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(70px,50px) scale(1.18); } }

#app { position: relative; z-index: 1; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  width: 100%; max-width: 380px; padding: 36px 32px; text-align: center;
  background: rgba(21, 29, 58, .72); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
  animation: rise .5s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.login-card .logo { font-size: 52px; }
.login-card h1 { margin: 8px 0 4px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 18px; }
.hint code { background: #0d1430; padding: 2px 8px; border-radius: 6px; color: var(--acc); }

/* ---------- Form ---------- */
label { display: block; text-align: left; margin: 12px 0; font-size: 14px; color: var(--muted); }
input[type=text], input[type=password], select {
  width: 100%; margin-top: 6px; padding: 11px 13px; font-size: 15px;
  background: #0d1430; border: 1px solid var(--line); border-radius: 10px; color: var(--txt);
}
input:focus, select:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(45,212,191,.15); }

/* ---------- Tombol ---------- */
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card2); color: var(--txt); font-size: 14px; cursor: pointer; text-decoration: none;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.btn.primary { background: linear-gradient(135deg, var(--acc), var(--acc2)); border: none; color: #06121f; font-weight: 700; }
.btn.big { width: 100%; padding: 13px; font-size: 16px; margin-top: 8px; }
.btn.small { padding: 7px 13px; font-size: 13px; }
.btn.danger { background: rgba(248,113,113,.12); border-color: var(--danger); color: var(--danger); }
.btn:disabled { opacity: .5; cursor: wait; transform: none; }

/* ---------- Navbar + dropdown ---------- */
.navbar { position: sticky; top: 0; z-index: 50; background: rgba(11,16,32,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 22px; }
.brand { font-size: 20px; font-weight: 800; color: var(--txt); text-decoration: none; }
.nav-links { display: flex; gap: 6px; flex: 1; }
.nav-links a { color: var(--muted); text-decoration: none; padding: 8px 14px; border-radius: 9px; font-size: 14px; }
.nav-links a:hover { color: var(--txt); background: var(--card2); }
.nav-links a.active { color: var(--acc); background: rgba(45,212,191,.1); }
.nav-user { position: relative; }
.user-btn { background: var(--card2); border: 1px solid var(--line); color: var(--txt); padding: 9px 16px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.5); padding: 6px; display: none;
}
.dropdown.open { display: block; animation: rise .18s ease; }
.dropdown a, .dropdown button {
  display: block; width: 100%; text-align: left; padding: 10px 14px; border: none; background: none;
  color: var(--txt); font-size: 14px; text-decoration: none; border-radius: 8px; cursor: pointer;
}
.dropdown a:hover, .dropdown button:hover { background: var(--card2); }
.dropdown hr { border: none; border-top: 1px solid var(--line); margin: 6px 0; }

/* ---------- Layout ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; }
.container.narrow { max-width: 560px; }
.container h1 { margin: 6px 0 20px; font-size: 26px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.cols { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }
.muted { color: var(--muted); font-size: 14px; }
.error { color: var(--danger); font-size: 14px; min-height: 20px; }
.row { display: flex; gap: 10px; margin-top: 14px; }

/* ---------- Grid media ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,.4); }
.thumb { aspect-ratio: 16/10; background: #0d1430; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb audio { width: 90%; }
.filetype { font-size: 56px; }
.card-body { padding: 14px 16px 16px; }
.card-body h3 { margin: 0 0 6px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-body .meta { margin: 3px 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- Upload ---------- */
.drop {
  border: 2px dashed var(--line); border-radius: 12px; padding: 38px 20px; text-align: center;
  color: var(--muted); cursor: pointer; margin: 14px 0; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--acc); background: rgba(45,212,191,.06); }
.progress { height: 10px; background: #0d1430; border-radius: 6px; overflow: hidden; margin: 14px 0; }
.progress .bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--acc), var(--acc2)); transition: width .2s; }

/* ---------- Tabel ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(4,8,20,.7); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { width: 100%; max-width: 400px; animation: rise .25s ease; }
.modal h2 { margin-top: 0; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 26px 16px 34px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); margin-top: 20px; }
.footer b { color: var(--acc); }
