/* scan+ · Design angelehnt an juma.productions:
   dunkles Theme, Source Sans Pro 300/600, Akzent #96D3FF */

:root {
  --grund: #2E2E36;
  --flaeche: rgba(40, 39, 48, 0.92);
  --flaeche-hell: rgba(144, 144, 144, 0.18);
  --linie: rgba(255, 255, 255, 0.14);
  --text: #FFFFFF;
  --text-leise: rgba(255, 255, 255, 0.62);
  --akzent: #96D3FF;
  --akzent-dunkel: #1D2B36;
  --warn: #FFB4A2;
  --radius: 0.375rem;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--grund);
  color: var(--text);
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ===== Kopf ===== */

header {
  padding: 1.25rem 1rem 0.75rem;
  border-bottom: 1px solid var(--linie);
  background: var(--flaeche);
  position: sticky;
  top: 0;
  z-index: 10;
}

#demo-banner {
  margin: -1.25rem -1rem 0.9rem;
  padding: 0.35rem 1rem;
  background: var(--akzent);
  color: var(--akzent-dunkel);
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  text-align: center;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: 1.5em;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.175rem;
  color: var(--akzent);
}

h2 {
  font-size: 1em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.175rem;
  color: var(--text-leise);
  margin: 2rem 0 0.5rem;
}

nav#tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

nav#tabs button {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-leise);
  font: inherit;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.175rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

nav#tabs button.aktiv {
  color: var(--akzent);
  border-bottom-color: var(--akzent);
}

/* ===== Inhalt ===== */

main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1rem 1rem 4rem;
}

.tab { display: none; }
.tab.aktiv { display: block; }

.hinweis {
  color: var(--text-leise);
  font-size: 0.875em;
}

/* ===== Knöpfe ===== */

.knopf {
  display: inline-block;
  background: var(--akzent);
  color: var(--akzent-dunkel);
  border: 1px solid var(--akzent);
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.175rem;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  text-align: center;
}

.knopf.sekundaer {
  background: transparent;
  color: var(--akzent);
}

.knopf:active { opacity: 0.8; }

/* ===== Scannen ===== */

#drop-zone {
  border: 1px dashed var(--linie);
  border-radius: var(--radius);
  padding: 2.5rem 1rem;
  text-align: center;
  margin-top: 1rem;
}

#drop-zone.ueber {
  border-color: var(--akzent);
  background: var(--flaeche-hell);
}

#scan-status {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#scan-status progress {
  flex: 1;
  accent-color: var(--akzent);
}

.scan-spalten {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (max-width: 40rem) {
  .scan-spalten { grid-template-columns: 1fr; }
}

#scan-vorschau {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--linie);
  align-self: start;
}

/* ===== Formulare ===== */

form label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.175rem;
  color: var(--text-leise);
}

input, select {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  background: var(--flaeche-hell);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
  padding: 0.5rem 0.6rem;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--akzent);
}

select option { background: var(--grund); }

.form-knoepfe {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

#ocr-text-box summary {
  cursor: pointer;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.175rem;
  color: var(--text-leise);
}

#ocr-text {
  max-height: 12rem;
  overflow: auto;
  background: var(--flaeche-hell);
  border-radius: var(--radius);
  padding: 0.5rem;
  font-family: 'Lucida Console', 'Courier New', monospace;
  font-size: 0.75em;
  white-space: pre-wrap;
}

#f-vorschlag-hinweis { color: var(--akzent); }

.kontrollzeile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.kontrollzeile input[type="checkbox"] {
  display: inline-block;
  width: auto;
  margin: 0;
  accent-color: var(--akzent);
}

/* ===== Belege ===== */

.filter-zeile {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.filter-zeile label { margin-bottom: 0; }
.filter-zeile input, .filter-zeile select { width: auto; }

.tabelle-scroll { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375em;
}

th {
  text-align: left;
  font-weight: 600;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.175rem;
  color: var(--text-leise);
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--linie);
}

td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--linie);
  vertical-align: middle;
}

td.zahl, th.zahl { text-align: right; }

td img.thumb {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

tr.klickbar { cursor: pointer; }
tr.klickbar:hover { background: var(--flaeche-hell); }

button.loeschen {
  background: transparent;
  border: none;
  color: var(--warn);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ===== Übersicht ===== */

.ue-block { margin-top: 1.5rem; }

.balken-zeile {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr) 6rem;
  gap: 0.75rem;
  align-items: center;
  padding: 0.3rem 0;
  font-size: 0.9375em;
}

@media (max-width: 40rem) {
  .balken-zeile { grid-template-columns: 7rem minmax(0, 1fr) 5.5rem; }
}

.balken-zeile .name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.balken-spur {
  display: block;
  background: var(--flaeche-hell);
  border-radius: var(--radius);
  height: 0.9rem;
  overflow: hidden;
}

.balken {
  display: block;
  background: var(--akzent);
  height: 100%;
  border-radius: var(--radius);
  min-width: 2px;
}

.balken-zeile .wert {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.gross {
  font-size: 2em;
  font-weight: 300;
  color: var(--akzent);
  margin: 0.25rem 0 0;
}

/* ===== Einstellungen ===== */

.einstell-liste {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.einstell-liste li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.2rem;
  border-bottom: 1px solid var(--linie);
}

.zeilen-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.zeilen-form input { margin-top: 0; }
