/*
 * Gemeinsames Design der Admin Seite (admin.sebastian-birthelmer.de), seit 30.10.2026.
 * Angelehnt an Apples Human Interface Guidelines: Systemschrift, gruppierte Flächen,
 * Materialien mit Unschärfe, Federkurven, hell und dunkel nach Systemeinstellung.
 *
 * Eingebunden von: Übersicht, Dienste, Gedächtnis, Trading, Mindmap.
 * Networth ist eine installierbare App mit eigener Kopie der Farben in style.css.
 * Die Leiste oben kommt aus nav.js, damit die Liste der Bereiche nur an einer Stelle steht.
 */

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

/* ------------------------------------------------------------------ Farben und Maße */
:root {
  color-scheme: light dark;
  --ax-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter Admin", system-ui, "Segoe UI", Roboto, sans-serif;
  --ax-font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter Admin", system-ui, "Segoe UI", Roboto, sans-serif;
  --ax-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --ax-bg: #f2f2f7;            /* gruppierter Hintergrund */
  --ax-bg-2: #ffffff;          /* Karten, Listen */
  --ax-bg-3: #f2f2f7;          /* Flächen in Karten */
  --ax-label: #1d1d1f;
  --ax-label-2: rgba(60, 60, 67, .76);
  --ax-label-3: rgba(60, 60, 67, .5);
  --ax-sep: rgba(60, 60, 67, .16);
  --ax-sep-strong: rgba(60, 60, 67, .29);
  --ax-fill: rgba(120, 120, 128, .12);
  --ax-fill-2: rgba(120, 120, 128, .08);
  --ax-fill-3: rgba(120, 120, 128, .2);

  --ax-blue: #007aff;   --ax-blue-text: #0066d6;
  --ax-green: #34c759;  --ax-green-text: #1f8a3c;
  --ax-red: #ff3b30;    --ax-red-text: #d70015;
  --ax-orange: #ff9500; --ax-orange-text: #b35c00;
  --ax-yellow: #ffcc00;
  --ax-teal: #30b0c7;   --ax-teal-text: #0e7d92;
  --ax-indigo: #5856d6;
  --ax-purple: #af52de; --ax-purple-text: #8e3bb8;
  --ax-pink: #ff2d55;
  --ax-gray: #8e8e93;
  --ax-accent: var(--ax-blue);
  --ax-accent-text: var(--ax-blue-text);
  --ax-on-accent: #fff;

  --ax-material: rgba(250, 250, 252, .74);
  --ax-material-thick: rgba(250, 250, 252, .9);
  --ax-blur: blur(24px) saturate(180%);
  --ax-scrim: rgba(0, 0, 0, .28);

  --ax-shadow-1: 0 0 0 .5px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .04), 0 2px 10px rgba(0, 0, 0, .035);
  --ax-shadow-2: 0 0 0 .5px rgba(0, 0, 0, .05), 0 4px 14px rgba(0, 0, 0, .07), 0 12px 32px rgba(0, 0, 0, .06);
  --ax-shadow-3: 0 0 0 .5px rgba(0, 0, 0, .06), 0 18px 60px rgba(0, 0, 0, .2);

  --ax-r-xs: 6px; --ax-r-s: 9px; --ax-r: 12px; --ax-r-l: 18px; --ax-r-xl: 24px;
  --ax-max: 1180px;
  --ax-pad: 20px;
  --ax-nav-h: 52px;
  --ax-safe-b: env(safe-area-inset-bottom, 0px);

  /* Bewegung: kritisch gedämpft, keine Überschwinger (Apple Standard für UI ohne Wurf) */
  --ax-ease: cubic-bezier(.32, .72, 0, 1);
  --ax-ease-out: cubic-bezier(.23, 1, .32, 1);
  --ax-ease-in: cubic-bezier(.55, 0, 1, .45);
  --ax-fast: 140ms; --ax-mid: 240ms; --ax-slow: 380ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-ax-theme="light"]) {
    --ax-bg: #000000;
    --ax-bg-2: #1c1c1e;
    --ax-bg-3: #2c2c2e;
    --ax-label: #f5f5f7;
    --ax-label-2: rgba(235, 235, 245, .7);
    --ax-label-3: rgba(235, 235, 245, .42);
    --ax-sep: rgba(84, 84, 88, .55);
    --ax-sep-strong: rgba(84, 84, 88, .85);
    --ax-fill: rgba(120, 120, 128, .24);
    --ax-fill-2: rgba(120, 120, 128, .16);
    --ax-fill-3: rgba(120, 120, 128, .36);
    --ax-blue: #0a84ff;   --ax-blue-text: #4ba3ff;
    --ax-green: #30d158;  --ax-green-text: #30d158;
    --ax-red: #ff453a;    --ax-red-text: #ff6961;
    --ax-orange: #ff9f0a; --ax-orange-text: #ffb340;
    --ax-yellow: #ffd60a;
    --ax-teal: #40c8e0;   --ax-teal-text: #5cd6eb;
    --ax-indigo: #5e5ce6;
    --ax-purple: #bf5af2; --ax-purple-text: #d084f5;
    --ax-pink: #ff375f;
    --ax-gray: #98989d;
    --ax-material: rgba(30, 30, 32, .7);
    --ax-material-thick: rgba(30, 30, 32, .88);
    --ax-scrim: rgba(0, 0, 0, .5);
    --ax-shadow-1: 0 0 0 .5px rgba(255, 255, 255, .06);
    --ax-shadow-2: 0 0 0 .5px rgba(255, 255, 255, .08), 0 12px 32px rgba(0, 0, 0, .4);
    --ax-shadow-3: 0 0 0 .5px rgba(255, 255, 255, .1), 0 24px 70px rgba(0, 0, 0, .6);
  }
}
/* Seiten, die immer dunkel sind (Mindmap), setzen data-ax-theme="dark" auf <html> */
:root[data-ax-theme="dark"] {
  color-scheme: dark;
  --ax-bg: #000000; --ax-bg-2: #1c1c1e; --ax-bg-3: #2c2c2e;
  --ax-label: #f5f5f7; --ax-label-2: rgba(235, 235, 245, .7); --ax-label-3: rgba(235, 235, 245, .42);
  --ax-sep: rgba(84, 84, 88, .55); --ax-sep-strong: rgba(84, 84, 88, .85);
  --ax-fill: rgba(120, 120, 128, .24); --ax-fill-2: rgba(120, 120, 128, .16); --ax-fill-3: rgba(120, 120, 128, .36);
  --ax-blue: #0a84ff; --ax-blue-text: #4ba3ff; --ax-green: #30d158; --ax-green-text: #30d158;
  --ax-red: #ff453a; --ax-red-text: #ff6961; --ax-orange: #ff9f0a; --ax-orange-text: #ffb340;
  --ax-teal: #40c8e0; --ax-teal-text: #5cd6eb; --ax-purple: #bf5af2; --ax-purple-text: #d084f5; --ax-gray: #98989d;
  --ax-material: rgba(30, 30, 32, .7); --ax-material-thick: rgba(30, 30, 32, .88); --ax-scrim: rgba(0, 0, 0, .5);
  --ax-shadow-1: 0 0 0 .5px rgba(255, 255, 255, .06);
  --ax-shadow-2: 0 0 0 .5px rgba(255, 255, 255, .08), 0 12px 32px rgba(0, 0, 0, .4);
  --ax-shadow-3: 0 0 0 .5px rgba(255, 255, 255, .1), 0 24px 70px rgba(0, 0, 0, .6);
}

@media (prefers-contrast: more) {
  :root { --ax-label-2: rgba(60, 60, 67, .92); --ax-label-3: rgba(60, 60, 67, .75); --ax-sep: rgba(60, 60, 67, .45); --ax-material: var(--ax-bg-2); }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --ax-material: var(--ax-bg-2); --ax-material-thick: var(--ax-bg-2); --ax-blur: none; }
}

/* ------------------------------------------------------------------ Grundlage */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.ax {
  margin: 0; background: var(--ax-bg); color: var(--ax-label);
  font-family: var(--ax-font); font-size: 15px; line-height: 1.47; letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent; font-feature-settings: "cv11" 1, "ss01" 1;
}
:where(.ax) :where(button, input, select, textarea) { font: inherit; color: inherit; letter-spacing: inherit; }
:where(.ax) a { color: var(--ax-accent-text); text-underline-offset: 2px; }
:where(.ax) :focus-visible { outline: 3px solid color-mix(in srgb, var(--ax-accent) 55%, transparent); outline-offset: 2px; }
:where(.ax) [hidden] { display: none !important; }
:where(.ax) ::selection { background: color-mix(in srgb, var(--ax-accent) 28%, transparent); }

.ax-num { font-variant-numeric: tabular-nums; }
.ax-muted { color: var(--ax-label-2); }
.ax-faint { color: var(--ax-label-3); }
.ax-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Schriftgrade: Laufweite je Größe, große Schrift enger, kleine leicht weiter */
.ax-largetitle { font-family: var(--ax-font-display); font-size: 34px; line-height: 1.12; font-weight: 700; letter-spacing: -.026em; margin: 0; }
.ax-title1 { font-family: var(--ax-font-display); font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.022em; margin: 0; }
.ax-title2 { font-family: var(--ax-font-display); font-size: 22px; line-height: 1.22; font-weight: 700; letter-spacing: -.018em; margin: 0; }
.ax-title3 { font-family: var(--ax-font-display); font-size: 19px; line-height: 1.26; font-weight: 650; letter-spacing: -.014em; margin: 0; }
.ax-headline { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.ax-callout { font-size: 14px; line-height: 1.43; }
.ax-footnote { font-size: 13px; line-height: 1.38; letter-spacing: -.003em; }
.ax-caption { font-size: 12px; line-height: 1.33; letter-spacing: 0; }
.ax-eyebrow { font-size: 12px; line-height: 1.3; font-weight: 600; letter-spacing: .02em; color: var(--ax-label-2); text-transform: uppercase; }

/* ------------------------------------------------------------------ Seitengerüst */
.ax-page { max-width: var(--ax-max); margin: 0 auto; padding: 0 var(--ax-pad); }
.ax-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 30px 0 18px; }
.ax-head .ax-sub { margin: 6px 0 0; color: var(--ax-label-2); font-size: 15px; max-width: 64ch; }
.ax-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ax-section { margin-top: 34px; }
.ax-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.ax-section-head .ax-title3 .ax-count { color: var(--ax-label-3); font-weight: 500; margin-left: 6px; }
.ax-section-head a { font-size: 14px; text-decoration: none; }

/* ------------------------------------------------------------------ Leiste oben */
.ax-nav {
  position: sticky; top: 0; z-index: 40; height: var(--ax-nav-h);
  background: var(--ax-material); -webkit-backdrop-filter: var(--ax-blur); backdrop-filter: var(--ax-blur);
  box-shadow: inset 0 -.5px 0 var(--ax-sep-strong);
  font-family: var(--ax-font); font-size: 14px; line-height: 1.3; letter-spacing: -.006em; color: var(--ax-label);
  view-transition-name: ax-nav;
}
.ax-nav-in { max-width: 1480px; height: 100%; margin: 0 auto; padding: 0 var(--ax-pad); display: flex; align-items: center; gap: 14px; }
.ax-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; font-size: 15px; color: var(--ax-label) !important; text-decoration: none; flex: none; letter-spacing: -.012em; }
.ax-brand-mark { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #5aa2ff, #0a6cff 55%, #4b3fe0); box-shadow: inset 0 .5px 0 rgba(255,255,255,.45), 0 1px 2px rgba(0,0,0,.18); }
.ax-brand-mark svg { width: 15px; height: 15px; }
.ax-tabs { flex: 1; min-width: 0; display: flex; justify-content: center; }
.ax-tabs-track { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--ax-fill-2); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.ax-tabs-track::-webkit-scrollbar { display: none; }
.ax-tab { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; color: var(--ax-label-2) !important; text-decoration: none; white-space: nowrap; font-weight: 520; transition: color var(--ax-fast) ease; }
.ax-tab:hover { color: var(--ax-label) !important; }
.ax-tab svg { width: 16px; height: 16px; flex: none; }
.ax-tab > * { position: relative; z-index: 1; }
.ax-tab[aria-current="page"] { color: var(--ax-label) !important; font-weight: 600; }
.ax-tab[aria-current="page"]::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--ax-bg-2);
  box-shadow: 0 0 0 .5px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.1), 0 2px 8px rgba(0,0,0,.05);
  view-transition-name: ax-tab-pill;
}
:root[data-ax-theme="dark"] .ax-tab[aria-current="page"]::before { background: var(--ax-fill-3); box-shadow: none; }
@media (prefers-color-scheme: dark) { .ax-tab[aria-current="page"]::before { background: var(--ax-fill-3); box-shadow: none; } }
.ax-tab:active { transform: scale(.97); }
.ax-tab[hidden] { display: none; }
button.ax-tab { border: 0; background: none; font: inherit; cursor: pointer; }
.ax-more[aria-expanded="true"] { color: var(--ax-label) !important; background: var(--ax-fill); }
.ax-more-menu { position: fixed; z-index: 60; min-width: 200px; padding: 6px; border-radius: 14px; background: var(--ax-bg-2); -webkit-backdrop-filter: var(--ax-blur); backdrop-filter: var(--ax-blur); box-shadow: var(--ax-shadow-2); display: grid; gap: 1px; transform-origin: top right; animation: ax-more-in 180ms var(--ax-ease-out); }
.ax-more-menu[hidden] { display: none; }
@keyframes ax-more-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .ax-more-menu { animation: none; } }
.ax-more-item { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 9px; color: var(--ax-label) !important; text-decoration: none; font-weight: 520; white-space: nowrap; }
.ax-more-item:hover, .ax-more-item:focus-visible { background: var(--ax-fill-2); outline: none; }
.ax-more-item svg { width: 17px; height: 17px; flex: none; color: var(--ax-label-2); }
.ax-more-item[aria-current="page"] { background: var(--ax-fill-2); font-weight: 620; }
.ax-more-item[aria-current="page"] svg { color: var(--ax-accent); }
.ax-tab svg.ax-more-pfeil { width: 12px; height: 12px; margin-left: -2px; opacity: .65; display: block; }
.ax-out { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; color: var(--ax-label-2) !important; text-decoration: none; font-weight: 520; }
.ax-out:hover { background: var(--ax-fill-2); color: var(--ax-label) !important; }
.ax-out svg { width: 16px; height: 16px; }
@media (max-width: 860px) {
  .ax-nav-in { gap: 8px; padding: 0 10px; }
  .ax-brand span:last-child, .ax-out span { display: none; }
  .ax-tabs { justify-content: flex-start; }
  .ax-tab { padding: 0 11px; }
}
@media (max-width: 520px) {
  .ax-tab svg { display: none; }
}

/* Suchknopf in der Leiste (Strg+K) */
.ax-find { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 8px 0 11px; border: 0; border-radius: 999px; background: var(--ax-fill-2); color: var(--ax-label-2); font: inherit; font-weight: 520; cursor: pointer; transition: background-color var(--ax-fast) ease, color var(--ax-fast) ease; }
.ax-find:hover { color: var(--ax-label); background: var(--ax-fill); }
.ax-find svg { width: 15px; height: 15px; }
.ax-find kbd { font: 600 11px/1 var(--ax-font, inherit); padding: 4px 6px; border-radius: 6px; background: var(--ax-bg-2); color: var(--ax-label-3); box-shadow: var(--ax-shadow-1); }
@media (max-width: 1640px) { .ax-find span, .ax-find kbd { display: none; } .ax-find { width: 32px; padding: 0; justify-content: center; } }

/* Tableiste unten auf dem Handy wie unter iOS */
.ax-tabbar { display: none; }
@media (max-width: 700px) {
  .ax-tabs { display: none; }
  .ax-nav-in { justify-content: space-between; }
  .ax-brand span:last-child { display: inline; }
  .ax-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    padding: 6px 6px calc(6px + var(--ax-safe-b)); background: color-mix(in srgb, var(--ax-bg-2) 80%, transparent);
    -webkit-backdrop-filter: var(--ax-blur); backdrop-filter: var(--ax-blur); border-top: .5px solid var(--ax-sep);
  }
  .ax-tabbar a, .ax-tabbar button { display: grid; justify-items: center; gap: 3px; padding: 4px 0 2px; border: 0; background: none; font: inherit; font-size: 10.5px; font-weight: 560; color: var(--ax-label-3) !important; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform var(--ax-fast) var(--ax-ease); }
  .ax-tabbar a:active, .ax-tabbar button:active { transform: scale(.92); }
  .ax-tabbar svg { width: 24px; height: 24px; stroke-width: 1.7; }
  .ax-tabbar [aria-current="page"] { color: var(--ax-accent) !important; }
  .ax-tabbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.ax-hat-tabbar { --ax-tabbar-h: calc(58px + var(--ax-safe-b)); padding-bottom: var(--ax-tabbar-h); }
  body.ax-hat-tabbar .ax-fab { bottom: calc(var(--ax-tabbar-h) + 14px); }
  body.ax-hat-tabbar .ax-toast { bottom: calc(var(--ax-tabbar-h) + 12px); }
}
@media print { .ax-tabbar { display: none !important; } }

/* Suche über alles */
.ax-pal { padding: 0; border: 0; background: transparent; width: min(640px, calc(100vw - 24px)); max-height: none; margin: 12vh auto auto; overflow: visible; color: var(--ax-label); }
.ax-pal::backdrop { background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.ax-pal[open] .ax-pal-box { animation: ax-pal-in 200ms var(--ax-ease-out); }
@keyframes ax-pal-in { from { opacity: 0; transform: scale(.97) translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .ax-pal[open] .ax-pal-box { animation: none; } }
.ax-pal-box { display: flex; flex-direction: column; max-height: min(560px, 76vh); border-radius: 16px; background: var(--ax-bg-2); box-shadow: var(--ax-shadow-2), 0 0 0 .5px var(--ax-sep); overflow: hidden; }
.ax-pal-feld { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: .5px solid var(--ax-sep); }
.ax-pal-feld svg { width: 18px; height: 18px; color: var(--ax-label-3); flex: none; }
.ax-pal-feld input { flex: 1; min-width: 0; height: 54px; border: 0; outline: 0; background: none; color: var(--ax-label); font: inherit; font-size: 17px; }
.ax-pal-feld input::-webkit-search-cancel-button { display: none; }
.ax-pal-zu { display: none; border: 0; background: none; color: var(--ax-accent); font: inherit; font-size: 16px; cursor: pointer; padding: 8px 0 8px 6px; }
.ax-pal-liste { overflow-y: auto; overscroll-behavior: contain; padding: 6px; }
.ax-pal-gruppe { margin: 10px 10px 4px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ax-label-3); }
.ax-pal-gruppe:first-child { margin-top: 4px; }
.ax-pal-item { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 10px; border-radius: 10px; color: var(--ax-label) !important; text-decoration: none; scroll-margin: 6px; }
.ax-pal-item[aria-selected="true"] { background: var(--ax-accent); color: #fff !important; }
.ax-pal-item[aria-selected="true"] small, .ax-pal-item[aria-selected="true"] .ax-pal-hint, .ax-pal-item[aria-selected="true"] .ax-pal-sym { color: rgba(255,255,255,.82); }
@media (hover: hover) { .ax-pal-item:not([aria-selected="true"]):hover { background: var(--ax-fill-2); } }
.ax-pal-sym { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: var(--ax-fill-2); color: var(--ax-label-2); }
.ax-pal-sym svg { width: 16px; height: 16px; }
.ax-pal-sym.emoji { font-size: 16px; }
.ax-pal-item[aria-selected="true"] .ax-pal-sym { background: rgba(255,255,255,.18); }
.ax-pal-txt { flex: 1; min-width: 0; display: grid; }
.ax-pal-txt b { font-weight: 560; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ax-pal-txt small { color: var(--ax-label-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ax-pal-hint { flex: none; font-size: 11.5px; color: var(--ax-label-3); }
.ax-pal-leer { margin: 28px 0; text-align: center; color: var(--ax-label-2); }
.ax-pal-fuss { display: flex; gap: 16px; margin: 0; padding: 9px 14px; border-top: .5px solid var(--ax-sep); font-size: 12px; color: var(--ax-label-3); }
.ax-pal-fuss kbd { font: 600 11px/1 inherit; padding: 3px 5px; margin-right: 3px; border-radius: 5px; background: var(--ax-fill-2); color: var(--ax-label-2); }
@media (max-width: 700px) {
  .ax-pal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; }
  .ax-pal-box { height: 100%; max-height: none; border-radius: 0; padding-top: env(safe-area-inset-top, 0px); }
  .ax-pal-zu { display: block; }
  .ax-pal-fuss { display: none; }
  .ax-pal-item { min-height: 52px; }
}

/* Weicher Seitenwechsel zwischen den Bereichen (nur gleiche Herkunft, nur wo der Browser es kann) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; animation-timing-function: var(--ax-ease); }
::view-transition-group(ax-tab-pill) { animation-duration: 360ms; animation-timing-function: var(--ax-ease); }

/* ------------------------------------------------------------------ Karten und Listen */
.ax-card { background: var(--ax-bg-2); border-radius: var(--ax-r-l); box-shadow: var(--ax-shadow-1); padding: 16px 18px; min-width: 0; }
.ax-card.is-link, a.ax-card { color: inherit; text-decoration: none; display: block; transition: transform var(--ax-mid) var(--ax-ease), box-shadow var(--ax-mid) var(--ax-ease); }
@media (hover: hover) { .ax-card.is-link:hover, a.ax-card:hover { box-shadow: var(--ax-shadow-2); transform: translateY(-1px); } }
.ax-card.is-link:active, a.ax-card:active { transform: scale(.985); transition-duration: 80ms; }

.ax-list { background: var(--ax-bg-2); border-radius: var(--ax-r); box-shadow: var(--ax-shadow-1); overflow: hidden; margin: 0; padding: 0; list-style: none; }
.ax-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 16px; min-height: 44px; color: inherit; text-decoration: none; }
.ax-row + .ax-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--ax-sep); }
.ax-row.has-icon + .ax-row.has-icon::before { left: 58px; }
button.ax-row, a.ax-row { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; }
button.ax-row:hover, a.ax-row:hover { background: var(--ax-fill-2); }
button.ax-row:active, a.ax-row:active { background: var(--ax-fill); }
.ax-row .ax-grow { flex: 1; min-width: 0; }
.ax-chevron { width: 8px; height: 13px; flex: none; color: var(--ax-label-3); }
.ax-list-head { font-size: 13px; color: var(--ax-label-2); margin: 0 16px 7px; text-transform: uppercase; letter-spacing: .02em; }
.ax-list-foot { font-size: 13px; color: var(--ax-label-2); margin: 7px 16px 0; }

/* App Symbol (abgerundetes Quadrat wie auf dem Home Bildschirm) */
.ax-icon { --c1: #8e8e93; --c2: #636366; width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 7px; color: #fff; font-size: 17px; line-height: 1; background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: inset 0 .5px 0 rgba(255,255,255,.35); }
.ax-icon.l { width: 44px; height: 44px; border-radius: 11px; font-size: 24px; }
.ax-icon svg { width: 62%; height: 62%; }

/* ------------------------------------------------------------------ Knöpfe */
.ax-btn {
  --b: var(--ax-fill); --t: var(--ax-label);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 0 15px; border: 0; border-radius: 999px; background: var(--b); color: var(--t) !important;
  font-size: 14px; font-weight: 590; letter-spacing: -.01em; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: transform var(--ax-fast) var(--ax-ease), background-color var(--ax-fast) ease, opacity var(--ax-fast) ease, filter var(--ax-fast) ease;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.ax-btn:hover { filter: brightness(.96); }
@media (prefers-color-scheme: dark) { .ax-btn:hover { filter: brightness(1.12); } }
.ax-btn:active { transform: scale(.96); transition-duration: 60ms; }
.ax-btn:disabled, .ax-btn[aria-disabled="true"] { opacity: .45; cursor: default; transform: none; filter: none; }
.ax-btn svg { width: 16px; height: 16px; flex: none; }
.ax-btn--filled { --b: var(--ax-accent); --t: var(--ax-on-accent); }
.ax-btn--tinted { --b: color-mix(in srgb, var(--ax-accent) 14%, transparent); --t: var(--ax-accent-text); }
.ax-btn--plain { --b: transparent; --t: var(--ax-accent-text); padding: 0 8px; }
.ax-btn--plain:hover { --b: var(--ax-fill-2); filter: none; }
.ax-btn--danger { --b: color-mix(in srgb, var(--ax-red) 13%, transparent); --t: var(--ax-red-text); }
.ax-btn--danger-filled { --b: var(--ax-red); --t: #fff; }
.ax-btn--success { --b: var(--ax-green); --t: #fff; }
.ax-btn--sm { min-height: 28px; padding: 0 12px; font-size: 13px; }
.ax-btn--lg { min-height: 44px; padding: 0 20px; font-size: 15px; }
.ax-btn--icon { width: 34px; padding: 0; }
.ax-btn--icon.ax-btn--sm { width: 28px; }

/* ------------------------------------------------------------------ Segmente, Chips, Suche */
.ax-seg { display: inline-flex; position: relative; padding: 2px; gap: 0; border-radius: 9px; background: var(--ax-fill); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ax-seg::-webkit-scrollbar { display: none; }
.ax-seg > button { position: relative; z-index: 1; border: 0; background: none; padding: 0 13px; min-height: 28px; border-radius: 7px; font-size: 13px; font-weight: 520; color: var(--ax-label); cursor: pointer; white-space: nowrap; transition: background-color var(--ax-mid) var(--ax-ease), box-shadow var(--ax-mid) var(--ax-ease); }
.ax-seg > button + button::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: .5px; background: var(--ax-sep-strong); transition: opacity var(--ax-mid) ease; }
.ax-seg > button[aria-pressed="true"], .ax-seg > button[aria-selected="true"] { background: var(--ax-bg-2); font-weight: 600; box-shadow: 0 0 0 .5px rgba(0,0,0,.04), 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); }
.ax-seg > button[aria-pressed="true"]::before, .ax-seg > button[aria-selected="true"]::before, .ax-seg > button[aria-pressed="true"] + button::before, .ax-seg > button[aria-selected="true"] + button::before { opacity: 0; }
@media (prefers-color-scheme: dark) { .ax-seg > button[aria-pressed="true"], .ax-seg > button[aria-selected="true"] { background: #636366; box-shadow: none; } }
:root[data-ax-theme="dark"] .ax-seg > button[aria-pressed="true"], :root[data-ax-theme="dark"] .ax-seg > button[aria-selected="true"] { background: #636366; box-shadow: none; }
.ax-seg > button:active { transform: scale(.97); }

.ax-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.ax-chips::-webkit-scrollbar { display: none; }
/* Breite Schirme: Chips umbrechen statt abschneiden. Schmale: wischen, mit ausblendendem Rand als Hinweis */
@media (min-width: 701px) { .ax-chips { flex-wrap: wrap; overflow: visible; } }
.ax-chips[data-rand="r"] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); }
.ax-chips[data-rand="l"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 44px); mask-image: linear-gradient(to right, transparent, #000 44px); }
.ax-chips[data-rand="lr"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent); }
.ax-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 13px; border: 0; border-radius: 999px; background: var(--ax-bg-2); box-shadow: var(--ax-shadow-1); color: var(--ax-label); font-size: 13.5px; font-weight: 520; cursor: pointer; white-space: nowrap; transition: background-color var(--ax-fast) ease, color var(--ax-fast) ease, transform var(--ax-fast) var(--ax-ease); }
.ax-chip:hover { background: color-mix(in srgb, var(--ax-bg-2) 92%, var(--ax-label)); }
.ax-chip:active { transform: scale(.96); }
.ax-chip[aria-pressed="true"] { background: var(--ax-label); color: var(--ax-bg-2); font-weight: 600; }
.ax-chip .n { color: var(--ax-label-3); font-variant-numeric: tabular-nums; font-weight: 500; }
.ax-chip[aria-pressed="true"] .n { color: color-mix(in srgb, var(--ax-bg-2) 65%, transparent); }
.ax-chip-sep { flex: none; width: .5px; background: var(--ax-sep-strong); margin: 6px 2px; }

.ax-search { position: relative; display: block; }
.ax-search input { width: 100%; height: 38px; padding: 0 12px 0 34px; border: 0; border-radius: 11px; background: var(--ax-fill); color: var(--ax-label); font-size: 16px; outline: none; transition: box-shadow var(--ax-fast) ease, background-color var(--ax-fast) ease; }
.ax-search input::placeholder { color: var(--ax-label-3); }
.ax-search input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ax-accent) 40%, transparent); background: var(--ax-bg-2); }
.ax-search::before { content: ""; position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; margin-top: -8px; background: var(--ax-label-3); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m20 20-4.6-4.6'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m20 20-4.6-4.6'/%3E%3C/svg%3E") center/contain no-repeat; }
.ax-search input::-webkit-search-cancel-button { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; cursor: pointer;
  background: var(--ax-label-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' stroke='white' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M5 5l6 6M11 5l-6 6'/%3E%3C/svg%3E") center/100% no-repeat; }

/* Leiste, die unter der Navigation kleben bleibt (Suche, Filter) */
.ax-toolbar { position: sticky; top: var(--ax-nav-h); z-index: 30; background: color-mix(in srgb, var(--ax-bg) 82%, transparent); -webkit-backdrop-filter: var(--ax-blur); backdrop-filter: var(--ax-blur); }
.ax-toolbar-in { max-width: var(--ax-max); margin: 0 auto; padding: 10px var(--ax-pad); display: grid; gap: 10px; }
/* Kante nur zeigen, wenn Inhalt darunter liegt */
.ax-toolbar { box-shadow: inset 0 -.5px 0 transparent; transition: box-shadow var(--ax-mid) ease; }
.ax-toolbar.is-stuck { box-shadow: inset 0 -.5px 0 var(--ax-sep-strong); }

/* ------------------------------------------------------------------ Formulare */
.ax-form { display: grid; gap: 14px; }
.ax-field { display: grid; gap: 6px; }
.ax-field > span, .ax-label { font-size: 13px; font-weight: 550; color: var(--ax-label-2); }
.ax-field .ax-hint { font-weight: 400; color: var(--ax-label-3); }
.ax-input, .ax-form input:not([type=checkbox]):not([type=radio]):not([type=range]), .ax-form select, .ax-form textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 10px; background: var(--ax-fill-2);
  box-shadow: inset 0 0 0 .5px var(--ax-sep-strong); color: var(--ax-label); font-size: 16px; outline: none;
  transition: box-shadow var(--ax-fast) ease, background-color var(--ax-fast) ease;
}
.ax-input:focus, .ax-form input:focus, .ax-form select:focus, .ax-form textarea:focus { background: var(--ax-bg-2); box-shadow: inset 0 0 0 1px var(--ax-accent), 0 0 0 3px color-mix(in srgb, var(--ax-accent) 28%, transparent); }
.ax-form textarea { line-height: 1.5; resize: vertical; }
.ax-form select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16' fill='none' stroke='%238e8e93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6l3-3 3 3M3 10l3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 16px; }

/* Schalter wie unter iOS: <label class="ax-switch"><input type="checkbox" role="switch"><span></span></label> */
.ax-switch { position: relative; display: inline-flex; flex: none; width: 51px; height: 31px; cursor: pointer; }
.ax-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: inherit; }
.ax-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--ax-fill-3); transition: background-color var(--ax-mid) var(--ax-ease); }
.ax-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 3px 1px rgba(0,0,0,.06); transition: transform var(--ax-slow) var(--ax-ease), width var(--ax-fast) var(--ax-ease); }
.ax-switch input:checked + span { background: var(--ax-green); }
.ax-switch input:checked + span::after { transform: translateX(20px); }
.ax-switch input:active + span::after { width: 33px; }
.ax-switch input:checked:active + span::after { transform: translateX(14px); }
.ax-switch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--ax-accent) 55%, transparent); outline-offset: 2px; }
.ax-switch input:disabled + span { opacity: .5; }
.ax-switch.is-busy span::after { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='%238e8e93' stroke-width='3' stroke-dasharray='30 60' stroke-linecap='round'/%3E%3C/svg%3E") center/15px no-repeat; animation: ax-spin .8s linear infinite; }

/* ------------------------------------------------------------------ Kennzeichen */
.ax-badge { --c: var(--ax-gray); --ct: var(--ax-label-2); display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0; white-space: nowrap; color: var(--ct); background: color-mix(in srgb, var(--c) 15%, transparent); }
.ax-badge--green { --c: var(--ax-green); --ct: var(--ax-green-text); }
.ax-badge--red { --c: var(--ax-red); --ct: var(--ax-red-text); }
.ax-badge--orange { --c: var(--ax-orange); --ct: var(--ax-orange-text); }
.ax-badge--blue { --c: var(--ax-blue); --ct: var(--ax-blue-text); }
.ax-badge--purple { --c: var(--ax-purple); --ct: var(--ax-purple-text); }
.ax-badge--teal { --c: var(--ax-teal); --ct: var(--ax-teal-text); }
.ax-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--ax-gray); display: inline-block; }
.ax-dot.ok { background: var(--ax-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ax-green) 20%, transparent); }
.ax-dot.bad { background: var(--ax-red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ax-red) 20%, transparent); }
.ax-dot.warn { background: var(--ax-orange); }
.ax-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border: 0; border-radius: 6px; background: var(--ax-fill-2); color: var(--ax-label-2); font-size: 12px; font-weight: 520; cursor: pointer; white-space: nowrap; }
.ax-tag:hover { background: var(--ax-fill); color: var(--ax-label); }

/* Füllstand */
.ax-meter { height: 6px; border-radius: 999px; background: var(--ax-fill); overflow: hidden; }
.ax-meter > i { display: block; height: 100%; border-radius: inherit; background: var(--ax-green); transition: width .6s var(--ax-ease); }
.ax-meter.warn > i { background: var(--ax-orange); }
.ax-meter.crit > i { background: var(--ax-red); }

/* Ladeanzeige wie unter iOS (Speichen) */
.ax-spinner { width: 18px; height: 18px; display: inline-block; flex: none; vertical-align: -4px; color: var(--ax-label-2);
  background: currentColor; animation: ax-spin 1s steps(8) infinite;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 3v4' opacity='1'/%3E%3Cpath d='M18.4 5.6l-2.8 2.8' opacity='.3'/%3E%3Cpath d='M21 12h-4' opacity='.35'/%3E%3Cpath d='M18.4 18.4l-2.8-2.8' opacity='.42'/%3E%3Cpath d='M12 21v-4' opacity='.5'/%3E%3Cpath d='M5.6 18.4l2.8-2.8' opacity='.62'/%3E%3Cpath d='M3 12h4' opacity='.75'/%3E%3Cpath d='M5.6 5.6l2.8 2.8' opacity='.88'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 3v4' opacity='1'/%3E%3Cpath d='M18.4 5.6l-2.8 2.8' opacity='.3'/%3E%3Cpath d='M21 12h-4' opacity='.35'/%3E%3Cpath d='M18.4 18.4l-2.8-2.8' opacity='.42'/%3E%3Cpath d='M12 21v-4' opacity='.5'/%3E%3Cpath d='M5.6 18.4l2.8-2.8' opacity='.62'/%3E%3Cpath d='M3 12h4' opacity='.75'/%3E%3Cpath d='M5.6 5.6l2.8 2.8' opacity='.88'/%3E%3C/svg%3E") center/contain no-repeat; }
@keyframes ax-spin { to { transform: rotate(360deg); } }

.ax-empty { text-align: center; color: var(--ax-label-2); padding: 56px 20px; display: grid; gap: 8px; justify-items: center; }
.ax-empty b { color: var(--ax-label); font-size: 17px; }

/* Platzhalter beim Laden */
.ax-skel { border-radius: var(--ax-r-l); background: linear-gradient(90deg, var(--ax-fill-2) 0%, var(--ax-fill) 40%, var(--ax-fill-2) 80%) 0 0/300% 100%; animation: ax-skel 1.6s var(--ax-ease) infinite; }
@keyframes ax-skel { from { background-position: 100% 0; } to { background-position: -50% 0; } }

/* ------------------------------------------------------------------ Meldungen und Dialoge */
.ax-toast {
  position: fixed; left: 50%; bottom: calc(22px + var(--ax-safe-b)); z-index: 90; translate: -50% 0;
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 999px; background: var(--ax-material-thick); -webkit-backdrop-filter: var(--ax-blur); backdrop-filter: var(--ax-blur);
  box-shadow: var(--ax-shadow-3); color: var(--ax-label); font-size: 14px; font-weight: 550; white-space: pre-line;
  opacity: 0; transform: translateY(16px) scale(.96); filter: blur(4px); pointer-events: none;
  transition: opacity var(--ax-mid) var(--ax-ease), transform var(--ax-slow) var(--ax-ease), filter var(--ax-mid) var(--ax-ease);
}
.ax-toast.show { opacity: 1; transform: none; filter: none; }
.ax-toast.err { border-radius: 16px; }
.ax-toast::before { content: ""; width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--ax-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.5'/%3E%3C/svg%3E") center/100% no-repeat; }
.ax-toast.err::before { background: var(--ax-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M10 5.5v5.5M10 14.3v.2'/%3E%3C/svg%3E") center/100% no-repeat; }
.ax-toast.info::before { display: none; }

/* Hinweisfenster (Alert): mittig, erscheint als Material statt nur einzublenden */
dialog.ax-alert {
  border: 0; padding: 0; width: min(300px, calc(100vw - 48px)); border-radius: 16px; overflow: hidden;
  background: var(--ax-material-thick); -webkit-backdrop-filter: var(--ax-blur); backdrop-filter: var(--ax-blur);
  color: var(--ax-label); box-shadow: var(--ax-shadow-3); text-align: center;
}
dialog.ax-alert::backdrop { background: var(--ax-scrim); }
dialog.ax-alert[open] { animation: ax-pop var(--ax-slow) var(--ax-ease); }
dialog.ax-alert[open]::backdrop { animation: ax-fade var(--ax-mid) ease; }
dialog.ax-alert.closing { animation: ax-pop-out 160ms var(--ax-ease-in) forwards; }
dialog.ax-alert.closing::backdrop { animation: ax-fade 160ms ease reverse forwards; }
.ax-alert-body { padding: 20px 18px 16px; }
.ax-alert h3 { margin: 0 0 4px; font-size: 17px; font-weight: 650; letter-spacing: -.012em; }
.ax-alert p { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--ax-label); }
.ax-alert-actions { display: grid; grid-template-columns: 1fr 1fr; box-shadow: inset 0 .5px 0 var(--ax-sep-strong); }
.ax-alert-actions button { border: 0; background: none; min-height: 44px; font-size: 16px; color: var(--ax-accent-text); cursor: pointer; }
.ax-alert-actions button + button { box-shadow: inset .5px 0 0 var(--ax-sep-strong); }
.ax-alert-actions button:hover { background: var(--ax-fill-2); }
.ax-alert-actions button:active { background: var(--ax-fill); }
.ax-alert-actions .is-default { font-weight: 650; }
.ax-alert-actions .is-destructive { color: var(--ax-red-text); font-weight: 600; }
@keyframes ax-pop { from { opacity: 0; transform: scale(1.12); filter: blur(6px); } }
@keyframes ax-pop-out { to { opacity: 0; transform: scale(.94); } }
@keyframes ax-fade { from { opacity: 0; } }

/* Seitenblatt: rechts auf großen Schirmen, von unten auf dem Handy. Gleicher Weg hinein und hinaus. */
.ax-sheet { position: fixed; inset: 0; z-index: 70; display: none; }
.ax-sheet.open, .ax-sheet.closing { display: block; }
.ax-sheet-scrim { position: absolute; inset: 0; background: var(--ax-scrim); animation: ax-fade var(--ax-mid) ease; }
.ax-sheet.closing .ax-sheet-scrim { animation: ax-fade 220ms ease reverse forwards; }
.ax-sheet-panel {
  position: absolute; top: 10px; right: 10px; bottom: 10px; width: min(720px, calc(100% - 20px));
  background: var(--ax-bg); border-radius: 20px; box-shadow: var(--ax-shadow-3); overflow: hidden auto; overscroll-behavior: contain;
  animation: ax-sheet-in var(--ax-slow) var(--ax-ease);
}
.ax-sheet.closing .ax-sheet-panel { animation: ax-sheet-out 240ms var(--ax-ease-in) forwards; }
@keyframes ax-sheet-in { from { transform: translateX(calc(100% + 20px)); } }
@keyframes ax-sheet-out { to { transform: translateX(calc(100% + 20px)); } }
.ax-sheet-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; min-height: 54px; padding: 8px 12px; background: color-mix(in srgb, var(--ax-bg) 80%, transparent); -webkit-backdrop-filter: var(--ax-blur); backdrop-filter: var(--ax-blur); box-shadow: inset 0 -.5px 0 var(--ax-sep); }
.ax-sheet-bar .ax-grow { flex: 1; }
.ax-sheet-body { padding: 18px 20px 28px; }
@media (max-width: 700px) {
  .ax-sheet-panel { top: 12px; left: 0; right: 0; bottom: 0; width: 100%; border-radius: 14px 14px 0 0; padding-bottom: var(--ax-safe-b); animation-name: ax-sheet-up; }
  .ax-sheet.closing .ax-sheet-panel { animation-name: ax-sheet-down; }
  @keyframes ax-sheet-up { from { transform: translateY(100%); } }
  @keyframes ax-sheet-down { to { transform: translateY(100%); } }
}

/* Schwebender Knopf (Neu) */
.ax-fab { position: fixed; right: 22px; bottom: calc(22px + var(--ax-safe-b)); z-index: 35; }
.ax-fab .ax-btn { min-height: 50px; padding: 0 22px; font-size: 15px; box-shadow: 0 6px 20px color-mix(in srgb, var(--ax-accent) 38%, transparent), 0 2px 6px rgba(0,0,0,.12); }

/* Inhalt gleitet beim ersten Laden sanft herein (nur einmal, nicht bei jedem Neuzeichnen) */
.ax-enter { animation: ax-enter .5s var(--ax-ease) both; }
@keyframes ax-enter { from { opacity: 0; transform: translateY(8px); } }

/* Kennzahlen als Widgets (Übersicht, Dienste) */
.ax-widgets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ax-widget { display: grid; gap: 4px; align-content: start; padding: 14px 16px 15px; min-height: 92px; }
.ax-widget .ax-eyebrow { display: flex; align-items: center; gap: 6px; }
.ax-widget .ax-eyebrow svg { width: 14px; height: 14px; flex: none; }
.ax-widget .val { font-family: var(--ax-font-display); font-size: 26px; font-weight: 700; letter-spacing: -.024em; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-widget .val small { font-size: 14px; font-weight: 500; color: var(--ax-label-2); letter-spacing: -.005em; margin-left: 4px; }
.ax-widget .ax-meter { margin-top: 6px; }
@media (max-width: 900px) { .ax-widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ax-widgets { gap: 10px; } .ax-widget { padding: 12px 14px; min-height: 0; } .ax-widget .val { font-size: 21px; white-space: normal; } .ax-widget .val small { display: block; margin: 1px 0 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }

/* Aufklappbereich mit drehendem Pfeil */
.ax-disclosure > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--ax-label-2); font-size: 13px; font-weight: 520; padding: 4px 0; user-select: none; }
.ax-disclosure > summary::-webkit-details-marker { display: none; }
.ax-disclosure > summary::before { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.8px 1.8px 0; transform: rotate(-45deg); transition: transform var(--ax-mid) var(--ax-ease); margin: 0 2px 0 1px; }
.ax-disclosure[open] > summary::before { transform: rotate(45deg) translate(-2px, -1px); }
.ax-disclosure > summary:hover { color: var(--ax-label); }

/* ------------------------------------------------------------------ Bewegung reduzieren */
@media (prefers-reduced-motion: reduce) {
  .ax *, .ax *::before, .ax *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .ax .ax-spinner { animation: ax-spin 1s steps(8) infinite !important; animation-duration: 1s !important; animation-iteration-count: infinite !important; }
  .ax-toast, .ax-toast.show { transform: none; filter: none; transition: opacity 200ms ease !important; }
  dialog.ax-alert[open] { animation: ax-fade 200ms ease !important; }
  @view-transition { navigation: none; }
}

@media (max-width: 700px) {
  :root { --ax-pad: 16px; }
  .ax-largetitle { font-size: 30px; }
  .ax-head { padding: 22px 0 14px; }
}
@media print { .ax-nav, .ax-toolbar, .ax-fab, .ax-toast { display: none !important; } }
