/* ColExTaxi Schichtplan
   Gestaltung: Schwarz/Gelb wie Marke & Taxi-Dachschild, Zahlen in Mono wie am Taxameter.
   Mobile first – ab 860px Matrix-Ansicht. */

/* ───────── Fonts (selbst gehostet, latin + latin-ext) ───────── */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 600 900; font-display: swap; src: url('fonts/montserrat-600-900-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 600 900; font-display: swap; src: url('fonts/montserrat-600-900-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('fonts/dm-sans-400-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('fonts/dm-sans-400-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500 700; font-display: swap; src: url('fonts/jetbrains-mono-500-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500 700; font-display: swap; src: url('fonts/jetbrains-mono-500-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }

/* ───────── Tokens ───────── */
:root {
  --c-ink: #0A0A0A;
  --c-ink-2: #1E1E28;
  --c-ink-3: #34343F;
  --c-on-ink: #F4F2EC;
  --c-on-ink-muted: #9C9A93;
  --c-yellow: #F5C518;
  --c-yellow-hover: #FFD740;
  --c-yellow-deep: #C99A0E;
  --c-yellow-wash: #FFF5CC;

  --c-bg: #F3F2EE;
  --c-surface: #FFFFFF;
  --c-surface-2: #F9F8F5;
  --c-line: #E3E0D7;
  --c-line-strong: #C9C5B8;
  --c-text: #17140F;
  --c-muted: #67645C;
  --c-taken: #E7E4DC;
  --c-taken-text: #55524A;

  --c-danger: #B42318;
  --c-danger-hover: #93190F;
  --c-danger-wash: #FDECEA;
  --c-ok: #0F6B45;
  --c-warn-wash: #FFF1D6;
  --c-warn-text: #7A4B00;

  /* Arabische/persische Schrift: Browser greift pro Zeichen auf die Systemschrift zurück */
  --f-arabic: 'Segoe UI', Tahoma, 'Noto Sans Arabic', 'Geeza Pro', 'Vazirmatn', sans-serif;
  --f-head: 'Montserrat', var(--f-arabic), system-ui, sans-serif;
  --f-body: 'DM Sans', system-ui, -apple-system, var(--f-arabic);
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, var(--f-arabic), monospace;

  --c-red: #D92D20;
  --c-red-wash: #FEF0EE;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px;
  --r-1: 4px; --r-2: 8px; --r-3: 12px; --r-4: 18px;

  --shadow-1: 0 1px 2px rgb(10 10 10 / .05), 0 2px 10px rgb(10 10 10 / .04);
  --shadow-2: 0 10px 40px rgb(10 10 10 / .28);

  --t-fast: 120ms;
  --t: 220ms;
  --ease: cubic-bezier(.16, 1, .3, 1);

  --bar-h: 62px;                         /* 56px Leiste + 6px Karo-Band */
  --tabs-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --gutter: 16px;

  --z-sticky: 20; --z-bar: 30; --z-tabs: 40; --z-toast: 60;

  --checker: repeating-conic-gradient(var(--c-ink) 0 25%, var(--c-yellow) 0 50%) 0 0 / 6px 6px;
}

/* ───────── Basis ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--c-bg);
  color: var(--c-text);
  font: 400 16px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--f-head); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--c-ink); outline-offset: 2px; }
.bar :focus-visible, .tabs :focus-visible, .auth :focus-visible, .meter :focus-visible, .toast :focus-visible { outline-color: var(--c-yellow); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--c-yellow); color: var(--c-ink); padding: 10px 14px; border-radius: var(--r-2); font-weight: 700; text-decoration: none; }
.skip:focus { top: 8px; }

.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.eyebrow { font: 600 11px/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); }
.eyebrow--light { color: var(--c-on-ink-muted); }
.muted { color: var(--c-muted); }
.noscript { padding: var(--s-5); text-align: center; }

/* ───────── Buttons ───────── */
.btn {
  --bg: var(--c-surface); --fg: var(--c-ink); --bd: var(--c-line-strong);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5);
  background: var(--bg); color: var(--fg);
  border: 1.5px solid var(--bd); border-radius: var(--r-1);
  font: 800 13px/1 var(--f-head); letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease);
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .5; }
.btn .i { width: 18px; height: 18px; }
.btn--primary { --bg: var(--c-yellow); --bd: var(--c-yellow); --fg: var(--c-ink); }
.btn--dark { --bg: var(--c-ink); --bd: var(--c-ink); --fg: var(--c-on-ink); }
.btn--ghost { --bg: transparent; }
.btn--danger { --bg: var(--c-danger); --bd: var(--c-danger); --fg: #fff; }
.btn--ghost-danger { --bg: transparent; --fg: var(--c-danger); --bd: color-mix(in srgb, var(--c-danger) 35%, transparent); }
.btn--block { width: 100%; }
.btn--lg { min-height: 56px; font-size: 14px; }
.btn--sm { min-height: 44px; padding: 0 var(--s-4); font-size: 12px; }
@media (hover: hover) {
  .btn--primary:hover:not(:disabled) { --bg: var(--c-yellow-hover); --bd: var(--c-yellow-hover); box-shadow: 0 8px 24px rgb(245 197 24 / .35); }
  .btn--dark:hover:not(:disabled) { --bg: var(--c-ink-2); --bd: var(--c-ink-2); }
  .btn--ghost:hover:not(:disabled) { --bd: var(--c-ink); }
  .btn--danger:hover:not(:disabled) { --bg: var(--c-danger-hover); --bd: var(--c-danger-hover); }
  .btn--ghost-danger:hover:not(:disabled) { --bg: var(--c-danger-wash); --bd: var(--c-danger); }
}
.btn.is-armed { --bg: var(--c-danger); --bd: var(--c-danger); --fg: #fff; }
.btn.is-busy { color: transparent !important; pointer-events: none; }
.btn.is-busy::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px;
  border: 2.5px solid var(--fg); border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }

.ibtn {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; padding: 0;
  background: transparent; color: inherit;
  border: 1.5px solid transparent; border-radius: var(--r-2);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.ibtn:disabled { opacity: .3; }
@media (hover: hover) { .ibtn:hover:not(:disabled) { background: rgb(10 10 10 / .06); } }

/* ───────── Formulare ───────── */
.field { display: grid; gap: 6px; }
.field__label { font: 700 12px/1.2 var(--f-head); letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.field__hint { font-size: 13px; color: var(--c-muted); }
.input, .field input, .field select {
  width: 100%; min-height: 50px; padding: 0 14px;
  background: var(--c-surface); color: var(--c-text);
  border: 1.5px solid var(--c-line-strong); border-radius: var(--r-2);
  font-size: 16px;                                  /* verhindert Zoom auf iOS */
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field input:focus, .field select:focus, .input:focus { outline: none; border-color: var(--c-ink); box-shadow: 0 0 0 3px rgb(245 197 24 / .55); }
.field input:user-invalid { border-color: var(--c-danger); }
.field input::placeholder { color: #A4A095; }
.mono-input { font-family: var(--f-mono) !important; letter-spacing: .04em; }

.pw { position: relative; display: block; }
.pw input { padding-right: 52px; }
.pw__toggle { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--c-muted); border-radius: var(--r-2); }
.pw__toggle[aria-pressed="true"] { color: var(--c-ink); }

.inline-input { display: flex; gap: var(--s-2); }
.inline-input > :first-child { flex: 1; min-width: 0; }
.inline-input .ibtn { width: 50px; height: 50px; border-color: var(--c-line-strong); background: var(--c-surface); }
@media (max-width: 399px) { .hide-xs { display: none; } }

.check { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; font-size: 15px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--c-ink); margin: 0; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; gap: 4px; background: var(--c-taken); border-radius: var(--r-2); border: 0; margin: 0; }
.seg legend { padding: 0; margin-bottom: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; min-height: 42px; border-radius: 6px; font: 700 14px var(--f-head); color: var(--c-muted); transition: background var(--t-fast), color var(--t-fast); }
.seg input:checked + span { background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow-1); }
.seg input:focus-visible + span { outline: 3px solid var(--c-ink); outline-offset: 1px; }

.form-error { color: var(--c-danger); font-size: 14px; font-weight: 600; min-height: 1.4em; }
.form-error:empty { min-height: 0; }

.note { padding: 12px 14px; border-radius: var(--r-2); font-size: 15px; background: var(--c-surface-2); border: 1px solid var(--c-line); }
.note--warn { background: var(--c-warn-wash); border-color: #F1D49B; color: var(--c-warn-text); }
.note--bad { background: var(--c-danger-wash); border-color: #F4C2BD; color: var(--c-danger); font-weight: 600; }

/* ───────── Anmeldung ───────── */
.is-guest { background: var(--c-ink); color: var(--c-on-ink); }
.is-guest::before { content: ''; position: fixed; inset: 0 0 auto; height: 12px; background: var(--checker); background-size: 12px 12px; z-index: 1; }
.auth {
  min-height: 100vh; min-height: 100svh;
  display: grid; align-content: center; gap: var(--s-6);
  padding: calc(var(--s-7) + 12px) var(--gutter) var(--s-6);
  max-width: 1080px; margin: 0 auto;
}
.auth__brand { display: grid; gap: var(--s-3); justify-items: start; }
.auth__logo { width: 72px; height: 72px; border-radius: 50%; }
.auth__title { display: grid; font: 900 clamp(3.2rem, 15vw, 7.5rem)/.88 var(--f-head); letter-spacing: -.03em; text-transform: uppercase; }
.auth__title span:last-child { color: var(--c-yellow); }
.auth__shifts { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font: 500 13px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--c-on-ink-muted); }
.auth__shifts b { color: var(--c-on-ink); font-weight: 700; }
.auth__card {
  display: grid; gap: var(--s-4);
  background: var(--c-surface); color: var(--c-text);
  padding: var(--s-5); border-radius: var(--r-3);
  box-shadow: 0 30px 80px rgb(0 0 0 / .45);
  width: 100%; max-width: 440px;
}
.auth__heading { font-size: 24px; font-weight: 800; }
.auth__lead { color: var(--c-muted); font-size: 15px; margin-top: -8px; }
.auth__foot { font-size: 14px; color: var(--c-muted); text-align: center; }
@media (min-width: 860px) {
  .auth { grid-template-columns: 1.2fr 1fr; align-items: center; gap: var(--s-7); }
  .auth__logo { width: 88px; height: 88px; }
  .auth__card { padding: var(--s-6); justify-self: end; }
}

/* ───────── App-Leiste ───────── */
.bar { position: sticky; top: 0; z-index: var(--z-bar); background: var(--c-ink); color: var(--c-on-ink); }
.bar::after { content: ''; display: block; height: 6px; background: var(--checker); }
.bar__inner { max-width: 1320px; margin: 0 auto; height: 56px; padding: 0 var(--gutter); display: flex; align-items: center; gap: var(--s-4); }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.brand img { width: 36px; height: 36px; border-radius: 50%; }
.brand__text { display: grid; line-height: 1.05; }
.brand__name { font: 800 17px var(--f-head); letter-spacing: -.01em; }
.brand__name em { font-style: normal; color: var(--c-yellow); }
.brand__app { font: 600 10px var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--c-on-ink-muted); }

.me { margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 4px; min-height: 44px; background: none; border: 0; border-radius: 999px; color: inherit; }
.me__name { display: none; font-weight: 600; font-size: 14px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me__avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--c-yellow); color: var(--c-ink); font: 800 15px var(--f-head); }
@media (hover: hover) { .me:hover .me__avatar { background: var(--c-yellow-hover); } }

/* Tabs: mobil unten fixiert, Desktop in der Leiste */
.tabs {
  position: fixed; inset: auto 0 0 0; z-index: var(--z-tabs);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding-bottom: var(--safe-b);
  background: var(--c-ink); border-top: 1px solid #26262E;
}
.tab {
  position: relative;
  display: grid; justify-items: center; align-content: center; gap: 4px;
  min-height: var(--tabs-h); padding: 6px 4px;
  background: none; border: 0; color: var(--c-on-ink-muted);
  font: 700 11px/1 var(--f-head); letter-spacing: .04em; text-transform: uppercase;
  transition: color var(--t-fast) var(--ease);
}
.tab .i { width: 22px; height: 22px; }
.tab.is-active { color: var(--c-yellow); }
.tab.is-active::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; background: var(--c-yellow); border-radius: 0 0 3px 3px; }

/* ───────── Hauptbereich ───────── */
.main { max-width: 1320px; margin: 0 auto; padding: var(--s-4) var(--gutter) calc(var(--tabs-h) + var(--safe-b) + var(--s-6)); outline: none; }
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-2) var(--s-4); margin: var(--s-2) 0 var(--s-4); }
.head h1 { font-size: clamp(1.6rem, 5vw, 2.25rem); font-weight: 800; }
.head p { color: var(--c-muted); font-size: 15px; margin-top: 4px; }
.card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-3); padding: var(--s-4); box-shadow: var(--shadow-1); }
.card + .card, .card + .section, .section + .section { margin-top: var(--s-5); }
.card__title { font-size: 17px; font-weight: 800; margin-bottom: var(--s-3); }
.stack { display: grid; gap: var(--s-4); }

/* ───────── Taxameter (Kennzahlen) ───────── */
.meter {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--s-4);
  padding: var(--s-4) var(--s-4) var(--s-4) calc(var(--s-4) + 10px);
  background: var(--c-ink); color: var(--c-on-ink);
  border-radius: var(--r-3);
  margin-bottom: var(--s-4);
}
.meter::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 10px; background: var(--checker); }
.meter__cell { display: grid; gap: 2px; min-width: 0; }
.meter__label { font: 600 10px/1.3 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--c-on-ink-muted); }
.meter__value { font: 700 clamp(1.5rem, 6vw, 2rem)/1.1 var(--f-mono); color: var(--c-yellow); font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter__value--text { font-family: var(--f-head); font-weight: 800; letter-spacing: -.01em; }
.meter__sub { font-size: 13px; color: var(--c-on-ink); opacity: .85; }
.meter__bar { height: 4px; background: var(--c-ink-3); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.meter__bar { display: block; }
.meter__bar > i { display: block; width: 0; height: 100%; background: var(--c-yellow); border-radius: 2px; transition: width .6s var(--ease); }
.meter__value small { font-size: .55em; margin-left: 2px; color: var(--c-on-ink-muted); }
.link-btn { padding: 0; background: none; border: 0; color: var(--c-yellow); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; min-height: 24px; }

/* ───────── Plan: Steuerung ───────── */
.controls {
  position: sticky; top: var(--bar-h); z-index: var(--z-sticky);
  margin: calc(var(--s-4) * -1) calc(var(--gutter) * -1) var(--s-3);
  padding: var(--s-2) var(--gutter);
  background: color-mix(in srgb, var(--c-bg) 94%, transparent);
  border-bottom: 1px solid var(--c-line);
}
@supports (backdrop-filter: blur(8px)) { .controls { backdrop-filter: blur(8px); } }
.weekbar { display: flex; align-items: center; gap: var(--s-2); }
.weekbar__label { flex: 1; display: grid; justify-items: center; text-align: center; min-width: 0; }
.weekbar__label strong { font: 700 15px/1.25 var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.weekbar .ibtn { border-color: var(--c-line-strong); background: var(--c-surface); }
.weekbar__today { min-height: 36px; padding: 0 12px; font-size: 11px; }

/* Taxi-Auswahl als Dachschilder */
.roofs { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; margin: var(--s-2) calc(var(--gutter) * -1) 0; padding: 2px var(--gutter) 4px; scroll-padding: 0 var(--gutter); }
.roofs::-webkit-scrollbar { display: none; }
.roof {
  flex: none;
  display: inline-grid; justify-items: center; align-content: center;
  min-width: 64px; min-height: 46px; padding: 3px 12px 4px;
  background: var(--c-surface); color: var(--c-ink);
  border: 1.5px solid var(--c-ink); border-radius: 10px 10px 4px 4px;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.roof small { font: 800 8px/1 var(--f-head); letter-spacing: .22em; text-transform: uppercase; }
.roof b { font: 700 17px/1.1 var(--f-mono); letter-spacing: -.02em; }
.roof.is-active { background: var(--c-yellow); box-shadow: 0 3px 0 var(--c-ink); }
.roof--static { background: var(--c-yellow); }
.roof--sm { min-width: 54px; min-height: 38px; padding: 2px 8px 3px; }
.roof--sm b { font-size: 14px; }

.swipehint { display: flex; align-items: center; justify-content: center; gap: var(--s-2); margin: 0 0 var(--s-2); font-size: 13px; color: var(--c-muted); }
.swipehint .i { width: 16px; height: 16px; }
.swipehint__count { font: 600 12px var(--f-mono); padding: 2px 8px; border-radius: 999px; background: var(--c-taken); color: var(--c-taken-text); }
.swipehint__count b { color: var(--c-ink); }

/* ───────── Plan mobil: Taxis wischen, Tage nach unten ───────── */
.track {
  position: relative;            /* hält absolut positionierte Kinder (z. B. .sr-only) im Scrollbereich */
  display: flex; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1);
}
.track::-webkit-scrollbar { display: none; }
.panel { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; padding: 0 var(--gutter); }
.panel__head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-2); }

.days { display: grid; gap: 6px; }
.day { display: grid; grid-template-columns: 52px 1fr 1fr; gap: 6px; align-items: stretch; }
.day__date {
  display: grid; align-content: center; justify-items: center; gap: 1px;
  border-radius: var(--r-2); background: var(--c-surface); border: 1px solid var(--c-line);
}
.day__wd { font: 800 14px/1 var(--f-head); text-transform: uppercase; letter-spacing: .02em; }
.day__dm { font: 500 11px/1.2 var(--f-mono); color: var(--c-muted); font-variant-numeric: tabular-nums; }
.is-today .day__date { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-on-ink); }
.is-today .day__date .day__wd { color: var(--c-yellow); font-size: 11px; letter-spacing: .06em; }
.is-today .day__date .day__dm { color: var(--c-on-ink); }
.is-weekend .day__wd { color: var(--c-yellow-deep); }

/* Schicht-Feld */
.slot {
  display: grid; align-content: center; gap: 3px;
  min-height: 64px; min-width: 0; padding: 8px 10px;
  text-align: left;
  background: var(--c-surface); color: var(--c-ink);
  border: 1.5px dashed var(--c-line-strong); border-radius: var(--r-2);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.slot:active:not(:disabled) { transform: scale(.97); }
.slot__meta { display: flex; align-items: center; gap: 5px; font: 600 10.5px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); white-space: nowrap; }
.slot__meta .i { width: 14px; height: 14px; }
.slot__state { display: flex; align-items: center; gap: 5px; min-width: 0; font: 700 15px/1.2 var(--f-head); letter-spacing: -.01em; }
.slot__state > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot__state .i { width: 16px; height: 16px; stroke-width: 2.5; }

.slot--free .slot__state .i { color: var(--c-yellow-deep); }
@media (hover: hover) { .slot--free:hover { border-style: solid; border-color: var(--c-ink); background: var(--c-yellow-wash); } }
.slot--mine { background: var(--c-yellow); border: 1.5px solid var(--c-yellow-deep); }
.slot--mine .slot__meta { color: rgb(10 10 10 / .65); }
.slot--taken { background: var(--c-taken); border: 1.5px solid transparent; color: var(--c-taken-text); }
.slot--taken .slot__state { font-weight: 600; }
.is-admin .slot--taken { color: var(--c-ink); }
.is-admin .slot--taken .slot__state { font-weight: 700; }
@media (hover: hover) { .is-admin .slot--taken:hover, .slot--mine:hover { border-color: var(--c-ink); } }
.slot--closed { background: transparent; border: 1.5px dotted var(--c-line); color: #A8A498; }
.slot--closed .slot__meta { color: #B5B1A5; }
.slot:disabled { cursor: default; }

.legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin-top: var(--s-4); font-size: 13px; color: var(--c-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 12px; border-radius: 3px; border: 1.5px solid; }
.legend .lg-free { border: 1.5px dashed var(--c-line-strong); background: var(--c-surface); }
.legend .lg-mine { background: var(--c-yellow); border-color: var(--c-yellow-deep); }
.legend .lg-taken { background: var(--c-taken); border-color: var(--c-taken); }

/* ───────── Plan Desktop: Matrix ───────── */
.matrix { width: 100%; border-collapse: separate; border-spacing: 6px; table-layout: fixed; margin: 0 -6px; width: calc(100% + 12px); }
.matrix thead th { position: sticky; top: calc(var(--bar-h) + var(--controls-h, 70px)); z-index: 5; background: var(--c-bg); padding: 6px 0; font-weight: 400; }
.matrix thead th > span { display: block; }
.matrix thead .is-today .day__wd { color: var(--c-ink); }
.matrix thead .is-today { box-shadow: inset 0 -3px 0 var(--c-yellow); }
.matrix__corner { width: 92px; text-align: left; }
.matrix tbody th { vertical-align: middle; text-align: left; }
.matrix td { padding: 0; vertical-align: top; }
.matrix td.is-today { background: rgb(245 197 24 / .14); border-radius: var(--r-2); box-shadow: 0 0 0 4px rgb(245 197 24 / .14); }
.pair { display: grid; gap: 4px; }
.matrix .slot { min-height: 50px; padding: 6px 8px; gap: 2px; }
.matrix .slot__state { font-size: 13.5px; }

/* ───────── Listen ───────── */
.list { display: grid; gap: var(--s-2); }
.row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3); min-height: 64px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-3);
}
.row__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.row__main b { font: 700 15px/1.25 var(--f-head); display: flex; align-items: center; gap: 6px; }
.row__main b .i { width: 16px; height: 16px; }
.row__main .muted { font-size: 13.5px; }
.row__date { display: grid; min-width: 72px; }
.row__date b { font: 800 15px/1.2 var(--f-head); }
.row__date span { font: 500 12px var(--f-mono); color: var(--c-muted); }

.group + .group { margin-top: var(--s-5); }
.group__title { display: flex; align-items: baseline; gap: var(--s-2); font-size: 16px; font-weight: 800; margin-bottom: var(--s-2); }
.group__title .day__dm { font-size: 13px; }
.group__count { margin-left: auto; font: 600 12px var(--f-mono); color: var(--c-muted); }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font: 700 11px/1.2 var(--f-head); letter-spacing: .03em; text-transform: uppercase; background: var(--c-taken); color: var(--c-taken-text); white-space: nowrap; }
.tag--warn { background: var(--c-warn-wash); color: var(--c-warn-text); }
.tag--ink { background: var(--c-ink); color: var(--c-yellow); }

/* ───────── Leere Zustände ───────── */
.empty { display: grid; justify-items: center; text-align: center; gap: var(--s-3); padding: var(--s-7) var(--s-4); background: var(--c-surface); border: 1.5px dashed var(--c-line-strong); border-radius: var(--r-3); }
.empty h2 { font-size: 20px; font-weight: 800; }
.empty p { color: var(--c-muted); max-width: 34ch; }
.empty .roof { transform: rotate(-4deg); margin-bottom: var(--s-2); }

/* ───────── Verwaltung ───────── */
.addform { display: grid; gap: var(--s-3); }
.addform__row { display: grid; gap: var(--s-3); }
.member { display: grid; gap: var(--s-3); padding: var(--s-4); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-3); }
.member__head { display: flex; align-items: center; gap: var(--s-3); }
.member__id { flex: 1; min-width: 0; display: grid; }
.member__id b { font: 800 16px/1.25 var(--f-head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member__id span { font-size: 13.5px; color: var(--c-muted); }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--c-ink); color: var(--c-yellow); font: 800 16px var(--f-head); }
.member__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.toggles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.toggle {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 40px; min-width: 52px; padding: 0 12px; justify-content: center;
  background: var(--c-surface); color: var(--c-muted);
  border: 1.5px solid var(--c-line-strong); border-radius: var(--r-1);
  font: 700 14px var(--f-mono);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.toggle .i { width: 15px; height: 15px; stroke-width: 2.6; }
.toggle[aria-pressed="true"] { background: var(--c-yellow); border-color: var(--c-ink); color: var(--c-ink); }
.toggle--all { font-family: var(--f-head); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; border-style: dashed; }
.toggle.is-busy { opacity: .5; pointer-events: none; }

/* ───────── Bottom-Sheet / Dialog ───────── */
.sheet {
  width: 100%; max-width: 560px; max-height: 90vh; max-height: 90dvh;
  margin: auto auto 0; padding: 0;
  border: 0; border-radius: var(--r-4) var(--r-4) 0 0;
  background: var(--c-surface); color: var(--c-text);
  box-shadow: var(--shadow-2);
  overscroll-behavior: contain;
}
.sheet[open] { animation: sheet-in var(--t) var(--ease); }
.sheet::backdrop { background: rgb(10 10 10 / .55); }
.sheet[open]::backdrop { animation: fade-in var(--t) var(--ease); }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
.sheet__body { display: grid; gap: var(--s-4); padding: var(--s-2) var(--s-4) calc(var(--s-5) + var(--safe-b)); }
.sheet__grip { justify-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--c-line-strong); margin-top: 2px; }
.sheet__head { display: flex; align-items: flex-start; gap: var(--s-3); }
.sheet__head > div { flex: 1; min-width: 0; display: grid; gap: 4px; }
.sheet__title { font-size: 22px; font-weight: 800; }
.sheet__subtitle { color: var(--c-muted); font-size: 15px; }
.sheet__slot { display: flex; align-items: center; gap: var(--s-3); }
.sheet__text { font-size: 16px; }
.sheet__actions { display: grid; gap: var(--s-2); }
.sheet__sub { font-size: 15px; font-weight: 800; }
.sep { border: 0; border-top: 1px solid var(--c-line); margin: var(--s-1) 0; width: 100%; }
@media (min-width: 640px) {
  .sheet { margin: auto; border-radius: var(--r-4); max-width: 480px; }
  .sheet[open] { animation-name: dialog-in; }
  .sheet__grip { display: none; }
  .sheet__body { padding: var(--s-5); }
  @keyframes dialog-in { from { transform: translateY(12px) scale(.98); opacity: 0; } }
}

/* Auswahl Mitarbeiter */
.pick { display: grid; gap: 6px; border: 0; margin: 0; padding: 0; max-height: 46vh; overflow-y: auto; }
.pick__search { margin-bottom: 4px; }
.pick__item {
  position: relative; display: flex; align-items: center; gap: var(--s-3);
  min-height: 52px; padding: 0 14px;
  border: 1.5px solid var(--c-line); border-radius: var(--r-2);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.pick__item input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick__name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick__meta { font-size: 13px; color: var(--c-muted); }
.pick__check { opacity: 0; color: var(--c-ink); }
.pick__item:has(input:checked) { border-color: var(--c-ink); background: var(--c-yellow-wash); }
.pick__item:has(input:checked) .pick__check { opacity: 1; }
.pick__item:has(input:focus-visible) { outline: 3px solid var(--c-ink); outline-offset: 1px; }
.pick__item.is-disabled { opacity: .5; cursor: not-allowed; }
.pick__item.is-hidden { display: none; }

.creds { margin: 0; padding: 14px; background: var(--c-ink); color: var(--c-on-ink); border-radius: var(--r-2); font: 500 14px/1.6 var(--f-mono); white-space: pre-wrap; word-break: break-all; }

/* ───────── Toast ───────── */
.toast {
  position: fixed; z-index: var(--z-toast);
  left: var(--gutter); right: var(--gutter); bottom: calc(var(--tabs-h) + var(--safe-b) + 12px);
  max-width: 520px; margin: 0 auto;
  padding: 14px 16px 14px 20px;
  background: var(--c-ink); color: var(--c-on-ink);
  border-radius: var(--r-2); box-shadow: var(--shadow-2);
  font-size: 15px; font-weight: 600;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.toast::before { content: ''; position: absolute; inset: 8px auto 8px 8px; width: 4px; border-radius: 2px; background: var(--c-yellow); }
.toast.is-on { opacity: 1; transform: none; }
.toast--bad::before { background: #FF6B5E; }
.is-guest .toast { bottom: var(--s-5); }

/* ───────── Sprache ───────── */
.langbtn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 10px; margin-inline-start: auto;
  background: transparent; color: var(--c-on-ink);
  border: 1.5px solid #3A3A44; border-radius: 999px;
  font: 700 12px var(--f-mono); letter-spacing: .06em;
}
.langbtn .i { width: 18px; height: 18px; }
@media (hover: hover) { .langbtn:hover { border-color: var(--c-yellow); color: var(--c-yellow); } }
.bar .langbtn + .me { margin-inline-start: 0; }
.auth__top { position: absolute; top: 24px; inset-inline-end: var(--gutter); z-index: 2; }
.langs { display: grid; gap: 8px; }
.langopt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 0 16px;
  background: var(--c-surface); border: 1.5px solid var(--c-line); border-radius: var(--r-2);
  font: 700 18px var(--f-body); text-align: start;
}
.langopt.is-active { border-color: var(--c-ink); background: var(--c-yellow-wash); }
@media (hover: hover) { .langopt:hover { border-color: var(--c-ink); } }
.langrow {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 52px; padding: 0 14px;
  background: var(--c-surface-2); border: 1px solid var(--c-line); border-radius: var(--r-2);
  text-align: start; font-size: 15px;
}
.langrow span { flex: 1; }
.langrow b { font-weight: 700; }

/* ───────── Plan-Werkzeuge ───────── */
.planbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--s-3); }
.chipbtn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px;
  background: var(--c-surface); color: var(--c-ink);
  border: 1.5px solid var(--c-line-strong); border-radius: 999px;
  font: 700 13px var(--f-head);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.chipbtn .i { width: 18px; height: 18px; }
.chipbtn[aria-pressed="true"] { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-yellow); }
.chipbtn--red .i { color: var(--c-red); }
@media (hover: hover) { .chipbtn:hover { border-color: var(--c-ink); } }

/* Mehrfachauswahl */
.slot { position: relative; }
.is-selecting .slot:not(:disabled)::before {
  content: ''; position: absolute; top: 7px; inset-inline-end: 7px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--c-line-strong); background: var(--c-surface);
}
.is-selecting .slot.is-selected { outline: 3px solid var(--c-ink); outline-offset: 1px; }
.is-selecting .slot.is-selected::before {
  border-color: var(--c-ink); background: var(--c-ink);
  box-shadow: inset 0 0 0 3px var(--c-yellow);
}
.selbar {
  position: fixed; z-index: var(--z-tabs); inset-inline: 0;
  bottom: calc(var(--tabs-h) + var(--safe-b));
  background: var(--c-ink-2); color: var(--c-on-ink);
  border-top: 3px solid var(--c-yellow);
  box-shadow: 0 -8px 30px rgb(10 10 10 / .25);
}
.selbar[hidden] { display: none; }
.selbar__inner { max-width: 1320px; margin: 0 auto; padding: 10px var(--gutter); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.selbar__count { flex: 1 1 140px; font-weight: 700; font-size: 14px; }
.selbar__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn--ghost-light { --bg: transparent; --fg: var(--c-on-ink); --bd: #4A4A55; }
.is-selecting .main { padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 120px); }

/* Stammplan */
.slot.is-std::after {
  content: ''; position: absolute; bottom: 7px; inset-inline-end: 8px;
  width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg);
  background: currentColor; opacity: .55;
}
.is-selecting .slot.is-std::after { display: none; }
.legend .lg-std { width: 9px; height: 9px; border: 0; border-radius: 2px; transform: rotate(45deg); background: var(--c-muted); margin: 0 3px; }
.std { display: grid; gap: 6px; justify-items: start; }
.std .field__label { display: inline-flex; align-items: center; gap: 6px; }
.std .field__label .i { width: 15px; height: 15px; }
.std__list { display: grid; gap: 6px; width: 100%; }
.std__item {
  display: flex; align-items: center; gap: 8px;
  min-height: 44px; padding-block: 4px; padding-inline: 12px 4px;
  background: var(--c-surface-2); border: 1px solid var(--c-line); border-radius: var(--r-2);
  font-size: 14px; font-weight: 600;
}
.std__item > span { flex: 1; min-width: 0; }
.std__item .i { width: 16px; height: 16px; }
.std-card { display: grid; gap: var(--s-3); }
.std-card .card__title { display: flex; align-items: center; gap: 8px; margin: 0; }
.ibtn--sm { width: 40px; height: 40px; }
.small { font-size: 13.5px; }
.tag--std { background: var(--c-ink); color: var(--c-on-ink); }

/* Wochentage */
.wdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wday { position: relative; }
.wday input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.wday span {
  display: grid; place-items: center; min-height: 44px; padding: 0 2px;
  border: 1.5px solid var(--c-line-strong); border-radius: var(--r-1);
  font: 700 12px var(--f-head); text-align: center; overflow: hidden; text-overflow: ellipsis;
  background: var(--c-surface); color: var(--c-muted);
}
.wday input:checked + span { background: var(--c-yellow); border-color: var(--c-ink); color: var(--c-ink); }
.wday input:focus-visible + span { outline: 3px solid var(--c-ink); outline-offset: 1px; }
.seg span .i { width: 16px; height: 16px; }
.seg span { grid-auto-flow: column; gap: 6px; }
.addform__row.two { grid-template-columns: 1fr 1fr; }

/* ───────── Abrechnungstage (rot umrandet) ───────── */
.day.is-billing { outline: 2.5px solid var(--c-red); outline-offset: 3px; border-radius: var(--r-2); }
.day__bill { display: inline-grid; place-items: center; margin-top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--c-red); color: #fff; }
.day__bill .i { width: 12px; height: 12px; stroke-width: 2.5; }
.matrix th.is-billing { box-shadow: inset 0 0 0 2.5px var(--c-red); border-radius: var(--r-2) var(--r-2) 0 0; }
.matrix th.is-billing .day__bill { margin-inline-start: 4px; vertical-align: middle; }
.matrix td.is-billing { box-shadow: inset 2.5px 0 0 var(--c-red), inset -2.5px 0 0 var(--c-red); }
.matrix tbody tr:last-child td.is-billing { box-shadow: inset 2.5px 0 0 var(--c-red), inset -2.5px 0 0 var(--c-red), inset 0 -2.5px 0 var(--c-red); }
.matrix td.is-billing .pair { padding: 3px; }
.row.is-billing { border-color: var(--c-red); box-shadow: inset 0 0 0 1px var(--c-red); }
.legend .lg-billing { width: 16px; height: 12px; border: 2.5px solid var(--c-red); border-radius: 3px; background: transparent; }
.legend__billing { color: var(--c-text); font-weight: 600; }
.tag--red { background: var(--c-red-wash); color: var(--c-red); }
.text-red { color: var(--c-red); font-weight: 700; }
.meter__value--red { color: #FF7A6E; }
.bill-list { display: grid; gap: 6px; max-height: 40vh; overflow-y: auto; }
.bill-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding-inline: 12px 4px; border: 2px solid var(--c-red); border-radius: var(--r-2); }
.bill-item__date { font: 700 15px var(--f-mono); }
.bill-item .muted { flex: 1; font-size: 14px; }
.addform--inline { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }

.nowrap { white-space: nowrap; }

/* ───────── Rechts-nach-links (Arabisch, Persisch) ───────── */
[dir="rtl"] .i--dir { transform: scaleX(-1); }
:root[dir="rtl"] body, :root[dir="rtl"] body * { letter-spacing: 0 !important; }   /* Sperrung zerreißt arabische Schrift */
[dir="rtl"] .slot, [dir="rtl"] .matrix__corner, [dir="rtl"] .matrix tbody th { text-align: right; }
[dir="rtl"] .pw input { padding-right: 14px; padding-left: 52px; }
[dir="rtl"] .pw__toggle { right: auto; left: 3px; }
[dir="rtl"] .meter { padding-left: var(--s-4); padding-right: calc(var(--s-4) + 10px); }
[dir="rtl"] .meter::before { left: auto; right: 0; }
[dir="rtl"] .toast { padding: 14px 20px 14px 16px; }
[dir="rtl"] .toast::before { left: auto; right: 8px; }
[dir="rtl"] .day { grid-template-columns: 64px 1fr 1fr; }
[dir="rtl"] .day__wd { font-size: 12px; text-align: center; line-height: 1.15; }
[dir="rtl"] .slot__meta { font-size: 12px; }
[dir="rtl"] .field__label, [dir="rtl"] .eyebrow, [dir="rtl"] .meter__label { font-size: 12.5px; }
.day__dm, .weekbar__label strong, .bill-item__date { direction: ltr; unicode-bidi: isolate; }

/* ───────── Größere Bildschirme ───────── */
@media (min-width: 420px) {
  .day { grid-template-columns: 60px 1fr 1fr; gap: 8px; }
  .days { gap: 8px; }
}
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .addform__row { grid-template-columns: 1fr 1fr; }
  .list--cols { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .members { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--s-3); }
}
@media (max-width: 639px) {
  .members { display: grid; gap: var(--s-3); }
}
@media (min-width: 860px) {
  :root { --bar-h: 70px; }
  .bar__inner { height: 64px; gap: var(--s-6); }
  .me__name { display: block; }
  .tabs { position: static; display: flex; gap: 2px; padding: 0; background: none; border: 0; align-self: stretch; }
  .tab { grid-auto-flow: column; gap: 8px; min-height: 0; height: 100%; padding: 0 14px; font-size: 12px; }
  .tab .i { width: 18px; height: 18px; }
  .tab.is-active::before { top: auto; bottom: 0; left: 14px; right: 14px; border-radius: 3px 3px 0 0; }
  @media (hover: hover) { .tab:hover { color: var(--c-on-ink); } }
  .main { padding: var(--s-5) var(--gutter) var(--s-7); }
  .controls { margin-top: calc(var(--s-5) * -1); padding-top: var(--s-3); padding-bottom: var(--s-3); }
  .weekbar { max-width: 520px; }
  .weekbar__label { justify-items: start; text-align: left; }
  .meter { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); padding: var(--s-5) var(--s-5) var(--s-5) calc(var(--s-5) + 10px); }
  .toast { left: auto; right: var(--gutter); bottom: var(--gutter); margin: 0; }
  [dir="rtl"] .toast { right: auto; left: var(--gutter); }
  [dir="rtl"] .weekbar__label { text-align: right; }
  [dir="rtl"] .meter { padding: var(--s-5) calc(var(--s-5) + 10px) var(--s-5) var(--s-5); }
  .selbar { bottom: 0; }
  .is-selecting .main { padding-bottom: 120px; }
  .addform { grid-template-columns: 1fr auto; align-items: end; }
  .addform--user { grid-template-columns: 1fr; }
}
@media (min-width: 1100px) {
  .team-layout { display: grid; grid-template-columns: 360px 1fr; gap: var(--s-5); align-items: start; }
  .team-layout > .card { position: sticky; top: calc(var(--bar-h) + var(--s-4)); margin: 0; }
  .team-layout .members { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}

/* ───────── Weniger Bewegung ───────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .btn.is-busy::after { animation: spin 1.2s linear infinite !important; }
}

/* Feinschliff */
.meter__value--text { white-space: normal; overflow: visible; }
.is-selecting .slot__meta { padding-inline-end: 22px; overflow: hidden; }
.matrix thead .day__bill { display: grid; margin: 3px auto 0; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 6px; }
