:root {
  color-scheme: dark;
  --bg: #08110f;
  --panel: rgba(18, 32, 28, 0.86);
  --panel-solid: #12201c;
  --line: rgba(170, 214, 194, 0.18);
  --text: #edf7f1;
  --muted: #9eb3a9;
  --accent: #75f0a7;
  --accent-deep: #153e2a;
  --danger: #ff8c87;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(51, 157, 99, 0.2), transparent 30rem),
    radial-gradient(circle at 90% 70%, rgba(30, 104, 79, 0.2), transparent 36rem),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

button, input { font: inherit; }

button, .button-link {
  border: 0;
  border-radius: 0.8rem;
  padding: 0.8rem 1.15rem;
  color: #07120c;
  background: var(--accent);
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  transition: transform 150ms ease, filter 150ms ease, opacity 150ms ease;
}

button:hover, .button-link:hover { transform: translateY(-1px); filter: brightness(1.06); }
button:disabled { cursor: not-allowed; opacity: 0.45; transform: none; }

.shell { width: min(940px, calc(100% - 2rem)); margin: 0 auto; padding: 4.5rem 0 2.5rem; }
.shell.narrow { width: min(720px, calc(100% - 2rem)); }

.hero { display: flex; gap: 1.3rem; align-items: flex-start; margin-bottom: 2rem; }
.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 3.5rem;
  width: 3.5rem;
  height: 3.5rem;
  color: #06120b;
  background: var(--accent);
  border-radius: 1.05rem;
  font-size: 1.8rem;
  font-weight: 900;
  box-shadow: 0 0 40px rgba(117, 240, 167, 0.18);
}
.admin-mark { font-size: 1.35rem; }
.eyebrow { margin: 0 0 0.35rem; color: var(--accent); font-size: 0.72rem; font-weight: 850; letter-spacing: 0.16em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0.45rem; font-size: clamp(2rem, 6vw, 3.5rem); line-height: 1; letter-spacing: -0.045em; }
h2 { margin-bottom: 0.35rem; font-size: 1.4rem; }
h3 { margin-bottom: 0.25rem; }
.lead { max-width: 680px; margin-bottom: 0; color: var(--muted); font-size: 1.03rem; line-height: 1.6; }
.muted { color: var(--muted); }

.panel {
  padding: clamp(1.15rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.panel.compact { max-width: 520px; }
.hidden { display: none !important; }
.stack { display: grid; gap: 1rem; }
label span { display: block; margin-bottom: 0.45rem; color: var(--muted); font-size: 0.86rem; font-weight: 700; }
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.85rem 0.95rem;
  color: var(--text);
  background: rgba(4, 12, 9, 0.7);
  outline: none;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(117, 240, 167, 0.1); }
.error { min-height: 1.2em; margin: 0; color: var(--danger); font-size: 0.9rem; }

.panel-heading, .queue-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.button-secondary, .button-link.subdued { color: var(--text); background: rgba(255,255,255,.07); }
.drop-zone {
  display: grid;
  place-items: center;
  margin: 1.5rem 0;
  padding: 3.5rem 1rem;
  border: 1px dashed rgba(117, 240, 167, 0.42);
  border-radius: 1.15rem;
  background: rgba(117, 240, 167, 0.035);
  cursor: pointer;
  transition: border 150ms ease, background 150ms ease, transform 150ms ease;
}
.drop-zone:hover, .drop-zone.dragging { border-color: var(--accent); background: rgba(117, 240, 167, 0.085); transform: translateY(-1px); }
.drop-zone.disabled { opacity: 0.45; cursor: not-allowed; }
.drop-zone span { margin-top: 0.25rem; color: var(--muted); }
.drop-zone small { margin-top: 1rem; color: var(--muted); text-align: center; }
.drop-icon { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; margin-bottom: 0.8rem; border-radius: 50%; color: var(--accent); background: var(--accent-deep); font-size: 1.5rem; }

.queue { display: grid; gap: 0.7rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.queue-item { padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 0.85rem; background: rgba(4, 12, 9, 0.42); }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.file-copy { min-width: 0; }
.file-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-copy span, .file-state { color: var(--muted); font-size: 0.8rem; }
.status-complete .file-state { color: var(--accent); }
.status-failed .file-state { color: var(--danger); }
.progress-track { height: 4px; margin-top: 0.75rem; overflow: hidden; border-radius: 100px; background: rgba(255,255,255,.07); }
.progress-bar { height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width 120ms linear; }

.status-card { display: flex; align-items: center; gap: 0.85rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: rgba(4, 12, 9, 0.42); }
.status-card p { margin: 0.2rem 0 0; }
.status-dot { flex: 0 0 auto; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: #d8a55f; box-shadow: 0 0 0 5px rgba(216,165,95,.1); }
.status-dot.connected { background: var(--accent); box-shadow: 0 0 0 5px rgba(117,240,167,.1); }
.facts { display: grid; gap: 0.75rem; margin: 1.25rem 0; }
.facts div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 1rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.drive-contents { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.drive-contents-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.drive-frame { width: 100%; height: min(65vh, 620px); border: 1px solid var(--line); border-radius: 1rem; background: #fff; }

footer { margin-top: 1.4rem; color: var(--muted); font-size: 0.8rem; text-align: center; }

@media (max-width: 620px) {
  .shell { padding-top: 2rem; }
  .hero { gap: 0.9rem; }
  .brand-mark { flex-basis: 2.8rem; width: 2.8rem; height: 2.8rem; }
  .panel-heading, .queue-heading { align-items: flex-start; }
  .queue-heading { flex-direction: column; }
  .queue-heading button { width: 100%; }
  .facts div { grid-template-columns: 1fr; gap: 0.2rem; }
  .drive-contents-heading { align-items: flex-start; flex-direction: column; }
}
