/* Corporate Design von vogelfrei-solutions.de: fast schwarz, Lime als Akzent, Urbanist im Text, Be Vietnam Pro in Überschriften. */
@font-face { font-family: "Urbanist"; src: url("/static/fonts/urbanist-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("/static/fonts/be-vietnam-pro-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("/static/fonts/be-vietnam-pro-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("/static/fonts/be-vietnam-pro-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;
  --ink: #0a0a09; --bg: #0a0a09; --panel: #111110; --card: #161615; --raised: #1f1f1e;
  --white: #feffff; --text: #e0e0e0; --muted: #a2a2a2; --faint: #8c8c86;
  --line: rgba(254, 255, 255, .09); --line-strong: rgba(254, 255, 255, .2); --fill: rgba(254, 255, 255, .05); --fill-hover: rgba(254, 255, 255, .1);
  --lime: #9edb1a; --lime-hover: #b4ec36; --lime-soft: rgba(158, 219, 26, .13); --lime-line: rgba(158, 219, 26, .4);
  --danger: #ff6568; --danger-soft: rgba(255, 101, 104, .13); --warn: #f2b84f; --warn-soft: rgba(242, 184, 79, .13);
  --info: #86b6ff; --info-soft: rgba(134, 182, 255, .13); --wa: #25d366; --wa-soft: rgba(37, 211, 102, .13); --mail: #86b6ff; --mail-soft: rgba(134, 182, 255, .13);
  --radius: 14px; --radius-lg: 24px; --pill: 999px; --shadow-lg: 0 16px 60px rgba(0, 0, 0, .6);
  --font: "Urbanist", system-ui, -apple-system, "Segoe UI", sans-serif; --display: "Be Vietnam Pro", "Urbanist", system-ui, sans-serif;
  --hero: url("/static/bilder/hero-hintergrund.jpg");
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 400 15.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; font-weight: 500; line-height: 1.2; color: var(--white); }
h1 { font-size: 30px; } h2 { font-size: 21px; } h3 { font-size: 16.5px; } h4 { font-size: 14.5px; }
p { margin: 0; }
a { color: var(--lime); }
strong { color: var(--white); font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
option { background: var(--card); color: var(--text); }
.icon { flex: none; vertical-align: -3px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13.5px; } .strong { font-weight: 600; color: var(--white); } .nowrap { white-space: nowrap; }
a.strong { color: var(--lime); }
.center { text-align: center; } .grow { flex: 1; min-width: 0; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .row.top { align-items: flex-start; } .between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; } .stack.lg { gap: 20px; } .stack.sm { gap: 6px; }
.mt { margin-top: 12px; } .mt-lg { margin-top: 24px; } .mb { margin-bottom: 12px; } .mb-lg { margin-bottom: 24px; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
::selection { background: var(--lime); color: var(--ink); }
* { scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }

/* Knöpfe: Pillen wie auf der Website */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--fill); color: var(--white); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--fill-hover); border-color: var(--line-strong); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--lime); border-color: var(--lime); color: var(--ink); font-weight: 700; }
.btn.primary:hover { background: var(--lime-hover); border-color: var(--lime-hover); }
.btn.primary:disabled:hover { background: var(--lime); border-color: var(--lime); }
.btn.dark { background: var(--raised); }
.btn.danger { color: var(--danger); border-color: rgba(255, 101, 104, .35); background: transparent; }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--fill-hover); border-color: transparent; }
.btn.sm { padding: 6px 12px; font-size: 13px; } .btn.lg { padding: 13px 26px; font-size: 15.5px; }
.btn.icon-only { padding: 8px; }
.linklike { background: none; border: 0; padding: 0; color: var(--lime); text-decoration: underline; cursor: pointer; }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-weight: 600; font-size: 14px; color: var(--white); }
.hint { font-size: 13.5px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--fill); color: var(--white); min-height: 40px; }
.input::placeholder { color: var(--faint); }
.input:focus { outline: 2px solid var(--lime); outline-offset: 0; border-color: transparent; }
.input[readonly] { color: var(--text); }
textarea.input { resize: vertical; min-height: 92px; line-height: 1.5; }
.input.mini { width: 78px; text-align: center; }
.input.time { width: 112px; }
.check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--lime); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.switch { position: relative; display: inline-block; width: 40px; height: 23px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line-strong); border-radius: 23px; transition: background .15s; }
.switch span::before { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; background: var(--white); border-radius: 50%; transition: transform .15s; }
.switch input:checked + span { background: var(--lime); }
.switch input:checked + span::before { transform: translateX(17px); background: var(--ink); }
.switch input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 13px; border: 1px solid var(--line-strong); border-radius: var(--pill); background: transparent; color: var(--text); cursor: pointer; font-size: 13.5px; font-weight: 600; transition: background .15s, border-color .15s; }
.chip:hover { background: var(--fill-hover); }
.chip.on { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.var-chip { padding: 2px 9px; border: 1px dashed var(--line-strong); background: transparent; border-radius: var(--pill); font-size: 12.5px; cursor: pointer; color: var(--muted); }
.var-chip:hover { border-color: var(--lime); color: var(--lime); background: var(--lime-soft); }

/* Karten und Hinweise */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.card.pad { padding: 24px; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); font-size: 14.5px; }
.banner .icon { margin-top: 3px; }
.banner.info { background: var(--info-soft); color: #c6dcff; }
.banner.warn { background: var(--warn-soft); color: #f9dca6; }
.banner.danger { background: var(--danger-soft); color: #ffc0c1; }
.banner.ok { background: var(--lime-soft); color: #d6f28f; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--pill); font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--fill-hover); color: var(--text); }
.badge.ok { background: var(--lime-soft); color: var(--lime); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.mail { background: var(--mail-soft); color: var(--mail); }
.badge.wa { background: var(--wa-soft); color: var(--wa); }
.badge.lila { background: rgba(95, 85, 238, .2); color: #a59dff; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty h3 { margin-bottom: 6px; }
.spinner { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--lime); animation: drehen .7s linear infinite; margin: 40px auto; }
@keyframes drehen { to { transform: rotate(360deg); } }

/* Marke */
.brand { display: flex; align-items: center; gap: 9px; font: 600 16.5px var(--display); color: var(--white); text-decoration: none; min-width: 0; }
.brand img { height: 30px; width: auto; flex: none; }
.brand span { white-space: nowrap; }
.brand i { color: var(--lime); font-style: normal; }

/* App-Rahmen */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 3px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { padding: 2px 8px 18px; }
.sidebar .btn.primary { margin: 0 4px 14px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 13px; margin-bottom: 2px; border-radius: var(--pill); color: var(--white); text-decoration: none; font-weight: 600; transition: background .15s; }
.nav-item:hover { background: var(--fill-hover); }
.nav-item.on { background: var(--lime-soft); color: var(--lime); }
.nav-sep { margin: auto 0 0; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid var(--line); margin-top: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--lime); color: var(--ink); display: grid; place-items: center; font: 600 12.5px var(--display); flex: none; }
.avatar.lg { width: 60px; height: 60px; font-size: 20px; }
.main { padding: 32px 36px 64px; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--muted); margin-top: 5px; }
.tabs { display: flex; gap: 2px; box-shadow: inset 0 -1px 0 var(--line); margin-bottom: 22px; overflow: auto hidden; scrollbar-width: none; }
.tab { padding: 10px 15px; background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-weight: 600; color: var(--muted); white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: color .15s; }
.tab:hover { color: var(--white); }
.tab.on { color: var(--white); border-bottom-color: var(--lime); }
.mobile-top { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.filters .input { width: auto; min-width: 180px; }

/* Link-Karten */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.link-card { position: relative; padding: 20px 22px 14px; border-top: 3px solid var(--c, var(--lime)); display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: border-color .15s; }
.link-card.aus { opacity: .55; }
.link-card h3 a { color: inherit; text-decoration: none; }
.link-card h3 a:hover { color: var(--lime); }
.link-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); margin-top: auto; padding-top: 12px; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); background: var(--raised); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow-lg); min-width: 225px; padding: 6px; z-index: 40; }
.menu.oben { top: auto; bottom: calc(100% + 4px); }
.menu button, .menu a { display: flex; gap: 9px; align-items: center; width: 100%; padding: 8px 11px; background: none; border: 0; border-radius: 10px; text-align: left; cursor: pointer; color: var(--white); text-decoration: none; font-size: 14.5px; }
.menu button:hover, .menu a:hover { background: var(--fill-hover); }
.menu button.rot { color: var(--danger); }
.profil-leiste { display: flex; align-items: center; gap: 12px; padding: 14px 20px; margin-bottom: 18px; flex-wrap: wrap; }

/* Modal und Toast */
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); display: grid; place-items: center; padding: 16px; z-index: 100; overflow-y: auto; }
.modal { background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: min(540px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal.gross { width: min(880px, 100%); }
.modal-head { padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-foot { padding: 16px 24px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; width: min(460px, calc(100vw - 32px)); }
.toast { background: var(--raised); border: 1px solid var(--line-strong); color: var(--white); padding: 12px 18px; border-radius: 16px; box-shadow: var(--shadow-lg); display: flex; gap: 9px; align-items: flex-start; }
.toast.err { background: #4a1c1d; border-color: var(--danger); }
.toast .icon { color: var(--lime); margin-top: 3px; } .toast.err .icon { color: var(--danger); }

/* Anmeldung und öffentliche Seiten: das Wellenmotiv der Website */
.auth-page, .pub { position: relative; isolation: isolate; }
.auth-page::before, .pub::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto 0; height: min(760px, 100%); pointer-events: none;
  background: linear-gradient(to bottom, rgba(10, 10, 9, .05) 40%, var(--bg) 100%), linear-gradient(to right, rgba(10, 10, 9, .25), rgba(10, 10, 9, .75) 55%, rgba(10, 10, 9, .85)), var(--hero) top left / cover no-repeat; }
