/* ZNZ Upload-Tool - Farben laut ZNZ-CI (Petrol #12575D, siehe 09 Anhänge/.../CD-ZNZ/ZNZ-Farbcodes.txt) */
:root {
  --brand: #12575d;             /* ZNZ Petrol - Logo, Buttons, Überschriften, Links */
  --brand-dark: #0d4247;        /* Hover */
  --brand-soft: #8fb5b8;        /* Rahmen, Linien */
  --brand-light: #e8f1f2;       /* helle Flächen */
  --text: #1a1a1a;
  --muted: #5f6b6c;
  --line: #d5dfe0;
  --bg: #f3f6f6;
  --card: #fff;
  --danger: #c0392b;
  --ok: #2e7d4f;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
}
a { color: var(--brand); }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* Kopf */
.topbar { height: 8px; background: var(--brand); }
.site-header { background: #fff; border-bottom: 1px solid var(--line); padding: 18px 0; }
.site-header .wrap { display: flex; justify-content: center; }
.logo { height: clamp(34px, 9vw, 56px); width: auto; max-width: 100%; display: block; }
.logo-text { display: inline-flex; flex-direction: column; color: var(--brand); line-height: 1.12; font-weight: 600; letter-spacing: .01em; }
.logo-small, .logo-big { font-size: clamp(16px, 4.6vw, 22px); }

main.wrap { padding-top: 24px; padding-bottom: 32px; }

/* Karten */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  padding: 24px 20px;
  margin-bottom: 20px;
}
.card.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }
@media (min-width: 600px) { .card { padding: 32px 36px; } }

h1 {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}
h2 { margin: 28px 0 12px; color: var(--brand); font-size: 20px; font-weight: 700; }
.lead { font-size: 18px; margin: 0 0 8px; }
.small { font-size: 14px; color: var(--muted); }

/* Upload-Feld */
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 28px 16px;
  border: 2px dashed var(--brand-soft);
  border-radius: var(--radius);
  background: #f6fafa;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag, .dropzone:focus-within { border-color: var(--brand); background: var(--brand-light); }
.dropzone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone.full { opacity: .55; pointer-events: none; }
.dropzone.has-files { padding: 16px; }
.dropzone.has-files .dz-icon svg { width: 28px; height: 28px; }
.dz-icon { color: var(--brand); }
.dz-title { font-size: 19px; font-weight: 700; }
.dz-hint { font-size: 14px; color: var(--muted); }

.previews { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.previews:empty { display: none; }
.previews li { position: relative; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.previews li.pending { display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); padding: 8px; text-align: center; }
.previews img { width: 100%; height: 100%; object-fit: cover; display: block; }
.previews .remove {
  position: absolute; top: 6px; right: 6px;
  width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: rgba(20, 20, 20, .75); color: #fff;
  font-size: 20px; line-height: 30px; cursor: pointer;
}

/* Formularfelder */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
input[type=text], input[type=tel], input[type=password] {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 17px; /* >=16px verhindert Auto-Zoom auf iOS */
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
input:focus-visible, button:focus-visible, a:focus-visible, .dropzone:focus-within {
  outline: 3px solid rgba(18, 87, 93, .35);
  outline-offset: 2px;
}
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 20px 0; cursor: pointer; }
.consent input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--brand); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Buttons */
.btn {
  display: inline-block;
  width: 100%;
  padding: 15px 20px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-small { width: auto; padding: 8px 14px; font-size: 15px; }
.btn-ghost { background: transparent; border: 2px solid var(--brand-soft); color: var(--brand); }
.btn-ghost:hover { background: var(--brand-light); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a93226; }

.progress { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; margin-top: 12px; }
.progress-bar { height: 100%; width: 0; background: var(--brand); transition: width .2s; }

.error { background: #fdecea; color: var(--danger); border-left: 4px solid var(--danger); padding: 12px 14px; border-radius: 6px; margin: 12px 0; }
.notice { background: var(--brand-light); border-left: 4px solid var(--brand-soft); padding: 12px 14px; border-radius: 6px; margin-bottom: 16px; }
.secure-note { display: flex; gap: 6px; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.secure-note svg { color: var(--brand-soft); flex: none; }

/* Erfolg */
.success { text-align: center; }
.success-icon {
  width: 64px; height: 64px; margin: 0 auto 12px;
  border-radius: 50%; background: var(--ok); color: #fff;
  font-size: 36px; line-height: 64px;
}
.ref { font-size: 28px; font-weight: 700; letter-spacing: .08em; color: var(--brand); margin: 4px 0 16px; }

/* Fußzeile */
.site-footer { border-top: 1px solid var(--line); padding: 18px 0 28px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; }

/* Admin */
body.admin .wrap { max-width: 1000px; }
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 16px; font-size: 15px; }
.admin-nav { display: flex; gap: 4px; margin-right: auto; }
.admin-nav a { padding: 6px 12px; border-radius: 6px; text-decoration: none; font-weight: 700; color: var(--brand); }
.admin-nav a.active { background: var(--brand); color: #fff; }
.form-narrow { max-width: 420px; }
td.right { text-align: right; }
code { background: var(--bg); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
table.list th, table.list td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list th { color: var(--muted); font-weight: 700; font-size: 13px; text-transform: uppercase; }
table.list tr.is-new td { font-weight: 700; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; }
.badge-neu { background: var(--brand); color: #fff; }
.badge-erledigt { background: #e3ece6; color: var(--ok); }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 16px 0 20px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 700; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; }
.gallery figcaption { font-size: 14px; margin-top: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.actions .btn { width: auto; }
