/* GT Mensa – Portal-Design */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300 800; font-display: swap; src: url(fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300 800; font-display: swap; src: url(fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --brand: #a60006;
  --brand-600: #8c0005;
  --brand-700: #6c0004;
  --brand-50: #fcf1f1;
  --brand-100: #f3d2d3;
  --navy: #1d1d1f;
  --navy-2: #2b2b2e;
  --accent: #f59f00;
  --bg: #f4f4f5;
  --surface: #fff;
  --surface-2: #f8f8f9;
  --line: #e4e4e7;
  --line-2: #d4d4d8;
  --text: #18181b;
  --text-2: #4b4b53;
  --muted: #71717a;
  --ok: #16a34a; --ok-bg: #e8f7ee; --ok-fg: #126b35;
  --warn: #d97706; --warn-bg: #fff4e0; --warn-fg: #8a4b00;
  --bad: #dc2626; --bad-bg: #fdecec; --bad-fg: #9b1c1c;
  --info: #2563eb; --info-bg: #eaf1fe; --info-fg: #1e46a8;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 20, 24, .06), 0 4px 16px rgba(20, 20, 24, .05);
  --shadow-lg: 0 10px 40px rgba(20, 20, 24, .14);
  --sidebar: 268px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 750; }
h2 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--surface-2); border: 1px solid var(--line); padding: .05em .35em; border-radius: 5px; }
code.big { font-size: 1.25rem; padding: .2em .5em; letter-spacing: .04em; }
small, .small { font-size: .85em; }
.muted { color: var(--muted); }
.strong { font-weight: 650; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt { margin-top: 1.25rem; } .mb { margin-bottom: 1.25rem; } .mt-xs { margin-top: .35rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.neg { color: var(--bad) !important; } .pos { color: var(--ok-fg); }
.i { width: 1.15em; height: 1.15em; flex: none; }
.i-xs { width: .9em; height: .9em; display: inline-block; vertical-align: -.1em; }
.i-xl { width: 3.5rem; height: 3.5rem; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }

/* ---------- App-Shell */
.has-nav .main { margin-left: var(--sidebar); padding: 28px clamp(16px, 3vw, 40px) 24px; min-height: 100vh; display: flex; flex-direction: column; max-width: calc(1440px + var(--sidebar)); }
.has-nav .main > .footer { margin-top: auto; }
.topbar { display: none; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: linear-gradient(180deg, #252528 0%, #161618 100%); color: #e4e4e7; display: flex; flex-direction: column; z-index: 40; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 18px 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none !important; }
.brand span { display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font-size: 1.1rem; letter-spacing: -.01em; }
.brand small { color: #a1a1aa; font-size: .74rem; }
.nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: #8a8a93; padding: 14px 12px 5px; font-weight: 650; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; color: #e4e4e7; font-weight: 500; text-decoration: none; transition: background .15s, color .15s; }
.nav a .i { width: 19px; height: 19px; opacity: .85; }
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a.active { background: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(166, 0, 6, .35); }
.nav a.active .i { opacity: 1; }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .08); padding: 12px 14px 14px; }
.me { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.me .avatar { background: rgba(255, 255, 255, .12); color: #fff; }
.me-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.me-text strong { color: #fff; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { color: #a1a1aa; font-size: .75rem; }
.me-links { display: flex; gap: 4px; }
.me-links > * { flex: 1; }
.me-links a, .me-links button { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; padding: 7px 8px; border-radius: 8px; color: #d4d4d8; font: inherit; font-size: .88rem; background: none; border: 0; cursor: pointer; text-align: left; text-decoration: none; }
.me-links a, .me-links button { font-size: .8rem; background: rgba(255, 255, 255, .05); }
.me-links a:hover, .me-links button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.me-links .i { width: 17px; height: 17px; }
.sidebar .nav-close { display: none; color: #fff; }
.scrim { position: fixed; inset: 0; background: rgba(10, 10, 12, .5); z-index: 35; backdrop-filter: blur(2px); }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 32px; color: var(--muted); font-size: .8rem; }
.footer a { color: var(--muted); }
.tabbar { display: none; }

@media (max-width: 1023px) {
  .has-nav .main { margin-left: 0; padding: 76px 16px 24px; }
  .topbar { display: flex; align-items: center; gap: 10px; position: fixed; inset: 0 0 auto 0; height: 60px; padding: 0 10px; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); z-index: 30; }
  .brand-sm { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; text-decoration: none !important; }
  .topbar-title { margin-left: auto; color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45vw; }
  .sidebar { transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow-lg); width: min(86vw, 300px); }
  .nav-open .sidebar { transform: none; }
  .sidebar .nav-close { display: inline-flex; }
  .role-2 .main { padding-bottom: 96px; }
  .role-2 .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); z-index: 30; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; color: var(--muted); font-size: .7rem; font-weight: 600; text-decoration: none; border-radius: 10px; }
  .tabbar a .i { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--brand-600); background: var(--brand-50); }
}

/* ---------- Logo */
.gtm-logo { display: block; width: 100%; height: auto; }
.brand { flex-direction: column; align-items: flex-start; gap: 4px; }
.brand .gtm-logo { width: 210px; margin: -8px 0 -6px -8px; }
.brand small { display: block; color: #a1a1aa; font-size: .72rem; line-height: 1.35; padding-left: 2px; }
.brand-sm .gtm-logo { width: 128px; }
.login-brand { flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 28px; }
.login-brand .gtm-logo { width: 260px; margin-left: -8px; }
.hero-logo .gtm-logo { width: min(440px, 100%); margin-left: -12px; }
.hero-slogan { color: #ff8a8e !important; font-weight: 600; letter-spacing: .02em; margin-top: -4px; }
.slip-head { align-items: flex-end; justify-content: space-between; }
.slip-head .gtm-logo { width: 200px; margin-left: -6px; }
.slip-head small { color: var(--muted); text-align: right; }
.term-logo .gtm-logo { width: 150px; }
@media (max-width: 760px) { .term-logo { display: none; } }

/* ---------- Bausteine */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.page-head .sub { color: var(--text-2); margin: 6px 0 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card.p0 { padding: 0; overflow: hidden; }
.card.narrow { max-width: 640px; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; margin-bottom: 14px; }
.card-title .i { color: var(--brand); }
.card-title.pad { padding: 16px 18px 0; }
.card-title.between { justify-content: space-between; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin: 0; }
.card-title.between > span { display: flex; align-items: center; gap: 10px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.align-start { align-items: start; }
@media (max-width: 1180px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .grid-4 { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; min-height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); border-color: #bdbdc4; }
.btn:active { transform: translateY(1px); }
.btn .i { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(166, 0, 6, .25); }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 32px; padding: 5px 11px; font-size: .84rem; border-radius: 8px; }
.btn-sm .i { width: 15px; height: 15px; }
.btn-lg { min-height: 48px; padding: 11px 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-danger-ghost { background: transparent; color: var(--bad); border-color: #f2c4c4; }
.btn-danger-ghost:hover { background: var(--bad-bg); border-color: var(--bad); }
.btn-link { background: none; border: 0; color: var(--brand-600); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; text-decoration: none !important; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.icon-btn.disabled { opacity: .3; pointer-events: none; }
.icon-btn.danger:hover { color: var(--bad); background: var(--bad-bg); }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; font-size: .94rem; }
.alert .i { width: 20px; height: 20px; margin-top: 1px; }
.alert-success { background: var(--ok-bg); border-color: #bfe6cc; color: var(--ok-fg); }
.alert-error { background: var(--bad-bg); border-color: #f5c2c2; color: var(--bad-fg); }
.alert-warning { background: var(--warn-bg); border-color: #f6d79f; color: var(--warn-fg); }
.alert-info { background: var(--info-bg); border-color: #c7d8fb; color: var(--info-fg); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 650; white-space: nowrap; line-height: 1.6; }
.badge-success { background: var(--ok-bg); color: var(--ok-fg); }
.badge-warning { background: var(--warn-bg); color: var(--warn-fg); }
.badge-danger { background: var(--bad-bg); color: var(--bad-fg); }
.badge-info { background: var(--info-bg); color: var(--info-fg); }
.badge-neutral { background: #efeff1; color: var(--text-2); }

.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); font-weight: 700; flex: none; object-fit: cover; width: 38px; height: 38px; font-size: .85rem; }
.avatar-sm { width: 32px; height: 32px; font-size: .75rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar-xl { width: 160px; height: 160px; font-size: 3rem; }
.person { display: inline-flex; align-items: center; gap: 10px; }
.person > span { display: flex; flex-direction: column; line-height: 1.25; }

.empty { text-align: center; padding: 48px 20px; }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 18px; background: var(--brand-50); color: var(--brand); }
.empty-icon .i { width: 30px; height: 30px; }
.empty h2 { margin-bottom: 8px; }
.empty p { color: var(--text-2); }

/* Stat-Kacheln */
.stat { position: relative; display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 18px 16px; color: var(--text); text-decoration: none !important; transition: transform .15s, box-shadow .15s; overflow: hidden; }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); margin-bottom: 6px; }
.stat-icon .i { width: 21px; height: 21px; }
.stat-label { color: var(--muted); font-size: .84rem; font-weight: 600; }
.stat-value { font-size: 1.9rem; font-weight: 780; letter-spacing: -.02em; line-height: 1.15; }
.stat-value.sm { font-size: 1.2rem; }
.stat-note { color: var(--text-2); font-size: .84rem; }
.stat-balance { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%); color: #fff; border-color: transparent; }
.stat-balance .stat-label, .stat-balance .stat-note { color: rgba(255, 255, 255, .85); }
.stat-balance .stat-icon { background: rgba(255, 255, 255, .16); color: #fff; }
.stat-balance.is-low { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); }
.stat-balance::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(-66deg, transparent 0 22px, rgba(255, 255, 255, .06) 22px 30px, transparent 30px 38px, rgba(255, 255, 255, .08) 38px 40px); pointer-events: none; }
.stat.is-low:not(.stat-balance) .stat-icon { background: var(--warn-bg); color: var(--warn); }
.stat-cta { border: 1.5px dashed var(--brand-100); background: linear-gradient(180deg, #fff, var(--brand-50)); }
.progress { display: block; height: 6px; background: #e7e7ea; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

.hello { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 20px; }
.hello h1 { font-size: 1.8rem; }
.eyebrow { color: var(--brand-600); font-weight: 650; font-size: .85rem; margin: 0 0 4px; text-transform: uppercase; letter-spacing: .06em; }
.hello-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Menüdarstellung */
.menu-line { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.menu-line:first-of-type { border-top: 0; padding-top: 0; }
.menu-line.is-mine { background: var(--brand-50); margin: 0 -12px; padding: 12px; border-radius: 10px; border: 0; }
.menu-letter { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--navy); color: #fff; font-weight: 750; font-size: .95rem; }
.menu-letter.sm { width: 24px; height: 24px; border-radius: 7px; font-size: .78rem; vertical-align: middle; }
.menu-letter.lg { width: 48px; height: 48px; border-radius: 12px; font-size: 1.4rem; }
.menu-count { text-align: right; flex: none; }
.menu-count strong { display: block; font-size: 1.15rem; }
.menu-count small { color: var(--muted); }
.diets { display: inline-flex; gap: 4px; flex-wrap: wrap; vertical-align: 1px; }
.diet { display: inline-block; font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; text-transform: uppercase; letter-spacing: .03em; vertical-align: 1px; }
.diet-veg { background: #e3f6e8; color: #17703a; }
.diet-fish { background: #e3f0fc; color: #1e5a96; }
.diet-beef { background: #fbe7e2; color: #9a3412; }
.diet-poultry { background: #fdf2d6; color: #8a5a00; }
.diet-pork { background: #fde7ef; color: #9d174d; }
.diet-other { background: #efeff1; color: var(--text-2); }
.allerg { display: inline-block; font-size: .72em; color: var(--muted); background: #f1f1f3; border-radius: 4px; padding: 0 4px; margin-left: 2px; vertical-align: 1px; white-space: nowrap; }
.zus { font-size: .68em; color: var(--muted); margin-left: 1px; }
.price { font-weight: 650; color: var(--text-2); font-size: .88rem; white-space: nowrap; }
.legend { margin-top: 18px; font-size: .82rem; line-height: 2; }
.menu-legend { margin-bottom: 16px; }

.timeline { list-style: none; margin: 0 0 12px; padding: 0; }
.timeline li { display: flex; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.tl-date { flex: none; width: 52px; display: flex; flex-direction: column; color: var(--muted); font-size: .82rem; line-height: 1.25; }
.tl-date strong { color: var(--text); font-size: .95rem; }
.tl-body { font-size: .9rem; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 99px; background: var(--warn-bg); color: var(--warn-fg); font-size: .82rem; font-weight: 600; border: 1px solid transparent; font-family: inherit; cursor: pointer; text-decoration: none !important; }
button.chip { background: var(--surface-2); color: var(--text); border-color: var(--line); font-size: .95rem; padding: 8px 16px; }
button.chip:hover { border-color: var(--brand); color: var(--brand-700); background: var(--brand-50); }

/* Toolbar / Periodennavigation */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.toolbar-info { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .88rem; }
.periodnav { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; box-shadow: var(--shadow); }
.periodnav strong { display: flex; flex-direction: column; align-items: center; padding: 0 10px; min-width: 150px; text-align: center; font-size: .98rem; line-height: 1.2; }
.periodnav strong small { color: var(--muted); font-weight: 500; font-size: .76rem; }
.periodnav input[type=date] { border: 0; font: inherit; font-weight: 650; background: transparent; padding: 6px; color: var(--text); }
.periodnav .day-label { min-width: 0; padding: 0 6px 0 0; color: var(--muted); font-weight: 600; font-size: .88rem; }
.link-today { font-size: .82rem; font-weight: 650; padding: 0 10px 0 4px; }
.pill-balance { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--brand-50); color: var(--brand-700); font-size: .9rem; border: 1px solid var(--brand-100); }
.pill-balance.is-low { background: var(--warn-bg); color: var(--warn-fg); border-color: #f6d79f; }

/* Buchung */
.booking { display: grid; gap: 14px; }
.day-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: 16px 18px 18px; margin: 0; min-width: 0; }
.day-card.is-locked { background: var(--surface-2); }
.day-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; padding: 0; margin-bottom: 12px; float: left; }
.day-head + * { clear: both; }
.day-date { display: flex; align-items: baseline; gap: 8px; margin-right: auto; }
.day-date .dow { font-weight: 750; font-size: 1.05rem; }
.day-date .date { color: var(--muted); font-size: .9rem; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; clear: both; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface); transition: border-color .15s, background .15s, box-shadow .15s; }
.choice:hover .choice-body { border-color: #e2a2a5; }
.choice input:checked + .choice-body { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(166, 0, 6, .14); }
.choice input:focus-visible + .choice-body { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.choice input:disabled + .choice-body { cursor: default; opacity: .75; }
.choice input:disabled:checked + .choice-body { opacity: 1; }
.choice-top { display: flex; align-items: center; gap: 10px; }
.choice-title { font-weight: 700; margin-right: auto; }
.choice-text { font-size: .9rem; color: var(--text-2); }
.tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: transparent; flex: none; }
.tick .i { width: 14px; height: 14px; stroke-width: 3; }
.choice input:checked + .choice-body .tick { background: var(--brand); border-color: var(--brand); color: #fff; }
.choice-none .choice-body { justify-content: center; background: var(--surface-2); }
.choice-none .menu-letter { background: #c9c9cf; }
.savebar { position: sticky; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 14px 12px 18px; background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 5; }
.savebar-hint { font-size: .84rem; flex: 1 1 260px; }
@media (max-width: 1023px) { .role-2 .savebar { bottom: 84px; } }
@media (max-width: 560px) { .savebar .btn { width: 100%; } .choices { grid-template-columns: 1fr; } }

/* Tabellen */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafafa; }
.table tfoot td { background: var(--surface-2); font-weight: 700; border-top: 2px solid var(--line-2); border-bottom: 0; }
.table-dense td { padding: 7px 12px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .center { text-align: center; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * { display: inline-flex; vertical-align: middle; }
.table tr.is-muted td { color: var(--muted); }
.table tr.is-neg td { background: #fff5f5; }
.table tr.group-row td { background: var(--navy); color: #fff; font-weight: 700; padding: 4px 14px; font-size: .8rem; letter-spacing: .08em; }
.table tr.row-ok td:first-child { box-shadow: inset 4px 0 0 var(--ok); }
.table tr.row-miss td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.table tr.group-start td { border-top: 2px solid var(--line-2); }
.table tr.is-editing td { background: var(--brand-50); }
.menu-cell { font-size: .88rem; color: var(--text-2); max-width: 520px; }
.mark { width: 34px; height: 30px; border-radius: 8px; border: 0; background: var(--brand); color: #fff; font-weight: 800; cursor: pointer; font-family: inherit; }
.mark:hover { background: var(--bad); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #dedee2; }
.dot-ok { background: var(--ok); }
.count-cell { display: flex; flex-direction: column; line-height: 1.2; margin-bottom: 4px; }
.big-num { font-size: 1.35rem; font-weight: 780; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 280px; }
form.inline { display: inline; margin: 0; }

@media (max-width: 760px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tfoot, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .table-cards tbody tr:last-child { border-bottom: 0; }
  .table-cards td { border: 0; padding: 3px 0; display: flex; gap: 12px; justify-content: space-between; align-items: center; text-align: right; }
  .table-cards td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .78rem; font-weight: 600; text-align: left; flex: none; }
  .table-cards td.menu-cell { display: block; text-align: left; }
  .table-cards td.menu-cell::before { display: block; margin-bottom: 2px; }
  .table-cards td.actions { justify-content: flex-end; padding-top: 8px; }
  .table-cards td.num, .table-cards td.center { text-align: right; }
  .table-cards td.hide-mobile { display: none; }
  .table-cards tr.group-row { padding: 0; }
  .table-cards tr.group-row td { padding: 4px 14px; }
  .table-cards tfoot tr { background: var(--surface-2); }
  .table-cards tfoot td { background: transparent; border: 0; }
  .table-cards tr.row-ok { box-shadow: inset 4px 0 0 var(--ok); } .table-cards tr.row-miss { box-shadow: inset 4px 0 0 var(--bad); }
  .table-cards tr.row-ok td:first-child, .table-cards tr.row-miss td:first-child { box-shadow: none; }
}

/* Formulare */
.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset > legend { font-weight: 700; font-size: 1rem; margin-bottom: 12px; padding: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span:first-child { font-size: .84rem; font-weight: 650; color: var(--text-2); }
.help { color: var(--muted); font-size: .8rem; }
input[type=text], input[type=password], input[type=search], input[type=number], input[type=date], input[type=email], input[type=file], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; min-height: 42px; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(166, 0, 6, .16); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d7c74' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 36px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.input-icon { position: relative; display: block; }
.input-icon .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; }
.input-icon input { padding-left: 38px; }
.input-action { display: flex; gap: 8px; }
.input-action input { flex: 1; }
.input-suffix { position: relative; display: block; }
.input-suffix input { padding-right: 34px; }
.input-suffix > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.input-suffix.big input { font-size: 1.6rem; font-weight: 700; min-height: 60px; padding-right: 44px; }
.input-suffix.big > span { font-size: 1.3rem; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; display: grid; place-items: center; }
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }
.pw-meter { display: block; height: 5px; border-radius: 99px; background: #e7e7ea; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--bad); transition: width .2s, background .2s; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; margin-bottom: 16px; padding: 14px 16px; }
.filters .field { min-width: 160px; }
.filters .field.grow { flex: 1 1 260px; }
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.segmented a { padding: 6px 12px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: .86rem; text-decoration: none; }
.segmented a.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.inline-form .field.sm { width: 110px; }
.inline-form .field.grow { flex: 1 1 220px; }

/* Dropdown-Menü */
.menu-dd { position: relative; display: inline-block; }
.menu-dd .dd { position: absolute; right: 0; top: calc(100% + 4px); min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 20; text-align: left; }
.menu-dd.open .dd { display: block; }
.dd a, .dd button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; color: var(--text); font: inherit; font-size: .9rem; border: 0; background: none; cursor: pointer; text-decoration: none; }
.dd a:hover, .dd button:hover { background: var(--surface-2); }
.dd .i { width: 17px; height: 17px; color: var(--muted); }
.dd form { margin: 0; }
.dd .danger, .dd .danger .i { color: var(--bad); }

.toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; font: inherit; font-size: .84rem; color: var(--muted); padding: 2px; }
.toggle span { position: relative; width: 36px; height: 20px; border-radius: 99px; background: #d1d1d6; transition: background .2s; flex: none; }
.toggle span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.toggle.on { color: var(--ok-fg); font-weight: 600; }
.toggle.on span { background: var(--ok); }
.toggle.on span::after { transform: translateX(16px); }

.daylist { display: grid; gap: 6px; margin-bottom: 14px; max-height: 520px; overflow: auto; padding-right: 4px; }
.dayrow { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.dayrow:hover { background: var(--surface-2); }
.dayrow input { width: 18px; height: 18px; accent-color: var(--warn); }
.dayrow.is-disabled { opacity: .6; cursor: default; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.plain-list li:first-child { border-top: 0; }

.credential-slip { border: 2px dashed var(--line-2); }
.slip-head { display: flex; gap: 12px; margin-bottom: 16px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 16px 0; align-items: center; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }

.photo-card { display: grid; gap: 18px; }
.photo-preview img, .photo-preview .avatar { width: 180px; height: 220px; border-radius: 14px; object-fit: cover; }
.photo-preview .avatar { width: 180px; height: 180px; border-radius: 50%; }

.payee { display: flex; gap: 16px; align-items: center; padding: 16px; margin: 16px 0; background: var(--brand-50); border-radius: 14px; border: 1px solid var(--brand-100); }
.payee > div { display: flex; flex-direction: column; gap: 2px; }
.payee-name { font-size: 1.3rem; }
.payee-balance { margin-top: 4px; }
.payee img.avatar { width: 72px; height: 88px; border-radius: 12px; }
.quick-amounts { display: flex; gap: 8px; flex-wrap: wrap; }
.pick-list { list-style: none; margin: 14px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pick-list a { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; color: var(--text); text-decoration: none; border-top: 1px solid var(--line); }
.pick-list li:first-child a { border-top: 0; }
.pick-list a:hover { background: var(--surface-2); }

/* Speiseplan */
.plan { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.plan-date { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--brand-100); }
.plan-date small { color: var(--muted); font-weight: 500; font-size: .85rem; }

/* Menü-Editor */
.menu-editor { display: grid; gap: 14px; }
.editor-day.is-locked { opacity: .65; }
.editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; clear: both; }
@media (max-width: 760px) { .editor-grid { grid-template-columns: 1fr; } }
.editor-menu { display: grid; grid-template-columns: 1fr 110px; gap: 10px; align-items: start; }
.editor-menu { grid-template-areas: 'text price' 'tools tools'; }
.editor-menu > .field:first-child { grid-area: text; }
.editor-menu > .field-price { grid-area: price; }
.editor-menu > .mark-tools { grid-area: tools; }
.editor-menu .field > span:first-child { display: flex; align-items: center; gap: 6px; }
.editor-more { margin-top: 12px; }
.editor-more summary { cursor: pointer; color: var(--brand-600); font-weight: 600; font-size: .88rem; margin-bottom: 10px; }

/* Kennzeichnung */
.marks { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: .82rem; }
.marks-none { color: var(--muted); font-size: .8rem; margin-top: 6px; }
.marks-label { font-weight: 650; color: var(--text-2); margin-right: 2px; }
.mark-chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 1px 8px; margin: 2px 2px 0 0; border-radius: 99px; background: var(--brand-50); color: var(--brand-700); font-size: .78rem; border: 1px solid var(--brand-100); }
.mark-chip b { font-weight: 800; }
.mark-chip.zus-chip { background: #f1f1f3; color: var(--text-2); border-color: var(--line); }
.mark-chip.m { background: #e3f6e8; color: #17703a; border-color: #c9ebd3; }
.mark-chip.bad { background: var(--warn-bg); color: var(--warn-fg); border-color: #f6d79f; font-weight: 600; }
.mark-tools { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: -2px; }
.mark-preview { flex: 1 1 260px; min-width: 0; }
.day-marks { margin-top: 10px; font-size: .86rem; }
.day-marks summary { cursor: pointer; color: var(--brand-600); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.day-marks-body { display: grid; gap: 8px; margin-top: 8px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; }
.day-marks-row { display: flex; gap: 10px; align-items: flex-start; }
.day-marks-row .marks { margin-top: 0; }
.kz-code { display: inline-grid; place-items: center; min-width: 30px; padding: 2px 6px; border-radius: 7px; background: var(--brand); color: #fff; font-weight: 800; font-size: .8rem; font-family: ui-monospace, monospace; margin-right: 8px; }
.kz-code.sub { background: var(--brand-100); color: var(--brand-700); }
.kz-code.zus { background: var(--navy); }
.legend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.legend-list li { display: flex; align-items: center; font-size: .92rem; }
.legend-list li.sub { padding-left: 22px; font-size: .86rem; color: var(--text-2); }
.mark-dialog { border: 0; border-radius: 18px; padding: 0; width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-lg); }
.mark-dialog::backdrop { background: rgba(10, 10, 12, .5); backdrop-filter: blur(2px); }
.mark-dialog-inner { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.mark-dialog header, .mark-dialog footer { display: flex; align-items: center; gap: 10px; padding: 14px 18px; }
.mark-dialog header { justify-content: space-between; border-bottom: 1px solid var(--line); }
.mark-dialog-inner > p { padding: 10px 18px 0; margin: 0; }
.mark-dialog footer { border-top: 1px solid var(--line); justify-content: flex-end; flex-wrap: wrap; }
.mark-result { margin-right: auto; font-family: ui-monospace, monospace; font-weight: 700; color: var(--brand-700); word-break: break-all; }
.mark-groups { overflow-y: auto; padding: 8px 18px 14px; display: grid; gap: 14px; }
.mark-groups legend { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.mark-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.mark-opt { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; font-size: .86rem; }
.mark-opt.sub { margin-left: 14px; border-style: dashed; }
.mark-opt:hover { background: var(--surface-2); }
.mark-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.mark-opt input { accent-color: var(--brand); width: 16px; height: 16px; flex: none; }

/* Barcodes */
.barcode-sheet { padding: 20px; }
.barcodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.barcode-card { border: 1px dashed #bbb; border-radius: 8px; padding: 12px; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 6px; break-inside: avoid; }
.barcode-card svg { max-width: 100%; height: auto; }
.bc-name { font-weight: 700; font-size: .9rem; text-align: center; }
.bc-meta { display: flex; justify-content: space-between; width: 100%; font-size: .8rem; color: #444; font-family: ui-monospace, monospace; }

/* ---------- Login */
.is-bare { background: var(--bg); }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero { position: relative; background: radial-gradient(900px 520px at -10% -10%, rgba(166, 0, 6, .55) 0%, transparent 60%), radial-gradient(800px 600px at 120% 120%, rgba(166, 0, 6, .35) 0%, transparent 50%), repeating-linear-gradient(-66deg, transparent 0 34px, rgba(255, 255, 255, .035) 34px 46px, transparent 46px 58px, rgba(255, 255, 255, .05) 58px 61px), linear-gradient(160deg, #26262a 0%, #141416 100%); color: #fff; display: flex; align-items: center; padding: 48px; overflow: hidden; }
.login-hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 22px 22px; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; max-width: 460px; margin: 0 auto; }
.hero-inner h2 { font-size: 2.4rem; margin: 22px 0 12px; letter-spacing: -.02em; }
.hero-inner p { color: #d4d4d8; font-size: 1.05rem; }
.hero-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.hero-points li { display: flex; gap: 12px; align-items: center; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); padding: 12px 14px; border-radius: 12px; }
.hero-points .i { color: #ff6b70; width: 22px; height: 22px; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(20px, 6vw, 80px); background: var(--surface); }
.login-card > * { width: 100%; max-width: 420px; margin-left: auto; margin-right: auto; }
.login-brand { display: flex; }
.login-brand small { color: var(--muted); padding-left: 2px; }
.login-card h1 { font-size: 1.9rem; margin-bottom: 8px; }
.login-card .form { margin: 22px auto 18px; }
.hint { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: .85rem; }
.hint .i { margin-top: 2px; }
.login-foot { display: flex; gap: 16px; margin-top: 36px; font-size: .82rem; }
.login-foot a { color: var(--muted); }
.bare > .alert { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 10; width: min(560px, calc(100% - 32px)); box-shadow: var(--shadow-lg); }
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-card { padding: 32px 20px; justify-content: flex-start; padding-top: 12vh; }
}

/* ---------- Kiosk / Terminal */
.is-kiosk { background: #151517; }
.is-kiosk:has(.barcode-sheet) { background: #f2f2f2; }
.kiosk > .alert { margin: 12px; }
.terminal { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto auto; gap: 14px; padding: 16px clamp(12px, 2.5vw, 32px) 20px; color: #e8f0f6; max-width: 1400px; margin: 0 auto; }
.term-head { display: flex; align-items: center; gap: 16px; }
.term-back { display: inline-flex; align-items: center; gap: 6px; color: #a1a1aa; font-weight: 600; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .12); text-decoration: none !important; }
.term-back:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.term-title { display: flex; flex-direction: column; line-height: 1.2; margin-right: auto; }
.term-title strong { font-size: 1.4rem; }
.term-title span { color: #a1a1aa; font-size: .9rem; }
.term-count { font-size: 2rem; font-weight: 800; text-align: right; line-height: 1; font-variant-numeric: tabular-nums; }
.term-count small { display: block; font-size: .78rem; color: #a1a1aa; font-weight: 600; margin-top: 4px; }
.term-menus { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 10px; }
.term-menu { display: flex; gap: 14px; align-items: center; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; padding: 12px 14px; }
.term-menu .menu-letter { background: var(--brand); }
.term-menu-text { flex: 1; min-width: 0; font-size: .92rem; color: #d4d4d8; }
.term-menu-text .allerg { background: rgba(255, 255, 255, .08); color: #a1a1aa; }
.term-menu-count { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.term-main { display: flex; }
.term-hist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.scan-card { flex: 1; display: flex; align-items: center; gap: 18px; padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, .06); border: 2px solid rgba(255, 255, 255, .1); min-width: 0; }
.scan-card .scan-photo { width: 56px; height: 68px; border-radius: 10px; object-fit: cover; flex: none; background: rgba(255, 255, 255, .1); display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; color: #fff; }
.scan-body { flex: 1; min-width: 0; }
.scan-name { font-weight: 750; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scan-meta { color: #a1a1aa; font-size: .82rem; }
.scan-status { font-weight: 700; font-size: .9rem; margin-top: 2px; }
.scan-menu { text-align: center; flex: none; }
.scan-menu small { display: block; font-size: .75rem; color: #a1a1aa; text-transform: uppercase; letter-spacing: .08em; }
.scan-menu strong { font-size: 1.8rem; font-weight: 850; line-height: 1; }
.scan-card.is-ok { border-color: rgba(34, 197, 94, .5); } .scan-card.is-ok .scan-status { color: #4ade80; }
.scan-card.is-warn { border-color: rgba(245, 159, 0, .55); } .scan-card.is-warn .scan-status { color: #fbbf24; }
.scan-card.is-bad { border-color: rgba(239, 68, 68, .55); } .scan-card.is-bad .scan-status { color: #f87171; }
.scan-card.is-muted .scan-status { color: #cbd5e1; }
.scan-card.is-main { padding: clamp(18px, 3vw, 36px); gap: clamp(18px, 3vw, 40px); border-width: 3px; min-height: 280px; }
.scan-card.is-main .scan-photo { width: clamp(110px, 14vw, 180px); height: clamp(134px, 17vw, 220px); border-radius: 16px; font-size: 4rem; }
.scan-card.is-main .scan-name { font-size: clamp(1.6rem, 3.6vw, 3rem); white-space: normal; }
.scan-card.is-main .scan-meta { font-size: 1.05rem; margin-top: 4px; }
.scan-card.is-main .scan-status { font-size: clamp(1.3rem, 2.4vw, 2rem); margin-top: 12px; }
.scan-card.is-main .scan-menu strong { font-size: clamp(4rem, 11vw, 9rem); }
.scan-card.is-main.is-ok { background: linear-gradient(135deg, rgba(22, 163, 74, .32), rgba(22, 163, 74, .12)); }
.scan-card.is-main.is-warn { background: linear-gradient(135deg, rgba(245, 159, 0, .3), rgba(245, 159, 0, .1)); }
.scan-card.is-main.is-bad { background: linear-gradient(135deg, rgba(220, 38, 38, .34), rgba(220, 38, 38, .12)); }
.scan-card.is-idle { justify-content: center; color: #a1a1aa; border-style: dashed; }
.scan-idle { display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 1.2rem; }
.scan-idle p { margin: 0; }
.scan-card.flash { animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(.97); opacity: .4; } 100% { transform: none; opacity: 1; } }
.term-input { display: flex; gap: 10px; align-items: center; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; padding: 10px; }
.term-input label { display: flex; align-items: center; gap: 8px; color: #a1a1aa; font-weight: 600; padding: 0 8px; white-space: nowrap; }
.term-input input { flex: 1; min-width: 0; font-size: 1.4rem; font-weight: 700; min-height: 54px; background: #fff; letter-spacing: .05em; }
@media (max-width: 760px) {
  .term-hist { grid-template-columns: 1fr; }
  .term-hist .scan-card:nth-child(n+2) { display: none; }
  .scan-card.is-main { flex-wrap: wrap; justify-content: center; text-align: center; }
  .term-input label { display: none; }
  .term-count { font-size: 1.4rem; }
  .term-head { flex-wrap: wrap; gap: 10px; }
  .term-menu-text { font-size: .8rem; }
  .term-input input { font-size: 1.05rem; }
}

/* ---------- Druck */
@media print {
  body { background: #fff; font-size: 11pt; }
  .sidebar, .topbar, .tabbar, .scrim, .page-actions, .toolbar .icon-btn, .link-today, .no-print, .filters, .savebar, .footer, .btn, .alert, .menu-dd { display: none !important; }
  .has-nav .main { margin: 0; padding: 0; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .periodnav { border: 0; box-shadow: none; }
  .table th, .table td { padding: 4px 6px; }
  .table thead { display: table-header-group !important; }
  .table-cards tr { display: table-row !important; } .table-cards td { display: table-cell !important; text-align: left; } .table-cards td::before { display: none !important; }
  .table-cards thead { display: table-header-group !important; } .table-cards tbody { display: table-row-group !important; } .table-cards tfoot { display: table-footer-group !important; }
  .table-cards { display: table !important; }
  .table-cards td.hide-mobile { display: table-cell !important; }
  .grid { display: block; } .grid > * { margin-bottom: 12px; }
  .stat-balance { color: #000; background: #fff; border: 1px solid #000; }
  .is-kiosk { background: #fff; }
  .barcode-sheet { padding: 0; }
  .barcodes { grid-template-columns: repeat(3, 1fr); gap: 4mm; }
  .credential-slip { border: 1px dashed #000; }
}
