/* ============================================================
   Retouren Manager — Indisplay HandelsGmbH
   Design-System v1.0  |  Mobile-first
   ============================================================ */

/* ------------------------------------------------------------
   Google Fonts
   ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;500;700&family=Open+Sans:wght@400;600&display=swap');

/* ------------------------------------------------------------
   CSS Custom Properties — Indisplay CI
   ------------------------------------------------------------ */
:root {
  /* Brand */
  --indisplay-gruen:        #8dc049;
  --indisplay-dunkel-gruen: #5b814a;
  --indisplay-dunkel-grau:  #878787;
  --indisplay-hell-grau:    #aaaaaa;

  /* Oberflächen */
  --bg:       #f5f5f5;
  --surface:  #ffffff;
  --surface2: #f0f0f0;
  --border:   #e0e0e0;

  /* Text */
  --text:     #2a2a2a;
  --text-mid: #878787;
  --text-dim: #aaaaaa;

  /* Workflow-Farbpunkte */
  --color-verraumen:   #8dc049;
  --color-neuversand:  #3b82f6;
  --color-spezialfall: #f59e0b;

  /* Status */
  --status-ok:   #8dc049;
  --status-warn: #f59e0b;
  --status-info: #3b82f6;
  --status-done: #5b814a;
  --status-err:  #ef4444;

  /* Layout */
  --radius:    8px;
  --radius-sm: 4px;
  --radius-lg: 12px;
  --shadow:    0 1px 4px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.05);
  --shadow-lg: 0 4px 16px rgba(0,0,0,.12);

  /* Spacing */
  --gap:    16px;
  --gap-sm: 8px;
  --gap-lg: 24px;

  /* Touch-Targets */
  --touch: 44px;

  /* Typografie */
  --font-head: 'Ubuntu', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --font-mono: 'Courier New', Courier, monospace;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 0.9375rem; /* 15px */
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
}

img { max-width: 100%; display: block; }
a   { color: var(--indisplay-gruen); text-decoration: none; }
a:hover { color: var(--indisplay-dunkel-gruen); text-decoration: underline; }

/* ------------------------------------------------------------
   Typografie
   ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(1.4rem, 4vw, 1.75rem); }
h2 { font-size: clamp(1.15rem, 3vw, 1.35rem); }
h3 { font-size: 1.05rem; }
h4 { font-size: 0.95rem; font-weight: 500; }

p  { margin-bottom: var(--gap-sm); }
p:last-child { margin-bottom: 0; }

small { font-size: 0.8125rem; color: var(--text-mid); }

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  word-break: break-all;
}

/* ------------------------------------------------------------
   Layout — App-Shell
   ------------------------------------------------------------ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 2px solid var(--indisplay-gruen);
  box-shadow: var(--shadow);
}

.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding: 10px var(--gap);
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--indisplay-gruen);
  letter-spacing: -0.02em;
}

.logo-sub {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--indisplay-gruen);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
}

.header-user {
  font-size: 0.8125rem;
  color: var(--text-mid);
  display: none;
}

@media (min-width: 480px) {
  .header-user { display: block; }
}

.app-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--gap);
}

@media (min-width: 768px) {
  .app-main { padding: var(--gap-lg); }
}

/* ------------------------------------------------------------
   Karten / Cards
   ------------------------------------------------------------ */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--gap);
}

@media (min-width: 768px) {
  .card { padding: var(--gap-lg); }
}

.card-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: var(--gap);
  padding-bottom: var(--gap-sm);
  border-bottom: 1px solid var(--border);
}

.card-accent {
  border-left: 4px solid var(--indisplay-gruen);
  padding-left: var(--gap);
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-sm);
  min-height: var(--touch);
  padding: 0 var(--gap);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(.97); }

/* Primär — Indisplay Grün */
.btn-primary {
  background: var(--indisplay-gruen);
  color: #fff;
}
.btn-primary:hover {
  background: var(--indisplay-dunkel-gruen);
  color: #fff;
  text-decoration: none;
}

/* Sekundär — Outline */
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  background: var(--surface2);
  color: var(--text);
  text-decoration: none;
}

/* Gefahren */
.btn-danger {
  background: #fee2e2;
  color: #dc2626;
}
.btn-danger:hover {
  background: #fecaca;
  color: #dc2626;
  text-decoration: none;
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-mid);
}
.btn-ghost:hover {
  background: var(--surface2);
  color: var(--text);
  text-decoration: none;
}

/* Workflow-Buttons */
.btn-verraumen  { background: var(--color-verraumen);   color: #fff; }
.btn-neuversand { background: var(--color-neuversand);  color: #fff; }
.btn-spezialfall{ background: var(--color-spezialfall); color: #fff; }
.btn-verraumen:hover   { background: #6fa035; color: #fff; text-decoration: none; }
.btn-neuversand:hover  { background: #2563eb; color: #fff; text-decoration: none; }
.btn-spezialfall:hover { background: #d97706; color: #fff; text-decoration: none; }

/* Größen */
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 0.8125rem; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 1rem; }
.btn-full { width: 100%; }

.btn:disabled, .btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Icon-Only Button */
.btn-icon {
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0;
  border-radius: var(--radius);
}

/* ------------------------------------------------------------
   Formulare
   ------------------------------------------------------------ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--gap);
}

.form-group:last-child { margin-bottom: 0; }

label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-mid);
  letter-spacing: 0.02em;
}

label .required {
  color: var(--status-err);
  margin-left: 2px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="password"],
select,
textarea {
  width: 100%;
  min-height: var(--touch);
  padding: 10px 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--indisplay-gruen);
  box-shadow: 0 0 0 3px rgba(141,192,73,.18);
}

input::placeholder, textarea::placeholder { color: var(--text-dim); }

textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.55;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23878787' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 36px;
}

/* Feld-Zustand: erkannt (grün) */
input.field-ok {
  border-color: var(--status-ok);
  background: #f0f9e8;
}

/* Feld-Zustand: fehlt (gelb) */
input.field-warn {
  border-color: var(--status-warn);
  background: #fffbeb;
}

.field-indicator {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
}
.field-indicator.ok   { color: var(--status-ok); }
.field-indicator.warn { color: var(--status-warn); }

/* Checkbox / Toggle */
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--touch);
  cursor: pointer;
}

.check-row input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  height: 20px;
  accent-color: var(--indisplay-gruen);
  cursor: pointer;
  flex-shrink: 0;
}

.check-row label {
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--text);
  letter-spacing: normal;
  margin: 0;
}

/* Grid: 2 Spalten ab Tablet */
.form-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-2 { grid-column: 1 / -1; }
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm);
  margin-top: var(--gap-lg);
  padding-top: var(--gap);
  border-top: 1px solid var(--border);
}

/* ------------------------------------------------------------
   Stat-Kacheln (Dashboard)
   ------------------------------------------------------------ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  margin-bottom: var(--gap-lg);
}

@media (min-width: 640px)  { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--gap);
  border-left: 4px solid var(--indisplay-gruen);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-card.warn   { border-left-color: var(--status-warn); }
.stat-card.info   { border-left-color: var(--status-info); }
.stat-card.done   { border-left-color: var(--status-done); }

a.stat-card       { cursor: pointer; transition: box-shadow .15s, transform .1s; }
a.stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.10); transform: translateY(-1px); }
.stat-card-active { box-shadow: 0 0 0 2px var(--indisplay-gruen) !important; }

.stat-value {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-mid);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------------
   Tabelle
   ------------------------------------------------------------ */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.875rem;
}

thead {
  background: var(--surface2);
  position: sticky;
  top: 0;
}

thead th {
  padding: 12px var(--gap);
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mid);
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
  cursor: pointer;
}

tbody tr:nth-child(even) { background: #fafafa; }
tbody tr:hover           { background: #eef5e6; }
tbody tr:last-child      { border-bottom: none; }

tbody td {
  padding: 12px var(--gap);
  vertical-align: middle;
}

/* Karten-Layout auf Mobil statt Tabelle */
@media (max-width: 767px) {
  .table-desktop { display: none; }
  .cards-mobile  { display: flex; flex-direction: column; gap: var(--gap); }
}
@media (min-width: 768px) {
  .table-desktop { display: block; }
  .cards-mobile  { display: none; }
}

.row-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--gap);
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: box-shadow .15s;
}
.row-card:hover { box-shadow: var(--shadow-lg); }

.row-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--gap-sm);
}

.row-card-name   { font-weight: 600; font-size: 0.9375rem; }
.row-card-meta   { font-size: 0.8125rem; color: var(--text-mid); }

/* ------------------------------------------------------------
   Badges / Pills
   ------------------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-ok       { background: #e8f5d8; color: var(--status-done); }
.badge-warn     { background: #fef3c7; color: #92400e; }
.badge-info     { background: #dbeafe; color: #1d4ed8; }
.badge-dim      { background: var(--surface2); color: var(--text-mid); }
.badge-err      { background: #fee2e2; color: #dc2626; }

/* Status-Badges */
.badge-angemeldet     { background: var(--surface2); color: var(--text-mid); }
.badge-eingegangen    { background: #dbeafe; color: #1d4ed8; }
.badge-in_bearbeitung { background: #fef3c7; color: #92400e; }
.badge-erledigt       { background: #e8f5d8; color: var(--status-done); }
.badge-nicht_erhalten { background: #fee2e2; color: #dc2626; }

/* ------------------------------------------------------------
   Farbpunkte (Abwicklung)
   ------------------------------------------------------------ */
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-verraumen   { background: var(--color-verraumen); }
.dot-neuversand  { background: var(--color-neuversand); }
.dot-spezialfall { background: var(--color-spezialfall); }
.dot-none        { background: var(--border); }

.abwicklung-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
}

/* ------------------------------------------------------------
   Fortschrittsleiste (4 Schritte)
   ------------------------------------------------------------ */
.progress-steps {
  display: flex;
  align-items: center;
  margin-bottom: var(--gap-lg);
  overflow-x: auto;
  padding-bottom: 4px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 60px;
  position: relative;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-dim);
  z-index: 1;
  transition: all .2s;
}

.step.done .step-circle {
  background: var(--indisplay-gruen);
  border-color: var(--indisplay-gruen);
  color: #fff;
}

.step.active .step-circle {
  border-color: var(--indisplay-gruen);
  color: var(--indisplay-gruen);
  box-shadow: 0 0 0 4px rgba(141,192,73,.2);
}

.step-label {
  font-size: 0.7rem;
  text-align: center;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.2;
  font-weight: 600;
}

.step.done   .step-label  { color: var(--indisplay-gruen); }
.step.active .step-label  { color: var(--text); }

.step-line {
  flex: 1;
  height: 2.5px;
  background: var(--border);
  margin-top: -22px; /* align to center of circles */
  position: relative;
  z-index: 0;
}
.step-line.done { background: var(--indisplay-gruen); }

/* Checkmark in done step */
.step.done .step-circle::after {
  content: '✓';
  font-size: 1rem;
}

/* ------------------------------------------------------------
   Foto-Upload Bereich
   ------------------------------------------------------------ */
.upload-zone {
  border: 2.5px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--gap-sm);
  padding: var(--gap-lg);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--indisplay-gruen);
  background: #f0f9e8;
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  min-height: unset;
  border: none;
  background: none;
  box-shadow: none;
  padding: 0;
}

.upload-icon {
  font-size: 2.5rem;
  color: var(--indisplay-hell-grau);
  line-height: 1;
}

.upload-text {
  font-size: 0.9375rem;
  color: var(--text-mid);
}
.upload-hint {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.upload-preview {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: var(--radius);
  display: none;
}

/* Scanning Overlay */
.scan-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.92);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--gap-sm);
  border-radius: var(--radius-lg);
  z-index: 10;
}

.scan-overlay.active { display: flex; }

.scan-overlay p {
  font-weight: 600;
  color: var(--indisplay-gruen);
  font-size: 0.9375rem;
}

/* Spinner */
.spinner {
  width: 36px;
  height: 36px;
  border: 3.5px solid rgba(141,192,73,.25);
  border-top-color: var(--indisplay-gruen);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Match-Banner */
.match-banner {
  display: none;
  background: #e8f5d8;
  border: 1.5px solid var(--indisplay-gruen);
  border-radius: var(--radius);
  padding: 12px var(--gap);
  gap: var(--gap-sm);
  align-items: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--status-done);
}
.match-banner.visible { display: flex; }
.match-banner a { color: var(--status-done); text-decoration: underline; }

/* ------------------------------------------------------------
   Toast-Nachrichten
   ------------------------------------------------------------ */
.toast-container {
  position: fixed;
  bottom: var(--gap);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-sm);
  pointer-events: none;
  width: min(90vw, 420px);
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px var(--gap);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.9375rem;
  font-weight: 600;
  pointer-events: auto;
  animation: toastIn .25s ease;
  width: 100%;
}

.toast-success { background: #2d6a17; color: #fff; }
.toast-error   { background: #dc2626; color: #fff; }
.toast-info    { background: #1d4ed8; color: #fff; }
.toast-warn    { background: #d97706; color: #fff; }

.toast-icon { font-size: 1.1rem; flex-shrink: 0; }

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

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

.toast.hiding { animation: toastOut .2s ease forwards; }

/* ------------------------------------------------------------
   Artikel-Liste (Schritt 3)
   ------------------------------------------------------------ */
.artikel-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
  margin-bottom: var(--gap);
}

.artikel-item {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  padding: 10px var(--gap);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s;
}

.artikel-item.beschaedigt {
  border-color: var(--status-warn);
  background: #fffbeb;
}

.artikel-item-name {
  flex: 1;
  font-size: 0.9375rem;
}

.artikel-item-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--status-warn);
  white-space: nowrap;
}

.artikel-item-actions {
  display: flex;
  gap: 4px;
}

/* Artikel hinzufügen */
.artikel-add-row {
  display: flex;
  gap: var(--gap-sm);
}

.artikel-add-row input {
  flex: 1;
}

/* ------------------------------------------------------------
   Detail-Sektionen (Workflow-Steps)
   ------------------------------------------------------------ */
.step-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--gap);
  margin-bottom: var(--gap);
}

@media (min-width: 768px) {
  .step-section { padding: var(--gap-lg); }
}

.step-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  margin-bottom: var(--gap);
  padding-bottom: var(--gap-sm);
  border-bottom: 1px solid var(--border);
}

.step-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--text-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-section.active-step .step-num {
  background: var(--indisplay-gruen);
  color: #fff;
}

.step-section.done-step   .step-num {
  background: var(--status-done);
  color: #fff;
}

.step-done-banner {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  background: #e8f5d8;
  color: var(--status-done);
  padding: 10px var(--gap);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
}

/* Abwicklung-Auswahl — große Buttons */
.abwicklung-choice {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

@media (min-width: 480px) {
  .abwicklung-choice { grid-template-columns: repeat(3, 1fr); }
}

.abwicklung-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 100px;
  border-radius: var(--radius-lg);
  border: 3px solid transparent;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all .15s;
  padding: var(--gap);
  color: #fff;
}

.abwicklung-btn .ab-icon { font-size: 1.75rem; }

.abwicklung-btn-verraumen  { background: var(--color-verraumen); }
.abwicklung-btn-neuversand { background: var(--color-neuversand); }
.abwicklung-btn-spezialfall{ background: var(--color-spezialfall); }

.abwicklung-btn.selected {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0,0,0,.15);
  transform: scale(1.03);
}

/* ------------------------------------------------------------
   Druckansicht
   ------------------------------------------------------------ */
@media print {
  .app-header, .btn, .toast-container, .no-print { display: none !important; }

  body { background: #fff; font-size: 12pt; }

  .card, .step-section {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  .print-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16pt;
    padding-bottom: 8pt;
    border-bottom: 2pt solid #8dc049;
  }

  table { font-size: 10pt; }
}

.print-header { display: none; }

/* ------------------------------------------------------------
   Login-Seite
   ------------------------------------------------------------ */
.login-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gap);
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(var(--gap-lg), 6vw, 40px);
}

.login-logo {
  text-align: center;
  margin-bottom: var(--gap-lg);
}

.login-logo .logo-text { font-size: 1.75rem; }
.login-logo .logo-sub  { font-size: 0.85rem; margin-top: 2px; }

.login-error {
  background: #fee2e2;
  color: #dc2626;
  border-radius: var(--radius);
  padding: 10px var(--gap);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--gap);
}

/* ------------------------------------------------------------
   Suchfeld + Filter-Leiste
   ------------------------------------------------------------ */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm);
  margin-bottom: var(--gap);
  align-items: center;
}

.search-input {
  flex: 1;
  min-width: 180px;
  position: relative;
}

.search-input input {
  padding-left: 36px;
}

.search-input .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  font-size: 1rem;
}

.filter-select {
  min-width: 140px;
  min-height: var(--touch);
}

/* ------------------------------------------------------------
   Seiten-Überschrift
   ------------------------------------------------------------ */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  margin-bottom: var(--gap-lg);
}

.page-title {
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  font-weight: 700;
  color: var(--text);
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-mid);
  margin-top: 2px;
}

/* ------------------------------------------------------------
   Info-Reihen (Key: Value)
   ------------------------------------------------------------ */
.info-grid {
  display: grid;
  gap: var(--gap-sm) var(--gap-lg);
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
}

.info-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-value {
  font-size: 0.9375rem;
  color: var(--text);
}

/* ------------------------------------------------------------
   Responsive Helpers
   ------------------------------------------------------------ */
.hide-mobile  { display: none; }
.hide-desktop { display: block; }

@media (min-width: 768px) {
  .hide-mobile  { display: block; }
  .hide-desktop { display: none; }
}

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-mid); }
.text-small  { font-size: 0.8125rem; }
.text-mono   { font-family: var(--font-mono); }

.mt-0  { margin-top: 0; }
.mt-1  { margin-top: var(--gap-sm); }
.mt-2  { margin-top: var(--gap); }
.mt-3  { margin-top: var(--gap-lg); }
.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: var(--gap-sm); }
.mb-2  { margin-bottom: var(--gap); }
.mb-3  { margin-bottom: var(--gap-lg); }

.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1        { gap: var(--gap-sm); }
.gap-2        { gap: var(--gap); }

/* Leerer Zustand */
.empty-state {
  text-align: center;
  padding: var(--gap-lg) var(--gap);
  color: var(--text-mid);
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: var(--gap-sm); opacity: .4; }
.empty-state-text { font-size: 0.9375rem; }

/* Trennlinie */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--gap) 0;
}

/* Zähler-Badge */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--indisplay-gruen);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}
