@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: #14171a;
  --panel: #1c2023;
  --panel-raised: #21262a;
  --border: #2c3237;
  --text: #e9e7e0;
  --muted: #868d88;
  --accent: #5fbf6b;
  --accent-dim: #35422f;
  --warn: #d9634b;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}

a { color: inherit; }

::selection { background: var(--accent-dim); color: var(--text); }

/* ---------- layout ---------- */

.frame {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.topbar {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 32px;
}

.wordmark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.04em;
  margin: 0;
}

.status-line {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.status-line .sep { opacity: 0.5; }

.led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  flex-shrink: 0;
}

.logout {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.logout:hover { border-bottom-color: var(--muted); }

/* ---------- dropzone ---------- */

.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: 4px;
  padding: 56px 24px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.dz-primary {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 4px;
}

.dz-secondary {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
}

.pick-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.pick-btn {
  display: inline-block;
  padding: 9px 20px;
  background: var(--panel-raised);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.pick-btn:hover { border-color: var(--accent); }

.dz-note {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
  margin: 16px 0 0;
}

/* ---------- panels ---------- */

.panel-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 10px;
}

.uploads-panel, .manifest {
  margin-top: 32px;
}

.manifest-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.file-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- upload rows ---------- */

.uploads-list, .files-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.upload-row, .file-row {
  border-bottom: 1px solid var(--border);
  padding: 12px 2px;
}

.upload-row-top, .file-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.row-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}

.progress-track {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.2s ease;
}

.progress-fill.error { background: var(--warn); }

.row-actions {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}

.row-actions a, .row-actions button {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}
.row-actions a:hover, .row-actions button:hover { color: var(--text); }
.row-actions button.delete:hover { color: var(--warn); }

.empty-note {
  color: var(--muted);
  font-size: 13px;
  padding: 16px 2px;
}

/* ---------- login ---------- */

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-card {
  width: 280px;
  text-align: center;
}

.login-sub {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 24px;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-card input {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
}
.login-card input:focus {
  outline: none;
  border-color: var(--accent);
}

.login-card button {
  background: var(--accent);
  color: #0e130f;
  border: none;
  border-radius: 3px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.login-error {
  color: var(--warn);
  font-size: 13px;
  margin-top: 16px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
