/* ShareBox - eine Datei für Oberfläche und Abrufseite. Hell/dunkel folgt dem System. */
:root {
  color-scheme: light dark;
  --grund: #F4F5F8;
  --flaeche: #FFFFFF;
  --text: #1B2030;
  --leise: #667085;
  --linie: #DDE1EA;
  --marke: #3A56C5;
  --marke-dunkel: #2C44A3;
  --marke-hell: #E9EDFB;
  --rot: #B42335;
  --rot-hell: #FBEAEC;
  --gut: #1F7A4D;
  --schatten: 0 1px 2px rgba(20, 28, 50, .06), 0 6px 24px rgba(20, 28, 50, .06);
  --rund: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #12141B;
    --flaeche: #1B1F2A;
    --text: #E7EAF2;
    --leise: #98A1B5;
    --linie: #2E3445;
    --marke: #8DA2F5;
    --marke-dunkel: #A9B9F8;
    --marke-hell: #232B47;
    --rot: #F1808D;
    --rot-hell: #3A1F25;
    --gut: #6FCF9B;
    --schatten: 0 1px 2px rgba(0, 0, 0, .4);
  }
  button.primaer, .knopf.primaer { color: #10131C; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 15px/1.5 "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text); background: var(--grund);
  display: flex; flex-direction: column; min-height: 100vh;
}
h1 { font-size: 22px; margin: 0 0 14px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 18px; margin: 0 0 12px; font-weight: 650; }
p { margin: 0 0 10px; }
a { color: var(--marke); }
code { font: 14px/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--marke-hell); padding: 2px 7px; border-radius: 6px; user-select: all; }
.leise { color: var(--leise); }
.klein { font-size: 13px; }
.zahl { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fehler { color: var(--rot); min-height: 1.2em; margin: 0; }
.warnung { color: var(--rot); }

header { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 14px 24px; }
.marke { font-size: 19px; font-weight: 700; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.marke::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 9px; border-radius: 4px; background: var(--marke); transform: rotate(45deg); }
nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
nav button { border-color: transparent; background: transparent; }
nav button.aktiv { background: var(--marke-hell); color: var(--marke-dunkel); }
main { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: 16px 20px 40px; }
footer { text-align: center; padding: 18px; color: var(--leise); font-size: 13px; }

.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); box-shadow: var(--schatten); padding: 22px; margin-bottom: 16px; }
.schmal { max-width: 420px; margin: 8vh auto 0; }
.rollbar { padding: 4px 8px; overflow-x: auto; }

button, .knopf {
  font: inherit; font-weight: 560; color: var(--text); background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: 10px; padding: 8px 14px; cursor: pointer;
  text-decoration: none; display: inline-block; white-space: nowrap;
}
button:hover, .knopf:hover { border-color: var(--marke); }
button:focus-visible, .knopf:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, #ablage:focus-visible { outline: 3px solid var(--marke-hell); outline-offset: 1px; border-color: var(--marke); }
button.primaer, .knopf.primaer { background: var(--marke); border-color: var(--marke); color: #fff; }
button.primaer:hover, .knopf.primaer:hover { background: var(--marke-dunkel); border-color: var(--marke-dunkel); }
button.gefahr { color: var(--rot); }
button.gefahr:hover { border-color: var(--rot); background: var(--rot-hell); }
button.klein { padding: 4px 10px; font-size: 13px; border-radius: 8px; }
button:disabled { opacity: .5; cursor: default; }
.knoepfe { display: flex; gap: 6px; justify-content: flex-end; }

input, select, textarea { font: inherit; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 8px 11px; width: 100%; }
textarea { resize: vertical; }
label { display: grid; gap: 5px; font-weight: 560; font-size: 13.5px; }
label small { font-weight: 400; color: var(--leise); }
label.haken { display: flex; align-items: center; gap: 8px; padding-bottom: 9px; }
label.haken input { width: auto; }
.felder { display: grid; gap: 14px; }
.reihe { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.reihe > label, .reihe > input { flex: 1 1 180px; }

/* Ablagefläche: die eine große Sache in der Mitte */
#ablage {
  border: 2px dashed var(--linie); border-radius: 22px; background: var(--flaeche);
  min-height: 300px; display: grid; place-content: center; text-align: center; gap: 4px;
  padding: 30px; margin-bottom: 16px; cursor: pointer; transition: border-color .15s, background .15s;
}
#ablage:hover, #ablage.ziel { border-color: var(--marke); background: var(--marke-hell); }
#ablage p { margin: 0; }
.gross { font-size: 26px; font-weight: 650; letter-spacing: -.02em; }

.dateien { list-style: none; margin: 0 0 16px; padding: 0; }
.dateien li { display: flex; align-items: center; gap: 14px; padding: 10px 2px; border-bottom: 1px solid var(--linie); }
.dateien li:last-child { border-bottom: 0; }
.dateien .name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 560; }
.nachricht { white-space: pre-wrap; overflow-wrap: anywhere; }

progress { width: 100%; height: 14px; accent-color: var(--marke); margin-bottom: 10px; }
.hinweis { background: var(--marke-hell); border-radius: 10px; padding: 12px 14px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--leise); padding: 10px 8px; }
td { padding: 10px 8px; border-top: 1px solid var(--linie); vertical-align: middle; }
td:first-child { overflow-wrap: anywhere; }
.marke-klein { font-size: 11.5px; font-weight: 600; color: var(--marke-dunkel); background: var(--marke-hell); border-radius: 6px; padding: 1px 6px; margin-left: 8px; }

#meldungen { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 5; }
.meldung { background: var(--flaeche); border: 1px solid var(--linie); border-left: 4px solid var(--gut); border-radius: 10px; box-shadow: var(--schatten); padding: 10px 14px; max-width: 360px; }
.meldung.rot { border-left-color: var(--rot); }

@media (max-width: 600px) {
  header { padding: 12px 14px; }
  main { padding: 10px 12px 30px; }
  #ablage { min-height: 200px; }
  .gross { font-size: 21px; }
}
