/* Zagros Hub – Startseite, Registrierung, Anmeldung, Konto, Inhaber-Bereich. Markenfarben aus dem Brand Book v1.1. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/InterVariable.woff2') format('woff2'); }
:root {
  --midnight: #0B0B0F; --violet: #7C3AED; --lavender: #A78BFA; --silver: #E5E7EB; --cloud: #F8FAFC;
  --bg: #0B0B0F; --panel: #15151D; --panel-2: #20202B; --fg: #F7F5FC; --muted: #AAA5B8; --subtle: #6F6A80;
  --line: #2B2936; --line-strong: #3A3747; --ac: #7C3AED; --ac-hover: #8B5CF6; --ac-text: #A78BFA; --ac-soft: #2A1F48;
  --ok: #4ADE80; --bad: #F87171;
  --radius: 16px; --focus: 0 0 0 3px rgba(167,139,250,.38);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font: 16px/1.6 var(--font); font-feature-settings: 'cv11', 'ss01'; letter-spacing: -.005em; background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; }
a { color: var(--ac-text); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.15; margin: 0; }
.muted { color: var(--muted); }
code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--panel-2); padding: 1px 6px; border-radius: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 600; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--fg); cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { border-color: var(--subtle); }
.btn.primary { background: var(--ac); border-color: var(--ac); color: #fff; }
.btn.primary:hover { background: var(--ac-hover); border-color: var(--ac-hover); }
.btn.glass { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); backdrop-filter: blur(10px); }
.btn.glass:hover { background: rgba(255,255,255,.14); }
.btn.danger { background: transparent; border-color: color-mix(in srgb, var(--bad) 60%, transparent); color: var(--bad); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 14%, transparent); }
.btn.lg { padding: 14px 24px; font-size: 16px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn:active { transform: translateY(1px); }

/* Kopfzeile */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 40px); background: rgba(11,11,15,.72); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.06); }
.top .brand img { display: block; height: 36px; width: auto; }
.top nav { display: flex; align-items: center; gap: 6px; }
.top .link { color: var(--fg); font-weight: 550; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.top .link:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.top .btn { padding: 8px 14px; font-size: 14px; }

/* Startseite */
.landing main { flex: 1; }
.hero { position: relative; min-height: min(86vh, 820px); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 80px clamp(18px, 5vw, 48px) 96px; margin-top: -69px;
  background: linear-gradient(180deg, rgba(11,11,15,.55) 0%, rgba(11,11,15,.45) 40%, rgba(11,11,15,1) 100%), url('/brand/berge-1.jpg') center 35% / cover no-repeat var(--midnight); }
.hero > * { max-width: 900px; }
.eyebrow { display: inline-block; margin: 0 0 18px; padding: 5px 12px; border-radius: 99px; background: rgba(124,58,237,.22); border: 1px solid rgba(167,139,250,.35); color: #DDD6FE; font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.hero h1 { font-size: clamp(34px, 6.2vw, 66px); font-weight: 750; letter-spacing: -.035em; line-height: 1.04; text-wrap: balance; }
.lead { font-size: clamp(17px, 2.2vw, 21px); color: #D9D5E5; margin: 22px auto 0; max-width: 680px; text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.fine { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.section { width: min(1120px, 100%); margin: 0 auto; padding: 72px clamp(18px, 4vw, 40px) 8px; }
.section h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 700; text-align: center; }
.section .sub { color: var(--muted); text-align: center; max-width: 640px; margin: 12px auto 0; }
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
.mode-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: var(--radius); background: linear-gradient(180deg, #17161F, #121218); border: 1px solid var(--line); color: var(--fg); text-decoration: none !important; transition: border-color .2s, transform .2s, box-shadow .2s; }
.mode-card:hover { border-color: rgba(167,139,250,.55); transform: translateY(-2px); box-shadow: 0 18px 40px rgba(124,58,237,.14); }
.mode-card h3 { font-size: 21px; margin-top: 6px; }
.mode-card p { margin: 0; color: var(--muted); flex: 1; }
.mode-card .more { color: var(--ac-text); font-weight: 600; font-size: 15px; }
.mode-ic { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--ac-soft); color: var(--lavender); }
.ic { width: 24px; height: 24px; flex: none; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
.feature { padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255,255,255,.015); }
.feature .ic { color: var(--lavender); }
.feature h3 { font-size: 17px; margin: 12px 0 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.final { text-align: center; padding-bottom: 80px; }
.final .btn { margin-top: 26px; }

/* Fußzeile */
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 22px clamp(16px, 4vw, 40px); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; margin-top: auto; }
.foot nav { margin-left: auto; display: flex; gap: 16px; }
.foot nav a { color: var(--muted); }

/* Anmeldung & Registrierung */
.auth { background: linear-gradient(180deg, rgba(11,11,15,.4), rgba(11,11,15,.88)), url('/brand/berge-1.jpg') center / cover no-repeat fixed var(--midnight); }
.auth-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px 16px; }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none !important; }
.auth-logo small { font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 16px; padding: 30px; border-radius: 18px; background: rgba(21,21,29,.8); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.card-wide { width: min(520px, 100%); }
.card h1 { font-size: 26px; }
.card > p { margin: 0; }
.auth-foot { color: var(--muted); font-size: 14px; margin: 0; }
.auth-foot a { color: var(--muted); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 550; color: #CFCADB; }
.hint { font-weight: 400; color: var(--subtle); }
input[type=email], input[type=password], input[type=text], input[type=search], textarea { font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--midnight); color: var(--fg); outline: none; width: 100%; }
textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
input:focus, textarea:focus { border-color: var(--ac); box-shadow: var(--focus); }
.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--muted); }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ac); flex: none; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 14px; font-weight: 550; color: #CFCADB; margin-bottom: 8px; padding: 0; }
.picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pick { position: relative; display: block; cursor: pointer; }
.pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 14px 8px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--midnight); color: var(--muted); font-size: 14px; line-height: 1.25; height: 100%; transition: border-color .15s, background .15s, color .15s; }
.pick-card b { font-weight: 600; }
.pick:hover .pick-card { border-color: var(--subtle); }
.pick input:checked + .pick-card { border-color: var(--ac); background: var(--ac-soft); color: var(--fg); }
.pick input:checked + .pick-card .ic { color: var(--lavender); }
.pick input:focus-visible + .pick-card { box-shadow: var(--focus); }
.alt { text-align: center; color: var(--muted); font-size: 15px; }
.notice { margin: 0; padding: 11px 14px; border-radius: 10px; font-size: 15px; }
.notice.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); color: #FECACA; }
.notice.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 36%, transparent); color: #BBF7D0; }
.notice.info { background: var(--ac-soft); border: 1px solid rgba(167,139,250,.4); color: #E9E3FF; }
.notice.warn { background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.42); color: #FDE68A; }
.hero .notice { margin-bottom: 22px; }

/* Konto, Datenschutz, Admin */
.narrow { width: min(760px, 100%); margin: 0 auto; padding: 40px clamp(16px, 4vw, 32px) 64px; flex: 1; display: flex; flex-direction: column; gap: 18px; }
.wide { width: min(1180px, 100%); margin: 0 auto; padding: 32px clamp(16px, 4vw, 32px) 64px; flex: 1; display: flex; flex-direction: column; gap: 18px; }
.narrow > h1 { font-size: clamp(28px, 4vw, 36px); }
.panel { padding: 24px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.panel h2 { font-size: 19px; }
.panel p { margin: 0; }
.panel .stack { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 420px; }
.panel .stack .btn { align-self: flex-start; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.prose h2 { font-size: 21px; margin-top: 18px; }
.prose p, .prose li { color: #D9D5E5; }
.prose ul { padding-left: 20px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { padding: 18px 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.kpi b { font-size: 30px; letter-spacing: -.02em; }
.kpi > span { color: var(--muted); font-size: 14px; }
.kpi b small { font-size: 17px; font-weight: 600; color: var(--muted); }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.admin table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin th, .admin td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.admin th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.admin .r { text-align: right; }
.admin td.w { width: 40%; }

/* Inhaber-Bereich: Kopf, Reiter, Kennzahlen, Diagramme (Inline-SVG), Kontentabelle, Steuerung */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 50; padding: 12px 16px; border-radius: 10px; background: var(--ac); color: #fff; font-weight: 600; }
.skip:focus { top: 12px; }
.admin main:focus { outline: none; }
.admin .btn { min-height: 44px; }
.admin-top .role { margin-right: auto; padding: 4px 11px; border-radius: 99px; background: var(--ac-soft); border: 1px solid rgba(167,139,250,.35); color: #DDD6FE; font-size: 13px; font-weight: 600; white-space: nowrap; }
.admin-top .logout { margin: 0; }
.tabs { border-bottom: 1px solid var(--line); background: rgba(11,11,15,.6); }
.tabs ul { list-style: none; display: flex; gap: 2px; width: min(1180px, 100%); margin: 0 auto; padding: 0 clamp(8px, 3vw, 24px); overflow-x: auto; scrollbar-width: none; }
.tabs ul::-webkit-scrollbar { display: none; }
.tabs a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; border-bottom: 2px solid transparent; text-decoration: none !important; }
.tabs a:hover { color: var(--fg); }
.tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--ac); }
.tabs a:focus-visible { border-radius: 8px 8px 0 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 18px; }
.page-head h1 { font-size: clamp(26px, 3.4vw, 32px); }
.page-head p { margin: 0; }
.admin .kpis { list-style: none; margin: 0; padding: 0; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi.hot b { color: var(--bad); }
.kpi.warn b { color: #FBBF24; }
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; letter-spacing: 0; white-space: nowrap; vertical-align: middle; }
.badge.ok { color: #BBF7D0; border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.badge.bad { color: #FECACA; border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.badge.run { color: #DDD6FE; border-color: rgba(167,139,250,.45); background: var(--ac-soft); }
.badge.off { color: var(--muted); background: transparent; }
.panel h2 .badge { margin-left: 8px; font-size: 12px; }
.chart { margin: 0; width: 100%; }
.chart svg { display: block; width: 100%; height: 160px; }
.chart .track, .hbar .track { fill: var(--panel-2); }
.chart .val, .hbar .val { fill: #8B5CF6; }
.chart g:hover .val { fill: var(--lavender); }
.axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.more { width: 100%; }
.more summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--ac-text); font-weight: 600; font-size: 14px; }
.dist { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 16px; }
.dist-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 15px; }
.hbar { display: block; width: 100%; height: 8px; border-radius: 99px; overflow: hidden; }
.admin td.w .hbar { min-width: 60px; }
.meter { width: 100%; }
.meter .hbar { height: 10px; }
.meter.hot .val { fill: var(--bad); }
.table-wrap { width: 100%; overflow-x: auto; }
.admin tbody th { color: var(--fg); font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.admin td.nowrap { white-space: nowrap; }
.accounts th, .accounts td { vertical-align: middle; }
.accounts tr.locked .email { color: var(--muted); }
.act { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: flex-start; }
.act form { margin: 0; }
.btn.sm { font-size: 14px; padding: 6px 12px; }
.btn.off { opacity: .45; cursor: default; pointer-events: none; }
.confirm { position: relative; }
.confirm > summary { list-style: none; }
.confirm > summary::-webkit-details-marker { display: none; }
.confirm[open] > summary { background: color-mix(in srgb, var(--bad) 14%, transparent); }
.confirm-box { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: min(320px, 80vw); display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 12px; background: var(--panel-2); border: 1px solid color-mix(in srgb, var(--bad) 45%, var(--line)); box-shadow: 0 16px 40px rgba(0,0,0,.45); text-align: left; }
.confirm-box p { margin: 0; font-size: 14px; color: #D9D5E5; }
.pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; color: var(--muted); }
.search { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 620px; }
.search .row { display: flex; flex-wrap: wrap; gap: 8px; }
.search input { flex: 1 1 220px; width: auto; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { flex-direction: row; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--midnight); color: var(--fg); cursor: pointer; }
.opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--ac); flex: none; }
.opt:has(input:checked) { border-color: var(--ac); background: var(--ac-soft); }
.opt:has(input:focus-visible) { box-shadow: var(--focus); }
.admin .panel .stack { max-width: 620px; }
.panel.warn-zone { border-color: rgba(251,191,36,.45); }
.preview { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 620px; }

/* Handy & Tablet */
@media (max-width: 900px) {
  .mode-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .top { padding: 10px 14px; }
  .top .brand img { height: 30px; }
  .top .link { padding: 8px; font-size: 14px; }
  .top nav .btn.primary { display: none; }
  .hero { margin-top: -59px; min-height: 92vh; }
  .feature-grid { grid-template-columns: 1fr; }
  .picks { grid-template-columns: 1fr; }
  .pick-card { flex-direction: row; justify-content: flex-start; text-align: left; padding: 12px 14px; }
  .card { padding: 22px; }
  .foot nav { margin-left: 0; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
}
@media (max-width: 760px) {
  .accounts thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .accounts, .accounts tbody, .accounts tr { display: block; width: 100%; }
  .accounts tr { margin-bottom: 12px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
  .admin .accounts th, .admin .accounts td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; text-align: right; }
  .accounts [data-label]::before { content: attr(data-label); color: var(--muted); font-size: 13px; font-weight: 600; text-align: left; }
  .admin .accounts .email { display: block; text-align: left; font-size: 16px; padding-top: 4px; }
  .accounts .email::before, .accounts td.actions::before { display: none; }
  .admin .accounts td.actions { display: block; border-bottom: 0; }
  .act { justify-content: flex-start; }
  .confirm[open] { flex-basis: 100%; }
  .confirm-box { position: static; width: 100%; margin-top: 8px; box-shadow: none; }
}
@media (max-width: 420px) {
  .admin-top .role { display: none; }
  .admin-top .brand { margin-right: auto; }
  .admin .panel { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* Kontenliste: Spaltenköpfe, Modus, Daten und Größen nicht mitten im Wort umbrechen; nur die E-Mail darf umbrechen */
.admin .accounts thead th { white-space: nowrap; overflow-wrap: normal; }
.admin .accounts td { overflow-wrap: normal; white-space: nowrap; }
.admin .accounts tbody th { overflow-wrap: anywhere; white-space: normal; min-width: 12em; }
.admin .accounts td:last-child { white-space: normal; }
