/* ACX-Konverter – Studio-Look: dunkle Kopfleiste, ruhige Fläche, Pegelanzeige als Hauptelement */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --ink: #1c2330;
  --muted: #5f6977;
  --line: #dfe3e8;
  --band: #1f2a3a;
  --band-ink: #f2f5f8;
  --band-muted: #a9b4c2;
  --accent: #2a6f97;
  --accent-hover: #215a7b;
  --accent-soft: #e6f0f6;
  --accent-ink: #ffffff;
  --ok: #23824f;
  --ok-soft: #e3f3ea;
  --bad: #b93a2e;
  --bad-soft: #fbe9e7;
  --zone: #cfe8d8;
  --track: #e8ebef;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12171e; --surface: #1a212b; --ink: #e7ecf1; --muted: #9ba6b3; --line: #2b3542;
    --band: #0d1218; --band-ink: #eef2f6; --band-muted: #8f9aa8;
    --accent: #6eb0d8; --accent-hover: #8cc2e3; --accent-soft: #1d3140; --accent-ink: #0c1a24;
    --ok: #5cc48a; --ok-soft: #173326; --bad: #f08a80; --bad-soft: #3a1f1c;
    --zone: #24493a; --track: #27313d;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 16px/1.55 "Segoe UI", system-ui, -apple-system, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* Kopfleiste */
.band { background: var(--band); color: var(--band-ink); }
.band-inner {
  max-width: 920px; margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand svg { flex: none; }
.brand-name { font-size: 1.15rem; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; }
.brand-sub { font-size: .8rem; color: var(--band-muted); line-height: 1.2; }
.account { display: flex; align-items: center; gap: 14px; margin: 0; font-size: .9rem; }
.account .who { color: var(--band-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.account button {
  background: transparent; color: var(--band-ink); border: 1px solid rgba(255,255,255,.28);
  border-radius: 6px; padding: 5px 12px; cursor: pointer;
}
.account button:hover { border-color: rgba(255,255,255,.6); }

.wrap { max-width: 920px; margin: 0 auto; padding: 32px 24px 64px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  padding: 9px 18px; border-radius: 7px; cursor: pointer; text-decoration: none; font-weight: 600; font-size: .95rem;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--line); font-weight: 500; }
.btn.ghost:hover { color: var(--bad); border-color: var(--bad); background: transparent; }

/* Upload */
.drop {
  display: block; position: relative;
  background: var(--surface); border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 40px 24px 36px; text-align: center; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop .icon { color: var(--accent); margin-bottom: 10px; }
.drop .title { display: block; font-size: 1.2rem; font-weight: 650; margin-bottom: 4px; }
.drop .hint { display: block; color: var(--muted); font-size: .92rem; margin-bottom: 18px; }
.drop .btn { pointer-events: none; }

.specs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-top: 16px;
}
.spec { background: var(--surface); padding: 12px 14px; }
.spec b { display: block; font-size: 1rem; font-variant-numeric: tabular-nums; }
.spec span { font-size: .8rem; color: var(--muted); }

.uploads { margin-top: 14px; }
.up {
  display: grid; grid-template-columns: minmax(0, 1fr) 2fr auto; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 14px; margin-top: 8px; font-size: .9rem;
}
.up .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up .bar { height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; }
.up .bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

/* Dateiliste */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 44px 0 14px; }
.section-head h2 { font-size: 1.15rem; margin: 0; white-space: nowrap; }
.section-head p { margin: 0; }

.job {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 14px;
}
.job-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.job-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.job-name { font-weight: 600; word-break: break-word; }
.badge { font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge.ok { color: var(--ok); background: var(--ok-soft); }
.badge.bad { color: var(--bad); background: var(--bad-soft); }
.badge.run { color: var(--accent); background: var(--accent-soft); }
.actions { display: flex; gap: 8px; align-items: center; }
.progress { height: 5px; background: var(--track); border-radius: 3px; margin-top: 16px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.job .error { color: var(--bad); margin: 12px 0 0; font-size: .92rem; }

/* Pegelanzeige */
.meters { margin-top: 18px; display: grid; gap: 14px; }
.meter { display: grid; grid-template-columns: 10rem 1fr 5rem; gap: 14px; align-items: center; }
.meter .label { font-size: .92rem; font-weight: 500; line-height: 1.3; }
.meter .label small { display: block; color: var(--muted); font-size: .78rem; font-weight: 400; }
.scale { position: relative; height: 24px; background: var(--track); border-radius: 5px; }
.scale .zone { position: absolute; top: 0; bottom: 0; background: var(--zone); border-radius: 5px; }
.scale .mark { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; border-radius: 2px; }
.scale .mark.in { background: var(--muted); opacity: .45; }
.scale .mark.out { background: var(--ink); }
.scale .mark.out.bad { background: var(--bad); }
.meter .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.meter .val.bad { color: var(--bad); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.facts { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.warn { margin: 12px 0 0; padding: 10px 14px 10px 30px; font-size: .875rem; color: var(--muted); background: var(--bg); border-radius: 8px; }
.warn li + li { margin-top: 4px; }
.empty {
  color: var(--muted); text-align: center; padding: 28px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 0;
}
.foot { margin-top: 20px; font-size: .85rem; color: var(--muted); }

/* Login */
.login-page { min-height: 100vh; display: flex; flex-direction: column; }
.login-page main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.login {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 32px;
}
.login h1 { font-size: 1.35rem; margin: 0 0 6px; }
.login p.lead { margin: 0 0 22px; color: var(--muted); font-size: .92rem; }
.login label { display: block; margin-top: 14px; font-size: .88rem; font-weight: 500; }
.login input {
  width: 100%; padding: 10px 12px; margin-top: 6px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg); color: var(--ink);
}
.login input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.login .btn { width: 100%; justify-content: center; margin-top: 24px; padding: 11px; }
.login .error { color: var(--bad); background: var(--bad-soft); padding: 9px 12px; border-radius: 7px; margin: 16px 0 0; font-size: .9rem; }

@media (max-width: 640px) {
  .band-inner { padding: 14px 16px; }
  .brand-sub, .account .who { display: none; }
  .wrap { padding: 22px 16px 48px; }
  .specs { grid-template-columns: repeat(2, 1fr); }
  .meter { grid-template-columns: 1fr auto; }
  .meter .scale { grid-column: 1 / -1; grid-row: 2; }
  .up { grid-template-columns: 1fr auto; }
  .up .bar { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
