:root {
  --bg: #07111f;
  --bg-2: #0c1a2e;
  --panel: rgba(12, 28, 48, 0.86);
  --line: rgba(212, 175, 106, 0.22);
  --gold: #d4af6a;
  --gold-2: #f0d9a6;
  --text: #eef4ff;
  --muted: #93a4bf;
  --danger: #ff6b7a;
  --ok: #3dd68c;
  --warn: #f5c16c;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(212, 175, 106, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(80, 140, 255, 0.12), transparent 50%),
    linear-gradient(180deg, #07111f, #0a1728 40%, #08101c);
}

a { color: var(--gold); text-decoration: none; }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.login-card { width: min(440px, 100%); padding: 36px 32px 28px; }
.brand { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.mark {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  overflow: hidden;
  background: #1e96c8;
  flex-shrink: 0;
}
.mark img {
  width: 100%;
  height: 100%;
  display: block;
}
h1, h2, h3 { margin: 0 0 8px; }
.sub { color: var(--muted); margin-bottom: 22px; line-height: 1.6; }
label { display: block; margin: 0 0 8px; color: var(--gold-2); font-size: 13px; }
input, select, textarea {
  width: 100%;
  background: rgba(4, 12, 24, 0.7);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
.field { margin-bottom: 16px; }
.btn {
  border: 0; border-radius: 12px; padding: 12px 16px; cursor: pointer; font-weight: 700;
}
.btn-gold { background: linear-gradient(135deg, #f0d9a6, #c99643); color: #1b1208; width: 100%; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: #5a1d2a; color: #ffd5db; }
.btn-ok { background: #14573a; color: #d9ffe9; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { width: auto; }
.msg { min-height: 22px; color: var(--danger); margin-top: 12px; }
.foot { margin-top: 22px; color: var(--muted); font-size: 12px; text-align: center; }

.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side {
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: rgba(6, 14, 26, 0.92);
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  z-index: 5;
}
.nav { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.nav button {
  text-align: left;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 12px;
  cursor: pointer;
  width: 100%;
  pointer-events: auto;
}
.nav button.active, .nav button:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(212, 175, 106, 0.08);
}
.main { padding: 24px; }
.topbar {
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  margin-bottom: 20px;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px;
  color: var(--muted); font-size: 12px;
}
.chip.ok { color: var(--ok); }
.grid-2 { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.panel { padding: 18px; }
.panel + .panel { margin-top: 16px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.6; }
.check { display: flex; gap: 8px; align-items: center; margin: 10px 0; color: var(--text); }
.check input { width: auto; }
.logbox {
  height: 280px; overflow: auto; background: #06101c; border-radius: 12px;
  padding: 12px; font-family: ui-monospace, Consolas, monospace; font-size: 12px;
  border: 1px solid var(--line); line-height: 1.7;
}
.log-info { color: #cfe3ff; }
.log-warn { color: var(--warn); }
.log-error { color: var(--danger); }
.progress {
  height: 10px; background: #122033; border-radius: 99px; overflow: hidden; margin: 10px 0 6px;
}
.bar { height: 100%; width: 0; background: linear-gradient(90deg, #3dd68c, #d4af6a); }
.dialog-list { max-height: 420px; overflow: auto; }
.dialog-item {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06); cursor: pointer;
}
.dialog-item:hover { color: var(--gold-2); }
.stat { font-size: 28px; color: var(--gold-2); }
.progress-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1b1208;
  background: var(--gold);
  border-radius: 999px;
  padding: 2px 8px;
  margin-right: 6px;
}
.progress-board {
  margin-bottom: 18px;
  padding: 14px 16px;
  background: rgba(12, 28, 48, 0.86);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.progress-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.progress-head strong {
  font-size: 28px;
  color: var(--gold-2);
  min-width: 72px;
}
.progress-head #progressLabel { color: var(--text); }
.progress-head #progressCount { margin-left: auto; color: var(--muted); }
.progress-track {
  height: 16px;
  background: #122033;
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2ea8e5, #3dd68c, #d4af6a);
  transition: width 0.2s ease;
}
.file-stat { font-size: 22px; color: #7dd3fc; margin-top: 6px; }
.file-progress { margin-top: 10px; }
.file-progress-label { color: var(--gold-2); font-size: 14px; margin-bottom: 6px; font-weight: 600; }
.file-track { height: 12px; }
.progress-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
}
