/* Cosmie – Dashboard für Betriebe */
body { background: #F6F5F9; }
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }

/* Seitenleiste */
.side { background: #fff; border-right: 1px solid var(--linie); padding: 22px 16px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .logo { font-size: 25px; padding: 2px 10px; }
.betrieb-box { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: #F6F5F9; }
.betrieb-box .mono { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.betrieb-box b { font-size: 14px; display: block; }
.betrieb-box small { font-size: 12px; color: var(--text-3); }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav .gruppe { font-size: 11px; font-weight: 700; color: var(--text-4); letter-spacing: .08em; padding: 14px 12px 6px; text-transform: uppercase; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; font-size: 14.5px; font-weight: 500; color: var(--text-2); text-decoration: none; }
.side nav a svg { width: 19px; height: 19px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side nav a:hover { background: #F6F5F9; color: var(--nacht); }
.side nav a.is-active { background: var(--violett-zart); color: var(--violett); font-weight: 600; }
.side nav a .zahl { margin-left: auto; background: var(--koralle); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 7px; }
.side-fuss { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.side-fuss .plan { background: var(--nacht); color: #fff; border-radius: 16px; padding: 16px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.side-fuss .plan b { font-size: 15px; }
.side-fuss .plan span { color: #A9ACC4; }

/* Hauptbereich */
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; background: rgba(246,245,249,.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); display: flex; align-items: center; gap: 14px; padding: 16px 32px; border-bottom: 1px solid transparent; }
.top h1 { font-size: 24px; letter-spacing: -.03em; margin-right: auto; }
.top .select { width: auto; min-width: 190px; padding: 10px 36px 10px 14px; font-weight: 600; font-size: 14px; }
.burger { display: none; border: 1px solid var(--linie-2); background: #fff; width: 42px; height: 42px; border-radius: 12px; align-items: center; justify-content: center; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--koralle); color: var(--nacht); font-weight: 700; font-size: 14px; display: grid; place-items: center; border: 0; flex: none; }
.inhalt { padding: 8px 32px 48px; display: flex; flex-direction: column; gap: 20px; max-width: 1360px; width: 100%; }

/* Karten & Raster */
.box { background: #fff; border: 1px solid var(--linie); border-radius: 20px; padding: 22px; min-width: 0; }
.box-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.box-kopf h2 { font-size: 17px; letter-spacing: -.02em; }
.box-kopf p { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.row { display: grid; gap: 20px; }
.r-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.r-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.r-21 { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.r-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }

.kpi { display: flex; flex-direction: column; gap: 8px; }
.kpi span { font-size: 13px; color: var(--text-3); font-weight: 500; }
.kpi b { font-size: 34px; letter-spacing: -.04em; line-height: 1; }
.kpi small { font-size: 12.5px; font-weight: 600; }
.plus { color: #0B7A5A; } .minus { color: #B3261E; }
.kpi.violett { background: var(--violett); color: #fff; border-color: var(--violett); }
.kpi.violett span, .kpi.violett small { color: #DCD5FF; }

/* Balkendiagramm */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding-top: 10px; }
.chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.chart .bar i { width: 100%; max-width: 34px; background: var(--violett-zart); border-radius: 8px 8px 4px 4px; position: relative; transition: background .15s; min-height: 3px; }
.chart .bar.heute i { background: var(--violett); }
.chart .bar:hover i { background: var(--violett-hell); }
.chart .bar em { font-style: normal; font-size: 11px; color: var(--text-4); white-space: nowrap; }
.chart .bar i::after { content: attr(data-n); position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: var(--text-2); opacity: 0; transition: opacity .15s; }
.chart .bar:hover i::after, .chart .bar.heute i::after { opacity: 1; }

/* Listen */
.liste { display: flex; flex-direction: column; }
.zeile { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--linie); min-width: 0; }
.zeile:first-child { border-top: 0; padding-top: 0; }
.zeile .av { width: 38px; height: 38px; border-radius: 50%; background: #F1EFF8; color: var(--violett); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.zeile .txt { flex: 1; min-width: 0; }
.zeile .txt b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile .txt small { font-size: 12.5px; color: var(--text-3); }
.leer { text-align: center; color: var(--text-3); padding: 28px 12px; font-size: 14px; }

/* Tabelle */
.tabelle-wrap { overflow-x: auto; margin: 0 -22px -22px; }
table.tab { width: 100%; border-collapse: collapse; font-size: 14px; }
.tab th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 10px 14px; border-bottom: 1px solid var(--linie); white-space: nowrap; background: #FCFBFE; }
.tab td { padding: 12px 14px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.tab tr:last-child td { border-bottom: 0; }
.tab tbody tr { cursor: pointer; }
.tab tbody tr:hover td { background: #FAF9FD; }
.tab th:first-child, .tab td:first-child { padding-left: 22px; }
.tab th:last-child, .tab td:last-child { padding-right: 22px; }
.mini-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.mini-dots i { width: 8px; height: 8px; border-radius: 50%; background: #E4E1EE; }
.mini-dots i.on { background: var(--violett); }

.filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.suche { position: relative; flex: 1 1 240px; max-width: 360px; }
.suche input { padding-left: 38px; }
.suche svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--text-4); fill: none; stroke-width: 2; }

/* Seitliche Detailansicht */
.drawer-bg { position: fixed; inset: 0; background: rgba(15,18,34,.35); z-index: 800; animation: fadeIn .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(100%, 460px); background: #fff; z-index: 801; box-shadow: var(--schatten-l); display: flex; flex-direction: column; animation: slideIn .22s ease; }
.drawer-kopf { display: flex; align-items: center; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--linie); }
.drawer-inhalt { padding: 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }
.fakten { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fakten div { background: #F8F7FB; border-radius: 14px; padding: 12px 14px; }
.fakten span { font-size: 12px; color: var(--text-3); display: block; }
.fakten b { font-size: 18px; letter-spacing: -.02em; }

/* Aktionen */
.vorlagen { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.vorlage { text-align: left; border: 1px solid var(--linie-2); background: #fff; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, box-shadow .15s; }
.vorlage:hover, .vorlage.is-active { border-color: var(--violett); box-shadow: 0 0 0 3px rgba(91,61,245,.1); }
.vorlage b { font-size: 14px; }
.vorlage small { font-size: 12px; color: var(--text-3); line-height: 1.35; }
.vorschau-phone { width: 290px; max-width: 100%; margin: 0 auto; background: #111114; border-radius: 44px; padding: 10px; }
.vorschau-screen { border-radius: 36px; min-height: 420px; background: radial-gradient(120% 80% at 30% 0%, #5B3DF5 0%, #2A2350 55%, #15122E 100%); padding: 54px 12px 20px; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
.vorschau-screen::before { content: ""; position: absolute; top: 12px; left: 50%; width: 86px; height: 26px; margin-left: -43px; background: #111114; border-radius: 999px; }
.vorschau-screen .zeit { font-size: 64px; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.vorschau-notif { margin-top: 26px; width: 100%; background: rgba(255,255,255,.92); color: #111114; border-radius: 18px; padding: 11px 12px; display: flex; gap: 10px; }
.vorschau-notif .ic { flex: 0 0 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 11px; }
.vorschau-notif p { font-size: 13px; line-height: 1.35; word-break: break-word; }
.ziel-zahl { font-size: 13px; color: var(--text-2); background: var(--violett-zart); border-radius: 12px; padding: 10px 12px; }
.ziel-zahl b { color: var(--violett); }

/* Automatisch */
.auto { display: flex; gap: 16px; align-items: flex-start; }
.auto .ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; flex: none; }
.auto .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.auto .txt h3 { font-size: 16px; }
.auto .txt p { font-size: 13.5px; color: var(--text-3); line-height: 1.45; }
.auto .messwerte { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.auto .messwerte b { color: var(--nacht); }
.auto-edit { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }

/* Kasse */
.kasse { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.scanner { position: relative; background: #0F1222; border-radius: 20px; aspect-ratio: 4 / 3; overflow: hidden; display: grid; place-items: center; color: #A9ACC4; text-align: center; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner .rahmen { position: absolute; width: 56%; aspect-ratio: 1; border: 3px solid rgba(255,255,255,.9); border-radius: 24px; box-shadow: 0 0 0 999px rgba(15,18,34,.35); }
.scanner .info { position: relative; z-index: 1; padding: 20px; display: flex; flex-direction: column; gap: 12px; align-items: center; font-size: 14px; max-width: 320px; }
.treffer { display: flex; flex-direction: column; gap: 16px; }
.gross-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gross-btns .btn { padding: 18px; font-size: 16px; border-radius: 14px; }

/* Stempelkarte gestalten */
.farben { display: flex; flex-wrap: wrap; gap: 8px; }
.farbe { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--linie-2); }
.farbe.is-active { box-shadow: 0 0 0 2px var(--violett); }
.stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--linie-2); border-radius: 12px; overflow: hidden; width: max-content; background: #fff; }
.stepper button { border: 0; background: #fff; width: 42px; height: 42px; font-size: 20px; }
.stepper button:hover { background: #F6F5F9; }
.stepper output { min-width: 44px; text-align: center; font-weight: 700; }
.pass-vorschau { max-width: 340px; margin: 0 auto; width: 100%; }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-form { display: flex; flex-direction: column; justify-content: center; padding: 48px; gap: 26px; max-width: 520px; width: 100%; margin: 0 auto; }
.login-form .logo { font-size: 30px; }
.login-form h1 { font-size: 36px; letter-spacing: -.04em; line-height: 1.05; }
.login-bild { background: var(--violett); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 48px; color: #fff; }
.login-bild .zitat { position: relative; max-width: 440px; display: flex; flex-direction: column; gap: 18px; }
.login-bild .zitat p { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; }
.code-felder { display: flex; gap: 8px; }
.code-felder input { width: 52px; height: 58px; text-align: center; font-size: 22px; font-weight: 700; padding: 0; }

.segment { display: inline-flex; background: #EFEDF5; border-radius: 12px; padding: 3px; gap: 2px; }
.segment button { border: 0; background: transparent; border-radius: 9px; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.segment button.is-active { background: #fff; color: var(--nacht); box-shadow: 0 1px 3px rgba(15,18,34,.1); }

.kosten { background: #F8F7FB; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.kosten div { display: flex; justify-content: space-between; gap: 10px; }
.kosten .total { border-top: 1px solid var(--linie-2); padding-top: 8px; font-weight: 700; }

@media (max-width: 1180px) {
  .r-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r-21, .r-12, .kasse { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 700; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--schatten-l); }
  .nav-open .side { transform: none; }
  .nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(15,18,34,.35); z-index: 650; }
  .burger { display: inline-flex; }
  .top { padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
  .top h1 { font-size: 20px; }
  .top .select { min-width: 0; flex: 1 1 100%; order: 5; }
  .inhalt { padding: 8px 16px 40px; }
  .login { grid-template-columns: 1fr; }
  .login-bild { display: none; }
  .r-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .r-4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .kpi b { font-size: 26px; }
  .box { padding: 16px; border-radius: 16px; }
  .tabelle-wrap { margin: 0 -16px -16px; }
  .top .btn-primary span { display: none; }
  .login-form { padding: 28px 20px; }
}
@media print {
  .side, .top, .no-print { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
}
.chart-box { display: flex; flex-direction: column; } .chart-box .chart { flex: 1; min-height: 200px; height: auto; }
.burger svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

.motive { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.motiv-btn { border: 1px solid var(--linie-2); background: #fff; border-radius: 12px; padding: 10px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-2); font-size: 11.5px; font-weight: 600; }
.motiv-btn svg { width: 26px; height: 26px; }
.motiv-btn:hover { border-color: var(--violett-hell); }
.motiv-btn.is-active { border-color: var(--violett); background: var(--violett-zart); color: var(--violett); box-shadow: 0 0 0 3px rgba(91,61,245,.1); }
