/* ELMOX ID – Stil angelehnt an elmox.de (Jost/Poppins, Schwarz/Weiß, Grün #74B92B) */

@font-face {
  font-family: "Jost";
  src: url("fonts/jost-latin-wght.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("fonts/poppins-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("fonts/poppins-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #111111;
  --text: #1c1d1d;
  --muted: #6b6d6d;
  --bg: #ffffff;
  --bg-dim: #f5f5f5;
  --line: #e8e8e1;
  --green: #74b92b;          /* Markengrün für Flächen, Icons, Ringe */
  --green-ink: #3f7a12;      /* dunkleres Grün für Text auf Weiß (Kontrast) */
  --danger: #c62828;
  --radius: 16px;
  --font: "Jost", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Poppins", var(--font);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: .025em;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: 0; line-height: 1.2; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- Kopf ---------- */
.brand {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  padding: calc(18px + env(safe-area-inset-top)) 16px 18px;
  background: var(--black);
  color: #fff;
  overflow: hidden;
}
.brand::before {
  content: ""; position: absolute; inset: auto -20% -120px; height: 220px; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(116, 185, 43, .28), transparent 70%);
}
.logo { position: relative; text-decoration: none; display: inline-flex; }
.logo img { height: 30px; width: auto; display: block; }
.wordmark { font-family: var(--font-head); font-weight: 700; font-size: 26px; }

.lang {
  position: absolute; right: 16px; top: calc(33px + env(safe-area-inset-top)); transform: translateY(-50%);
  display: flex; padding: 3px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22);
}
.lang a {
  min-width: 34px; padding: 3px 8px; border-radius: 999px; text-align: center;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-decoration: none; color: rgba(255, 255, 255, .7);
}
.lang a:hover { color: #fff; }
.lang a.on { background: var(--green); color: var(--black); }

/* Profil: dunkler Bereich, in den die Karte hineinragt */
.page-profile .brand { padding-bottom: 116px; }
.page-profile .brand::before { inset: auto -20% -60px; }

.wrap { width: 100%; max-width: 480px; margin: 0 auto; padding: 24px 16px 32px; flex: 1; }
.wrap.center { display: flex; align-items: center; }
.wrap.wide { max-width: 920px; }

.eyebrow { margin: 0 0 6px; color: var(--green-ink); font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.muted { color: var(--muted); margin: 0; }

/* ---------- Karte / Profil ---------- */
.card {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px 22px;
  box-shadow: 0 18px 50px -28px rgba(17, 17, 17, .35);
}
.page-profile .wrap { padding-top: 0; }
.profile { position: relative; text-align: center; margin-top: -28px; padding-top: 0; }
.profile h1 { font-size: 26px; margin: 14px 0 6px; }
.role { margin: 0; color: var(--green-ink); font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.claim { margin: 6px 0 0; color: var(--muted); }

.avatar {
  display: grid; place-items: center; overflow: hidden; border-radius: 50%;
  background: var(--bg-dim); color: var(--black); font-family: var(--font-head); font-weight: 700; flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.lg {
  width: 132px; height: 132px; margin: -66px auto 0; padding: 0; font-size: 40px;
  border: 4px solid var(--bg); box-shadow: 0 0 0 3px var(--green), 0 12px 30px -12px rgba(0, 0, 0, .5);
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.avatar.lg img { pointer-events: none; }
.avatar.lg.tap { animation: tap .18s ease-out; }
@keyframes tap { 50% { transform: scale(.95); } }
.avatar.sm { width: 52px; height: 52px; font-size: 17px; }

.contacts { list-style: none; margin: 24px 0 0; padding: 0; text-align: left; display: grid; gap: 8px; }
.contacts a {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  padding: 10px 14px 10px 10px; border-radius: 12px; background: var(--bg-dim); border: 1px solid transparent;
  transition: border-color .15s, background .15s;
}
.contacts a:hover { border-color: var(--green); background: #fff; }
.contacts a > span:last-child { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; font-weight: 500; line-height: 1.4; }
.contacts small { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--green); color: var(--black); flex: none; }

.actions { display: grid; gap: 10px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; letter-spacing: .03em; text-decoration: none; cursor: pointer;
  transition: transform .1s, background .15s, border-color .15s, color .15s;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--black); color: #fff; }
.btn.primary:hover { background: #000; }
.btn.primary svg { color: var(--green); }
.btn.ghost { background: var(--bg); color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--black); }
.btn.small { min-height: 38px; padding: 8px 14px; border-radius: 8px; font-size: 14px; }
.btn.danger { color: var(--danger); border-color: rgba(198, 40, 40, .35); background: transparent; }

/* ---------- Übersicht ---------- */
.intro { text-align: center; margin: 14px 0 26px; }
.intro h1 { margin: 0 0 4px; font-size: 32px; }
.team { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.member {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; text-decoration: none;
  border-radius: 14px; background: var(--bg); border: 1px solid var(--line); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.member:hover { border-color: var(--green); transform: translateY(-1px); box-shadow: 0 10px 24px -16px rgba(17, 17, 17, .4); }
.member-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.member-text strong { font-family: var(--font-head); font-weight: 600; letter-spacing: 0; }
.member-text small { color: var(--muted); font-size: 14px; }
.chev { color: var(--green-ink); }
.empty { text-align: center; color: var(--muted); }
.notfound { text-align: center; padding: 34px 22px; }
.notfound h1 { margin: 0 0 8px; font-size: 22px; }
.notfound .btn { margin-top: 20px; }

/* ---------- Modals (QR, Rechtstexte) ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .2s;
}
.modal.open { opacity: 1; }
.modal[hidden] { display: none; }
.sheet {
  position: relative; width: 100%; background: var(--bg); border-radius: var(--radius);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6);
  transform: translateY(12px) scale(.98); transition: transform .2s;
}
.modal.open .sheet { transform: none; }

.qr-sheet { max-width: 360px; text-align: center; padding: 26px 22px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.qr-box { width: 100%; max-width: 280px; aspect-ratio: 1; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin: 6px 0 10px; }
.qr-box svg { width: 100%; height: 100%; display: block; stroke: none; }
.qr-name { font-family: var(--font-head); font-size: 18px; letter-spacing: 0; }
.qr-url { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.qr-sheet .btn { width: 100%; }

.legal-sheet { max-width: 720px; max-height: min(86vh, 900px); max-height: min(86dvh, 900px); overflow-y: auto; overscroll-behavior: contain; padding: 30px 24px 26px; }
.modal-x {
  position: sticky; top: 0; float: right; margin: -14px -10px 0 12px; z-index: 1;
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  background: var(--bg-dim); color: var(--text); text-decoration: none;
}
.modal-x:hover { background: var(--line); }

.legal-text { overflow-wrap: break-word; hyphens: auto; }
.legal-text h1 { font-size: 26px; margin: 0 0 6px; }
.legal-text h2 { font-size: 17px; margin: 28px 0 8px; }
.legal-text p, .legal-text ul, .legal-text address { margin: 0 0 12px; font-size: 15px; color: #3a3c3c; }
.legal-text address { font-style: normal; }
.legal-text ul { padding-left: 20px; }
.legal-text li { margin-bottom: 8px; }
.legal-text li::marker { color: var(--green); }
.legal-text strong { color: var(--text); }
.legal-text a { color: var(--green-ink); text-underline-offset: 2px; }
.legal-text > .muted { margin-bottom: 18px; font-size: 14px; }

/* ---------- Footer ---------- */
.legal {
  display: flex; justify-content: center; gap: 12px;
  padding: 20px 16px calc(22px + env(safe-area-inset-bottom));
  background: var(--black); color: rgba(255, 255, 255, .6); font-size: 14px;
}
.legal a { text-decoration: none; }
.legal a:hover { color: #fff; }

/* ---------- Admin ---------- */
.admin h1 { font-size: 24px; margin: 0; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-top .row { display: flex; gap: 8px; flex-wrap: wrap; }
.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; background: rgba(116, 185, 43, .12); border: 1px solid rgba(116, 185, 43, .5); }
.flash.err { background: rgba(198, 40, 40, .07); border-color: rgba(198, 40, 40, .35); }
.list { display: grid; gap: 10px; }
.item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); flex-wrap: wrap; }
.item.off { opacity: .55; }
.item .info { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.item .info a { color: var(--muted); font-size: 14px; text-decoration: none; }
.item .tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.item form { margin: 0; }

.switch { position: relative; width: 50px; height: 30px; border-radius: 99px; border: 0; padding: 0; cursor: pointer; background: #d5d5cf; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(20px); }
.badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--bg-dim); color: var(--muted); letter-spacing: .04em; }
.badge.on { background: rgba(116, 185, 43, .16); color: var(--green-ink); }

.form { display: grid; gap: 14px; }
.form .grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .form .grid { grid-template-columns: 1fr; } }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
label small { color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=file] {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 13px; min-height: 46px;
}
input:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: transparent; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--green); }
.photo-row { display: flex; align-items: center; gap: 14px; }
.photo-row .avatar { width: 72px; height: 72px; font-size: 24px; }
.slug-prefix { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow: hidden; }
.slug-prefix span { padding: 0 4px 0 13px; color: var(--muted); white-space: nowrap; }
.slug-prefix input { border: 0; padding-left: 0; }
.form-sep { margin: 6px 0 -4px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--green-ink); }
.login { max-width: 380px; margin: 40px auto 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
