/* Clever Stempel – Dashboards (Café-Betreiber & Entwickler) */
:root {
  --paper: #F6F4EF;
  --card: #FFFFFF;
  --ink: #1F2A24;
  --ink-2: #4A554E;
  --muted: #7A837D;
  --line: #E6E2D9;
  --accent: #2F7D4F;
  --accent-soft: #E3F1E8;
  --red: #B3261E;
  --red-soft: #FBE9E7;
  --blue: #1F5FA8;
  --blue-soft: #E5EEF9;
  --radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.dash { background: var(--paper); color: var(--ink); line-height: 1.45; font-size: 15px; }
a { color: var(--accent); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: #F1EEE7; padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .85rem; font-weight: 400; }
.mt { margin-top: 18px; }
.center { text-align: center; }

/* Layout */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100dvh; background: linear-gradient(to right, var(--ink) 240px, transparent 240px); }
.side { background: var(--ink); color: #E9EDE9; display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100dvh; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.05rem; padding: 0 10px 22px; letter-spacing: -.01em; }
.brand--center { justify-content: center; padding-bottom: 8px; }
.brand-bean { width: 22px; height: auto; --bg: #fff; --strip: var(--ink); --accent: #6CC28A; }
.brand-bean .bean-body { fill: #6CC28A; stroke: #6CC28A; stroke-width: 3; }
.brand-bean .bean-line { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; color: #C9D1CB; text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 550; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.is-active { background: rgba(255,255,255,.12); color: #fff; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding: 14px 10px 0; display: grid; gap: 10px; }
.who { display: grid; font-size: .85rem; } .who span { color: #9AA59E; word-break: break-all; }
.link-btn { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; color: #C9D1CB; font-size: .9rem; }
.link-btn:hover { color: #fff; }
.content { padding: 28px clamp(16px, 4vw, 44px) 60px; max-width: 1240px; width: 100%; }
.page-title { font-size: 1.6rem; margin: 0 0 20px; letter-spacing: -.02em; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .side, .nav, .content { min-width: 0; }
  .side { position: static; height: auto; padding: 12px; }
  .brand { padding: 4px 6px 10px; }
  .nav { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .nav a { white-space: nowrap; padding: 8px 10px; font-size: .9rem; }
  .side-foot { flex-direction: row; display: flex; justify-content: space-between; align-items: center; padding-top: 10px; margin-top: 8px; }
  .content { padding-top: 20px; }
}

/* Bausteine */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; min-width: 0; }
.panel h2 { font-size: 1.02rem; margin: 0 0 4px; }
.panel h2 + .muted { margin: 0 0 14px; font-size: .88rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.top-actions { margin-bottom: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.grid-2 > .panel, .grid-2 > .stack > .panel { margin-bottom: 0; }
.grid-2 { margin-bottom: 18px; }
@media (max-width: 980px) { .grid-2 { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 14px; align-content: start; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 12px; align-items: end; }
.row-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 640px) { .row-2, .row-3 { grid-template-columns: 1fr; } .row-4 { grid-template-columns: 1fr 1fr; } }
.form-narrow { max-width: 680px; }

/* Kennzahlen */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi-label { color: var(--muted); font-size: .82rem; font-weight: 600; }
.kpi-value { font-size: 1.75rem; font-weight: 750; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-hint { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.ok { color: var(--accent); } .bad { color: var(--red); }

/* Diagramme */
.bars { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; align-items: end; border-bottom: 1px solid var(--line); }
.bar { height: 100%; display: flex; align-items: flex-end; }
.bar span { display: block; width: 100%; border-radius: 4px 4px 1px 1px; min-height: 0; }
.bar:hover span { filter: brightness(1.25); }
.bar-labels { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; margin-top: 6px; }
.bar-labels span { font-size: .72rem; color: var(--muted); text-align: center; white-space: nowrap; overflow: visible; }
.chart-max { text-align: right; color: var(--muted); font-size: .75rem; margin-top: 4px; }
.splitbar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: #F1EEE7; margin: 14px 0 12px; }
.splitbar span { display: block; height: 100%; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .92rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: 0; }
.rank { list-style: none; padding: 0; margin: 0; }
.rank li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rank li:last-child { border-bottom: 0; }

/* Formulare */
label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
label.check input { width: 18px; height: 18px; }
input, select { font: inherit; color: var(--ink); background: #fff; width: 100%; border: 1px solid #D8D3C8; border-radius: 10px; padding: 10px 12px; }
input:focus, select:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
input[type=color] { padding: 3px; height: 42px; cursor: pointer; }
input[type=file] { padding: 8px; }
label.file img { max-height: 64px; max-width: 200px; object-fit: contain; background: #F1EEE7; border-radius: 10px; padding: 8px; }

/* Buttons */
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 650; text-decoration: none;
  border: 1px solid #D8D3C8; background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #2E3B34; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-small { padding: 6px 10px; font-size: .85rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.center .btn-row { justify-content: center; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
td.actions { text-align: right; white-space: nowrap; }
td.actions form { display: inline; }
tr.is-off td { opacity: .55; }
table.deadlines th { text-transform: none; letter-spacing: 0; font-size: .92rem; color: var(--ink); width: 34%; }

/* Hinweise */
.badge { display: inline-block; font-size: .75rem; font-weight: 650; padding: 3px 8px; border-radius: 999px; background: #EEEAE2; color: var(--ink-2); white-space: nowrap; }
.badge-green { background: var(--accent-soft); color: var(--accent); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.alert { background: var(--red-soft); color: var(--red); border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; font-weight: 550; }
.alert-ok { background: var(--accent-soft); color: var(--accent); }
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--blue-soft); color: #173F6E; border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; }
.notice .ico { margin-top: 1px; }
.notice-red { background: var(--red-soft); color: #7A1A14; }
.notice-green { background: var(--accent-soft); color: #1D5534; }
.warn-list { margin-bottom: 18px; }
.warn-list .notice a, .notice a { color: inherit; font-weight: 650; }
.imp-banner { background: #F2B233; color: #2A1F05; text-align: center; padding: 8px 12px; font-size: .9rem; }
.imp-banner a { color: inherit; font-weight: 700; }
.pin-box { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pin-box .pin { font-family: ui-monospace, Menlo, monospace; font-size: 1.8rem; letter-spacing: .25em; background: rgba(255,255,255,.12); padding: 4px 14px; border-radius: 10px; }
.pin-box small { color: #C9D1CB; width: 100%; }
.copy code { display: block; padding: 10px 12px; }
.tips { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }
.tips li { margin: 4px 0; }
.qr-big { width: 220px; height: 220px; display: block; margin: 12px auto; }

/* Karte gestalten: Vorschau */
.grid-design { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
@media (max-width: 980px) { .grid-design { grid-template-columns: 1fr; } .preview-wrap { order: -1; } }
.preview-wrap { position: sticky; top: 24px; }
.preview-label { font-size: .78rem; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.mini-pass { background: var(--bg); color: var(--fg); border-radius: 18px; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.mp-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.mp-head img { width: 48px; height: 34px; object-fit: contain; }
.mp-head strong { flex: 1; font-size: .95rem; }
.mp-head span { text-align: right; line-height: 1.1; font-weight: 750; font-size: 1.2rem; }
.mp-head small, .mp-fields small { display: block; font-size: .62rem; letter-spacing: .08em; font-weight: 500; opacity: .75; }
.mp-strip { background: var(--strip); padding: 16px 12px; }
.mp-fields { padding: 12px 16px 18px; }
.beans { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); gap: 10px 4px; }
.beans li { display: grid; place-items: center; }
.bean { width: 26px; height: auto; }
.bean-body { fill: none; stroke: color-mix(in srgb, var(--bg) 55%, var(--strip)); stroke-width: 3; }
.bean-line { fill: none; stroke: color-mix(in srgb, var(--bg) 55%, var(--strip)); stroke-width: 3; stroke-linecap: round; }
.bean.is-on .bean-body { fill: var(--accent); stroke: var(--accent); }
.bean.is-on .bean-line { stroke: var(--strip); }

/* Login */
.login-body { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 30px 26px; width: 100%; max-width: 400px; box-shadow: 0 20px 50px rgba(31,42,36,.08); }
.login-card h1 { font-size: 1.35rem; margin: 10px 0 4px; text-align: center; }
.login-card > .muted { text-align: center; margin: 0 0 20px; font-size: .92rem; }
.login-card .brand { color: var(--ink); }
.login-card .brand-bean .bean-line { stroke: #fff; }

/* Willkommensblatt */
.sheet-body { background: #e9e6df; padding: 16px; }
.sheet-bar { max-width: 760px; margin: 0 auto 12px; display: flex; justify-content: space-between; align-items: center; }
.sheet { background: #fff; max-width: 760px; margin: 0 auto; padding: 40px 44px; border-radius: 12px; }
.sheet .brand { color: var(--ink); padding: 0 0 16px; }
.sheet .brand-bean .bean-line { stroke: #fff; }
.sheet h1 { font-size: 1.6rem; margin: 0 0 8px; }
.sheet h2 { font-size: 1.05rem; margin: 26px 0 8px; }
.kv { border: 1px solid var(--line); border-radius: 10px; }
.kv th { width: 30%; text-transform: none; letter-spacing: 0; font-size: .92rem; color: var(--ink-2); }
.kv code { font-size: 1.05rem; background: #F1EEE7; }
@media print {
  .no-print { display: none !important; }
  .sheet-body { background: #fff; padding: 0; }
  .sheet { padding: 0; }
}
.login-foot { margin: 18px 0 0; font-size: .82rem; } .login-foot a { color: var(--muted); }
