/* Abiball 2026 — Fotogalerie · Gold-Design (Schriften lokal gehostet, DSGVO) */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('/static/fonts/playfair-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/fonts/lato-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('/static/fonts/lato-700.woff2') format('woff2');
}

:root {
  --cream: #f8f5f0;
  --paper: #ffffff;
  --navy: #1a1a2e;
  --gold: #c9a84c;
  --gold-light: #e2c97e;
  --gold-dark: #9a7428;
  --ink: #2a2420;
  --muted: #7a7068;
  --line: #e5dcc8;
  --input-bg: #faf8f5;
  --input-border: #d8cfc0;
  --ok: #4a7a4f;
  --no: #a3473f;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Lato', sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

a { color: var(--gold-dark); }

/* ── Top ribbon ── */
.top-banner { background: var(--navy); padding: 7px 0; text-align: center; }
.top-banner span { font-size: 0.72rem; letter-spacing: 0.3em; color: var(--gold); text-transform: uppercase; }

/* ── Header ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  background: linear-gradient(160deg, #ffffff 0%, #faf6ee 100%);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 700;
  color: var(--navy); text-decoration: none;
}
.topbar nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.topbar nav a, .topbar nav .navform button {
  color: var(--gold-dark); text-decoration: none;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
}
.topbar nav a:hover { color: var(--navy); }
.navform { display: inline; }

/* ── Deadline-Banner ── */
.deadline-banner {
  text-align: center; padding: 9px 16px; font-size: 0.85rem;
  background: rgba(201,168,76,0.12); border-bottom: 1px solid var(--line); color: var(--gold-dark);
}
.deadline-banner.over { background: rgba(163,71,63,0.08); color: var(--no); }

/* ── Layout ── */
.container { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 36px 20px; }
.container.wide { max-width: 1200px; }

/* ── Cards ── */
.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 34px 38px;
  margin-bottom: 26px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04), 0 12px 40px rgba(0,0,0,0.06);
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}
.card.narrow { max-width: 460px; margin: 50px auto; }
.card.legal { max-width: 720px; margin-left: auto; margin-right: auto; }
.card.legal ul { padding-left: 22px; margin-bottom: 0.8em; }
.card.legal li { margin: 6px 0; }

/* ── Typography ── */
h1, h2, h3 { font-family: 'Playfair Display', serif; color: var(--navy); font-weight: 700; line-height: 1.2; }
h1 { font-size: 1.9rem; margin-bottom: 6px; }
h2 { font-size: 1.3rem; margin: 1.4em 0 0.5em; }
.card.legal h2 { font-size: 1.15rem; }
.card p { margin-bottom: 0.8em; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.tagline { text-align: center; font-size: 0.7rem; letter-spacing: 0.3em; color: var(--gold-dark); text-transform: uppercase; margin-bottom: 10px; }
.ornament { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 16px; }
.o-line { height: 1px; width: 54px; background: linear-gradient(90deg, transparent, var(--gold)); }
.o-line.rev { background: linear-gradient(90deg, var(--gold), transparent); }
.o-diamond { width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); }

/* ── Forms ── */
label { display: block; margin: 16px 0; font-weight: 700; font-size: 0.9rem; }
input[type=email], input[type=text], input[type=date], textarea, select {
  display: block; width: 100%; margin-top: 8px; padding: 12px 14px;
  background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 2px;
  color: var(--ink); font-family: 'Lato', sans-serif; font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(201,168,76,0.14);
}
textarea { resize: vertical; }
.code-input { letter-spacing: 0.5em; text-align: center; font-size: 1.5rem; font-weight: 700; }

button {
  background: var(--navy); color: var(--gold);
  border: 1px solid var(--navy); border-radius: 2px;
  padding: 12px 26px;
  font-family: 'Lato', sans-serif; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; transition: background 0.2s, color 0.2s;
}
button:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }
button.secondary { background: transparent; color: var(--navy); border-color: var(--input-border); }
button.secondary:hover { border-color: var(--gold); color: var(--gold-dark); background: transparent; }
button.link {
  background: none; border: none; color: var(--gold-dark);
  padding: 4px 6px; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: none;
}
button.link:hover { background: none; color: var(--navy); }
button.link.danger { color: var(--no); }
button.link.ok { color: var(--ok); }

.alert { padding: 12px 16px; border-radius: 2px; margin: 14px 0; font-size: 0.9rem; }
.alert.error { background: rgba(163,71,63,0.08); border: 1px solid rgba(163,71,63,0.4); color: var(--no); }

.status-banner { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 3px; margin: 20px 0; border: 1px solid; }
.status-banner .sb-icon { font-size: 1.5rem; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; flex-shrink: 0; }
.status-banner.ok { background: rgba(74,122,79,0.08); border-color: rgba(74,122,79,0.4); }
.status-banner.ok .sb-icon { background: rgba(74,122,79,0.15); color: var(--ok); }

.notice {
  background: var(--input-bg); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 2px; padding: 16px 18px; margin: 18px 0; font-size: 0.9rem;
}

.addrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 4px; }
.addrow input, .addrow select { width: auto; flex: 1; min-width: 150px; margin-top: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 18px; margin: 8px 0 4px; }
.toolbar a { font-weight: 700; text-decoration: none; }
.toolbar a:hover { text-decoration: underline; }

/* ── Tables ── */
table.guests { width: 100%; border-collapse: collapse; margin-top: 14px; }
table.guests th, table.guests td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.guests th { color: var(--gold-dark); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; }
table.guests select { padding: 7px 10px; margin-top: 0; font-size: 0.88rem; }

.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid; }
.badge.ok { background: rgba(74,122,79,0.10); color: var(--ok); border-color: rgba(74,122,79,0.4); }
.badge.no { background: rgba(163,71,63,0.10); color: var(--no); border-color: rgba(163,71,63,0.4); }
.badge.wait { background: rgba(201,168,76,0.12); color: var(--gold-dark); border-color: rgba(201,168,76,0.5); }
.badge.vis { background: rgba(26,26,46,0.06); color: var(--navy); border-color: rgba(26,26,46,0.25); }
.reason { font-size: 0.85rem; color: var(--muted); font-style: italic; margin-bottom: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }

/* ── Album-Übersicht ── */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.album-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: transform 0.15s, box-shadow 0.15s;
}
.album-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.10); }
.album-cover { aspect-ratio: 4/3; background: linear-gradient(160deg, #faf6ee, #f0e8d8); overflow: hidden; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-empty { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 2rem; color: var(--gold); }
.album-meta { display: flex; justify-content: space-between; align-items: baseline; padding: 13px 16px; border-top: 2px solid var(--gold); }
.album-name { font-family: 'Playfair Display', serif; font-weight: 700; color: var(--navy); }
.album-count { font-size: 0.78rem; color: var(--muted); }

/* ── Foto-Grid ── */
.album-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.album-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.photo { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 3px; background: #eee7d8; cursor: pointer; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s; }
.photo:hover img { transform: scale(1.03); }
.photo .check {
  position: absolute; top: 8px; left: 8px; width: 26px; height: 26px;
  border-radius: 50%; background: rgba(255,255,255,0.85); border: 2px solid var(--gold-dark);
  color: transparent; display: none; align-items: center; justify-content: center; font-weight: 700;
}
.selecting .photo .check { display: flex; }
.photo.selected .check { background: var(--gold); color: var(--navy); }
.photo.selected img { outline: 3px solid var(--gold); outline-offset: -3px; }
.new-badge, .flag-badge {
  position: absolute; top: 8px; right: 8px; padding: 2px 9px; border-radius: 999px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.new-badge { background: var(--gold); color: var(--navy); }
.flag-badge { background: var(--no); color: #fff; top: auto; bottom: 8px; }
.photo.flagged img { opacity: 0.5; }
.fav-btn {
  position: absolute; bottom: 8px; right: 8px; width: 32px; height: 32px; padding: 0;
  border-radius: 50%; border: none; background: rgba(26,26,46,0.55); color: rgba(255,255,255,0.85);
  font-size: 1rem; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.fav-btn:hover { background: rgba(26,26,46,0.8); color: #fff; }
.fav-btn.active { color: var(--gold-light); background: rgba(26,26,46,0.8); }
.selecting .fav-btn { display: none; }

/* ── Auswahl-Leiste ── */
.selectbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
  background: var(--navy); color: var(--gold-light); padding: 14px 20px;
  box-shadow: 0 -6px 24px rgba(0,0,0,0.25);
}
.selectbar button[type=submit] { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.selectbar .link { color: var(--gold-light); }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(15,14,20,0.96);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img#lbImg { max-width: 96vw; max-height: 82vh; object-fit: contain; border-radius: 2px; }
.lb-close {
  position: absolute; top: 12px; right: 14px; z-index: 52;
  background: none; border: none; color: #fff; font-size: 2.2rem; padding: 4px 12px;
}
.lb-close:hover { background: none; color: var(--gold-light); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 52;
  background: rgba(255,255,255,0.08); border: none; color: #fff;
  font-size: 2rem; padding: 14px 18px; border-radius: 3px;
}
.lb-nav:hover { background: rgba(255,255,255,0.18); color: var(--gold-light); }
.lb-nav.prev { left: 10px; }
.lb-nav.next { right: 10px; }
.lb-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 20px; background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: #cfc8bb;
}
.lb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lb-btn {
  display: inline-block; padding: 8px 16px; border-radius: 2px; border: 1px solid var(--gold);
  background: none; color: var(--gold-light); text-decoration: none;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.lb-btn:hover { background: var(--gold); color: var(--navy); }
.lb-btn.danger { border-color: rgba(220,120,110,0.7); color: #e8a49c; }
.lb-btn.danger:hover { background: var(--no); border-color: var(--no); color: #fff; }

/* ── Modal ── */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(15,14,20,0.6); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--paper); border-radius: 4px; padding: 28px 30px; max-width: 440px; width: 100%; }

/* ── Upload ── */
.dropzone {
  border: 2px dashed var(--input-border); border-radius: 4px; padding: 44px 20px;
  text-align: center; cursor: pointer; margin: 18px 0; transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--gold); background: rgba(201,168,76,0.06); }
.upload-list { max-height: 300px; overflow-y: auto; }
.upload-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.upload-row .uname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-row .ustate { flex-shrink: 0; color: var(--muted); }
.upload-row.ok .ustate { color: var(--ok); }
.upload-row.err .ustate { color: var(--no); }
.upload-row.warn .ustate { color: var(--gold-dark); }
.code-block { background: var(--input-bg); border: 1px solid var(--line); border-radius: 2px; padding: 12px 16px; overflow-x: auto; font-size: 0.9rem; }

/* ── Admin-Statistiken ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 20px 0 26px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 4px; padding: 18px; text-align: center; }
.stat-n { display: block; font-family: 'Playfair Display', serif; font-size: 1.7rem; font-weight: 700; color: var(--navy); }
.stat-l { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* ── Meldungen ── */
.report-card.done { opacity: 0.65; }
.report-flex { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.report-thumb { width: 130px; height: 130px; object-fit: cover; border-radius: 3px; }
.report-body { flex: 1; min-width: 220px; }

/* ── Footer ── */
.site-footer {
  text-align: center; padding: 34px 20px 40px; color: #b0a898; font-size: 0.78rem;
  letter-spacing: 0.05em; border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, #faf6ee);
}
.footer-ornament { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 14px; }
.footer-text { margin-bottom: 10px; }
.footer-text strong { color: var(--gold-dark); }
.footer-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.footer-links a { color: var(--gold-dark); text-decoration: none; }
.footer-links a:hover { color: var(--navy); }

@media (max-width: 560px) {
  .card { padding: 24px 20px; }
  .topbar { padding: 14px 16px; }
  h1 { font-size: 1.55rem; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .album-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .lb-bar { padding-bottom: 20px; }
}
