:root {
  --bg: #070b14;
  --bg2: #0c1322;
  --card: rgba(16, 24, 42, 0.86);
  --line: rgba(148, 175, 255, 0.12);
  --text: #eaf0ff;
  --muted: #8b97b8;
  --blue: #4d8dff;
  --cyan: #2ee9c8;
  --gold: #f5c14a;
  --red: #ff5d73;
  --ok: #3ee08f;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(77, 141, 255, 0.18), transparent 50%),
    radial-gradient(900px 400px at 100% 0%, rgba(46, 233, 200, 0.12), transparent 45%),
    var(--bg);
  color: var(--text);
}
a { color: var(--blue); text-decoration: none; }
button, input, textarea, select { font: inherit; }
.hidden { display: none !important; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card, .panel, .hero, .file-item, .stat, .table-wrap, .modal {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.login-card { width: min(420px, 100%); padding: 32px; }
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.logo {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #061018; font-weight: 900;
}
h1, h2, h3 { margin: 0 0 8px; }
.sub { color: var(--muted); font-size: 13px; line-height: 1.6; }
.field { margin-top: 14px; }
.field label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
input, textarea, select {
  width: 100%;
  background: #0a1120;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: rgba(77,141,255,.55); }
.btn {
  border: 0; border-radius: 12px; padding: 10px 14px; cursor: pointer;
  background: linear-gradient(135deg, var(--blue), #6aa6ff);
  color: white; font-weight: 700;
}
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.gold { background: linear-gradient(135deg, #f0b429, #ffd56a); color: #2a1b00; }
.btn.red { background: linear-gradient(135deg, #ff5d73, #ff8b6b); }
.btn.cyan { background: linear-gradient(135deg, #19c8b0, #2ee9c8); color: #04231d; }
.btn.sm { padding: 7px 10px; font-size: 12px; border-radius: 9px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1; }

.layout { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side {
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: rgba(8, 12, 22, 0.7);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.nav { margin-top: 22px; display: grid; gap: 6px; }
.side-art {
  margin-top: auto;
  padding-top: 18px;
}
.side-art img {
  display: block;
  width: 100%;
  border-radius: 14px;
}
.nav button {
  text-align: left; background: transparent; color: var(--muted);
  border: 0; padding: 11px 12px; border-radius: 12px; cursor: pointer;
}
.nav button.active, .nav button:hover { background: rgba(77,141,255,.12); color: var(--text); }
.main { padding: 22px; }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { padding: 16px; }
.stat b { font-size: 24px; display: block; margin-top: 6px; }
.panel { padding: 18px; margin-top: 16px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px; font-size: 12px;
  background: rgba(255,255,255,.06);
}
.tag.ok { color: var(--ok); background: rgba(62,224,143,.12); }
.tag.warn { color: var(--gold); background: rgba(245,193,74,.12); }
.tag.bad { color: var(--red); background: rgba(255,93,115,.12); }
.tag.svip { color: var(--gold); background: rgba(245,193,74,.16); }

.page { display: none; }
.page.active { display: block; }

.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: grid; place-items: center; padding: 20px; z-index: 20;
}
.modal { width: min(720px, 100%); padding: 22px; }
.toast {
  position: fixed; right: 16px; top: 16px; z-index: 40;
  background: #10182a; border: 1px solid var(--line); color: var(--text);
  padding: 12px 14px; border-radius: 12px; box-shadow: var(--shadow);
}

.portal {
  width: min(920px, calc(100% - 28px));
  margin: 36px auto 60px;
}
.hero { padding: 28px; }
.share-box { display: grid; grid-template-columns: 1fr 140px auto; gap: 10px; margin-top: 16px; }
.file-list { margin-top: 16px; display: grid; gap: 8px; }
.file-item { padding: 12px 14px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.file-item .meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.codebox {
  background: #070d18; border: 1px dashed var(--line); border-radius: 12px;
  padding: 10px; font-size: 12px; word-break: break-all; color: #c9d7ff;
}
.crumb { color: var(--muted); font-size: 13px; margin: 10px 0; }
.batch-bar {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.batch-bar.hidden { display: none !important; }
.dl-progress { margin-top: 12px; }
.dl-progress.hidden { display: none !important; }
.dl-progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.dl-bar {
  height: 8px; margin-top: 8px; border-radius: 99px; overflow: hidden;
  background: rgba(255,255,255,.08);
}
.dl-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(135deg, #19c8b0, #2ee9c8);
  transition: width .2s;
}
.quota { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: flex; justify-content: space-between; align-items: center; min-height: 0; }
  .nav { display: flex; overflow: auto; margin: 0; }
  .side-art { display: none; }
  .grid { grid-template-columns: 1fr 1fr; }
  .share-box { grid-template-columns: 1fr; }
  .file-item { flex-direction: column; align-items: flex-start; }
}

.acc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.acc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.acc-card.off { opacity: 0.58; filter: grayscale(.15); }
.acc-top { display: flex; gap: 12px; align-items: center; }
.avatar-wrap { position: relative; width: 56px; height: 56px; flex: 0 0 56px; }
.avatar {
  width: 56px; height: 56px; border-radius: 18px; object-fit: cover;
  background: #0a1120; display: block; border: 1px solid var(--line);
}
.avatar.fallback {
  position: absolute; inset: 0; place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #061018; font-weight: 800; font-size: 22px;
}
.acc-name { font-weight: 800; font-size: 16px; line-height: 1.3; }
.acc-quota { margin: 12px 0 8px; }
.acc-line { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-top: 6px; }
.acc-line span { color: var(--muted); }
.bar {
  height: 7px; border-radius: 99px; background: rgba(255,255,255,.06);
  overflow: hidden; margin: 8px 0 4px;
}
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--blue)); }
.acc-actions { margin-top: 12px; }
.acc-empty {
  grid-column: 1 / -1;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 18px;
}

.chk { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }
.acc-card { position: relative; }
.acc-check { position: absolute; top: 12px; right: 12px; }
