/* NDZ Upload-Tool - Farben angelehnt an www.ndz.at */
:root {
  --ndz-blue-grey: #90a9c2;   /* Balken oben */
  --ndz-blue-dark: #4d6c8c;   /* Links, Fokus */
  --ndz-orange: #f9ae0b;      /* Akzent / Zwischenüberschriften */
  --ndz-orange-dark: #f99d0b;
  --ndz-grey: #666;           /* Hauptüberschriften */
  --text: #141414;
  --muted: #666;
  --line: #d6d6d6;
  --bg: #f4f4f4;
  --card: #fff;
  --danger: #c0392b;
  --ok: #3c8d4f;
  --radius: 10px;
  --font: "Myriad Pro", Myriad, "Trebuchet MS", "Segoe UI", 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(--ndz-blue-dark); }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* Kopf */
.topbar { height: 26px; background: var(--ndz-blue-grey); }
.site-header { background: #fff; border-bottom: 3px solid var(--ndz-orange); padding: 18px 0; text-align: center; }
.logo { max-height: 90px; max-width: 100%; }
.logo-text { display: inline-flex; flex-direction: column; align-items: center; color: #3a3a3a; font-family: Georgia, "Times New Roman", serif; letter-spacing: .06em; }
.logo-small { font-size: 13px; text-transform: uppercase; letter-spacing: .25em; }
.logo-big { font-size: clamp(18px, 5.5vw, 24px); text-transform: uppercase; }

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(--ndz-grey);
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.2;
}
h2 { margin: 28px 0 12px; color: var(--ndz-orange); 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(--ndz-blue-grey);
  border-radius: var(--radius);
  background: #f7f9fb;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag, .dropzone:focus-within { border-color: var(--ndz-orange); background: #fffaf0; }
.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(--ndz-orange); }
.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(249, 174, 11, .5);
  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(--ndz-orange); }
.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(--ndz-orange);
  color: var(--text);
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--ndz-orange-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(--ndz-blue-grey); color: var(--ndz-blue-dark); }
.btn-ghost:hover { background: #eef3f7; }
.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(--ndz-orange); 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: #eef3f7; border-left: 4px solid var(--ndz-blue-grey); 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(--ndz-blue-grey); 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(--ndz-grey); 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; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 15px; }
.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(--ndz-orange); color: var(--text); }
.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; }
