/* ═══════════════════════════════════════════════════════════════════════════
   ABYSS — Amazfit Download Portal
   Dark ocean command-center aesthetic · Blue-electric accents · Precise grid
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Fonts (locally hosted) ──────────────────────────────────────────────── */
@font-face {
  font-family: 'Outfit';
  src: url('fonts/Outfit.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

/* ── Design Tokens ───────────────────────────────────────────────────────── */
:root {
  /* Background layers */
  --bg-void:    #020810;
  --bg-base:    #050d1a;
  --bg-surface: #08152a;
  --bg-raised:  #0c1e3a;
  --bg-hover:   #112447;

  /* Borders */
  --border-dim:    rgba(30, 90, 160, 0.18);
  --border-normal: rgba(30, 110, 200, 0.30);
  --border-bright: rgba(56, 189, 248, 0.45);

  /* Blue accent spectrum */
  --blue-dim:    #1e4d7a;
  --blue-mid:    #0ea5e9;
  --blue-bright: #38bdf8;
  --blue-glow:   rgba(14, 165, 233, 0.20);
  --blue-pulse:  rgba(56, 189, 248, 0.10);

  /* Text */
  --text-primary:   #d4e8f8;
  --text-secondary: #5a89b0;
  --text-muted:     #2e5070;
  --text-accent:    #38bdf8;

  /* Status */
  --green: #10b981;
  --red:   #ef4444;
  --amber: #f59e0b;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(2, 8, 20, 0.6), 0 1px 0 rgba(56, 189, 248, 0.05) inset;
  --shadow-glow: 0 0 32px rgba(14, 165, 233, 0.15);
  --shadow-btn:  0 4px 16px rgba(14, 165, 233, 0.30);
}

/* ── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Outfit', system-ui, sans-serif;
  background-color: var(--bg-void);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  background-image:
    linear-gradient(rgba(14, 165, 233, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--blue-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-mid); }

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.login-wrapper::before,
.login-wrapper::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: float 12s ease-in-out infinite alternate;
}
.login-wrapper::before {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.08) 0%, transparent 70%);
  top: -200px; left: -200px;
}
.login-wrapper::after {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.06) 0%, transparent 70%);
  bottom: -100px; right: -100px;
  animation-delay: -6s;
}

@keyframes float {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.08); }
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-normal);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  position: relative;
  animation: slideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-bright), transparent);
  opacity: 0.6;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-logo {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--bg-raised), var(--bg-hover));
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  box-shadow: 0 0 20px var(--blue-glow);
}

.login-logo-icon svg { width: 26px; height: 26px; stroke: var(--blue-bright); fill: none; }

.login-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 400;
}

.login-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #fca5a5;
  margin-bottom: 20px;
  animation: shake 0.4s ease;
}

.login-error h3 { font-size: inherit; font-weight: 500; margin: 0; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-6px); }
  75%       { transform: translateX(6px); }
}

/* ── Form Elements ─────────────────────────────────────────────────────────*/

.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  padding: 11px 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
  border-color: var(--blue-mid);
  background: var(--bg-hover);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.10);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}

.btn-primary {
  width: 100%;
  justify-content: center;
  padding: 13px;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: var(--shadow-btn);
  margin-top: 8px;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  box-shadow: 0 6px 24px rgba(14, 165, 233, 0.45);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-dim);
  padding: 7px 14px;
  font-size: 0.82rem;
}
.btn-ghost:hover {
  background: var(--bg-hover);
  border-color: var(--border-normal);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.22);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.40);
  color: #fecaca;
}

.btn-success {
  background: rgba(16, 185, 129, 0.08);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.22);
}
.btn-success:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.40);
}

.btn-accent {
  background: var(--blue-pulse);
  color: var(--blue-bright);
  border-color: var(--border-bright);
}
.btn-accent:hover {
  background: rgba(56, 189, 248, 0.18);
  box-shadow: 0 0 16px var(--blue-glow);
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.dashboard {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ── Top Bar ─────────────────────────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-dim);
  position: relative;
}

.topbar::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; width: 140px; height: 1px;
  background: linear-gradient(90deg, var(--blue-mid), transparent);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--bg-raised), var(--bg-hover));
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  box-shadow: 0 0 14px var(--blue-glow);
}
.topbar-logo-box svg { width: 20px; height: 20px; stroke: var(--blue-bright); fill: none; }

.topbar-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.topbar-name span { color: var(--blue-bright); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-ip {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-raised);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
}

.topbar-ip::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ── Section Headers ─────────────────────────────────────────────────────── */

.section {
  margin-bottom: 36px;
  animation: fadeIn 0.45s ease both;
}
.section:nth-child(2) { animation-delay: 0.08s; }
.section:nth-child(3) { animation-delay: 0.16s; }
.section:nth-child(4) { animation-delay: 0.24s; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.section-title-line {
  flex: 1;
  height: 1px;
  background: var(--border-dim);
}

.section-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  background: var(--bg-raised);
  border: 1px solid var(--border-dim);
  border-radius: 20px;
  padding: 2px 9px;
}

/* ── Card ────────────────────────────────────────────────────────────────── */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-normal); }

/* ── Upload Zone ─────────────────────────────────────────────────────────── */

.upload-zone {
  background: var(--bg-surface);
  border: 1px dashed var(--border-normal);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.2s;
}

.upload-zone:hover {
  border-color: var(--blue-mid);
  background: var(--bg-raised);
  box-shadow: 0 0 20px var(--blue-glow);
}

.upload-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  background: var(--blue-pulse);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.upload-icon svg { width: 22px; height: 22px; stroke: var(--blue-bright); fill: none; }

.upload-info { flex: 1; }
.upload-info h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.upload-info p  { font-size: 0.8rem; color: var(--text-secondary); }

.upload-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.file-input-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 18px;
  background: var(--blue-pulse);
  color: var(--blue-bright);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.file-input-label:hover {
  background: rgba(56, 189, 248, 0.18);
  box-shadow: 0 0 16px var(--blue-glow);
}

.file-input-hidden { display: none; }
.file-selected-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */

.table-wrapper { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }

thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--text-muted);
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border-dim);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border-dim);
  transition: background 0.15s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(14, 165, 233, 0.04); }

tbody td {
  padding: 12px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}

.cell-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cell-token {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--blue-bright);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.cell-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cell-actions form { margin: 0; }

.filename {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filename-icon {
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-pulse);
  border: 1px solid var(--border-bright);
  border-radius: 5px;
  flex-shrink: 0;
}
.filename-icon svg { width: 13px; height: 13px; stroke: var(--blue-bright); fill: none; }

.date-cell {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 20px;
}
.badge-used {
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.20);
}
.badge-fresh {
  background: rgba(16, 185, 129, 0.08);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.20);
}
.badge-note {
  background: rgba(14, 165, 233, 0.08);
  color: var(--text-accent);
  border: 1px solid rgba(14, 165, 233, 0.20);
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
}

.token-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--blue-bright);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}
.token-link:hover { color: var(--text-primary); text-decoration: underline; }

.ip-cell {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ip-trace {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.ip-trace:hover { color: var(--blue-bright); }

/* ── Copy Button ─────────────────────────────────────────────────────────── */

.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  background: var(--blue-pulse);
  color: var(--blue-bright);
  border: 1px solid var(--border-bright);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  vertical-align: middle;
}
.copy-button:hover { background: rgba(56, 189, 248, 0.18); }

/* ── Logout ──────────────────────────────────────────────────────────────── */
a[href="logout.php"] {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
a[href="logout.php"]:hover { color: var(--red); }

/* ═══════════════════════════════════════════════════════════════════════════
   DOWNLOAD CONFIRMATION PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.download-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.download-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border-normal);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  text-align: center;
  position: relative;
  animation: slideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.download-card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-bright), transparent);
  opacity: 0.6;
}

.download-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  background: var(--blue-pulse);
  border: 1px solid var(--border-bright);
  border-radius: 18px;
  margin-bottom: 24px;
  box-shadow: 0 0 32px var(--blue-glow);
  animation: icon-pulse 3s ease infinite;
}

@keyframes icon-pulse {
  0%, 100% { box-shadow: 0 0 32px var(--blue-glow); }
  50%       { box-shadow: 0 0 48px rgba(14, 165, 233, 0.35); }
}

.download-icon-wrap svg {
  width: 32px; height: 32px;
  stroke: var(--blue-bright);
  fill: none;
  stroke-width: 1.5;
}

.download-card h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.download-filename {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  color: var(--blue-bright);
  background: var(--blue-pulse);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  margin: 16px 0;
  word-break: break-all;
  display: block;
}

.download-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 16px 24px;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: all 0.2s ease;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.download-button:hover {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.50);
  transform: translateY(-2px);
}
.download-button:active { transform: translateY(0); }

.download-button svg {
  width: 20px; height: 20px;
  stroke: currentColor; fill: none; stroke-width: 2;
}

/* ── SweetAlert2 dark overrides ──────────────────────────────────────────── */
.swal2-popup {
  background: var(--bg-raised) !important;
  border: 1px solid var(--border-normal) !important;
  color: var(--text-primary) !important;
  font-family: 'Outfit', sans-serif !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-card), var(--shadow-glow) !important;
}
.swal2-title   { color: var(--text-primary) !important; font-weight: 700 !important; }
.swal2-html-container { color: var(--text-secondary) !important; }
.swal2-confirm {
  background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 600 !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-btn) !important;
}
.swal2-icon.swal2-success { border-color: var(--green) !important; color: var(--green) !important; }
.swal2-icon.swal2-success [class^=swal2-success-line] { background: var(--green) !important; }
.swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(16, 185, 129, 0.3) !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   DOWNLOAD STATUS PAGES — error / warning / info variants
   ═══════════════════════════════════════════════════════════════════════════ */

/* Error (rot) — ungültiger Link, Datei nicht gefunden */
.download-card.is-error::before {
  background: linear-gradient(90deg, transparent, #ef4444, transparent);
}
.download-icon-wrap.is-error {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.40);
  box-shadow: 0 0 32px rgba(239, 68, 68, 0.20);
  animation: none;
}
.download-icon-wrap.is-error svg { stroke: #f87171; }

/* Warning (amber) — Link erschöpft / bereits verwendet */
.download-card.is-warning::before {
  background: linear-gradient(90deg, transparent, #f59e0b, transparent);
}
.download-icon-wrap.is-warning {
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.40);
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.18);
  animation: none;
}
.download-icon-wrap.is-warning svg { stroke: #fbbf24; }

/* Status-Texte auf Fehlerseiten */
.status-title       { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
.status-title.error   { color: #fca5a5; }
.status-title.warning { color: #fcd34d; }
.status-message     { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 0; }

/* Download-Counter Badge */
.download-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-raised);
  border: 1px solid var(--border-dim);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 20px;
}
.download-counter .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 5px var(--green);
}
.download-counter .dot.used { background: var(--amber); box-shadow: 0 0 5px var(--amber); }
.download-counter .dot.empty { background: var(--text-muted); box-shadow: none; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .upload-zone  { flex-direction: column; align-items: flex-start; }
  .upload-actions { width: 100%; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .login-card, .download-card { padding: 32px 20px; }
  .dashboard { padding: 0 14px 40px; }
}
