/* ============================================================
   Stempelkarte – Styles
   Neutral & sachlich: weiß, Grautöne, Linien statt Schatten,
   kleine Radien, eine Akzentfarbe sparsam eingesetzt.
   ============================================================ */
:root {
  --ink: #111827;
  --ink-2: #374151;
  --mute: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --line-2: #f0f1f3;
  --canvas: #f9fafb;
  --white: #ffffff;
  --accent: #3f5862;          /* Schiefer – passt zu Kamm & Klinge, neutral genug für alle */
  --accent-soft: #eef2f3;
  --ok: #15803d;
  --ok-soft: #ecfdf3;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --err: #b91c1c;
  --err-soft: #fef2f2;
  --r: 8px;
  --r-sm: 6px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: var(--font);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); line-height: 1.5; font-size: 14px; -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--mute); }
.small { font-size: 13px; }
.center { text-align: center; }
.block { display: block; }
.grow { flex: 1; min-width: 0; }
.r { text-align: right; }
i.ph { font-size: 18px; line-height: 1; vertical-align: -3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--ink); cursor: pointer;
  background: var(--ink); color: #fff; font-weight: 500; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #1f2937; }
.btn i.ph { font-size: 16px; vertical-align: 0; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--canvas); border-color: #d1d5db; }
.link, .link-danger { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 500; font-size: 13px; color: var(--ink-2); }
.link:hover { color: var(--ink); text-decoration: underline; }
.link-danger { color: var(--err); }

.alert { padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 18px; font-weight: 500; font-size: 14px; border: 1px solid; display: flex; gap: 8px; align-items: center; }
.alert-ok { background: var(--ok-soft); color: var(--ok); border-color: #bbf7d0; }
.alert-err { background: var(--err-soft); color: var(--err); border-color: #fecaca; }

/* Status-Kennzeichnung: kleiner Punkt + Text statt bunter Pillen */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.pill-gold::before { background: #d97706; }
.pill-ok::before { background: var(--ok); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 8px; vertical-align: 0; }

/* ---------- Formularfelder ---------- */
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld > span { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.fld input, .fld select, .fld textarea, .inline-add input, .inline-add select, .co-new input, .search input {
  height: 38px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid #d1d5db; background: #fff; outline: none; width: 100%; font-size: 14px;
}
.fld textarea { height: auto; padding: 10px 12px; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .inline-add input:focus, .inline-add select:focus, .search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.fld input[type=color] { padding: 3px; height: 38px; cursor: pointer; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 12px; }
.row > .fld { flex: 1; }
.row > .fld.sm { flex: 0 0 170px; }
.row.between { justify-content: space-between; align-items: center; }
.err { color: var(--err); font-size: 13px; font-weight: 500; font-style: normal; margin: 4px 0 0; }

/* ============================================================
   Wallet-Karte (Vorschau wie Apple/Google Wallet)
   ============================================================ */
.wcard {
  --c1: #3f5862; --c2: #111827; --c3: #f9fafb;
  position: relative; width: 100%; max-width: 360px; margin: 0 auto;
  background: var(--c2); color: var(--c3);
  border-radius: 14px; padding: 16px 16px 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 8px 24px -8px rgba(0, 0, 0, .18);
  overflow: hidden; font-family: var(--fb, var(--font));
}
.wcard.pulse { animation: pulse .7s ease; }
@keyframes pulse { 0% { transform: scale(1); } 40% { transform: scale(1.02); } 100% { transform: scale(1); } }

.wcard-top { display: flex; align-items: center; gap: 12px; }
.wcard-logo {
  width: 40px; height: 40px; border-radius: 8px; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--c1); color: var(--con, var(--c2));
  font-weight: 700; font-size: 15px;
}
.wcard-brand { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wcard-brand strong { font-family: var(--fh, var(--font)); font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wcard-brand span { font-size: 12px; opacity: .65; }
.wcard-logoimg { flex: 1; min-width: 0; display: flex; align-items: center; height: 52px; }
.wcard-logoimg .brand-img { max-height: 52px; max-width: 190px; width: auto; height: auto; display: block; }
.wcard-count { text-align: right; display: flex; flex-direction: column; }
.wcard-count small, .wcard-fields small { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .6; }
.wcard-count b { font-family: var(--fh, var(--font)); font-size: 22px; font-weight: 700; color: var(--c1); line-height: 1.1; font-variant-numeric: tabular-nums; }

.wcard-strip {
  margin: 14px -16px 12px; padding: 14px 16px;
  background: color-mix(in srgb, var(--c3) 5%, transparent);
  border-block: 1px solid color-mix(in srgb, var(--c3) 12%, transparent);
}
.wcard-stamps { display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); gap: 10px; }
.st {
  aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px dashed color-mix(in srgb, var(--c3) 30%, transparent);
  transition: background .25s, border-color .25s;
}
.st svg { width: 52%; height: 52%; fill: currentColor; opacity: 0; transition: opacity .25s; }
.st.goal { border-style: solid; border-color: color-mix(in srgb, var(--c1) 60%, transparent); color: var(--c1); }
.st.goal svg { opacity: .75; }
.st.on { background: var(--c1); border: 1.5px solid var(--c1); color: var(--con, var(--c2)); }
.st.on svg { opacity: 1; }

.wcard-fields { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; }
.wcard-fields > div { display: flex; flex-direction: column; min-width: 0; }
.wcard-fields .r { text-align: right; }
.wcard-fields span { font-size: 14px; font-weight: 500; }

.wcard-qr { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qr-box { width: 144px; height: 144px; padding: 10px; background: #fff; border-radius: 6px; }
.qr-box svg { width: 100%; height: 100%; display: block; }
.wcard-qr code { font-family: var(--font); font-size: 12px; font-weight: 600; letter-spacing: .16em; opacity: .7; }

/* ============================================================
   Kundenseiten (Farben + Schriften kommen vom Unternehmen)
   ============================================================ */
.page-customer { background: var(--brand-bg); color: var(--brand-text); min-height: 100vh; font-family: var(--fb, var(--font)); }
.page-customer h1, .page-customer .cust-success strong, .page-customer .modal h3 { font-family: var(--fh, var(--font)); }
.page-customer .cust-wrap { max-width: 440px; margin: 0 auto; padding: 28px 18px 24px; }
.cust-hero { text-align: center; padding: 14px 0 24px; }
.cust-logo {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand); color: var(--brand-on); font-size: 24px; font-weight: 700;
}
.cust-logoimg { margin: 0 auto 22px; max-width: 280px; }
.cust-logoimg .brand-img { display: block; width: 100%; height: auto; }
.cust-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.cust-hero h1 { font-size: clamp(30px, 8vw, 38px); font-weight: 700; margin: 6px 0 10px; }
.cust-hero p { margin: 0 auto; max-width: 340px; opacity: .75; }
.page-customer.head-sans .cust-hero h1 { text-transform: uppercase; font-weight: 900; letter-spacing: 0; line-height: 1.04; }
.page-customer.head-sans .cust-success strong { text-transform: uppercase; font-weight: 900; }

.cust-form {
  display: flex; flex-direction: column; gap: 16px; padding: 18px; border-radius: 12px;
  background: color-mix(in srgb, var(--brand-text) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-text) 12%, transparent);
}
.cust-form .fld > span { color: inherit; opacity: .85; }
.cust-form .fld small { opacity: .6; font-weight: 400; }
.cust-form .fld input {
  height: 46px; font-size: 16px; color: inherit;
  background: color-mix(in srgb, var(--brand-text) 4%, transparent);
  border-color: color-mix(in srgb, var(--brand-text) 20%, transparent);
}
.cust-form .fld input::placeholder { color: inherit; opacity: .4; }
.cust-form .fld input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }

.types { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.types legend { font-size: 13px; font-weight: 500; opacity: .85; margin-bottom: 8px; padding: 0; }
.type-opt {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 8px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--brand-text) 18%, transparent); transition: border-color .15s, background .15s;
}
.type-opt input { position: absolute; opacity: 0; pointer-events: none; }
.type-body { flex: 1; display: flex; flex-direction: column; }
.type-body strong { font-weight: 600; }
.type-body small { opacity: .65; }
.type-dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--brand-text) 35%, transparent); flex: 0 0 auto; }
.type-opt:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.type-opt:has(input:checked) .type-dot { border: 5px solid var(--brand); }
.type-opt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

.check { display: flex; gap: 10px; font-size: 13px; line-height: 1.45; opacity: .85; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; accent-color: var(--brand); }
.check a { color: inherit; }

.cust-btn {
  height: 50px; border: 0; border-radius: 8px; cursor: pointer; width: 100%;
  background: var(--brand); color: var(--brand-on); font-weight: 600; font-size: 16px;
}
.cust-btn:hover { filter: brightness(1.06); }
.cust-btn:active { transform: translateY(1px); }

.cust-steps { list-style: none; display: flex; justify-content: space-between; padding: 0; margin: 22px 0 0; gap: 8px; font-size: 12px; font-weight: 500; opacity: .75; }
.cust-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; flex: 1; }
.cust-steps b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid currentColor; font-weight: 600; }

.cust-success { text-align: center; padding: 4px 0 18px; display: flex; flex-direction: column; gap: 4px; }
.cust-success strong { font-size: 24px; }
.cust-success span { opacity: .7; font-size: 14px; }

.card-stage { padding: 6px 0 4px; }
.wallet-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.wbtn {
  height: 50px; border-radius: 8px; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #000; color: #fff; padding: 0 12px; text-align: left;
}
.wbtn svg { width: 22px; height: 22px; fill: currentColor; flex: 0 0 auto; }
.wbtn span { display: flex; flex-direction: column; line-height: 1.1; font-weight: 600; font-size: 14px; }
.wbtn small { font-size: 10px; font-weight: 400; opacity: .8; }

.cust-note {
  margin-top: 14px; padding: 12px 14px; border-radius: 8px; display: flex; flex-direction: column; gap: 2px; font-size: 14px;
  background: color-mix(in srgb, var(--brand-text) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-text) 12%, transparent);
}
.cust-note small { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .6; }
.cust-note-reward { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.cust-info { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; padding: 4px 2px; }
.cust-info > div { display: flex; flex-direction: column; }
.cust-info small { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .55; }
.cust-foot { text-align: center; font-size: 12px; opacity: .55; padding: 10px 0 28px; }
.cust-foot a { color: inherit; }

.modal { border: 0; border-radius: 12px; padding: 22px; max-width: 360px; width: calc(100% - 32px); background: var(--brand-bg); color: var(--brand-text); box-shadow: 0 20px 40px rgba(0, 0, 0, .25); }
.modal::backdrop { background: rgba(17, 24, 39, .5); }
.modal h3 { font-size: 20px; margin-bottom: 8px; }
.modal p { opacity: .8; font-size: 14px; margin: 0 0 18px; }

/* helle Unternehmensseiten (z. B. Creme): weiße Flächen */
.page-customer.is-light .cust-form, .page-customer.is-light .cust-note, .page-customer.is-light .modal { background: #fff; }
.page-customer.is-light .cust-form .fld input { background: #fff; }

/* Datenschutz-Seite */
.legal { padding: 8px 2px 24px; font-size: 15px; line-height: 1.6; }
.legal-back { font-size: 14px; text-decoration: none; opacity: .7; }
.legal h1 { font-size: 30px; margin: 18px 0 2px; }
.legal-lead { margin: 0 0 18px; opacity: .7; }
.legal h2 { font-family: var(--fb, var(--font)); font-size: 16px; font-weight: 700; margin: 24px 0 6px; }
.legal p { margin: 0 0 10px; }
.legal ul { margin: 0 0 10px; padding-left: 18px; }
.legal li { margin: 4px 0; }
.legal a { color: inherit; }
.legal-date { margin-top: 24px !important; font-size: 13px; opacity: .6; }
.page-customer.head-sans .legal h1 { text-transform: uppercase; font-weight: 900; }

/* ============================================================
   Mitarbeiter-App (hell, große Touch-Flächen)
   ============================================================ */
.page-staff { --brand: var(--accent); background: var(--canvas); color: var(--ink); min-height: 100vh; }
.page-staff .muted { color: var(--mute); }
.staff-center { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.staff-panel { width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px 24px; }
.staff-panel h1 { font-size: 22px; font-weight: 600; margin: 6px 0 4px; }
.staff-panel .stack { margin-top: 20px; }
.staff-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--mute); }
.fld.dark > span { color: var(--ink-2); }
.pin { letter-spacing: .5em; font-size: 20px !important; text-align: center; height: 48px !important; }

.sbtn {
  height: 44px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line); cursor: pointer; font-weight: 600; font-size: 15px;
  background: #fff; color: var(--ink); width: auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.sbtn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.sbtn-gold { background: var(--ok); border-color: var(--ok); color: #fff; }
.sbtn-ghost { background: #fff; }
.sbtn-xl { width: 100%; height: 60px; font-size: 18px; }
.sbtn i.ph { font-size: 22px; vertical-align: 0; }

.staff-bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; padding-top: max(12px, env(safe-area-inset-top));
  background: #fff; border-bottom: 1px solid var(--line);
}
.staff-bar div { display: flex; flex-direction: column; }
.staff-bar .right { text-align: right; }
.staff-bar strong { font-weight: 600; }
.staff-bar small { color: var(--mute); font-size: 12px; }
.staff-bar .staff-logo { height: 28px; width: auto; max-width: 150px; margin-bottom: 2px; }
.staff-out, .staff-back { font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.staff-main { max-width: 480px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.scanner { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.reader { width: 100%; height: 100%; }
.reader video { object-fit: cover; }
.reader-idle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.reader-idle[hidden] { display: none; }
.reader-idle .ph { font-size: 64px; color: var(--faint); }
.reader-idle small { color: var(--mute); }
.manual { display: flex; gap: 8px; }
.manual input { flex: 1; height: 44px; border-radius: var(--r); border: 1px solid #d1d5db; background: #fff; padding: 0 12px; text-transform: uppercase; letter-spacing: .08em; outline: none; min-width: 0; font-size: 15px; }
.manual input::placeholder { text-transform: none; letter-spacing: 0; color: var(--faint); }
.manual input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

.recent { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; }
.recent h2 { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--mute); margin: 10px 0 2px; }
.recent-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); text-decoration: none; }
.recent-row:last-child { border-bottom: 0; }
.recent-row .grow { display: flex; flex-direction: column; font-weight: 500; }
.recent-row small { color: var(--mute); font-weight: 400; font-size: 12px; }
.recent-row time { color: var(--mute); font-size: 12px; font-variant-numeric: tabular-nums; }
.page-staff .pill { min-width: 64px; }

.sc-head { padding: 4px 0 0; }
.sc-co { font-size: 12px; font-weight: 500; color: var(--mute); }
.sc-head h1 { font-size: 26px; font-weight: 600; margin: 2px 0; }
.sc-head code { font-family: var(--font); font-weight: 500; letter-spacing: .12em; color: var(--mute); font-size: 13px; }
.sc-progress { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.sc-num { display: flex; align-items: baseline; gap: 8px; }
.sc-num b { font-size: 48px; line-height: 1; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.sc-num span { color: var(--mute); font-weight: 500; }
.sc-dots { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 12px; }
.sc-dots i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px dashed #d1d5db; }
.sc-dots i.on { background: var(--c1, var(--accent)); border: 1.5px solid var(--c1, var(--accent)); }
.sc-progress p { margin: 0; font-size: 14px; }
.sc-actions form { display: flex; flex-direction: column; gap: 10px; }
.warn { margin: 0; padding: 10px 12px; border-radius: var(--r); background: var(--warn-soft); border: 1px solid #fde68a; color: var(--warn); font-size: 14px; font-weight: 500; }

.toast {
  position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 50; width: calc(100% - 32px); max-width: 440px;
  padding: 12px 16px; border-radius: var(--r); font-weight: 500; font-size: 15px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  animation: toast 4.5s ease forwards;
}
.toast-ok { background: var(--ok); color: #fff; }
.toast-err { background: var(--err); color: #fff; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -8px); } 6%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -8px); visibility: hidden; } }

/* ============================================================
   Admin
   ============================================================ */
.page-admin { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; background: var(--canvas); }
.side { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 10px; position: sticky; top: 0; height: 100vh; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.side-brand div { display: flex; flex-direction: column; line-height: 1.25; }
.side-brand strong { font-weight: 600; font-size: 14px; }
.side-brand small { color: var(--mute); font-size: 12px; }
.side-logo { width: 30px; height: 30px; border-radius: 6px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 17px; }
.side-label { font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; padding: 10px 10px 6px; }
.side nav { display: flex; flex-direction: column; gap: 1px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-sm); text-decoration: none; font-weight: 500; font-size: 14px; color: var(--ink-2); }
.side nav a i.ph { font-size: 18px; color: var(--mute); vertical-align: 0; }
.side nav a:hover { background: var(--canvas); color: var(--ink); }
.side nav a.active { background: #f3f4f6; color: var(--ink); }
.side nav a.active i.ph { color: var(--ink); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.side-foot a { display: flex; align-items: center; gap: 8px; color: var(--ink-2); text-decoration: none; padding: 7px 10px; border-radius: var(--r-sm); }
.side-foot a:hover { background: var(--canvas); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.side-user .avatar { width: 28px; height: 28px; border-radius: 50%; background: #e5e7eb; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.side-user span { display: flex; flex-direction: column; line-height: 1.2; }
.side-user small { color: var(--mute); font-size: 12px; }

.main { padding: 28px 36px 60px; max-width: 1280px; width: 100%; }
.crumbs { font-size: 13px; color: var(--mute); display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.crumbs a { text-decoration: none; color: var(--mute); }
.crumbs a:hover { color: var(--ink); }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.pagehead h1 { font-size: 24px; font-weight: 600; margin: 0 0 2px; }
.pagehead p { margin: 0; color: var(--mute); }
.pagehead .small { text-decoration: none; }
.pagehead-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Unternehmens-Filter als Segment-Leiste */
.chips { display: inline-flex; gap: 0; flex-wrap: wrap; margin-bottom: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 3px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 5px; text-decoration: none; font-size: 13px; font-weight: 500; color: var(--mute); }
.chip:hover { color: var(--ink); }
.chip i { width: 8px; height: 8px; border-radius: 2px; }
.chip.on { background: #f3f4f6; color: var(--ink); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-bottom: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.kpi small { font-size: 13px; font-weight: 500; color: var(--mute); display: flex; align-items: center; gap: 6px; }
.kpi small i.ph { font-size: 16px; vertical-align: 0; }
.kpi b { font-size: 28px; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi span { font-size: 12px; color: var(--faint); }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 16px; min-width: 0; }
.panel h2 { font-size: 15px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: baseline; gap: 8px; }
.panel h2 small { font-weight: 400; color: var(--mute); font-size: 13px; }
.panel-flush { padding: 0; }
.panel-flush h2 { padding: 16px 20px 0; }
.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.grid-design { display: grid; grid-template-columns: 1fr 390px; gap: 16px; align-items: start; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 16px; border-bottom: 1px solid var(--line); }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; position: relative; }
.bar i { display: block; width: 100%; max-width: 26px; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--accent); opacity: .85; transition: height .4s; }
.bar:hover i { opacity: 1; }
.bar small { font-size: 11px; color: var(--faint); position: absolute; bottom: -20px; font-variant-numeric: tabular-nums; }
.bar-v { font-size: 11px; font-weight: 500; color: var(--mute); font-variant-numeric: tabular-nums; }
.bars + .bars-space { height: 22px; }
.grid2 > .panel:has(.bars) { display: flex; flex-direction: column; }
.grid2 > .panel:has(.bars) .bars { flex: 1; min-height: 190px; height: auto; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 500; color: var(--mute); padding: 0 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #fcfcfd; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl td form { display: inline; }
.tbl td strong { font-weight: 500; }
.tbl .num { font-variant-numeric: tabular-nums; }
.prog { width: 110px; height: 5px; border-radius: 3px; background: #f3f4f6; overflow: hidden; margin-bottom: 4px; }
.prog i { display: block; height: 100%; border-radius: 3px; }

.inline-add { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.inline-add input, .inline-add select { flex: 1; min-width: 140px; height: 36px; }
.search { position: relative; }
.search i.ph { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 16px; }
.search input { width: 280px; height: 36px; padding-left: 32px; }

.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.co-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: border-color .15s; }
a.co-card:hover { border-color: #c4c8cf; }
.co-preview { display: flex; align-items: center; gap: 14px; padding: 22px 18px; min-height: 92px; border-bottom: 1px solid var(--line); }
.co-preview div { display: flex; flex-direction: column; }
.co-preview strong { font-size: 16px; font-weight: 600; }
.co-preview small { opacity: .7; }
.co-logo { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.co-logo-img { height: 46px; max-width: 170px; display: flex; align-items: center; }
.co-logo-img .brand-img { max-height: 46px; max-width: 170px; }
.co-meta { display: grid; grid-template-columns: repeat(3, 1fr); padding: 12px 18px; font-size: 12px; color: var(--mute); }
.co-meta span { display: flex; flex-direction: column; }
.co-meta b { color: var(--ink); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.co-new { padding: 20px 18px; gap: 10px; border: 1px dashed #d1d5db; background: transparent; justify-content: center; }
.co-new strong { font-weight: 600; display: flex; align-items: center; gap: 6px; }

.colors .fld { flex: 1; }
.preview-panel { background: var(--canvas); position: sticky; top: 20px; }
.phone { padding: 14px 8px; }

.types-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.type-item { border-bottom: 1px solid var(--line); }
.type-item:last-child { border-bottom: 0; }
.type-item summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.type-item summary:hover { background: #fcfcfd; }
.type-item summary::-webkit-details-marker { display: none; }
.type-item summary .grow { display: flex; flex-direction: column; }
.type-item summary strong { font-weight: 500; }
.type-item summary small { color: var(--mute); }
.type-ic { width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; font-weight: 600; font-size: 13px; color: #fff; font-variant-numeric: tabular-nums; }
.type-ic.plus { background: #f3f4f6; font-size: 16px; color: var(--ink-2); }
.chev { font-size: 16px; color: var(--faint); transition: transform .2s; }
.type-item[open] .chev { transform: rotate(90deg); }
.type-item[open] summary { border-bottom: 1px solid var(--line-2); background: var(--canvas); }
.type-form { padding: 16px 14px; display: flex; flex-direction: column; gap: 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
.checks label, .toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.checks input, .toggle input { width: 16px; height: 16px; accent-color: var(--ink); }

/* Logo-Felder */
.logos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.logo-slot { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; background: #fff; min-width: 0; overflow: hidden; }
.logo-slot:hover { border-color: #c4c8cf; }
.logo-prev { height: 64px; border-radius: var(--r-sm); display: grid; place-items: center; background: repeating-conic-gradient(#f3f4f6 0 25%, #fff 0 50%) 0 0 / 12px 12px; overflow: hidden; border: 1px solid var(--line-2); }
.logo-slot.dark .logo-prev { background: #1f2937; }
.logo-prev img { max-width: 90%; max-height: 54px; }
.logo-prev em { font-style: normal; font-size: 12px; color: var(--faint); }
.logo-meta { display: flex; flex-direction: column; line-height: 1.25; }
.logo-meta strong { font-weight: 500; }
.logo-meta small { color: var(--mute); font-size: 12px; }
.logo-slot input[type=file] { font-size: 11px; width: 100%; max-width: 100%; }

/* Sperrbildschirm-Vorschau */
.lock { border-radius: 20px; padding: 34px 16px 56px; background: #1f2937; color: #fff; text-align: center; }
.lock-time { font-size: 60px; font-weight: 300; letter-spacing: -.02em; line-height: 1; }
.lock-date { font-size: 14px; opacity: .75; margin: 6px 0 24px; }
.notif { display: flex; gap: 10px; text-align: left; padding: 11px; border-radius: 14px; background: rgba(255, 255, 255, .88); color: #111; }
.notif-ic { width: 36px; height: 36px; border-radius: 8px; flex: 0 0 auto; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 13px; overflow: hidden; }
.notif .grow { display: flex; flex-direction: column; font-size: 14px; line-height: 1.35; }
.notif-top { display: flex; justify-content: space-between; font-size: 12px; opacity: .6; text-transform: uppercase; letter-spacing: .03em; }

/* ============================================================
   Übersicht / Druck
   ============================================================ */
.page-plain { background: var(--canvas); color: var(--ink); min-height: 100vh; }
.hub { max-width: 1000px; margin: 0 auto; padding: 56px 24px 80px; }
.hub-head { max-width: 640px; margin-bottom: 32px; }
.eyebrow { font-size: 13px; font-weight: 500; color: var(--mute); display: inline-flex; align-items: center; gap: 6px; }
.hub-head h1 { font-size: clamp(30px, 5vw, 40px); font-weight: 600; margin: 8px 0 10px; letter-spacing: -.02em; }
.hub-head p { color: var(--mute); font-size: 16px; margin: 0; }
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hub-tile { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--r); text-decoration: none; background: #fff; border: 1px solid var(--line); transition: border-color .15s; min-height: 180px; }
.hub-tile:hover { border-color: #c4c8cf; }
.hub-tile > i.ph { font-size: 22px; color: var(--accent); margin-bottom: 6px; }
.hub-tile strong { font-size: 17px; font-weight: 600; }
.hub-tile p { margin: 0; color: var(--mute); font-size: 14px; flex: 1; }
.hub-tile small { color: var(--ink-2); font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--canvas); border: 1px solid var(--line-2); border-radius: 4px; padding: 4px 6px; align-self: flex-start; }
.tile-k { font-size: 12px; font-weight: 500; color: var(--mute); }
.hub-h2 { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 36px 0 10px; }
.hub-companies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hub-co { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r); text-decoration: none; background: var(--c2); color: var(--c3); border: 1px solid color-mix(in srgb, var(--c3) 14%, transparent); }
.hub-co:hover { filter: brightness(.98); }
.hub-co > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.hub-co strong { font-weight: 600; }
.hub-co small { opacity: .65; font-size: 12px; }
.hub-co-logo { width: 40px; height: 40px; border-radius: 8px; background: var(--c1); color: var(--c2); display: grid; place-items: center; font-weight: 700; }
.hub-co-logoimg { width: 96px; height: 42px; display: flex; align-items: center; }
.hub-co-logoimg .brand-img { max-width: 96px; max-height: 42px; }
.hub-co .arrow { font-size: 18px; opacity: .55; }
.hub-note { margin-top: 32px; color: var(--mute); font-size: 13px; max-width: 640px; display: flex; gap: 8px; }
.hub-note i.ph { font-size: 16px; margin-top: 2px; }

.page-print { background: #e5e7eb; padding: 30px 16px; }
.poster { width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 1 / 1.414; background: var(--c2); color: var(--c3); border-radius: 4px; padding: 8% 10%; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.12); font-family: var(--fb, var(--font)); }
.poster-logo { width: 80px; height: 80px; border-radius: 14px; background: var(--c1); color: var(--c2); display: grid; place-items: center; font-weight: 700; font-size: 30px; }
.poster-logoimg { width: 72%; max-width: 360px; margin: 2% 0 6%; }
.poster-logoimg .brand-img { width: 100%; height: auto; display: block; }
.poster h1 { font-family: var(--fh, var(--font)); font-size: 38px; margin: 18px 0 4px; }
.poster-lead { font-family: var(--fh, var(--font)); font-size: 22px; font-weight: 700; color: var(--c1); margin: 0 0 24px; line-height: 1.25; }
.poster.head-sans .poster-lead { text-transform: uppercase; font-weight: 900; letter-spacing: .02em; }
.poster-qr { width: 58%; aspect-ratio: 1; background: #fff; padding: 5%; border-radius: 8px; }
.poster-qr svg { width: 100%; height: 100%; display: block; }
.poster-steps { font-weight: 700; margin: 24px 0 4px; font-size: 16px; }
.poster-small { opacity: .6; margin: 0; font-size: 13px; }
.poster-branches { margin-top: auto; width: 100%; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--c3) 18%, transparent); display: flex; flex-direction: column; gap: 4px; }
.poster-branches small { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c1); }
.poster-branches span { font-family: var(--fh, var(--font)); font-weight: 700; font-size: 18px; }
.poster.head-sans .poster-branches span { text-transform: uppercase; letter-spacing: .03em; }
@media print { .no-print { display: none; } .page-print { background: #fff; padding: 0; } .poster { box-shadow: none; max-width: none; border-radius: 0; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  .grid-design { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .page-admin { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-brand { padding-bottom: 8px; }
  .side-label { display: none; }
  .side nav { flex-direction: row; overflow-x: auto; }
  .side nav a { white-space: nowrap; }
  .side-foot { display: none; }
  .main { padding: 18px 14px 48px; }
  .hub-grid, .hub-companies { grid-template-columns: 1fr; }
  .hub { padding-top: 32px; }
  .row { flex-direction: column; }
  .row > .fld.sm { flex: 1; }
  .search, .search input { width: 100%; }
  .panel { padding: 16px 14px; overflow-x: auto; }
  .tbl { min-width: 520px; }
  .logos { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .wallet-btns { grid-template-columns: 1fr; }
}
