/* Shared shell for the app and the admin ("Stammdaten"): colour tokens, icons, sidebar, phone tab bar, page header. */
:root {
  --bg: #f4f6f8; --surface: #ffffff; --surface-2: #f8fafb; --ink: #17212b; --muted: #5f6b76; --line: #e3e8ec;
  --accent: #a8472a; --accent-strong: #8a3a22; --accent-soft: #f7e9e3; --accent-ink: #ffffff;
  --good: #1f7a4d; --good-soft: #e5f4ec; --bad: #b42318; --bad-soft: #fdecea; --warn: #9a5b00; --warn-soft: #fff4e0;
  --let: #3a7ca5; --own: #d9a441; --vacant: #b8b2a6;
  --radius: 14px; --radius-sm: 9px; --shadow: 0 1px 2px rgba(16, 24, 32, .05), 0 4px 16px rgba(16, 24, 32, .05);
  --sidebar: 272px; --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1418; --surface: #171e24; --surface-2: #1c252c; --ink: #e6ebef; --muted: #98a4ae; --line: #2a343c;
    --accent: #e0896a; --accent-strong: #eba489; --accent-soft: #3a2119; --accent-ink: #2a0f06;
    --good: #5cc98d; --good-soft: #143224; --bad: #ff8a80; --bad-soft: #3a1a18; --warn: #f2b84b; --warn-soft: #36290f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}
.icon { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.icon.flip { transform: rotate(180deg); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; overflow-y: auto; z-index: 10; }
.brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px 14px; color: var(--ink); font-weight: 700; font-size: 1.02rem; }
.brand:hover { text-decoration: none; }
.brand small { display: block; font-weight: 500; font-size: .76rem; color: var(--muted); }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); }
.brand-mark .icon { width: 22px; height: 22px; }
.brand-mark.lg { width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 14px; }
.brand-mark.lg .icon { width: 30px; height: 30px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-label { margin: 14px 10px 4px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sidebar nav > a { display: flex; gap: 12px; align-items: flex-start; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--ink); font-weight: 600; font-size: .93rem; }
.sidebar nav > a .icon { margin-top: 2px; color: var(--muted); }
.sidebar nav > a small { display: block; font-weight: 400; font-size: .76rem; color: var(--muted); line-height: 1.35; }
.sidebar nav > a:hover { background: var(--surface-2); text-decoration: none; }
.sidebar nav > a[aria-current] { background: var(--accent-soft); color: var(--accent-strong); }
.sidebar nav > a[aria-current] .icon { color: var(--accent); }
.subnav { display: flex; flex-direction: column; margin: 2px 0 6px 21px; padding-left: 12px; border-left: 2px solid var(--line); }
.subnav a { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 7px; color: var(--muted); font-size: .88rem; font-weight: 500; }
.subnav a:hover { color: var(--ink); text-decoration: none; background: var(--surface-2); }
.subnav a[aria-current] { color: var(--accent-strong); font-weight: 650; }
.sidebar-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.who { display: flex; gap: 6px; align-items: center; font-size: .85rem; color: var(--muted); }
.tabbar { display: none; }

/* ---------- Page header ---------- */
.page-head { display: flex; gap: 16px; align-items: flex-start; margin: 0 0 22px; }
.page-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.page-icon .icon { width: 24px; height: 24px; }
.page-title { min-width: 0; }
.lead { margin: 4px 0 0; color: var(--muted); max-width: 72ch; }
.back { display: inline-flex; gap: 4px; align-items: center; font-size: .85rem; font-weight: 600; margin-bottom: 2px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0 0 18px; }
.push { margin-left: auto; }

@media (max-width: 960px) {
  .sidebar { display: none; }
  .tabbar { display: flex; position: fixed; inset: auto 0 0 0; z-index: 10; justify-content: space-around; background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px; color: var(--muted); font-size: .7rem; font-weight: 600; }
  .tabbar a .icon { width: 22px; height: 22px; }
  .tabbar a[aria-current] { color: var(--accent); background: var(--accent-soft); }
  .tabbar a:hover { text-decoration: none; }
}
.sidebar, .tabbar { font-family: var(--font); font-size: 15.5px; line-height: 1.5; }
.sidebar a { text-decoration: none; }
.sidebar-foot button { display: inline-flex; gap: 6px; align-items: center; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: transparent; color: var(--ink); font: inherit; font-weight: 600; font-size: .86rem; cursor: pointer; }
.sidebar-foot button:hover { border-color: var(--accent); }
