/* SmartRedange – Design-System. Mobile-first. Hell/Dunkel über Tokens. */
:root {
  --bg: #f2f5f9; --surface: #ffffff; --surface-2: #eaf0f6; --surface-3: #dfe8f1;
  --text: #121d28; --muted: #556677; --border: #d6dfe9;
  --primary: #0b5cab; --primary-hover: #094a8b; --on-primary: #ffffff; --primary-soft: #e1eefb; --primary-text: #0b5cab;
  --accent: #e0354a;
  --danger: #b42318; --danger-soft: #fdeceb; --success: #146c43; --success-soft: #e2f5ea; --warn: #8f5200; --warn-soft: #fff1d9; --info-soft: #e1eefb;
  --st-open: #b45309; --st-open-bg: #fff0dc; --st-read: #0b5cab; --st-read-bg: #e1eefb; --st-in_progress: #6d3fc0; --st-in_progress-bg: #efe8fb;
  --st-waiting: #8f5200; --st-waiting-bg: #fdf3c8; --st-closed: #146c43; --st-closed-bg: #e2f5ea;
  --shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 4px 16px rgba(16, 32, 48, .06);
  --shadow-lg: 0 12px 40px rgba(16, 32, 48, .22);
  --radius: 16px; --radius-sm: 10px; --focus: 0 0 0 3px rgba(11, 92, 171, .45);
  --topbar-h: 60px; --bottom-h: 68px; --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="dark"] { color-scheme: dark; --bg: #0c1218; --surface: #141d26; --surface-2: #1b2733; --surface-3: #243342; --text: #e9eff5; --muted: #a2b2c2; --border: #283644;
  --primary: #5aaaf2; --primary-hover: #7bbcf6; --on-primary: #05121f; --primary-soft: #16304a; --primary-text: #8cc6fa;
  --danger: #ff8b80; --danger-soft: #3a1d1b; --success: #5fd49a; --success-soft: #163626; --warn: #f2b45a; --warn-soft: #3b2b10; --info-soft: #16304a;
  --st-open: #ffb870; --st-open-bg: #3b2812; --st-read: #8cc6fa; --st-read-bg: #16304a; --st-in_progress: #c7aaff; --st-in_progress-bg: #2c2147;
  --st-waiting: #f4d56d; --st-waiting-bg: #38300f; --st-closed: #6fdca5; --st-closed-bg: #163626;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3); --shadow-lg: 0 12px 40px rgba(0, 0, 0, .6); --focus: 0 0 0 3px rgba(90, 170, 242, .6); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; --bg: #0c1218; --surface: #141d26; --surface-2: #1b2733; --surface-3: #243342; --text: #e9eff5; --muted: #a2b2c2; --border: #283644;
  --primary: #5aaaf2; --primary-hover: #7bbcf6; --on-primary: #05121f; --primary-soft: #16304a; --primary-text: #8cc6fa;
  --danger: #ff8b80; --danger-soft: #3a1d1b; --success: #5fd49a; --success-soft: #163626; --warn: #f2b45a; --warn-soft: #3b2b10; --info-soft: #16304a;
  --st-open: #ffb870; --st-open-bg: #3b2812; --st-read: #8cc6fa; --st-read-bg: #16304a; --st-in_progress: #c7aaff; --st-in_progress-bg: #2c2147;
  --st-waiting: #f4d56d; --st-waiting-bg: #38300f; --st-closed: #6fdca5; --st-closed-bg: #163626;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3); --shadow-lg: 0 12px 40px rgba(0, 0, 0, .6); --focus: 0 0 0 3px rgba(90, 170, 242, .6); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
body.modal-open { overflow: hidden; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
hr { border: 0; border-top: 1px solid var(--border); width: 100%; margin: 4px 0; }
blockquote { margin: 6px 0 0; padding: 6px 12px; border-left: 3px solid var(--border); color: var(--muted); white-space: pre-wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 10px; z-index: 300; }
.skip-link:focus { top: 8px; }
.icon { display: inline-flex; width: 1.25em; height: 1.25em; flex: none; }
.icon svg { width: 100%; height: 100%; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .strong { font-weight: 650; } .center { text-align: center; } .pad { padding: 20px; } .mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.grow { flex: 1; min-width: 0; } .tight { gap: 6px !important; }
.stack { display: flex; flex-direction: column; gap: 14px; } .stack-sm { display: flex; flex-direction: column; gap: 8px; } .stack-lg { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap, .wrap { flex-wrap: wrap; } .between { justify-content: space-between; }
.inline { display: inline-flex; align-items: center; gap: 6px; }
.h-sm { font-size: 1.1rem; display: flex; align-items: center; gap: 8px; } .h-xs { font-size: .95rem; margin-top: 4px; }
.fade-in { animation: fade .25s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001s !important; transition-duration: .001s !important; scroll-behavior: auto !important; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; background: var(--surface-2); font-weight: 600; text-decoration: none !important; transition: transform .1s, background .15s, box-shadow .15s; position: relative; color: var(--text); }
.btn:hover { background: var(--surface-3); } .btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 4px 14px rgba(11, 92, 171, .28); } .btn-primary:hover { background: var(--primary-hover); }
.btn-soft { background: var(--primary-soft); color: var(--primary-text); } .btn-soft:hover { background: var(--surface-3); }
.btn-ghost { background: transparent; border-color: var(--border); } .btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; } :root[data-theme="dark"] .btn-danger { color: #1a0402; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-success { background: var(--success); color: #fff; } :root[data-theme="dark"] .btn-success { color: #04180d; }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: .9rem; border-radius: 10px; } .btn-lg { min-height: 52px; font-size: 1.05rem; } .btn-xl { min-height: 64px; font-size: 1.15rem; border-radius: 16px; }
.btn-block { width: 100%; } .btn small { display: block; font-weight: 400; opacity: .85; }
.btn.busy::after { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 44px; min-height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--text); position: relative; text-decoration: none !important; }
.icon-btn:hover { background: var(--surface-2); }
.lang-btn span:last-child { font-size: .75rem; font-weight: 700; }
.link { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 650; font-size: .92rem; padding: 0; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
input[readonly] { background: var(--surface-2); }
.hint { color: var(--muted); font-size: .85rem; display: flex; gap: 6px; align-items: flex-start; } .hint .icon { margin-top: 2px; }
.privacy-hint { background: var(--info-soft); padding: 8px 10px; border-radius: 10px; margin-top: 8px; color: var(--text); }
.grid-form { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .grid-form { grid-template-columns: 1fr 1fr; } }
.search-box { position: relative; flex: 1; min-width: 0; } .search-box .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box input { padding-left: 42px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; } .seg-item { flex: 1 1 110px; position: relative; }
.seg-item input { position: absolute; opacity: 0; inset: 0; }
.seg-item label { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); font-weight: 600; cursor: pointer; transition: all .15s; }
.seg-item input:checked + label { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); box-shadow: inset 0 0 0 1px var(--primary); }
.seg-item input:focus-visible + label { box-shadow: var(--focus); }
.seg-urgent input:checked + label { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
.cat-item { position: relative; } .cat-item input { position: absolute; opacity: 0; inset: 0; }
.cat-item label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; min-height: 82px; padding: 10px 6px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); font-size: .85rem; font-weight: 600; cursor: pointer; transition: all .15s; }
.cat-item label .icon { width: 26px; height: 26px; color: var(--primary-text); }
.cat-item input:checked + label { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.cat-item input:focus-visible + label { box-shadow: var(--focus); }
.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { flex: none; width: 48px; height: 28px; border-radius: 99px; background: var(--surface-3); border: 1.5px solid var(--border); position: relative; transition: background .2s; margin-top: 2px; }
.switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .2s; }
.switch input:checked + .switch-ui { background: var(--primary); border-color: var(--primary); } .switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-ui { box-shadow: var(--focus); }
.switch-text { display: flex; flex-direction: column; font-weight: 500; } .switch-text small { font-weight: 400; }

/* ---------- Karten, Badges ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-grid { display: grid; gap: 12px; grid-template-columns: 1fr; } @media (min-width: 700px) { .card-grid { grid-template-columns: repeat(2, 1fr); } } @media (min-width: 1280px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 8px; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--surface-2); color: var(--text); white-space: nowrap; }
.badge .icon { width: 14px; height: 14px; }
.st-open { background: var(--st-open-bg); color: var(--st-open); } .st-read { background: var(--st-read-bg); color: var(--st-read); } .st-in_progress { background: var(--st-in_progress-bg); color: var(--st-in_progress); }
.st-waiting { background: var(--st-waiting-bg); color: var(--st-waiting); } .st-closed { background: var(--st-closed-bg); color: var(--st-closed); }
.pr-low { background: var(--surface-2); color: var(--muted); } .pr-normal { background: var(--surface-2); color: var(--text); } .pr-high { background: var(--st-open-bg); color: var(--st-open); } .pr-urgent { background: var(--danger-soft); color: var(--danger); box-shadow: inset 0 0 0 1.5px var(--danger); }
.chip-role { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--primary-soft); color: var(--primary-text); }
.avatar { --size: 40px; width: var(--size); height: var(--size); border-radius: 50%; flex: none; display: inline-grid; place-items: center; overflow: hidden; background: hsl(var(--hue) 55% 42%); color: #fff; font-weight: 700; font-size: calc(var(--size) * .38); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: .95rem; background: var(--surface-2); }
.alert > .icon { margin-top: 1px; } .alert.compact { padding: 9px 12px; font-size: .88rem; }
.alert-error { background: var(--danger-soft); color: var(--danger); } .alert-ok { background: var(--success-soft); color: var(--success); } .alert-warn { background: var(--warn-soft); color: var(--warn); } .alert-info { background: var(--info-soft); color: var(--text); }
.alert-info > .icon { color: var(--primary-text); }

/* ---------- App-Shell ---------- */
.app { min-height: 100dvh; display: block; }
.sidebar { display: none; }
.content { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 40; height: var(--topbar-h); display: flex; align-items: center; gap: 6px; padding: 0 10px 0 12px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.topbar h1 { font-size: 1.15rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: .02em; text-decoration: none !important; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #0b5cab, #0e8ad6); box-shadow: 0 4px 12px rgba(11, 92, 171, .35); }
.brand-mark .icon { width: 22px; height: 22px; } .brand-mobile { margin-right: 2px; }
#back-btn:not([hidden]) + .brand-mobile { display: none; }
.nav-badge { position: absolute; top: 0; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.nav-badge.static { position: static; margin-left: auto; border: 0; }
.bell .nav-badge { top: 2px; right: 0; }
.nav-ico { position: relative; display: inline-flex; }
.offline-banner { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 10px 14px; background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: .92rem; position: sticky; top: var(--topbar-h); z-index: 39; }
main#main { outline: none; padding-bottom: calc(var(--bottom-h) + 24px + var(--safe-b)); }
.page { max-width: 1180px; margin: 0 auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 18px; } .page.narrow { max-width: 760px; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(var(--bottom-h) + var(--safe-b)); padding: 6px 4px var(--safe-b); display: grid; grid-template-columns: repeat(6, 1fr); align-items: center; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--border); }
.bn-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; color: var(--muted); font-size: .72rem; font-weight: 650; text-decoration: none !important; border-radius: 12px; min-height: 52px; justify-content: center; }
.bn-item .icon { width: 26px; height: 26px; } .bn-item.active { color: var(--primary-text); } .bn-item.active .nav-ico::before { content: ""; position: absolute; inset: -4px -12px; background: var(--primary-soft); border-radius: 14px; z-index: -1; }
.bn-item .nav-ico { z-index: 0; }
.bn-item.fab .nav-ico { background: var(--primary); color: var(--on-primary); width: 54px; height: 54px; border-radius: 50%; align-items: center; justify-content: center; margin-top: -26px; box-shadow: 0 6px 18px rgba(11, 92, 171, .45); border: 4px solid var(--bg); transition: transform .15s; }
.bn-item.fab:active .nav-ico { transform: scale(.92); } .bn-item.fab.active .nav-ico::before { display: none; } .bn-item.fab { color: var(--text); }
body.chat-open .bottom-nav { display: none; } body.chat-open main#main { padding-bottom: 0; }
.fab-mobile { position: fixed; right: 16px; bottom: calc(var(--bottom-h) + 18px + var(--safe-b)); width: 58px; height: 58px; border-radius: 50%; padding: 0; z-index: 30; display: none; }

@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 272px 1fr; }
  .sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100dvh; padding: 20px 16px; background: var(--surface); border-right: 1px solid var(--border); }
  .bottom-nav, .brand-mobile, #back-btn { display: none !important; } .bn-item { display: none; }
  main#main { padding-bottom: 40px; } body.chat-open main#main { padding-bottom: 0; }
  .side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
  .nav-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; color: var(--text); font-weight: 600; text-decoration: none !important; }
  .nav-item .nav-ico { position: static; }
  .nav-item .nav-badge { top: 50%; right: 12px; transform: translateY(-50%); border-color: var(--surface); }
  .nav-item:hover { background: var(--surface-2); } .nav-item.active { background: var(--primary-soft); color: var(--primary-text); }
  .side-user { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface-2); color: var(--text); text-decoration: none !important; }
  .side-user .who { display: flex; flex-direction: column; min-width: 0; } .side-user small { color: var(--muted); }
  .page { padding: 24px 28px; }
  .topbar { padding: 0 20px; height: 64px; } .topbar h1 { font-size: 1.35rem; }
  .fab-mobile { display: none !important; }
  .offline-banner { top: 64px; }
}
@media (max-width: 899px) { .side-new, .only-desktop, .only-desktop-block { display: none !important; } .fab-mobile { display: none; } }
@media (min-width: 900px) { .only-mobile-block { display: none !important; } }

/* ---------- Skeleton, Laden, Leer ---------- */
.skeleton { height: 110px; background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 40px; color: var(--muted); }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--primary); animation: spin .8s linear infinite; }
.empty { text-align: center; padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); display: grid; place-items: center; margin-bottom: 4px; } .empty-icon .icon { width: 34px; height: 34px; }

/* ---------- Dashboard ---------- */
.hello { position: relative; overflow: hidden; padding: 18px; background: linear-gradient(135deg, var(--primary-soft), var(--surface)); }
.hello-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .18; }
.hello-text { position: relative; display: flex; align-items: center; gap: 14px; } .hello h2 { font-size: 1.4rem; }
.cta { gap: 12px; flex-direction: row; text-align: left; padding: 14px 18px; } .cta small { margin-left: auto; font-size: .8rem; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; } @media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, 1fr); } } @media (min-width: 1100px) { .tiles { grid-template-columns: repeat(5, 1fr); } }
.tile { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ico num" "label label"; gap: 4px 10px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none !important; transition: transform .15s, border-color .15s; }
.tile:hover { transform: translateY(-2px); border-color: var(--primary); }
.tile-ico { grid-area: ico; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); } .tile-num { grid-area: num; font-size: 1.9rem; font-weight: 800; line-height: 1; text-align: right; } .tile-label { grid-area: label; font-size: .85rem; color: var(--muted); font-weight: 600; }
.tile.hot .tile-ico { background: var(--st-open-bg); color: var(--st-open); } .tile.danger { border-color: var(--danger); } .tile.danger .tile-ico { background: var(--danger-soft); color: var(--danger); }
.section { display: flex; flex-direction: column; gap: 10px; } .section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .section-head h2 { font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; } @media (min-width: 700px) { .quick { grid-template-columns: repeat(4, 1fr); } }
.quick-item { display: flex; align-items: center; gap: 10px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 650; text-decoration: none !important; } .quick-item:hover { border-color: var(--primary); } .quick-item .icon { color: var(--primary-text); width: 26px; height: 26px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 36px; gap: 10px; align-items: center; font-size: .9rem; } .bar-label { display: flex; gap: 6px; align-items: center; font-weight: 600; } .bar-track { height: 12px; background: var(--surface-2); border-radius: 99px; overflow: hidden; } .bar-fill { display: block; height: 100%; border-radius: 99px; min-width: 4px; } .bar-fill.st-open { background: var(--st-open); } .bar-fill.st-read { background: var(--st-read); } .bar-fill.st-in_progress { background: var(--st-in_progress); } .bar-fill.st-waiting { background: var(--st-waiting); } .bar-fill.st-closed { background: var(--st-closed); } .bar-n { text-align: right; font-weight: 700; }
@media (max-width: 480px) { .bar-row { grid-template-columns: 1fr 36px; } .bar-track { grid-column: 1 / -1; grid-row: 2; } .bar-n { grid-row: 1; grid-column: 2; } }
.timeline-list { list-style: none; margin: 0; padding: 0; } .timeline-list li + li { border-top: 1px solid var(--border); }
.tl-item { display: flex; gap: 12px; padding: 12px 14px; color: var(--text); text-decoration: none !important; } .tl-item:hover { background: var(--surface-2); }
.tl-ico { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); display: grid; place-items: center; flex: none; } .tl-text { display: flex; flex-direction: column; min-width: 0; } .tl-text small { color: var(--muted); }

/* ---------- Tickets ---------- */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 99px; background: var(--surface); border: 1.5px solid var(--border); font-weight: 600; font-size: .92rem; color: var(--text); text-decoration: none !important; }
.chip[aria-pressed="true"], .chip[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.filters { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; } .filters .grid-form { width: 100%; } @media (min-width: 900px) { .filters .grid-form { grid-template-columns: repeat(4, 1fr); } }
.result-count { margin-top: -6px; }
.ticket-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none !important; transition: transform .15s, box-shadow .15s; min-width: 0; }
.ticket-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ticket-card.prio-urgent { border-left-color: var(--danger); } .ticket-card.prio-high { border-left-color: var(--st-open); } .ticket-card.prio-normal { border-left-color: var(--primary); } .ticket-card.prio-low { border-left-color: var(--muted); }
/* Status-Farben: offen = rot, in Bearbeitung = orange, erledigt = grün (ganze Karte) */
.ticket-card { --tc-bg: var(--surface); background: var(--tc-bg); }
.ticket-card.tstat-open, .ticket-card.tstat-read { --tc-bg: #fde2e0; border-top-color: #f2aaa5; border-right-color: #f2aaa5; border-bottom-color: #f2aaa5; }
.ticket-card.tstat-in_progress, .ticket-card.tstat-waiting { --tc-bg: #ffe8cc; border-top-color: #f5be82; border-right-color: #f5be82; border-bottom-color: #f5be82; }
.ticket-card.tstat-closed { --tc-bg: #d9f3e3; border-top-color: #9ad6b4; border-right-color: #9ad6b4; border-bottom-color: #9ad6b4; }
:root[data-theme="dark"] .ticket-card.tstat-open, :root[data-theme="dark"] .ticket-card.tstat-read { --tc-bg: #3d1f1e; border-top-color: #6b3532; border-right-color: #6b3532; border-bottom-color: #6b3532; }
:root[data-theme="dark"] .ticket-card.tstat-in_progress, :root[data-theme="dark"] .ticket-card.tstat-waiting { --tc-bg: #3d2a14; border-top-color: #6b4a22; border-right-color: #6b4a22; border-bottom-color: #6b4a22; }
:root[data-theme="dark"] .ticket-card.tstat-closed { --tc-bg: #173a29; border-top-color: #2c6b4a; border-right-color: #2c6b4a; border-bottom-color: #2c6b4a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ticket-card.tstat-open, :root:not([data-theme="light"]) .ticket-card.tstat-read { --tc-bg: #3d1f1e; border-top-color: #6b3532; border-right-color: #6b3532; border-bottom-color: #6b3532; }
  :root:not([data-theme="light"]) .ticket-card.tstat-in_progress, :root:not([data-theme="light"]) .ticket-card.tstat-waiting { --tc-bg: #3d2a14; border-top-color: #6b4a22; border-right-color: #6b4a22; border-bottom-color: #6b4a22; }
  :root:not([data-theme="light"]) .ticket-card.tstat-closed { --tc-bg: #173a29; border-top-color: #2c6b4a; border-right-color: #2c6b4a; border-bottom-color: #2c6b4a; }
}
.tc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; } .tc-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tnum { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; font-size: .85rem; color: var(--muted); } .tnum.big { font-size: 1rem; }
.tc-title { font-size: 1.05rem; overflow-wrap: anywhere; }
.tc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: .88rem; } .tc-meta span { display: inline-flex; align-items: center; gap: 5px; } .tc-meta .icon, .tc-date .icon, .tc-assignee .icon { width: 16px; height: 16px; }
.tc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .88rem; } .tc-who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; } .tc-who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tc-date { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); flex: none; }
.tc-assignee { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; padding-top: 8px; border-top: 1px dashed var(--border); } .tc-assignee.none { color: var(--muted); font-weight: 500; } .tc-photos { margin-left: auto; display: inline-flex; gap: 4px; color: var(--muted); align-items: center; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; } .table th { text-align: left; padding: 12px; background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; position: sticky; top: 0; } .table td { padding: 10px 12px; border-top: 1px solid var(--border); vertical-align: middle; } .table tbody tr:hover { background: var(--surface-2); }
.cat-grid + * { margin-top: 0; }
.similar { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; } .similar-head { display: flex; gap: 10px; align-items: flex-start; } .similar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; } .similar li { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: var(--surface); padding: 8px 12px; border-radius: 10px; flex-wrap: wrap; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; } .thumb { position: relative; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); } .thumb img { width: 100%; height: 100%; object-fit: cover; } .thumb-x { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; display: grid; place-items: center; }
.ticket-head { display: flex; flex-direction: column; gap: 12px; border-left: 6px solid var(--primary); } .ticket-head.prio-urgent { border-left-color: var(--danger); } .ticket-head.prio-high { border-left-color: var(--st-open); }
.ticket-title { font-size: 1.4rem; overflow-wrap: anywhere; } .ticket-desc { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.02rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; } .photo { padding: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface-2); aspect-ratio: 4/3; } .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; } .photo:hover img { transform: scale(1.05); }
.facts { display: grid; gap: 12px 20px; grid-template-columns: 1fr; margin: 0; } @media (min-width: 600px) { .facts { grid-template-columns: 1fr 1fr; } } .facts dt { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; display: flex; gap: 6px; align-items: center; margin-bottom: 2px; } .facts dt .icon { width: 15px; height: 15px; } .facts dd { margin: 0; overflow-wrap: anywhere; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; }
.contact-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--surface-2); padding: 10px 12px; border-radius: 10px; font-size: .9rem; }
.resolution { background: var(--success-soft); color: var(--success); padding: 12px 14px; border-radius: 12px; } .resolution strong { display: flex; gap: 6px; align-items: center; } .resolution p { color: var(--text); margin-top: 4px; white-space: pre-wrap; }
.actions .btn { flex: 1 1 auto; } .assign-row { display: flex; gap: 8px; flex-wrap: wrap; } .assign-row select { flex: 1; min-width: 180px; }
.page.ticket-page { max-width: 1180px; }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; } .ticket-layout > * { min-width: 0; }
.ticket-side .facts { grid-template-columns: 1fr; gap: 10px; } .ticket-side .facts > div { padding-bottom: 10px; border-bottom: 1px solid var(--border); } .ticket-side .facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.side-card { padding: 14px 16px; gap: 12px; } .side-card .times .facts > div { border-bottom: 0; padding-bottom: 0; }
.act-group { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--border); } .act-label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; display: flex; gap: 6px; align-items: center; margin: 0; } .act-label .icon { width: 15px; height: 15px; }
.act-card .actions { gap: 8px; } .act-danger .btn-block { width: 100%; justify-content: center; }
.ticket-head { padding: 18px 20px; } .ticket-head .ticket-title { line-height: 1.25; margin-top: 2px; } .ticket-head .ticket-desc { background: var(--surface-2); padding: 12px 14px; border-radius: 12px; line-height: 1.5; }
@media (min-width: 960px) {
  .ticket-layout { grid-template-columns: minmax(0, 1fr) 360px; column-gap: 20px; }
  .ticket-layout > .stack:first-child { grid-column: 1; grid-row: 1; } .ticket-layout > .ticket-side { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: calc(var(--topbar-h, 56px) + 12px); max-height: calc(100dvh - var(--topbar-h, 56px) - 24px); overflow-y: auto; scrollbar-width: thin; padding-right: 2px; } .ticket-layout > .ticket-convo { grid-column: 1; grid-row: 2; }
}
@media (max-width: 599px) { .ticket-head { padding: 14px; } .ticket-head .ticket-title { font-size: 1.25rem; } .actions .btn { flex: 1 1 calc(50% - 8px); justify-content: center; } .assign-row select { min-width: 100%; } .assign-row .btn { flex: 1; justify-content: center; } }
.tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tl-sys { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); padding: 2px 4px; } .sys-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; flex: none; border: 1px dashed var(--border); } .sys-dot .icon { width: 15px; height: 15px; }
.tl-comment { display: flex; gap: 10px; align-items: flex-start; } .tl-comment .bubble { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 4px 16px 16px 16px; padding: 10px 14px; box-shadow: var(--shadow); } .tl-comment.mine .bubble { background: var(--primary-soft); border-color: transparent; }
.bubble-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; } .bubble-head time { margin-left: auto; } .msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.composer { display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.composer-bar { display: flex; align-items: center; gap: 6px; }
.emoji-picker { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; } .emoji-tabs { display: flex; border-bottom: 1px solid var(--border); background: var(--surface-2); } .emoji-tab { flex: 1; min-height: 44px; border: 0; background: transparent; font-size: 1.3rem; } .emoji-tab[aria-selected="true"] { background: var(--surface); box-shadow: inset 0 -3px var(--primary); }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); max-height: 180px; overflow-y: auto; padding: 6px; } .emoji { min-height: 44px; border: 0; background: transparent; font-size: 1.5rem; border-radius: 10px; } .emoji:hover { background: var(--surface-2); }
.fab-mobile-hide { display: none; }

/* ---------- Nachrichten ---------- */
.msg-layout { display: grid; grid-template-columns: 1fr; height: calc(100dvh - var(--topbar-h) - var(--bottom-h) - var(--safe-b) - 4px); max-width: 1180px; margin: 0 auto; }
body.chat-open .msg-layout { height: calc(100dvh - var(--topbar-h)); }
.msg-layout.has-chat .conv-list, .msg-layout:not(.has-chat) .chat { display: none; }
.conv-list, .chat { display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.conv-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 14px 10px; gap: 8px; } .conv-items { overflow-y: auto; flex: 1; }
.conv { display: flex; gap: 12px; align-items: center; padding: 12px 14px; color: var(--text); text-decoration: none !important; border-bottom: 1px solid var(--border); min-height: 72px; } .conv:hover { background: var(--surface-2); } .conv.active { background: var(--primary-soft); }
.conv-text { flex: 1; min-width: 0; } .conv-top, .conv-bottom { display: flex; justify-content: space-between; gap: 8px; align-items: center; } .conv .preview { color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.unread .preview { color: var(--text); font-weight: 700; } .unread-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 800; display: grid; place-items: center; flex: none; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--border); } .chat-who { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); overscroll-behavior: contain; }
.day-sep { text-align: center; margin: 8px 0; } .day-sep span { background: var(--surface-2); color: var(--muted); font-size: .78rem; font-weight: 650; padding: 3px 12px; border-radius: 99px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; } .msg.mine { justify-content: flex-end; } .msg-col { display: flex; flex-direction: column; max-width: min(78%, 520px); } .msg.mine .msg-col { align-items: flex-end; }
.msg-bubble { padding: 9px 14px; border-radius: 18px 18px 18px 4px; background: var(--surface); border: 1px solid var(--border); overflow-wrap: anywhere; } .msg.mine .msg-bubble { background: var(--primary); color: var(--on-primary); border-color: transparent; border-radius: 18px 18px 4px 18px; }
.msg-bubble .msg-text { font-size: 1.02rem; }
.msg-photo { padding: 0; border: 0; background: none; display: block; margin-top: 4px; } .msg-photo img { max-height: 260px; border-radius: 12px; }
.msg-meta { display: flex; align-items: center; gap: 4px; font-size: .75rem; color: var(--muted); padding: 2px 4px; } .msg-menu { border: 0; background: transparent; color: var(--muted); min-width: 32px; min-height: 28px; border-radius: 8px; display: inline-grid; place-items: center; } .msg-menu:hover { background: var(--surface-2); }
.msg-deleted { display: flex; gap: 6px; align-items: center; font-style: italic; opacity: .85; } .is-deleted .msg-bubble { background: transparent; border: 1px dashed var(--border); color: var(--muted); } .msg.mine.is-deleted .msg-bubble { background: transparent; color: var(--muted); }
.pending .msg-bubble { opacity: .7; } .failed .msg-bubble { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); opacity: 1; } .msg-meta.fail { color: var(--danger); flex-wrap: wrap; justify-content: flex-end; font-weight: 600; }
.center-btn { align-self: center; }
.dm-composer { border-top: 1px solid var(--border); padding: 8px 10px calc(8px + var(--safe-b)); background: var(--surface); display: flex; flex-direction: column; gap: 8px; } .dm-row { display: flex; align-items: flex-end; gap: 4px; } .dm-row textarea { min-height: 46px; max-height: 160px; resize: none; overflow-y: auto; border-radius: 22px; padding: 11px 16px; flex: 1; } .send-btn { min-width: 48px; min-height: 48px; padding: 0; border-radius: 50%; flex: none; }
.dm-preview { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.chat-empty { display: grid; place-items: center; flex: 1; }
.people { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; max-height: 50vh; overflow-y: auto; } .person { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; border: 0; background: transparent; text-align: left; min-height: 56px; } .person:hover { background: var(--surface-2); } .person span { display: flex; flex-direction: column; }
@media (min-width: 900px) {
  .msg-layout { grid-template-columns: 340px 1fr; height: calc(100dvh - 64px - 32px); margin: 16px auto; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); width: calc(100% - 56px); }
  body.chat-open .msg-layout { height: calc(100dvh - 64px - 32px); }
  .msg-layout.has-chat .conv-list, .msg-layout:not(.has-chat) .chat { display: flex; } .conv-list { border-right: 1px solid var(--border); } .chat-back { display: none; }
  .chat-empty { background: var(--bg); }
}

/* ---------- Benachrichtigungen / Menü / Kontakte ---------- */
.notif-list { list-style: none; margin: 0; padding: 0; } .notif-list li + li { border-top: 1px solid var(--border); }
.notif { display: flex; gap: 12px; align-items: flex-start; padding: 14px; color: var(--text); text-decoration: none !important; } .notif:hover { background: var(--surface-2); } .notif.unread { background: var(--primary-soft); box-shadow: inset 4px 0 var(--primary); }
.notif-ico { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; flex: none; color: var(--primary-text); } .notif-text { display: flex; flex-direction: column; flex: 1; min-width: 0; } .new-pill { background: var(--primary); color: var(--on-primary); font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; flex: none; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 16px; color: var(--text); font-weight: 600; text-decoration: none !important; border-top: 1px solid var(--border); min-height: 60px; } .menu-item:first-child { border-top: 0; } .menu-item:hover { background: var(--surface-2); } .menu-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-text); display: grid; place-items: center; } .menu-item .chev { margin-left: auto; color: var(--muted); } .menu-item .nav-badge + .chev { margin-left: 8px; }
.profile-card { display: flex; gap: 16px; align-items: center; color: var(--text); text-decoration: none !important; }
.contact { display: flex; flex-direction: column; gap: 12px; } .contact-top { display: flex; gap: 14px; align-items: center; } .contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; } .contact-list li { display: flex; gap: 10px; align-items: center; overflow-wrap: anywhere; } .contact-list a { font-weight: 600; font-size: 1.02rem; }
.person-row { padding: 12px 14px; }
.avatar-edit { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.user-row { display: flex; flex-direction: column; gap: 12px; } .user-row.inactive { opacity: .75; } @media (min-width: 900px) { .user-row { flex-direction: row; align-items: center; } }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; } .plain-list li { padding: 8px 0; border-top: 1px solid var(--border); gap: 8px; } .plain-list li:first-child { border-top: 0; } li.inactive, .card.inactive { opacity: .65; }
.brand-slot { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); } .brand-prev { max-height: 140px; border-radius: 12px; margin-top: 8px; border: 1px solid var(--border); }
.prose h2 { font-size: 1.1rem; margin-bottom: 6px; } .prose p { white-space: pre-line; }

/* ---------- Dialog, Toast ---------- */
.backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(8, 16, 26, .55); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.modal { width: 100%; max-width: 520px; max-height: 92dvh; overflow: auto; background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg); animation: sheet .22s ease; padding-bottom: var(--safe-b); } .modal.wide { max-width: 900px; }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 6px 20px; position: sticky; top: 0; background: var(--surface); z-index: 1; } .modal-head h2 { font-size: 1.15rem; } .modal-body { padding: 8px 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 20px 18px; flex-wrap: wrap; } .modal-actions .btn { flex: 1 1 140px; }
@media (min-width: 640px) { .backdrop { align-items: center; padding: 20px; } .modal { border-radius: 22px; } .modal-actions .btn { flex: 0 0 auto; } }
.modal .btn-block { justify-content: flex-start; padding: 10px 16px; min-height: 56px; flex-wrap: wrap; text-align: left; } .modal .btn-block small { flex-basis: 100%; padding-left: 33px; opacity: .8; }
.lightbox-img { width: 100%; max-height: 78dvh; object-fit: contain; border-radius: 12px; }
#toasts { position: fixed; z-index: 300; left: 12px; right: 12px; bottom: calc(var(--bottom-h) + 16px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; } @media (min-width: 900px) { #toasts { bottom: 24px; align-items: flex-end; right: 24px; left: auto; } }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: center; background: #14202c; color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); max-width: 440px; animation: sheet .25s ease; font-weight: 600; } .toast-error { background: #8a1c12; } .toast.out { opacity: 0; transform: translateY(10px); transition: all .3s; }

/* ---------- Anmeldung ---------- */
body.auth-mode { background: var(--bg); }
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
.auth-hero { position: relative; min-height: 230px; color: #fff; overflow: hidden; display: flex; align-items: flex-end; }
.hero-art, .hero-art img, .hero-art svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } .hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 24, 44, .15), rgba(5, 24, 44, .82)); }
.hero-text { position: relative; padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.brand-big { color: #fff; font-size: 1.7rem; } .brand-big .brand-mark { width: 48px; height: 48px; } .hero-tag { font-size: 1.1rem; opacity: .95; } .hero-place { display: flex; gap: 6px; align-items: center; font-size: .9rem; opacity: .9; } .hero-note { font-size: .75rem; opacity: .75; border-top: 1px solid rgba(255,255,255,.3); padding-top: 6px; margin-top: 4px; }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 16px 28px; gap: 16px; position: relative; margin-top: -24px; }
.auth-tools { align-self: flex-end; display: flex; gap: 4px; position: absolute; top: -14px; right: 12px; } .auth-hero + .auth-main .auth-tools .icon-btn { background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(6px); }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 26px 22px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 16px; } .auth-card h1 { font-size: 1.6rem; }
.auth-foot { font-size: .88rem; }
.public-page { padding: 20px 14px; } .center-btn { align-self: center; }
@media (min-width: 900px) {
  .auth { grid-template-columns: 1.1fr 1fr; } .auth-hero { min-height: 100dvh; } .hero-text { padding: 56px; } .brand-big { font-size: 2.2rem; } .hero-tag { font-size: 1.4rem; }
  .auth-main { margin-top: 0; } .auth-tools { top: 20px; right: 24px; } .auth-hero + .auth-main .auth-tools .icon-btn { background: transparent; color: var(--text); }
}

/* ---------- SmartRedange: Logo ---------- */
.brand-plate { display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 8px 12px; }
.brand-logo { height: 38px; width: auto; max-width: 100%; }
.brand-mark-img { width: 38px; height: 34px; object-fit: contain; }
.sidebar .brand { align-self: flex-start; }
.brand-plate-big { border: 0; border-radius: 18px; padding: 12px 20px; box-shadow: 0 8px 30px rgba(0, 0, 0, .3); }
.brand-plate-big .brand-logo { height: 40px; }
@media (min-width: 900px) { .brand-plate-big .brand-logo { height: 54px; } .brand-plate-big { padding: 16px 26px; } }

/* ---------- Gebäude, Karte, Historie ---------- */
.map { position: relative; z-index: 0; isolation: isolate; height: min(62dvh, 560px); min-height: 320px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.map-small { height: 280px; min-height: 220px; } .map-pick { height: min(52dvh, 440px); min-height: 280px; }
.map-tools { margin-top: 10px; } .map-tools label.row { gap: 8px; } .map-tools input { min-width: 150px; }
.bpin-wrap { background: none; border: 0; }
.bpin { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; pointer-events: auto; cursor: pointer; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .35)); }
.bpin-label { background: #fff; color: #0b2a55; font: 700 12px/1.2 system-ui, sans-serif; padding: 4px 9px; border-radius: 999px; border: 2px solid #0b5cab; white-space: nowrap; max-width: 190px; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.bpin-dot { position: relative; width: 38px; height: 38px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: linear-gradient(135deg, #0b5cab, #00a8d8); display: grid; place-items: center; border: 3px solid #fff; margin-bottom: 4px; }
.bpin-dot > .icon { transform: rotate(45deg); color: #fff; width: 20px; height: 20px; }
.bpin-count { position: absolute; top: -9px; right: -9px; transform: rotate(45deg); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #e0354a; color: #fff; font: 800 11px/20px system-ui, sans-serif; text-align: center; border: 2px solid #fff; }
.leaflet-container { font-family: inherit; }
.bpop { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 190px; color: #121d28; }
.bpop img { width: 100%; height: 110px; object-fit: cover; border-radius: 10px; } .bpop .btn { color: #fff; text-decoration: none; }
.building-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.building-card { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.building-cover { display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.building-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); background: var(--surface-2); } .cover-ph .icon { width: 42px; height: 42px; }
.building-name { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; }
.building-photos { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.bphoto { position: relative; } .bphoto .thumb-x { position: absolute; top: 6px; right: 6px; }
.building-prev { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.building-prev img, .building-prev .cover-ph { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; flex: none; } .building-prev .cover-ph .icon { width: 30px; height: 30px; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { display: flex; flex-direction: column; align-items: center; padding: 10px; border-radius: 12px; background: var(--surface-2); } .stat strong { font-size: 1.5rem; } .stat span { font-size: .8rem; color: var(--muted); }
.repairs { list-style: none; margin: 0; padding: 0 0 0 14px; display: flex; flex-direction: column; gap: 12px; border-left: 3px solid var(--border); }
.repair { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.repair::before { content: ""; position: absolute; left: -23px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--st-open); border: 2px solid var(--surface); }
.repair.st-line-closed::before { background: var(--st-closed); } .repair.st-line-in_progress::before, .repair.st-line-waiting::before { background: var(--st-in_progress); }
.repair.same-cat { box-shadow: inset 3px 0 0 var(--primary); }
.repair-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .repair-title { font-weight: 650; color: var(--text); flex: 1; min-width: 140px; }
.repair-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; } .repair-meta .icon { width: 1em; height: 1em; vertical-align: -2px; }
.repair-res { margin: 4px 0 0; }

.history-filters select { width: auto; min-width: 150px; }

/* Ticket-Detail: aktuelle Bearbeitung, eingeklappter Statusverlauf, interne Kommentare */
.now-working { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; border-radius: 99px; background: var(--st-in_progress-bg); color: var(--st-in_progress); font-weight: 600; font-size: .92rem; align-self: flex-start; }
.now-working.none { background: var(--surface-2); color: var(--muted); font-weight: 500; }
.now-working .icon { width: 16px; height: 16px; }
.hist-box { padding: 10px 14px; } .hist-box[hidden] { display: none; }
.hist-box > summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 6px; list-style: none; } .hist-box > summary::-webkit-details-marker { display: none; }
.hist-box > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .15s; } .hist-box[open] > summary::after { transform: rotate(180deg); }
.hist-box > .tl { margin-top: 12px; }
.tl-comment.internal .bubble { background: var(--warn-soft); border: 1px dashed var(--warn); }
.badge-internal { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.internal-toggle { padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; } .internal-toggle[hidden] { display: none; }
.composer.is-internal { background: var(--warn-soft); border-color: var(--warn); }

[hidden] { display: none !important; }

/* Tabellenansicht: gleiche Statusfarben wie bei den Karten */
.table tbody tr.tstat-open, .table tbody tr.tstat-read { background: #fde2e0; }
.table tbody tr.tstat-in_progress, .table tbody tr.tstat-waiting { background: #ffe8cc; }
.table tbody tr.tstat-closed { background: #d9f3e3; }
.table tbody tr[class*="tstat-"]:hover { filter: brightness(.96); }
.table tbody tr[class*="tstat-"] td { border-top-color: rgba(0, 0, 0, .08); }
:root[data-theme="dark"] .table tbody tr.tstat-open, :root[data-theme="dark"] .table tbody tr.tstat-read { background: #3d1f1e; }
:root[data-theme="dark"] .table tbody tr.tstat-in_progress, :root[data-theme="dark"] .table tbody tr.tstat-waiting { background: #3d2a14; }
:root[data-theme="dark"] .table tbody tr.tstat-closed { background: #173a29; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .table tbody tr.tstat-open, :root:not([data-theme="light"]) .table tbody tr.tstat-read { background: #3d1f1e; }
  :root:not([data-theme="light"]) .table tbody tr.tstat-in_progress, :root:not([data-theme="light"]) .table tbody tr.tstat-waiting { background: #3d2a14; }
  :root:not([data-theme="light"]) .table tbody tr.tstat-closed { background: #173a29; }
}

.inv-list li { padding: 6px 4px; border-bottom: 1px dashed var(--border); } .inv-list li:last-child { border-bottom: 0; }
.chips.tabs .chip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }

.member-role { width: auto; min-width: 11rem; max-width: 55%; }
.check-row.between { justify-content: space-between; gap: .75rem; }

/* ---------- Gruppenkalender ---------- */
.cal-page { max-width: 1320px; }
.cal-c-blue { --ev-fg: #0b5cab; --ev-bg: #e1eefb; --ev-bd: #8cc2f7; }
.cal-c-green { --ev-fg: #146c43; --ev-bg: #dff5e8; --ev-bd: #80d4a8; }
.cal-c-amber { --ev-fg: #944d00; --ev-bg: #fff0d4; --ev-bd: #f5be6b; }
.cal-c-red { --ev-fg: #b42318; --ev-bg: #fde8e6; --ev-bd: #f29b94; }
.cal-c-purple { --ev-fg: #5e35b1; --ev-bg: #ede5fc; --ev-bd: #b89bf5; }
.cal-c-teal { --ev-fg: #0d6e6e; --ev-bg: #dcf4f4; --ev-bd: #79cfcf; }

:root[data-theme="dark"] .cal-c-blue { --ev-fg: #90caf9; --ev-bg: #142e4a; --ev-bd: #2b5b8c; }
:root[data-theme="dark"] .cal-c-green { --ev-fg: #7be3ae; --ev-bg: #143625; --ev-bd: #286b49; }
:root[data-theme="dark"] .cal-c-amber { --ev-fg: #ffca7a; --ev-bg: #3b2810; --ev-bd: #785220; }
:root[data-theme="dark"] .cal-c-red { --ev-fg: #ff9c93; --ev-bg: #3d1c1a; --ev-bd: #7a3733; }
:root[data-theme="dark"] .cal-c-purple { --ev-fg: #d0b8ff; --ev-bg: #2a1f45; --ev-bd: #563f8c; }
:root[data-theme="dark"] .cal-c-teal { --ev-fg: #7de8e8; --ev-bg: #123636; --ev-bd: #266b6b; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cal-c-blue { --ev-fg: #90caf9; --ev-bg: #142e4a; --ev-bd: #2b5b8c; }
  :root:not([data-theme="light"]) .cal-c-green { --ev-fg: #7be3ae; --ev-bg: #143625; --ev-bd: #286b49; }
  :root:not([data-theme="light"]) .cal-c-amber { --ev-fg: #ffca7a; --ev-bg: #3b2810; --ev-bd: #785220; }
  :root:not([data-theme="light"]) .cal-c-red { --ev-fg: #ff9c93; --ev-bg: #3d1c1a; --ev-bd: #7a3733; }
  :root:not([data-theme="light"]) .cal-c-purple { --ev-fg: #d0b8ff; --ev-bg: #2a1f45; --ev-bd: #563f8c; }
  :root:not([data-theme="light"]) .cal-c-teal { --ev-fg: #7de8e8; --ev-bg: #123636; --ev-bd: #266b6b; }
}

.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.cal-period-title { font-size: 1.15rem; margin-left: 4px; }
.cal-view-switch { display: inline-flex; background: var(--surface-2); padding: 3px; border-radius: 12px; border: 1px solid var(--border); }
.cal-view-btn { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; font-weight: 600; font-size: .88rem; color: var(--muted); min-height: 34px; }
.cal-view-btn.active { background: var(--surface); color: var(--primary-text); box-shadow: var(--shadow); }

/* Blitz-Eintrag-Leiste */
.cal-quick-bar { padding: 10px 12px; background: linear-gradient(135deg, var(--primary-soft), var(--surface)); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.cal-quick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cal-quick-date-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .88rem; padding: 6px 10px; border-radius: 10px; background: var(--surface); color: var(--primary-text); border: 1px solid var(--border); white-space: nowrap; }
.cal-quick-group, .cal-quick-time { width: auto !important; min-height: 40px !important; padding: 6px 10px !important; font-size: .9rem; font-weight: 600; flex: 0 0 auto; }
.cal-quick-input { flex: 1 1 200px; min-height: 40px !important; padding: 6px 12px !important; font-size: .95rem; }
.cal-share-active { background: var(--primary-soft) !important; color: var(--primary-text) !important; border-color: var(--primary) !important; }
@media (max-width: 640px) {
  .cal-quick-group, .cal-quick-time { flex: 1 1 calc(50% - 4px); }
  .cal-quick-input { flex: 1 1 100%; }
}

/* Monatsansicht + Tagespanel */
.cal-month-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 980px) {
  .cal-month-split { grid-template-columns: minmax(0, 1.35fr) 410px; }
  .cal-day-panel { position: sticky; top: calc(var(--topbar-h, 64px) + 12px); max-height: calc(100dvh - var(--topbar-h, 64px) - 24px); overflow-y: auto; scrollbar-width: thin; }
}
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.cal-weekday { padding: 8px 4px; text-align: center; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cal-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-day-cell { min-height: 98px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; cursor: pointer; transition: background .12s; min-width: 0; position: relative; background: var(--surface); }
.cal-day-cell:nth-child(7n) { border-right: 0; }
.cal-day-cell:hover { background: var(--surface-2); }
.cal-day-cell.outside { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); color: var(--muted); }
.cal-day-cell.outside .cal-day-num { opacity: .55; }
.cal-day-cell.today { background: color-mix(in srgb, var(--primary-soft) 45%, var(--surface)); }
.cal-day-cell.selected { box-shadow: inset 0 0 0 2.5px var(--primary); z-index: 1; }
.cal-day-top { display: flex; align-items: center; justify-content: space-between; }
.cal-day-num { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .88rem; }
.cal-day-cell.today .cal-day-num { background: var(--primary); color: var(--on-primary); }
.cal-day-add { width: 24px; height: 24px; border-radius: 6px; border: 0; background: var(--surface-2); color: var(--primary-text); display: inline-grid; place-items: center; opacity: 0; transition: opacity .15s; padding: 0; }
.cal-day-add .icon { width: 14px; height: 14px; }
.cal-day-cell:hover .cal-day-add, .cal-day-cell.selected .cal-day-add { opacity: 1; }
.cal-day-pills { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-pill { display: flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 6px; font-size: .75rem; font-weight: 600; background: var(--ev-bg); color: var(--ev-fg); border-left: 3px solid var(--ev-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-pill:hover { filter: brightness(.95); }
.cal-pill-time { font-weight: 750; font-size: .7rem; opacity: .9; flex: none; }
.cal-pill-title { overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.cal-pill-share { width: 12px !important; height: 12px !important; flex: none; }
.cal-pill-more { font-size: .72rem; font-weight: 700; color: var(--muted); padding-left: 4px; }

@media (max-width: 640px) {
  .cal-day-cell { min-height: 68px; padding: 4px 3px; }
  .cal-day-num { width: 22px; height: 22px; font-size: .8rem; }
  .cal-day-add { display: none; }
  .cal-pill { padding: 1px 4px; font-size: .68rem; border-left-width: 2.5px; }
  .cal-pill-time { display: none; }
}

.cal-day-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.cal-day-panel-head h3 { font-size: 1.05rem; }

/* Termin-Karten */
.cal-event-card { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--ev-bg); border: 1px solid var(--ev-bd); border-left: 5px solid var(--ev-fg); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.cal-event-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.cal-ev-time { display: flex; flex-direction: column; align-items: flex-start; min-width: 56px; font-variant-numeric: tabular-nums; color: var(--ev-fg); line-height: 1.2; flex: none; }
.cal-ev-allday { font-size: .76rem; font-weight: 750; padding: 2px 7px; border-radius: 6px; background: var(--surface); color: var(--ev-fg); }
.cal-ev-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cal-ev-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.cal-ev-title { font-size: .98rem; color: var(--text); overflow-wrap: anywhere; }
.cal-ev-loc { display: inline-flex; align-items: center; gap: 3px; }
.cal-ev-loc .icon { width: 14px; height: 14px; }
.cal-ev-desc { white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cal-ev-groups { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.cal-owner-pill { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.cal-shared-pill { background: var(--primary); color: var(--on-primary); }
.cal-ev-actions { flex: none; align-self: center; }
.cal-share-quick { background: var(--surface) !important; border: 1px solid var(--border) !important; }
@media (max-width: 480px) {
  .cal-share-btn-lbl { display: none; }
}

/* Stundenplan (Pro Stunde eintragen) */
.cal-hourly-wrap { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; border-top: 1px solid var(--border); }
.cal-hourly-head { padding: 2px 0; }
.cal-allday-strip { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.cal-allday-lbl { font-size: .76rem; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.cal-allday-items { display: flex; flex-direction: column; gap: 6px; }
.cal-hour-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.cal-hour-row { display: grid; grid-template-columns: 74px minmax(0, 1fr); border-top: 1px solid var(--border); min-height: 46px; }
.cal-hour-row:first-child { border-top: 0; }
.cal-hour-label { border: 0; border-right: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: .82rem; font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 10px; cursor: pointer; }
.cal-hour-label:hover { background: var(--primary-soft); color: var(--primary-text); }
.cal-hour-plus { width: 14px !important; height: 14px !important; opacity: .55; }
.cal-hour-label:hover .cal-hour-plus { opacity: 1; }
.cal-hour-content { padding: 5px 8px; display: flex; flex-direction: column; gap: 5px; justify-content: center; cursor: pointer; transition: background .12s; }
.cal-hour-content:hover { background: color-mix(in srgb, var(--primary-soft) 35%, transparent); }
.cal-hour-empty { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; color: var(--muted); opacity: 0; transition: opacity .12s; }
.cal-hour-empty .icon { width: 14px; height: 14px; }
.cal-hour-row:hover .cal-hour-empty { opacity: .85; }
@media (hover: none) {
  .cal-hour-empty { opacity: .55; }
}
.cal-hour-ev { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 6px 10px; border-radius: 10px; background: var(--ev-bg); border: 1px solid var(--ev-bd); border-left: 4px solid var(--ev-fg); cursor: pointer; }
.cal-hour-ev-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.cal-hour-ev-time { font-size: .78rem; font-weight: 750; color: var(--ev-fg); font-variant-numeric: tabular-nums; }
.cal-hour-ev-title { font-size: .9rem; color: var(--text); overflow-wrap: anywhere; }
.cal-hour-ev-meta { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-left: auto; }
.cal-mini-group { font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.cal-mini-share { display: inline-flex; align-items: center; gap: 3px; font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--primary); color: var(--on-primary); }
.cal-mini-share .icon { width: 11px; height: 11px; }
.cal-inline-share-btn { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--border); background: var(--surface); color: var(--primary-text); border-radius: 8px; padding: 3px 7px; font-size: .75rem; font-weight: 700; min-height: 28px; }
.cal-inline-share-btn .icon { width: 13px; height: 13px; }
.cal-inline-share-btn:hover { background: var(--primary-soft); border-color: var(--primary); }

/* Wochenansicht */
.cal-week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 8px; }
.cal-ws-day { border: 1px solid transparent; background: transparent; border-radius: 12px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--text); }
.cal-ws-day:hover { background: var(--surface-2); }
.cal-ws-day.today { border-color: var(--primary); }
.cal-ws-day.active { background: var(--primary); color: var(--on-primary); }
.cal-ws-dow { font-size: .72rem; text-transform: uppercase; opacity: .8; font-weight: 600; }
.cal-ws-num { font-size: 1rem; font-weight: 800; }
.cal-ws-dot { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; font-size: .68rem; font-weight: 800; background: var(--primary-soft); color: var(--primary-text); display: inline-grid; place-items: center; }
.cal-ws-day.active .cal-ws-dot { background: rgba(255,255,255,.25); color: #fff; }
.cal-ws-dot.empty { background: transparent; }

.cal-wg-toolbar { padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.cal-wg-head, .cal-wg-allday, .cal-wg-row { display: grid; grid-template-columns: 68px repeat(7, minmax(0, 1fr)); }
.cal-wg-head { border-bottom: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 0; z-index: 2; }
.cal-wg-corner { display: grid; place-items: center; color: var(--muted); border-right: 1px solid var(--border); }
.cal-wg-dayhead { border: 0; border-right: 1px solid var(--border); background: transparent; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.cal-wg-dayhead:last-child { border-right: 0; }
.cal-wg-dayhead:hover { background: var(--surface-3); }
.cal-wg-dayhead.today .cal-wg-dnum { background: var(--primary); color: var(--on-primary); width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; }
.cal-wg-dow { font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.cal-wg-dnum { font-size: 1rem; }
.cal-wg-allday { border-bottom: 2px solid var(--border); background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); }
.cal-wg-row { border-bottom: 1px solid var(--border); min-height: 52px; }
.cal-wg-row:last-child { border-bottom: 0; }
.cal-wg-time { border-right: 1px solid var(--border); padding: 6px 8px; font-size: .78rem; font-weight: 700; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; background: var(--surface-2); }
.cal-wg-cell { border-right: 1px solid var(--border); padding: 4px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; min-width: 0; transition: background .12s; }
.cal-wg-cell:last-child { border-right: 0; }
.cal-wg-cell:hover { background: color-mix(in srgb, var(--primary-soft) 40%, transparent); }
.cal-wg-cell.today-col { background: color-mix(in srgb, var(--primary-soft) 18%, transparent); }
.cal-wg-event { padding: 4px 6px; border-radius: 8px; background: var(--ev-bg); border: 1px solid var(--ev-bd); border-left: 3.5px solid var(--ev-fg); display: flex; flex-direction: column; gap: 1px; font-size: .76rem; cursor: pointer; min-width: 0; }
.cal-wg-ev-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; color: var(--ev-fg); font-weight: 700; font-size: .7rem; }
.cal-wg-ev-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.cal-wg-ev-grp { font-size: .68rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Formular-Chips & Teilen-Auswahl */
.cal-quick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-hour-chip, .cal-dur-chip { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 9px; padding: 5px 10px; font-size: .82rem; font-weight: 650; min-height: 34px; }
.cal-hour-chip:hover, .cal-dur-chip:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); }
.cal-share-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cal-share-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border-radius: 99px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-weight: 650; font-size: .9rem; transition: all .15s; }
.cal-share-pill:hover { border-color: var(--primary); }
.cal-share-pill.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.cal-color-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-color-dot { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; border: 1.5px solid var(--border); background: var(--surface); font-size: .84rem; font-weight: 600; min-height: 38px; }
.cal-color-dot.active { border-color: var(--ev-fg); background: var(--ev-bg); color: var(--ev-fg); box-shadow: inset 0 0 0 1px var(--ev-fg); }
.cal-dot-swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--ev-fg); flex: none; }

.cal-share-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 520px) { .cal-share-grid { grid-template-columns: 1fr 1fr; } }
.cal-share-option { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); text-align: left; transition: all .15s; }
.cal-share-option:hover { border-color: var(--primary); background: var(--surface-2); }
.cal-share-option.active { border-color: var(--primary); background: var(--primary-soft); }
.cal-share-check { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; flex: none; }
.cal-share-option.active .cal-share-check { background: var(--primary); color: var(--on-primary); }
.cal-share-info { display: flex; flex-direction: column; min-width: 0; }

.cal-detail-banner { padding: 14px 16px; border-radius: 14px; background: var(--ev-bg); border: 1px solid var(--ev-bd); border-left: 6px solid var(--ev-fg); display: flex; flex-direction: column; gap: 8px; }
.cal-detail-title { font-size: 1.25rem; color: var(--text); }
.cal-detail-date { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--ev-fg); }
.cal-time-pill { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: .85rem; padding: 3px 10px; border-radius: 99px; background: var(--surface); color: var(--ev-fg); }
.cal-detail-desc { white-space: pre-wrap; background: var(--surface-2); padding: 12px 14px; border-radius: 12px; }

/* ---------- Öffentliche Anleitungen / How-To & Videos ---------- */
.public-shell { min-height: 100dvh; background: var(--bg); display: flex; flex-direction: column; }
.public-topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 16px; }
.public-topbar-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.public-brand { display: inline-flex; align-items: center; background: #fff; padding: 4px 10px; border-radius: 10px; border: 1px solid var(--border); }
.public-brand img { height: 28px; width: auto; display: block; }

.public-guide-cta {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-soft) 0%, var(--surface) 100%);
  border: 1.5px solid var(--primary); color: var(--text); text-decoration: none;
  box-shadow: 0 4px 14px rgba(11, 92, 171, .08); transition: transform .12s, box-shadow .12s;
}
.public-guide-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(11, 92, 171, .14); text-decoration: none; }
.public-guide-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; flex: none; }
.public-guide-ico .icon { width: 22px; height: 22px; }
.public-guide-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.public-guide-text strong { font-size: .98rem; color: var(--primary-text); }
.public-guide-text small { font-size: .82rem; color: var(--muted); line-height: 1.35; }

.guide-hero { border-left: 5px solid var(--primary); }
.guide-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.guide-cover { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--border); }
.guide-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.guide-card:hover .guide-cover img { transform: scale(1.03); }
.guide-play-pill {
  position: absolute; bottom: 10px; right: 10px; display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 99px; background: rgba(15, 23, 42, .86); color: #fff;
  font-size: .78rem; font-weight: 700; backdrop-filter: blur(4px);
}
.guide-play-pill .icon { width: 15px; height: 15px; }
.guide-card-body { padding: 14px 16px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.guide-card-title { font-size: 1.06rem; margin: 2px 0; }
.guide-card-title a { color: var(--text); text-decoration: none; }
.guide-card-title a:hover { color: var(--primary-text); text-decoration: underline; }
.guide-snippet { white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.guide-card-actions { margin-top: auto; padding-top: 8px; }

.guide-detail-title { font-size: 1.45rem; margin: 0; line-height: 1.25; }
.video-embed-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--border); }
.video-embed-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.guide-prose p { white-space: pre-wrap; line-height: 1.6; margin: 0; padding: 10px 14px; background: var(--surface-2); border-radius: 12px; }

.qr-preview-box { display: inline-flex; padding: 12px; background: #fff; border: 2px solid var(--border); border-radius: 16px; margin: 4px auto; }
.qr-svg-img { width: 200px; height: 200px; display: block; }
.qr-share-card { background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%); border: 1.5px solid var(--primary); }
.qr-share-inner { gap: 16px; align-items: center; }
.guide-url-code { display: inline-block; padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); font-size: .82rem; word-break: break-all; }
.qr-mini-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border-radius: 14px; background: #fff; border: 2px solid var(--primary); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.qr-mini-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(11, 92, 171, .16); }
.qr-mini-img { width: 116px; height: 116px; display: block; }
.qr-mini-cap { font-size: .72rem; font-weight: 700; color: #0b5cab; letter-spacing: .04em; }

/* Professionelle Sticker-Vorschau im Admin-Modal */
.qr-sticker-card { border: 2px solid #0f172a; border-radius: 18px; overflow: hidden; background: #fff; color: #0f172a; max-width: 340px; width: 100%; margin: 0 auto; box-shadow: 0 10px 28px rgba(15, 23, 42, .14); }
.qr-sticker-head { background: #0f172a; border-bottom: 3px solid #0284c7; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.qr-sticker-logo { background: #fff; padding: 4px 8px; border-radius: 8px; display: inline-flex; align-items: center; }
.qr-sticker-logo img { height: 24px; width: auto; display: block; }
.qr-sticker-head-txt { display: flex; flex-direction: column; line-height: 1.2; }
.qr-sticker-head-txt small { font-size: .68rem; font-weight: 800; color: #38bdf8; letter-spacing: .06em; }
.qr-sticker-head-txt strong { font-size: .86rem; color: #fff; }
.qr-sticker-body { padding: 16px 18px 18px 18px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.qr-sticker-place { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; background: #e0f2fe; color: #0369a1; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.qr-sticker-place .icon { width: 14px; height: 14px; }
.qr-sticker-title { margin: 0; font-size: 1.08rem; line-height: 1.25; color: #0f172a; }
.qr-frame-wrap { position: relative; padding: 12px; background: #fff; border: 1.5px solid #cbd5e1; border-radius: 14px; margin: 4px 0; }
.qr-corner { position: absolute; width: 16px; height: 16px; border-color: #0b5cab; border-style: solid; border-width: 0; }
.qr-corner.tl { top: -3px; left: -3px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 6px; }
.qr-corner.tr { top: -3px; right: -3px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 6px; }
.qr-corner.bl { bottom: -3px; left: -3px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 6px; }
.qr-corner.br { bottom: -3px; right: -3px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 6px; }
.qr-scan-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px; background: #0b5cab; color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .03em; }
.qr-scan-pill .icon { width: 15px; height: 15px; }

.guide-group-sec { padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: 0 2px 10px rgba(15, 23, 42, .03); }
.guide-group-head { padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.guide-group-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-text); display: grid; place-items: center; flex: none; }
.guide-group-ico .icon { width: 22px; height: 22px; }

/* ---------- Nutzungsbedingungen & Datenschutz-Gate ---------- */
.legal-hero-card { border-left: 5px solid var(--primary); }
.legal-contact-card { background: var(--surface-2); border: 1.5px solid var(--border); }
.legal-sec h3 { margin: 0 0 8px 0; color: var(--primary-text); }
.legal-sec p { margin: 0 0 8px 0; line-height: 1.6; }
.legal-sec p:last-child { margin-bottom: 0; }

.terms-gate-backdrop { z-index: 200; backdrop-filter: blur(6px); background: rgba(15, 23, 42, .68); }
.terms-gate-modal { max-width: 780px; width: 95vw; max-height: 92dvh; display: flex; flex-direction: column; border: 2px solid var(--primary); }
.terms-gate-head { border-bottom: 1px solid var(--border); padding: 14px 18px; }
.terms-gate-body { overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 14px 18px; flex: 1; min-height: 0; }
.terms-gate-scroll { overflow-y: auto; flex: 1; min-height: 220px; max-height: 52dvh; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
.terms-check-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px;
  background: var(--primary-soft); border: 1.5px solid var(--primary); cursor: pointer; font-weight: 600; font-size: .92rem; line-height: 1.45;
}
.terms-check-card input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--primary); }
.terms-check-inline {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; font-size: .88rem; line-height: 1.4;
}
.terms-check-inline input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--primary); }
.terms-gate-foot { border-top: 1px solid var(--border); padding: 14px 18px; }

/* ---------- 5-Sprachen-Umschalter (DE · FR · LB · EN · PT) ---------- */
.lang-pills {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.lang-pill {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .03em;
  padding: 5px 8px;
  border-radius: 99px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.lang-pill:hover { color: var(--text); background: var(--surface); }
.lang-pill.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(11, 92, 171, .28);
}

/* ---------- Öffentliche Landing Page (für Bürger, Vereine & Besucher) ---------- */
.landing-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}
.landing-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.landing-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.landing-brand img {
  height: 36px;
  width: auto;
  display: block;
}
.landing-brand-sub {
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  padding-left: 10px;
  border-left: 1.5px solid var(--border);
}
.landing-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.landing-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0b2545 0%, #0b5cab 65%, #0284c7 100%);
  color: #fff;
  padding: 48px 20px 54px;
}
.landing-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.landing-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .22;
  filter: saturate(1.15);
}
.landing-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(8, 22, 44, .92) 0%, rgba(11, 62, 122, .82) 55%, rgba(12, 74, 110, .78) 100%);
}
.landing-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr .95fr;
  gap: 32px;
  align-items: center;
}
.landing-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(56, 189, 248, .18);
  border: 1px solid rgba(125, 211, 252, .4);
  color: #e0f2fe;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.landing-badge-pill .icon { width: 16px; height: 16px; color: #38bdf8; }
.landing-h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  line-height: 1.16;
  margin: 0;
  font-weight: 850;
  letter-spacing: -.02em;
  color: #fff;
}
.landing-lead {
  font-size: 1.05rem;
  line-height: 1.62;
  color: rgba(241, 245, 249, .92);
  margin: 0;
  max-width: 640px;
}
.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 6px;
}
.landing-btn-main {
  background: #38bdf8;
  color: #082f49;
  font-weight: 800;
  border: 0;
  box-shadow: 0 10px 26px rgba(56, 189, 248, .32);
}
.landing-btn-main:hover { background: #7dd3fc; color: #082f49; }
.landing-btn-sec {
  background: rgba(255, 255, 255, .13);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .32);
  backdrop-filter: blur(6px);
}
.landing-btn-sec:hover { background: rgba(255, 255, 255, .22); color: #fff; }

.landing-lang-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  margin-top: 6px;
}
.landing-lang-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .82rem;
  color: #bae6fd;
  font-weight: 600;
}
.landing-lang-label .icon { width: 16px; height: 16px; }
.landing-lang-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.landing-lang-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .24);
  background: rgba(15, 23, 42, .42);
  color: #e2e8f0;
  padding: 5px 11px;
  border-radius: 99px;
  font-size: .78rem;
  cursor: pointer;
  transition: all .15s;
}
.landing-lang-chip:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.landing-lang-chip.active {
  background: #fff;
  color: #0b5cab;
  border-color: #fff;
  font-weight: 700;
}

.landing-hero-cards { gap: 14px; }
.landing-quick-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(15, 23, 42, .68);
  border: 1.5px solid rgba(148, 163, 184, .32);
  backdrop-filter: blur(12px);
  color: #fff;
  text-decoration: none;
  transition: transform .16s, border-color .16s, background .16s;
}
.landing-quick-card:hover {
  transform: translateY(-3px);
  border-color: #38bdf8;
  background: rgba(15, 23, 42, .82);
}
.landing-quick-card strong { font-size: 1.05rem; color: #fff; }
.landing-quick-card p { margin: 0; color: #cbd5e1; line-height: 1.45; }
.landing-quick-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: none;
}
.landing-quick-ico .icon { width: 24px; height: 24px; }
.landing-quick-ico.ico-building { background: rgba(56, 189, 248, .2); color: #38bdf8; }
.landing-quick-ico.ico-material { background: rgba(52, 211, 153, .2); color: #34d399; }
.landing-quick-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .83rem;
  font-weight: 700;
  color: #38bdf8;
  margin-top: 2px;
}
.landing-quick-link .icon { width: 15px; height: 15px; }

.landing-main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}
.landing-section { display: flex; flex-direction: column; gap: 20px; }
.landing-sec-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  background: var(--primary-soft);
  color: var(--primary-text);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.landing-eyebrow .icon { width: 15px; height: 15px; }
.landing-h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  margin: 0;
  line-height: 1.22;
}
.landing-benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.landing-benefit-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px;
  border-top: 4px solid var(--primary);
}
.landing-ben-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-text);
  display: grid;
  place-items: center;
}
.landing-ben-ico .icon { width: 22px; height: 22px; }
.landing-benefit-card h3 { margin: 0; }
.landing-benefit-card p { margin: 0; line-height: 1.55; }

.landing-steps-card {
  padding: 28px 24px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1.5px solid var(--border);
}
.landing-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 8px;
}
.landing-step {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.landing-step-num {
  width: 32px;
  height: 32px;
  border-radius: 99px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
  display: grid;
  place-items: center;
}
.landing-step p { margin: 0; line-height: 1.5; }

.landing-guide-card {
  text-decoration: none;
  color: inherit;
  transition: transform .15s, border-color .15s;
}
.landing-guide-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}
.guide-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  margin-bottom: 10px;
}
.guide-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.guide-card-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); }
.guide-card-placeholder .icon { width: 34px; height: 34px; }
.guide-video-pill {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(15, 23, 42, .85);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
}
.guide-video-pill .icon { width: 13px; height: 13px; color: #38bdf8; }
.guide-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .84rem;
  font-weight: 700;
  color: var(--primary-text);
  margin-top: 4px;
}
.guide-card-cta .icon { width: 15px; height: 15px; }
.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.landing-staff-card {
  padding: 22px 24px;
  border-left: 5px solid var(--primary);
  background: var(--surface-2);
  gap: 16px;
}
.landing-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 20px;
}
.landing-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  gap: 12px;
}

@media (max-width: 880px) {
  .landing-hero-inner { grid-template-columns: 1fr; }
  .landing-hide-xs { display: none; }
}

/* ---------- Gemeinde Redange Visitenkarte & Login-Bild auf der Landing Page ---------- */
.landing-brand-muni {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  padding-left: 12px;
  border-left: 2px solid var(--primary);
}
.landing-brand-muni strong { font-size: .86rem; color: var(--text); }
.landing-brand-muni small { font-size: .72rem; color: var(--muted); }

.landing-redange-photo-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .45);
  box-shadow: 0 18px 40px rgba(8, 22, 44, .45);
  aspect-ratio: 16 / 10;
  background: #0f172a;
}
.landing-redange-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.landing-redange-photo-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, .05) 30%, rgba(15, 23, 42, .88) 100%);
}
.landing-redange-photo-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}
.landing-redange-photo-caption strong { font-size: .96rem; color: #fff; display: block; }
.landing-redange-photo-caption small { font-size: .76rem; color: #bae6fd; display: block; }
.landing-quick-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .landing-quick-pair { grid-template-columns: 1fr; }
  .landing-brand-muni { display: none; }
}

/* ---------- Öffentlicher Event-Kalender & Next Events Box ---------- */
.landing-next-events-box {
  padding: 24px;
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  box-shadow: 0 10px 30px rgba(11, 92, 171, .08);
}
.next-events-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.next-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 14px;
}
.pub-event-card {
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  border-left: 5px solid var(--primary);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.pub-event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .1);
}
.pub-event-card.ev-border-blue { border-left-color: #0b5cab; }
.pub-event-card.ev-border-green { border-left-color: #15803d; }
.pub-event-card.ev-border-amber { border-left-color: #d97706; }
.pub-event-card.ev-border-red { border-left-color: #dc2626; }
.pub-event-card.ev-border-purple { border-left-color: #7c3aed; }
.pub-event-card.ev-border-teal { border-left-color: #0d9488; }

.pub-event-date-box {
  width: 68px;
  flex: none;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  text-align: center;
  border: 1px solid var(--border);
}
.pub-event-month { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.pub-event-day { font-size: 1.45rem; font-weight: 900; line-height: 1.1; }
.pub-event-time { font-size: .7rem; font-weight: 700; opacity: .85; margin-top: 2px; }

.pub-event-main { flex: 1; min-width: 0; }
.pub-event-title { margin: 2px 0; line-height: 1.25; }

.pub-event-flyer-thumb {
  position: relative;
  width: 88px;
  height: 112px;
  flex: none;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
}
.pub-event-flyer-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flyer-zoom-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  background: rgba(15, 23, 42, .82);
  color: #fff;
  font-size: .66rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.flyer-zoom-badge .icon { width: 11px; height: 11px; }

.event-flyer-large {
  max-width: 100%;
  max-height: 520px;
  width: auto;
  margin: 0 auto;
  display: block;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  cursor: zoom-in;
}
.event-detail-meta { background: var(--surface-2); padding: 12px 16px; }

.admin-pending-events-box {
  border: 2px solid #d97706;
  background: color-mix(in srgb, #fef3c7 22%, var(--surface));
}
.pending-ev-row {
  background: var(--surface);
  border: 1px solid var(--border);
  gap: 12px;
}
.pending-ev-thumb {
  width: 64px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  flex: none;
}

.pub-day-simul-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 14px;
}
.cal-simul-dot {
  font-size: .68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--primary-soft);
  color: var(--primary-text);
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.year-month-card {
  justify-content: space-between;
}
.year-ev-item {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 10px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: .83rem;
}
.year-ev-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.year-ev-date { font-weight: 800; color: var(--primary-text); flex: none; }
.year-ev-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* ---------- Farblich getrennte Ticket-Standort-Pins auf der Karte (.tpin vs .bpin) ---------- */
.tpin-wrap { background: none; border: 0; }
.tpin {
  position: relative;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  pointer-events: auto;
  cursor: pointer;
}
.tpin-label {
  background: #ea580c;
  color: #fff;
  font-weight: 800;
  font-size: .78rem;
  line-height: 1.2;
  padding: 5px 10px;
  border-radius: 99px;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 2px solid #fff;
  box-shadow: 0 3px 12px rgba(234, 88, 12, .45);
  margin-bottom: 4px;
}
.tpin-dot {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50% 50% 50% 6px;
  transform: rotate(-45deg);
  background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, .48);
  display: grid;
  place-items: center;
}
.tpin-dot .icon {
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
}
.tpin.tpin-urgent .tpin-label {
  background: #dc2626;
  box-shadow: 0 3px 14px rgba(220, 38, 38, .55);
}
.tpin.tpin-urgent .tpin-dot {
  background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
}
.tpin:hover .tpin-label,
.tpin:hover .tpin-dot {
  filter: brightness(1.08);
}

.map-legend {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: .84rem;
}
.map-legend-item,
.map-legend-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}
.map-legend-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 11px;
  font-size: .82rem;
  color: var(--text);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.map-legend-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}
.map-legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
  display: inline-block;
}
.map-legend-dot.is-building { background: var(--primary); }
.map-legend-dot.is-ticket { background: linear-gradient(135deg, #f97316 0%, #dc2626 100%); }
.map-legend-dot.is-boundary {
  background: rgba(11, 92, 171, .16);
  border: 2.5px solid #0b5cab;
  border-radius: 4px;
}

.muni-village-wrap {
  background: transparent;
  border: 0;
  pointer-events: none;
}
.muni-village-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, .92);
  color: #0b3d75;
  border: 1.5px solid rgba(11, 92, 171, .45);
  border-radius: 99px;
  padding: 2px 8px;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .14);
  pointer-events: none;
}
.muni-village-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0b5cab;
}

.map-floating-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 950;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: auto;
}
.map-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, .88);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .35);
  border-radius: 99px;
  padding: 6px 13px;
  font-size: .8rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .35);
  backdrop-filter: blur(6px);
  transition: transform .12s, background .15s;
}
.map-ctrl-btn .icon { width: 15px; height: 15px; }
.map-ctrl-btn:hover {
  background: #0b5cab;
  transform: translateY(-1px);
}
.map-ctrl-btn.is-active {
  background: #dc2626;
  border-color: #fca5a5;
}

.map-expand-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 950;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, .84);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: .76rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}
.map-expand-badge .icon { width: 14px; height: 14px; }
.map-expand-badge:hover { background: #0b5cab; }

.map-fs-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 15, 26, .78);
  z-index: 1990;
}
.map.map-is-fullscreen {
  position: fixed !important;
  inset: 18px !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
  z-index: 2000 !important;
  border-radius: 16px !important;
  border: 2px solid #fff !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55) !important;
  filter: none !important;
}

.map-pop-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  font-size: .7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.map-pop-tag .icon { width: 12px; height: 12px; }
.map-pop-tag-building { background: var(--primary-soft); color: var(--primary-text); }
.map-pop-tag-ticket { background: #ffedd5; color: #c2410c; }

.ticket-pin-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 2px;
}

.ticket-gps-actions {
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 10px 14px;
}

/* 24-Stunden-Uhrzeitauswahl (ohne AM/PM) */
.time24-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 48px;
  padding: 4px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.time24-picker:focus-within {
  border-color: var(--primary);
  box-shadow: var(--focus);
}
.time24-picker > .icon {
  color: var(--primary-text);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.time24-select {
  width: auto !important;
  min-height: 38px !important;
  padding: 4px 8px !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  background: var(--surface-2) !important;
  font-weight: 700;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
  cursor: pointer;
}
.time24-sep {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
}
.time24-unit {
  margin-left: auto;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary-text);
  padding: 2px 8px;
  border-radius: 99px;
  font-size: .75rem;
}

/* ---------- iPhone-Style Ganzmonats- & Jahreskalender (#/events) ---------- */
.ios-cal-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(15, 23, 42, .05);
}
.ios-cal-toolbar-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ios-segmented {
  display: inline-flex;
  align-items: center;
  background: var(--surface-2);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  gap: 2px;
}
.ios-seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: .88rem;
  padding: 7px 16px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, color .15s, box-shadow .15s;
}
.ios-seg-btn .icon { width: 16px; height: 16px; }
.ios-seg-btn:hover { color: var(--text); }
.ios-seg-btn.is-active {
  background: var(--surface);
  color: var(--primary-text);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .1);
}

.ios-cal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ios-cal-title {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 850;
  letter-spacing: -.02em;
  min-width: 190px;
  text-align: center;
  color: var(--text);
}
.ios-nav-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.ios-nav-circle:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-text);
}
.ios-today-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--primary-text);
  font-weight: 750;
  font-size: .84rem;
  padding: 6px 14px;
  border-radius: 99px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.ios-today-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

/* Schnellwahl-Leiste der 12 Monate */
.ios-month-strip {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.ios-month-pill {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  padding: 5px 4px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  position: relative;
  transition: background .15s, color .15s;
}
.ios-month-pill:hover {
  background: var(--surface-2);
  color: var(--text);
}
.ios-month-pill.is-active {
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(11, 92, 171, .28);
}
.ios-month-pill.has-events::after {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  margin: 2px auto 0;
}
.ios-month-pill.is-active.has-events::after {
  background: #fff;
}
@media (max-width: 680px) {
  .ios-month-strip {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* Split-Layout für Monatskalender + iPhone-Tages-Agenda */
.ios-month-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (min-width: 1040px) {
  .ios-month-layout {
    grid-template-columns: minmax(0, 1.45fr) 390px;
  }
  .ios-agenda-card {
    position: sticky;
    top: calc(var(--topbar-h, 64px) + 14px);
    max-height: calc(100dvh - var(--topbar-h, 64px) - 28px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}

/* 7-Spalten Ganzmonats-Kalenderkarte */
.ios-month-card {
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
.ios-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--surface-2);
  border-bottom: 1.5px solid var(--border);
}
.ios-wd {
  padding: 10px 4px;
  text-align: center;
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.ios-wd.is-weekend {
  color: var(--primary-text);
  opacity: .85;
}

.ios-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--border);
  gap: 1px;
}
.ios-cal-cell {
  min-height: 112px;
  padding: 7px 6px 6px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  position: relative;
  min-width: 0;
  transition: background .12s;
}
.ios-cal-cell:hover {
  background: color-mix(in srgb, var(--primary-soft) 32%, var(--surface));
}
.ios-cal-cell.is-weekend {
  background: color-mix(in srgb, var(--surface-2) 45%, var(--surface));
}
.ios-cal-cell.is-outside {
  background: color-mix(in srgb, var(--surface-2) 70%, var(--surface));
  color: var(--muted);
}
.ios-cal-cell.is-outside .ios-day-num {
  opacity: .42;
}
.ios-cal-cell.is-today {
  background: color-mix(in srgb, #fee2e2 28%, var(--surface));
}
.ios-cal-cell.is-selected {
  background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface));
  box-shadow: inset 0 0 0 2px var(--primary);
  z-index: 1;
}

.ios-cell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.ios-day-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  font-size: .92rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  transition: transform .12s, background .12s, color .12s;
}
/* iPhone-typisches rotes Kreis-Badge für HEUTE */
.ios-cal-cell.is-today .ios-day-num {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, .4);
}
/* Ausgewählter Tag: Kräftiger blauer Kreis (wie beim iPhone-Kalender) */
.ios-cal-cell.is-selected:not(.is-today) .ios-day-num {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(11, 92, 171, .35);
}

/* Farbige Event-Punkte wie beim iPhone unter/neben der Tageszahl */
.ios-ev-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.ios-ev-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}
.ios-ev-dot.dot-blue { background: #0b5cab; }
.ios-ev-dot.dot-green { background: #16a34a; }
.ios-ev-dot.dot-amber { background: #d97706; }
.ios-ev-dot.dot-red { background: #dc2626; }
.ios-ev-dot.dot-purple { background: #7c3aed; }
.ios-ev-dot.dot-teal { background: #0d9488; }

.ios-cell-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.ios-ev-pill {
  appearance: none;
  border: 0;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: .74rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  border-left: 3px solid var(--ev-fg, #0b5cab);
  background: var(--ev-bg, #e1eefb);
  color: var(--ev-fg, #0b5cab);
  transition: filter .12s, transform .1s;
}
.ios-ev-pill:hover {
  filter: brightness(.95);
}
.ios-ev-pill-time {
  font-weight: 800;
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
  opacity: .92;
  flex: none;
}
.ios-ev-pill-title {
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.ios-cell-more {
  font-size: .7rem;
  font-weight: 800;
  color: var(--primary-text);
  padding-left: 4px;
}

@media (max-width: 680px) {
  .ios-cal-cell {
    min-height: 68px;
    padding: 5px 3px;
    align-items: center;
  }
  .ios-cell-head {
    flex-direction: column;
    align-items: center;
    gap: 3px;
  }
  .ios-day-num {
    width: 28px;
    height: 28px;
    font-size: .85rem;
  }
  .ios-ev-pill {
    padding: 1px 4px;
    font-size: .64rem;
    border-left-width: 2.5px;
    justify-content: center;
  }
  .ios-ev-pill-time { display: none; }
}

/* iPhone-Style Tages-Agenda-Panel (rechts oder unterhalb des Monatskalenders) */
.ios-agenda-card {
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
.ios-agenda-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--border);
}
.ios-agenda-date-label {
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--primary-text);
}
.ios-agenda-date-title {
  font-size: 1.12rem;
  font-weight: 850;
  margin: 2px 0 0;
  line-height: 1.25;
}
.ios-agenda-item {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.ios-agenda-item:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
}
.ios-agenda-time-col {
  width: 54px;
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  font-variant-numeric: tabular-nums;
  font-size: .78rem;
  font-weight: 800;
  color: var(--text);
  padding-right: 10px;
  border-right: 3.5px solid var(--ev-fg, var(--primary));
}
.ios-agenda-time-col small {
  font-weight: 600;
  color: var(--muted);
  font-size: .72rem;
}
.ios-agenda-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ios-agenda-title {
  font-weight: 800;
  font-size: .95rem;
  color: var(--text);
  line-height: 1.25;
}
.ios-agenda-meta {
  font-size: .78rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.ios-agenda-flyer {
  width: 52px;
  height: 66px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex: none;
}

/* iPhone-Style Jahresansicht (12 Mini-Monatskalender im Grid) */
.ios-year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}
.ios-year-month-card {
  padding: 16px;
  border-radius: 18px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.ios-year-month-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .07);
}
.ios-year-month-card.is-current-month {
  border-color: var(--primary);
}
.ios-year-month-title {
  font-size: 1.05rem;
  font-weight: 850;
  color: var(--primary-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ios-mini-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.ios-mini-wd {
  font-size: .64rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  padding-bottom: 3px;
}
.ios-mini-day {
  appearance: none;
  border: 0;
  background: transparent;
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border-radius: 50%;
  font-size: .74rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}
.ios-mini-day:hover {
  background: var(--surface-2);
}
.ios-mini-day.is-today {
  background: #ef4444;
  color: #fff;
  font-weight: 800;
}
.ios-mini-day.has-event:not(.is-today) {
  background: var(--primary-soft);
  color: var(--primary-text);
  font-weight: 850;
  box-shadow: inset 0 0 0 1.5px var(--primary);
}
.ios-Upcoming-month-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ios-upcoming-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px;
  border-bottom: 2px solid var(--border);
  font-size: 1.08rem;
  font-weight: 850;
  color: var(--primary-text);
}

/* ---------- Full-Admin Live-Konsole & Analytics (#/admin/console) ---------- */
.adm-console-hero {
  border-left: 4px solid var(--primary);
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
}
.adm-console-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.adm-console-kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
}
.adm-console-kpi.is-live {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, var(--surface) 100%);
}
.adm-console-kpi-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.adm-console-kpi-val {
  font-size: 2rem;
  font-weight: 850;
  line-height: 1.1;
  color: var(--text);
}
.adm-console-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #10b981;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.adm-console-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.24);
  display: inline-block;
  flex-shrink: 0;
  animation: admPulseDot 1.8s infinite ease-in-out;
}
.adm-console-live-dot.paused {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
  animation: none;
}
@keyframes admPulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.22); opacity: 0.75; }
}

.adm-console-live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}
.adm-console-live-user {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.adm-console-live-user.is-clickable {
  cursor: pointer;
}
.adm-console-live-user.is-clickable:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}
.adm-console-live-user.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}
.adm-console-live-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary-text);
  font-weight: 700;
}

.adm-console-analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.adm-console-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.adm-console-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.12s ease;
}
.adm-console-bar-item.is-clickable {
  cursor: pointer;
}
.adm-console-bar-item.is-clickable:hover {
  background: var(--surface-2);
}
.adm-console-bar-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
}
.adm-console-bar-rank {
  color: var(--muted);
  font-weight: 700;
  min-width: 18px;
}
.adm-console-bar-label {
  font-weight: 650;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-console-bar-val {
  font-weight: 800;
  color: var(--primary-text);
}
.adm-console-bar-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.adm-console-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) 0%, #38bdf8 100%);
}

.adm-console-terminal-card {
  border: 1px solid #1e293b;
}
.adm-console-count-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.78rem;
  font-weight: 800;
}
.adm-console-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(240px, 2fr);
  gap: 10px;
}
@media (max-width: 680px) {
  .adm-console-filters {
    grid-template-columns: 1fr;
  }
}
.adm-console-stream-rows {
  background: #0b111e;
  color: #e2e8f0;
  border-radius: 12px;
  border: 1px solid #1e293b;
  max-height: 560px;
  overflow-y: auto;
  font-size: 0.84rem;
  divide-y: 1px solid #1e293b;
}
.adm-console-empty {
  padding: 28px 16px;
  text-align: center;
  color: #94a3b8;
}
.adm-console-row {
  display: grid;
  grid-template-columns: 118px 66px 210px 1fr minmax(120px, 190px);
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  transition: background 0.2s ease;
}
.adm-console-row:hover {
  background: rgba(255, 255, 255, 0.04);
}
.adm-console-row.is-fresh {
  animation: admRowFlash 1.6s ease-out;
}
@keyframes admRowFlash {
  0% { background: rgba(16, 185, 129, 0.28); }
  100% { background: transparent; }
}
.adm-console-time {
  color: #94a3b8;
  font-size: 0.78rem;
  white-space: nowrap;
}
.adm-console-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}
.adm-console-kind.kind-pageview {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
}
.adm-console-kind.kind-click {
  background: rgba(250, 204, 21, 0.18);
  color: #facc15;
}
.adm-console-kind.kind-api {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}
.adm-console-kind.kind-audit {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.adm-console-actor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #f8fafc;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-console-actor:hover {
  border-color: #38bdf8;
}
.adm-console-actor-role {
  color: #94a3b8;
  font-size: 0.7rem;
  margin-left: auto;
}
.adm-console-what {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.adm-console-action-text {
  color: #f1f5f9;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-console-detail {
  color: #94a3b8;
  font-size: 0.74rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-console-where {
  color: #38bdf8;
  font-size: 0.78rem;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .adm-console-row {
    grid-template-columns: 1fr auto;
    gap: 6px;
  }
  .adm-console-where {
    text-align: left;
  }
}

/* ---------- Superadmin Badge & Toggle ---------- */
.badge-superadmin {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.25);
}
.superadmin-toggle-box {
  border-left: 4px solid #7c3aed;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, var(--surface) 100%);
}

/* ---------- Dienstplanung (Roster) ---------- */
.roster-header-card {
  gap: 12px;
}
.roster-nav-bar {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  gap: 10px;
}
.roster-period-bar {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.roster-period-select {
  max-width: 420px;
}
.roster-date-picker {
  width: auto;
  padding: 5px 10px;
  font-size: 0.85rem;
}
.roster-current-range-label {
  font-size: 0.92rem;
}
.roster-shift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}
.roster-shift-card {
  border-left: 4px solid var(--primary);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.roster-shift-card.is-compact {
  padding: 10px 12px;
  gap: 8px;
}
.roster-border-blue { border-left-color: #0b5cab !important; }
.roster-border-green { border-left-color: #15803d !important; }
.roster-border-amber { border-left-color: #d97706 !important; }
.roster-border-purple { border-left-color: #7c3aed !important; }
.roster-border-teal { border-left-color: #0d9488 !important; }
.roster-border-red { border-left-color: #dc2626 !important; }

.roster-group-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.roster-bg-blue { background: rgba(11, 92, 171, 0.14); color: #0b5cab; }
.roster-bg-green { background: rgba(21, 128, 61, 0.14); color: #15803d; }
.roster-bg-amber { background: rgba(217, 119, 6, 0.15); color: #b45309; }
.roster-bg-purple { background: rgba(124, 58, 237, 0.14); color: #6d28d9; }
.roster-bg-teal { background: rgba(13, 148, 136, 0.14); color: #0f766e; }
.roster-bg-red { background: rgba(220, 38, 38, 0.14); color: #b91c1c; }

[data-theme="dark"] .roster-bg-blue { color: #60a5fa; }
[data-theme="dark"] .roster-bg-green { color: #4ade80; }
[data-theme="dark"] .roster-bg-amber { color: #fbbf24; }
[data-theme="dark"] .roster-bg-purple { color: #c4b5fd; }
[data-theme="dark"] .roster-bg-teal { color: #5eead4; }
[data-theme="dark"] .roster-bg-red { color: #f87171; }

.roster-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-size: 0.84rem;
  background: var(--surface-2);
  padding: 3px 9px;
  border-radius: 999px;
}
.roster-night-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.14);
  color: #7c3aed;
}
[data-theme="dark"] .roster-night-badge {
  color: #c4b5fd;
}
.roster-area-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(11, 92, 171, 0.11);
  color: var(--primary);
}
.roster-area-badge.is-vehicle {
  background: rgba(217, 119, 6, 0.15);
  color: #b45309;
}
[data-theme="dark"] .roster-area-badge.is-vehicle {
  color: #fbbf24;
}
.roster-people-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.roster-person-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  font-weight: 600;
}
.roster-person-chip.is-unassigned {
  padding-left: 9px;
  color: var(--muted);
  border-style: dashed;
}
.roster-person-avatar,
.roster-person-initials {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--primary);
  color: #fff;
  object-fit: cover;
}
.roster-shift-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: var(--surface-2);
  padding: 6px 9px;
  border-radius: 8px;
}
.roster-no-plan-box {
  align-items: center;
  text-align: center;
  padding: 28px 18px;
  border: 1px dashed var(--border);
}
.roster-no-plan-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--primary);
}
.roster-other-groups-section {
  border-top: 3px solid var(--border);
}
.roster-other-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}
.roster-other-group-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 12px;
}
.roster-week-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.roster-week-day-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.roster-week-day-card.is-today {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(11, 92, 171, 0.16);
}
.roster-week-day-head {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.roster-week-day-title-btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.96rem;
  cursor: pointer;
}
.roster-week-day-title-btn:hover {
  color: var(--primary);
}
.roster-month-card {
  padding: 12px;
}
.roster-month-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  padding-bottom: 6px;
}
.roster-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
.roster-month-cell {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  min-height: 76px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 4px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.roster-month-cell:hover {
  border-color: var(--primary);
}
.roster-month-cell.is-outside {
  opacity: 0.35;
  pointer-events: none;
}
.roster-month-cell.is-today .roster-month-day-num {
  background: var(--primary);
  color: #fff;
}
.roster-month-cell.is-selected {
  border-color: var(--primary);
  background: rgba(11, 92, 171, 0.08);
}
.roster-month-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.roster-month-day-num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
}
.roster-month-count-dot {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}
.roster-month-pills {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.roster-month-pill {
  font-size: 0.68rem;
  line-height: 1.25;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--surface-2);
  border-left: 2px solid var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.roster-month-pill.is-night {
  border-left-color: #7c3aed;
}
.roster-month-pill-area {
  font-weight: 700;
}
.roster-mapping-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.roster-mapping-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.3fr) 1.2fr 1fr auto;
  gap: 8px;
  align-items: center;
  background: var(--surface-2);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.roster-mapping-col-name {
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 680px) {
  .roster-month-cell {
    min-height: 54px;
    padding: 4px;
  }
  .roster-month-pill {
    font-size: 0.6rem;
    padding: 1px 3px;
  }
  .roster-mapping-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Integriertes E-Mail-System (#/mail) ---------- */
.mail-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 14px;
  align-items: start;
}
.mail-list-col {
  max-height: 70vh;
  overflow-y: auto;
}
.mail-item-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mail-item-list li + li {
  border-top: 1px solid var(--border);
}
.mail-item-btn {
  appearance: none;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s;
}
.mail-item-btn:hover {
  background: var(--surface-2);
}
.mail-item-btn.is-selected {
  background: rgba(11, 92, 171, 0.1);
  border-left: 3px solid var(--primary);
}
.mail-item-btn.is-unread .mail-item-sender,
.mail-item-btn.is-unread .mail-item-subject {
  font-weight: 800;
}
.mail-unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  margin-right: 6px;
}
.mail-item-sender {
  font-size: 0.86rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail-item-subject {
  font-size: 0.9rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail-item-snippet {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail-detail-col {
  min-height: 360px;
}
.mail-meta-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.mail-body-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
@media (max-width: 860px) {
  .mail-layout {
    grid-template-columns: 1fr;
  }
  .mail-list-col {
    max-height: 360px;
  }
}











