/* Bryght — gemeinsame Oberfläche für Einreichung und Prüfung.

   Bewusst unbunt: Weiß, Grau, Schwarz. Farbe trägt hier keine Information,
   sie würde nur ablenken — wer 100 Kunden abarbeitet, braucht Ruhe und
   Struktur, keine Signalfarben. Die wenigen semantischen Töne (überfällige
   Frist, fehlgeschlagener Upload) sind entsättigt und tauchen nur dort auf,
   wo sie wirklich etwas bedeuten. */

:root {
  color-scheme: light dark;

  /* Markenton. Steht nur noch auf der Logokachel und auf der Hauptaktion.
     Wer die Marke doch sehen will, setzt hier den echten Hex-Wert ein. */
  --brand: #09090B;

  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --ground: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #FAFAFA;
  --surface-3: #F4F4F5;
  --ink: #09090B;
  --ink-2: #3F3F46;
  --muted: #71717A;
  --line: #E7E7EA;
  --line-strong: #D4D4D8;

  --accent: #09090B;
  --accent-ink: #FFFFFF;
  --accent-soft: #F4F4F5;

  --good: #15803D;  --good-soft: #F2F7F3;
  --ok:   #92600A;  --ok-soft:   #F8F5EE;
  --warn: #9A4B0C;  --warn-soft: #F9F4EF;
  --bad:  #B42318;  --bad-soft:  #FBF3F2;

  --shadow-sm: 0 1px 2px rgba(9,9,11,.04);
  --shadow: 0 1px 3px rgba(9,9,11,.06);
  --shadow-lg: 0 16px 48px -12px rgba(9,9,11,.22);

  --r-sm: 6px; --r-md: 8px; --r-lg: 12px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #FAFAFA;
    --ground: #09090B; --surface: #0F0F11; --surface-2: #17171A; --surface-3: #202024;
    --ink: #FAFAFA; --ink-2: #D4D4D8; --muted: #8B8B94;
    --line: #232327; --line-strong: #34343A;
    --accent: #FAFAFA; --accent-ink: #09090B; --accent-soft: #202024;
    --good: #4ADE80; --good-soft: #121814;
    --ok:   #E0B341; --ok-soft:   #1A1710;
    --warn: #E39355; --warn-soft: #1B1512;
    --bad:  #F27A6E; --bad-soft:  #1D1312;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow: 0 1px 3px rgba(0,0,0,.5);
    --shadow-lg: 0 16px 48px -12px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  --brand: #FAFAFA;
  --ground: #09090B; --surface: #0F0F11; --surface-2: #17171A; --surface-3: #202024;
  --ink: #FAFAFA; --ink-2: #D4D4D8; --muted: #8B8B94;
  --line: #232327; --line-strong: #34343A;
  --accent: #FAFAFA; --accent-ink: #09090B; --accent-soft: #202024;
  --good: #4ADE80; --good-soft: #121814;
  --ok:   #E0B341; --ok-soft:   #1A1710;
  --warn: #E39355; --warn-soft: #1B1512;
  --bad:  #F27A6E; --bad-soft:  #1D1312;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 3px rgba(0,0,0,.5);
  --shadow-lg: 0 16px 48px -12px rgba(0,0,0,.7);
}

/* ---------------------------------------------------------------- Reset */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--font-sans); font-size: 14.5px; line-height: 1.5;
  letter-spacing: -.005em; -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; }
p { margin: 0; }

/* ---------------------------------------------------------------- Marke */

.mark {
  width: 28px; height: 28px; flex: none;
  display: grid; place-items: center;
  background: var(--brand); border-radius: 7px;
}
.mark svg { width: 18px; height: 18px; }
.mark svg path { stroke: var(--ground); }
.mark.logo-raw { background: none; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand .name { font-weight: 600; letter-spacing: -.02em; font-size: 14.5px; }
.brand .sub { color: var(--muted); font-size: 12.5px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 24px;
}

/* ---------------------------------------------------------------- Bausteine */

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px 96px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.card + .card { margin-top: 10px; }
.card-head { padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.card-body { padding: 0 16px 16px; }
.card-foot {
  padding: 11px 16px; border-top: 1px solid var(--line);
  background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--font-mono); font-size: 11.5px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--r-md);
  border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 13.5px; font-weight: 500; color: var(--ink);
  transition: background .12s, border-color .12s, opacity .12s;
}
a.btn { text-decoration: none; }
.btn:hover:not(:disabled) { background: var(--surface-3); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  font-weight: 550;
}
.btn.primary:hover:not(:disabled) { opacity: .86; background: var(--accent); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--ink); }
.btn.danger { border-color: var(--line-strong); color: var(--bad); background: var(--surface); }
.btn.danger:hover:not(:disabled) { background: var(--bad-soft); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn.block { width: 100%; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
}
.badge::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; flex: none;
}
.badge.offen        { color: var(--ink-2); }
.badge.eingereicht  { color: var(--ink-2); background: var(--surface-3); }
.badge.angenommen   { color: var(--good); }
.badge.abgelehnt    { color: var(--bad); }
.badge.geprueft     { color: var(--muted); }
.badge.plain::before { display: none; }

label.field { display: block; }
label.field > span {
  display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  margin-bottom: 5px;
}
input[type="text"], input[type="password"], input[type="email"], input[type="date"],
input[type="number"], input[type="search"], select, textarea {
  width: 100%; padding: 8px 11px; border-radius: var(--r-md);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus {
  border-color: var(--ink); outline: none;
}
textarea { resize: vertical; min-height: 70px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

.notice {
  padding: 11px 13px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface-2);
  font-size: 13px; color: var(--ink-2);
}
.notice.warn { border-color: var(--line-strong); background: var(--warn-soft); color: var(--warn); }
.notice.bad  { border-color: var(--line-strong); background: var(--bad-soft);  color: var(--bad); }
.notice.good { border-color: var(--line-strong); background: var(--good-soft); color: var(--good); }

.ic-svg { width: 100%; height: 100%; display: block; }

/* Die Seite für einen Link, der ins Leere führt. */
.gate { max-width: 480px; padding-top: 16vh; text-align: center; }
.gate .mark { margin: 0 auto 20px; }
.gate h1 { font-size: 20px; margin-bottom: 8px; }

.checklist { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13px; }
.checklist li {
  display: flex; gap: 8px; align-items: flex-start; padding: 2px 0; color: var(--ink-2);
}

/* ---------------------------------------------------------------- Ablagefeld */

.drop {
  border: 1px dashed var(--line-strong); border-radius: var(--r-md);
  background: var(--surface-2); padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; transition: border-color .12s, background .12s;
  font-size: 13.5px; color: var(--muted);
}
.drop:hover { border-color: var(--ink); color: var(--ink-2); }
.drop.over { border-color: var(--ink); background: var(--surface-3); color: var(--ink); }
.drop .icon { display: block; width: 16px; height: 16px; flex: none; }
.drop .lead { font-weight: 500; color: var(--ink); }
.drop .hint { color: var(--muted); }
.drop input[type="file"] { display: none; }
.drop.disabled { opacity: .45; }
.drop.disabled:hover { border-color: var(--line-strong); background: var(--surface-2); }

.filelist { list-style: none; margin: 8px 0 0; padding: 0; }
.filelist li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); font-size: 13px;
}
.filelist li + li { margin-top: 5px; }
.filelist .fname { font-weight: 500; word-break: break-all; line-height: 1.35; }
.filelist .meta { color: var(--muted); font-size: 12px; }
.filelist .ic { display: block; width: 15px; height: 15px; flex: none; color: var(--muted); }
.filelist .ic.done { color: var(--ink-2); }
.filelist .ic.err { color: var(--bad); }
.filelist li.failed { border-color: var(--line-strong); background: var(--bad-soft); }
.filelist li.going { opacity: .4; }

.bar { height: 3px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ink); width: 0; transition: width .18s; }

/* ---------------------------------------------------------------- Dialog */

.modal-back {
  position: fixed; inset: 0; background: rgba(9,9,11,.4);
  display: grid; place-items: center; padding: 20px; z-index: 50;
}
.modal {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); width: min(520px, 100%);
  max-height: 90vh; overflow: auto; padding: 20px;
}
.modal h2 { font-size: 16px; margin-bottom: 6px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
[hidden] { display: none !important; }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--ink); color: var(--ground); padding: 10px 16px;
  border-radius: var(--r-md); font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg); z-index: 60; max-width: 90vw; text-align: center;
}
.toast.bad { background: var(--bad); color: #fff; }
