/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #f7f9fb;
  color: #191c1e;
  display: flex;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typography ───────────────────────────────────────── */
h1, h2, h3 { font-family: 'Manrope', system-ui, sans-serif; letter-spacing: -0.01em; }
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 600; margin-bottom: .75rem; }

/* ─── Buttons ───────────────────────────────────────────── */
button, .btn-primary, .btn-ghost, .btn-success, .btn-danger {
  font-family: inherit;
  font-size: .875rem;
  cursor: pointer;
  border: none;
  border-radius: .5rem;
  padding: .6rem 1.25rem;
  font-weight: 600;
  transition: opacity .15s, transform .1s;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.btn-primary { background: linear-gradient(160deg,#006591,#004c6e); color: #fff; box-shadow: 0 4px 12px rgba(0,101,145,.2); }
.btn-primary:hover { opacity: .9; }
.btn-ghost { background: transparent; color: #566166; border: 1px solid #a9b4b922; }
.btn-ghost:hover { background: #e8eff3; }
.btn-success { background: #22c55e; color: #fff; }
.btn-danger  { background: #ef4444; color: #fff; }
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: .35rem .75rem; font-size: .8rem; }
.btn-xs { padding: .2rem .5rem; font-size: .75rem; }

/* ─── Cards ─────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.04);
  padding: 1.5rem;
  border: 1px solid rgba(0,0,0,.02);
  ring: 1px solid rgba(0,0,0,.02);
}

/* ─── Form Fields ───────────────────────────────────────── */
.field { margin-bottom: 1.25rem; }
.field-row { display: flex; gap: 1rem; }
.field-row .field { flex: 1; }
label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  color: #40484e;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .4rem;
}
input, select, textarea {
  width: 100%;
  padding: .65rem 1rem;
  border: none;
  border-radius: .75rem;
  background: #e6e8ea;
  color: #191c1e;
  font-size: .875rem;
  font-family: inherit;
  transition: background .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0,101,145,.2);
}
input::placeholder, textarea::placeholder { color: rgba(64,72,78,.45); }
textarea { resize: vertical; }

/* ─── Error / Info ──────────────────────────────────────── */
.error-msg {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: .65rem 1rem;
  border-radius: .5rem;
  font-size: .875rem;
  margin-bottom: 1rem;
}
.info-box {
  background: #dbeafe;
  border: 1px solid #93c5fd;
  color: #1d4ed8;
  padding: .65rem 1rem;
  border-radius: .5rem;
  font-size: .875rem;
}
.empty-hint { color: #9ca3af; font-size: .875rem; }

/* ─── LOGIN PAGE ────────────────────────────────────────── */
body.login-page {
  flex-direction: column;
  align-items: center;
}
.login-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  background: rgba(247,249,251,.85);
  backdrop-filter: blur(24px);
  z-index: 50;
}
.logo { height: 40px; object-fit: contain; }
.portal-label {
  font-size: .65rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 600;
  color: #566166;
  margin-top: .25rem;
}
.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1rem 2rem;
  width: 100%;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: .75rem;
  padding: 2.5rem;
  box-shadow: 0 4px 24px rgba(42,52,57,.06);
  border: 1px solid rgba(169,180,185,.12);
}
.login-card-header { text-align: center; margin-bottom: 2rem; }
.login-card-header h1 { font-size: 1.5rem; }
.login-card-header p { color: #566166; font-size: .875rem; margin-top: .4rem; }
.login-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(169,180,185,.1);
  text-align: center;
  font-size: .7rem;
  color: #566166;
}
.page-footer {
  width: 100%;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .75rem;
  color: #9ca3af;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: #9ca3af; text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: #006591; }
.icon { font-style: normal; }
.icon-sm { font-size: .875rem; }

/* ─── SIDEBAR LAYOUT ────────────────────────────────────── */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: #fff;
  border-right: 1px solid rgba(169,180,185,.12);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  box-shadow: 2px 0 16px rgba(42,52,57,.04);
  z-index: 40;
}
.main-content {
  margin-left: 260px;
  padding: 2rem;
  flex: 1;
  min-height: 100vh;
}
.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: .5rem .75rem 1.5rem;
  gap: .25rem;
}
.sidebar-brand .logo { height: 32px; }

/* Urlaubskonto Box */
.urlaubskonto {
  background: #f0f4f7;
  border-radius: .625rem;
  padding: 1rem 1rem .75rem;
  margin-bottom: 1.5rem;
}
.konto-label { font-size: .7rem; font-weight: 600; color: #566166; text-transform: uppercase; letter-spacing: .05em; }
.konto-zahl { font-size: 1.5rem; font-weight: 800; color: #006591; margin: .25rem 0; }
.konto-bar { height: 6px; background: #d1e8f2; border-radius: 99px; overflow: hidden; }
.konto-bar-fill { height: 100%; background: linear-gradient(90deg,#006591,#34b5fa); border-radius: 99px; transition: width .4s; }

/* Nav */
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: .25rem; }
.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1rem;
  border-radius: .5rem;
  text-decoration: none;
  color: #566166;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-item:hover { background: #f0f4f7; color: #191c1e; }
.nav-item.active { background: linear-gradient(135deg,rgba(0,101,145,.12),rgba(0,76,110,.08)); color: #006591; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(0,101,145,.08); }
.badge {
  background: #ef4444;
  color: #fff;
  border-radius: 99px;
  padding: .1rem .5rem;
  font-size: .7rem;
  font-weight: 700;
  margin-left: auto;
}

.sidebar-bottom {
  padding-top: 1rem;
  border-top: 1px solid rgba(169,180,185,.12);
  position: relative;
}
.settings-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.settings-user {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
}
.settings-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #006591;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.settings-name {
  font-size: .8rem;
  font-weight: 600;
  color: #2a3439;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings-gear {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #9ca3af;
  cursor: pointer;
  padding: .25rem;
  border-radius: .375rem;
  line-height: 1;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.settings-gear:hover { color: #006591; background: #eef6fb; }
.settings-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + .5rem);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid rgba(169,180,185,.2);
  border-radius: .625rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,.1);
  padding: .35rem;
  z-index: 100;
}
.settings-menu.open { display: block; }
.settings-menu button {
  width: 100%;
  text-align: left;
  padding: .55rem .75rem;
  border: none;
  background: none;
  font-family: inherit;
  font-size: .875rem;
  color: #2a3439;
  border-radius: .375rem;
  cursor: pointer;
  transition: background .1s;
}
.settings-menu button:hover { background: #f0f4f7; }
.settings-menu hr { border: none; border-top: 1px solid rgba(169,180,185,.15); margin: .25rem 0; }

/* ─── PAGE HEADER ───────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.filter-row { display: flex; gap: .5rem; }
.filter-btn.active { background: #006591; color: #fff; border-color: #006591; }

/* ─── KALENDER ──────────────────────────────────────────── */
.kalender-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.kalender-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.kalender-tage {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.kalender-legende {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid #e5e7eb;
  font-size: .75rem;
  color: #566166;
  align-items: center;
}
.kalender-wochentag {
  text-align: center;
  font-size: .7rem;
  font-weight: 700;
  color: #566166;
  padding: .25rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.kalender-wochentag.wochenende { color: #9ca3af; }
.kalender-tag {
  min-height: 52px;
  border-radius: .5rem;
  padding: .35rem .4rem;
  font-size: .8rem;
  position: relative;
  background: #f7f9fb;
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kalender-tag.leer { background: transparent; }
.kalender-tag.wochenende { background: transparent; color: #9ca3af; }
.kalender-tag.feiertag { background: #fef9e7; }
.admin-cal-tag.feiertag { background: #fef9e7; }
.kalender-tag.schulferie { background: #eff6ff; }
.tag-schulferie {
  font-size: .55rem;
  color: #1d4ed8;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  opacity: .75;
}
.tag-feiertag {
  font-size: .6rem;
  color: #b45309;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.kalender-tag.heute .tag-nr {
  background: #006591;
  color: #fff;
  border-radius: 99px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.tag-nr { font-size: .8rem; font-weight: 500; }
.tag-dot { width: 8px; height: 8px; border-radius: 99px; }

/* ─── ANTRÄGE LISTE ─────────────────────────────────────── */
.antraege-liste { display: flex; flex-direction: column; gap: .5rem; }
.antrag-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1rem;
  background: #f7f9fb;
  border-radius: .5rem;
  border: 1px solid rgba(169,180,185,.12);
}
.antrag-typ-dot { width: 10px; height: 10px; border-radius: 99px; flex-shrink: 0; }
.antrag-info { flex: 1; }
.antrag-titel { font-size: .875rem; font-weight: 600; }
.antrag-datum { font-size: .8rem; color: #566166; }
.antrag-notiz { font-size: .8rem; color: #9ca3af; margin-top: .2rem; }
.antrag-status { font-size: .8rem; white-space: nowrap; }
.antrag-actions { display: flex; gap: .5rem; flex-shrink: 0; }
.antrag-chip {
  font-size: .75rem;
  padding: .25rem .6rem;
  border-radius: .375rem;
  margin-bottom: .25rem;
  font-weight: 500;
}

/* ─── MODAL ─────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(42,52,57,.4);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2rem 1rem;
}
.modal-overlay.active { display: flex; }
.modal {
  background: #fff;
  border-radius: 1.25rem;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 64px rgba(0,0,0,.12);
  margin: auto;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.modal-actions { display: flex; justify-content: flex-end; gap: .75rem; margin-top: 1.5rem; }

/* Typ-Select — native segmented control */
.typ-select {
  display: flex;
  gap: 2px;
  background: #eceef0;
  border-radius: .75rem;
  padding: 2px;
}
.typ-btn {
  flex: 1;
  justify-content: center;
  background: transparent;
  color: #40484e;
  border: none;
  border-radius: .625rem;
  padding: .55rem .4rem;
  font-size: .8rem;
  transition: background .15s, color .15s, box-shadow .15s;
}
.typ-btn.active {
  background: #006591;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,101,145,.25);
}

/* ─── ADMIN ─────────────────────────────────────────────── */
.mitarbeiter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.mitarbeiter-karte { padding: 1.25rem; }
.karte-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.avatar {
  width: 40px; height: 40px;
  background: linear-gradient(135deg,#006591,#34b5fa);
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1rem;
  flex-shrink: 0;
}
.karte-name { font-weight: 700; font-size: .9rem; }
.karte-email { font-size: .75rem; color: #9ca3af; }
.karte-konto { margin-left: auto; text-align: right; }
.konto-zahl-sm { font-size: 1.25rem; font-weight: 800; color: #006591; display: block; }
.konto-label-sm { font-size: .65rem; color: #566166; }
.karte-antraege { display: flex; flex-direction: column; gap: .25rem; }

/* Data Table */
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th {
  text-align: left;
  font-size: .7rem;
  font-weight: 700;
  color: #566166;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .5rem .75rem;
  border-bottom: 1px solid rgba(169,180,185,.2);
}
.data-table td { padding: .75rem; border-bottom: 1px solid rgba(169,180,185,.08); }
.data-table tr:last-child td { border-bottom: none; }
.role-badge {
  padding: .2rem .6rem;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.role-admin { background: #fef3c7; color: #92400e; }
.role-mitarbeiter { background: #dbeafe; color: #1e40af; }

/* ─── Tab Content ───────────────────────────────────────── */
.tab-content { }

/* ─── Upload Area ───────────────────────────────────────── */
.upload-area {
  border: 2px dashed rgba(169,180,185,.4);
  border-radius: .5rem;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  color: #566166;
  font-size: .875rem;
}
.upload-area:hover { border-color: #006591; background: #f0f8ff; }

/* ─── Krankenschein Upload ──────────────────────────────── */
.krankenschein-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  font-weight: 600;
  color: #006591;
  cursor: pointer;
  padding: .25rem .6rem;
  border: 1px dashed #006591;
  border-radius: .375rem;
  transition: background .15s;
}
.krankenschein-upload-btn:hover { background: #e8f4fd; }
.krankenschein-nachreichen { opacity: .6; border-style: dotted; font-weight: 500; }
.krankenschein-nachreichen:hover { opacity: 1; }
.antrag-clickable { cursor: pointer; transition: background .15s; }
.antrag-clickable:hover { background: #f0f6fa; }
.ad-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid #f0f4f7; font-size: .875rem; }
.ad-row:last-child { border-bottom: none; }
.ad-label { color: #566166; font-weight: 500; min-width: 100px; flex-shrink: 0; }
.btn-heute { font-size: .7rem !important; padding: .2rem .6rem !important; margin-left: .5rem; color: #006591; }

/* ─── Passwort UX ──────────────────────────────────────── */
.pw-input-wrap { position: relative; display: flex; align-items: center; }
.pw-input-wrap input { flex: 1; padding-right: 2.5rem; }
.pw-toggle { position: absolute; right: .5rem; background: none; border: none; cursor: pointer; font-size: 1rem; padding: .2rem; opacity: .6; }
.pw-toggle:hover { opacity: 1; }
.pw-strength { height: 4px; background: #e5e7eb; border-radius: 2px; margin-top: .35rem; overflow: hidden; }
.pw-strength-bar { height: 100%; width: 0; border-radius: 2px; transition: width .3s, background .3s; }
.pw-strength-label { font-size: .7rem; font-weight: 600; margin-top: .2rem; min-height: .9rem; }

/* ─── Spinner ──────────────────────────────────────────── */
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #e5e7eb; border-top-color: #006591; border-radius: 50%; animation: spin .6s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Admin Search + Sort ──────────────────────────────── */
.ma-search-input { width: 100%; max-width: 320px; padding: .5rem .75rem; border: 1px solid #d1d5db; border-radius: .5rem; font-size: .875rem; font-family: inherit; transition: border-color .15s; }
.ma-search-input:focus { outline: none; border-color: #006591; box-shadow: 0 0 0 3px rgba(0,101,145,.1); }
.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.sortable:hover { color: #006591; }
.cdd-ma-filter { min-width: 180px; }
.cdd-ma-filter .cdd-trigger { font-size: .8rem; padding: .4rem .75rem; }
.cdd-ma-filter .cdd-list { max-height: 250px; overflow-y: auto; }
.date-filter-input { padding: .35rem .5rem; border: 1px solid #d1d5db; border-radius: .375rem; font-size: .8rem; font-family: inherit; }
.date-filter-input:focus { outline: none; border-color: #006591; }

/* ─── Mitarbeiter Detail ────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.detail-section h3 { margin-bottom: 1rem; }
.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 0;
  border-bottom: 1px solid rgba(169,180,185,.1);
  gap: 1rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
  font-size: .8rem;
  color: #566166;
  font-weight: 600;
}

/* ─── Quartalsziel ──────────────────────────────────────── */
.quartal-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #f7f9fb;
  border: 1px solid rgba(169,180,185,.15);
  border-radius: .75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.quartal-icon { font-size: 1.5rem; }
.quartal-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #9ca3af;
  margin-bottom: .2rem;
}
.quartal-zahlen {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2a3439;
  line-height: 1.2;
}
.quartal-sep { color: #566166; font-weight: 400; }
.quartal-einheit { font-size: .9rem; font-weight: 400; color: #566166; }
.quartal-sub { font-size: .75rem; color: #9ca3af; margin-top: .1rem; }

/* ─── Patientenkalender ─────────────────────────────────── */
.pat-woche-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.pat-tag-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1rem .5rem;
  background: #f7f9fb;
  border-radius: .625rem;
  border: 1px solid rgba(169,180,185,.1);
  min-width: 0;
  overflow: hidden;
}
.pat-tag-col.feiertag { background: #fef9e7; }
.pat-tag-label {
  font-size: .85rem;
  font-weight: 700;
  color: #2a3439;
  text-align: center;
  line-height: 1.4;
}
.pat-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  justify-content: center;
  width: 100%;
}
.pat-tile {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  border-radius: .375rem;
  border: 1.5px solid #d1dbe0;
  background: #fff;
  color: #566166;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s, transform .08s;
  user-select: none;
}
.pat-tile:hover {
  border-color: #006591;
  color: #006591;
  background: #eef6fb;
}
.pat-tile.active {
  background: #006591;
  border-color: #006591;
  color: #fff;
  transform: scale(1.08);
}
.pat-abwesend {
  font-size: .7rem;
  font-weight: 600;
  color: #9ca3af;
  text-align: center;
  padding: .35rem .25rem;
  background: #f0f4f7;
  border-radius: .375rem;
  width: 100%;
  word-break: break-word;
  white-space: normal;
  line-height: 1.2;
}
.pat-summe {
  text-align: right;
  font-size: .9rem;
  color: #566166;
  padding-top: .75rem;
  border-top: 1px solid rgba(169,180,185,.15);
}
.ah-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  margin-top: .4rem;
  padding-top: .5rem;
  border-top: 1px dashed rgba(169,180,185,.25);
  width: 100%;
}
.ah-btn {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: .375rem;
  border: 1.5px solid #d1dbe0;
  background: #fff;
  color: #a855f7;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background .12s, border-color .12s;
  font-family: inherit;
}
.ah-btn:hover {
  background: #f5f3ff;
  border-color: #a855f7;
}
.ah-btn:active { transform: scale(.95); }
.ah-count {
  font-size: .7rem;
  font-weight: 700;
  color: #a855f7;
  min-width: 2.5rem;
  text-align: center;
  user-select: none;
}

/* ─── Patienten-Wochen-Tabelle ─────────────────────────── */
.pw-range-btn {
  padding: .3rem .75rem;
  font-size: .75rem;
  font-weight: 600;
  border: 1.5px solid rgba(169,180,185,.3);
  border-radius: .375rem;
  background: #fff;
  color: #566166;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s, border-color .12s, color .12s;
}
.pw-range-btn:hover { border-color: #006591; color: #006591; }
.pw-range-btn.active { background: #006591; border-color: #006591; color: #fff; }

.pw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.pw-table thead th {
  padding: .75rem 1rem;
  text-align: left;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #566166;
  background: #f7f9fb;
  border-bottom: 1px solid rgba(169,180,185,.15);
}
.pw-table tbody tr {
  border-bottom: 1px solid rgba(169,180,185,.1);
  transition: background .1s;
}
.pw-table tbody tr:last-child { border-bottom: none; }
.pw-table tbody tr:hover { background: #f7f9fb; }
.pw-table td {
  padding: .65rem 1rem;
  vertical-align: middle;
}
.pw-kw {
  font-weight: 700;
  color: #2a3439;
  white-space: nowrap;
  min-width: 80px;
}
.pw-date {
  font-size: .7rem;
  font-weight: 400;
  color: #9ca3af;
}
.pw-bar-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 80px;
}
.pw-bar {
  height: 6px;
  background: #006591;
  border-radius: 3px;
  min-width: 2px;
  transition: width .3s;
}
.pw-val {
  font-weight: 700;
  color: #2a3439;
  font-size: .875rem;
  white-space: nowrap;
}
.pw-zero { color: #d1dbe0; font-weight: 400; }
.pw-summe {
  font-weight: 700;
  color: #006591;
  text-align: right;
  white-space: nowrap;
}
.pw-ah {
  font-size: .6rem;
  font-weight: 700;
  color: #a855f7;
  background: #f5f3ff;
  padding: .1rem .35rem;
  border-radius: 99px;
  white-space: nowrap;
}

/* ─── MOBILE UI COMPONENTS ─────────────────────────────── */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(247,249,251,.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(169,180,185,.12);
  z-index: 50;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}
.mobile-topbar-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 800;
  color: #006591;
  font-size: 1rem;
  font-family: 'Inter', system-ui, sans-serif;
}
.mobile-topbar-brand .logo { height: 24px; }
.mobile-hamburger {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #566166;
  cursor: pointer;
  padding: .4rem .5rem;
  border-radius: .375rem;
  line-height: 1;
  font-family: inherit;
}
.mobile-hamburger:active { background: #f0f4f7; }

.mobile-bottomnav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(169,180,185,.12);
  z-index: 50;
  align-items: center;
  justify-content: space-around;
  padding: 0 .5rem;
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  padding: .4rem .5rem;
  border-radius: .5rem;
  color: #9ca3af;
  font-size: .65rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  transition: color .15s;
  min-width: 52px;
  position: relative;
}
.mobile-nav-item.active { color: #006591; }
.mobile-nav-item .nav-icon { font-size: 1.25rem; line-height: 1.2; }
.mobile-nav-item .nav-badge {
  position: absolute;
  top: 2px; right: 6px;
  background: #ef4444;
  color: #fff;
  border-radius: 99px;
  font-size: .6rem;
  font-weight: 700;
  padding: .05rem .3rem;
  line-height: 1.4;
  min-width: 16px;
  text-align: center;
}
.mobile-nav-fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #006591;
  color: #fff;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,101,145,.3);
  font-family: inherit;
  flex-shrink: 0;
  transition: transform .1s;
}
.mobile-nav-fab:active { transform: scale(.94); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(42,52,57,.4);
  backdrop-filter: blur(2px);
  z-index: 55;
}
.sidebar-overlay.active { display: block; }

/* ─── RESPONSIVE LAYOUT ─────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    z-index: 60;
    width: 280px;
    box-shadow: 4px 0 24px rgba(42,52,57,.15);
  }
  .sidebar.mobile-open { transform: translateX(0); }

  .main-content {
    margin-left: 0;
    padding: 1rem;
    padding-top: 4.5rem;
    padding-bottom: 5rem;
  }

  .mobile-topbar { display: flex; }
  .mobile-bottomnav { display: flex; }

  /* Login page */
  .login-main { padding-top: 5rem; }
  .login-card { padding: 1.75rem; }

  /* Page header: stack */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
  }
  .page-header h1 { font-size: 1.25rem; }

  /* Filter row: horizontal scroll */
  .filter-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .25rem;
    width: 100%;
  }
  .filter-row .btn-ghost,
  .filter-row .filter-btn { flex-shrink: 0; }

  /* Calendar */
  .kalender-tag { min-height: 38px; padding: .2rem .25rem; }
  .kalender-wochentag { font-size: .6rem; padding: .2rem 0; }
  .kalender-tage { gap: 2px; }
  .tag-nr { font-size: .72rem; }
  .tag-dot { width: 6px; height: 6px; }
  .kalender-tag.heute .tag-nr { width: 20px; height: 20px; font-size: .7rem; }
  .tag-feiertag { font-size: .45rem; white-space: normal; line-height: 1.1; max-height: 2.2em; overflow: hidden; }
  .tag-schulferie { font-size: .45rem; }
  /* Prevent horizontal swipe navigation */
  body { overscroll-behavior-x: none; }
  .main-content { touch-action: pan-y; }

  /* Admin calendar */
  .admin-cal-tag { min-height: 56px; padding: .25rem .2rem; }
  .admin-cal-header { font-size: .6rem; gap: 2px; }
  .cal-bar { min-height: 13px; font-size: .55rem; padding: 1px 3px; }
  .cal-tag-nr { font-size: .65rem; }

  /* Modal → bottom sheet */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
    overflow-y: hidden;
  }
  .modal {
    border-radius: 1.25rem 1.25rem 0 0;
    padding: 0 1.25rem 1.5rem;
    max-width: 100%;
    max-height: 92dvh;
    overflow-y: auto;
    margin: 0;
  }
  .modal::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: rgba(169,180,185,.4);
    border-radius: 99px;
    margin: .9rem auto 1.25rem;
  }
  .modal-header { margin-bottom: 1rem; }

  /* Field row: stack vertically */
  .field-row { flex-direction: column; gap: 0; }

  /* Detail grid: single column */
  .detail-grid { grid-template-columns: 1fr; }

  /* Mitarbeiter grid: single column */
  .mitarbeiter-grid { grid-template-columns: 1fr; }

  /* Pat woche grid: horizontal scroll, breiter damit AH-Controls passen */
  .pat-woche-grid {
    grid-template-columns: repeat(5, minmax(118px, 1fr));
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: .6rem;
  }
  .pat-tag-col {
    padding: .75rem .4rem;
    gap: .45rem;
  }
  .pat-tile {
    width: 1.85rem;
    height: 1.85rem;
    font-size: .8rem;
  }
  .pat-tiles { gap: .25rem; }
  .ah-control {
    gap: .35rem;
    padding-top: .4rem;
    margin-top: .3rem;
    flex-wrap: nowrap;
  }
  .ah-btn {
    width: 1.9rem;
    height: 1.9rem;
    font-size: 1rem;
    flex: 0 0 auto;
    touch-action: manipulation;
  }
  .ah-count {
    min-width: 2.2rem;
    font-size: .68rem;
    flex: 1 1 auto;
  }

  /* PW table: scroll */
  .pw-table { min-width: 460px; }
  .card:has(.pw-table) { overflow-x: auto; }

  /* Report card */
  .report-card { max-width: 100%; }
  .report-fields { flex-direction: column; gap: .75rem; }

  /* Card */
  .card { padding: 1rem; }

  /* Touch-friendly inputs & buttons */
  input, select, textarea { padding: .7rem .9rem; min-height: 44px; }
  .btn-primary, .btn-ghost { min-height: 40px; }
  .typ-btn { min-height: 44px; }

  /* Antrag item */
  .antrag-item { flex-wrap: wrap; gap: .5rem; }

  /* Kalender nav title */
  .kalender-nav h2 { font-size: 1rem; }

  /* Quartalsziel card: stack */
  .quartal-card { flex-wrap: wrap; }
}

/* ─── MOBILE DATA TABLE → CARDS ────────────────────────── */
@media (max-width: 768px) {
  .data-table { display: block; width: 100%; }
  .data-table thead { display: none; }
  .data-table tbody { display: flex; flex-direction: column; gap: .5rem; }
  .data-table tr {
    display: block;
    background: #f7f9fb;
    border-radius: .875rem;
    padding: .875rem 1rem;
    border: 1px solid rgba(0,0,0,.04);
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
  }
  .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .3rem 0;
    border: none;
    font-size: .875rem;
  }
  .data-table td:first-child {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #191c1e;
    padding-bottom: .5rem;
    border-bottom: 1px solid rgba(0,0,0,.05);
    margin-bottom: .25rem;
  }
  .data-table td:last-child { padding-top: .5rem; }

  /* Anträge: mobile layout */
  .antrag-item { flex-wrap: wrap; align-items: flex-start; gap: .4rem; }
  .antrag-info { width: 100%; min-width: 0; }
  .antrag-titel { white-space: normal; word-break: break-word; }
  .antrag-datum { white-space: normal; }
  .antrag-status { width: 100%; margin-top: .1rem; font-size: .78rem; }
  .antrag-actions {
    width: 100%;
    display: flex;
    gap: .5rem;
    margin-top: .25rem;
  }
  .antrag-actions .btn-success,
  .antrag-actions .btn-danger {
    flex: 1;
    justify-content: center;
    padding: .65rem;
    border-radius: .75rem;
  }

  /* Patienten nav: wrap */
  #tab-patienten .page-header > div { flex-wrap: wrap; justify-content: space-between; width: 100%; }
  #tab-patienten strong { min-width: auto !important; text-align: center; width: 100%; order: -1; }

  /* Swipe hint indicator */
  .tab-swipe-hint {
    position: fixed;
    bottom: 72px;
    left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: .3rem 0;
    z-index: 49;
    pointer-events: none;
  }
  .tab-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #d1d5db;
    transition: background .2s, width .2s;
  }
  .tab-dot.active { background: #006591; width: 18px; border-radius: 3px; }
}

@media (max-width: 768px) {
  /* Prevent any element from breaking viewport width */
  .main-content { overflow-x: hidden; }

  /* Admin calendar: horizontal scroll on mobile */
  .admin-cal-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: .75rem !important;
    /* Must be max viewport width so inner min-width doesn't expand page */
    max-width: calc(100vw - 2rem);
    box-sizing: border-box;
  }
  .admin-cal-header,
  .admin-cal-grid {
    min-width: 460px;
  }
  /* Mitarbeiter Übersicht section below calendar */
  #mobileUebersichtContent + .admin-cal-card {
    margin-top: 0;
  }
}

@media (max-width: 480px) {
  .kalender-tag { min-height: 30px; }
  .kalender-tage, .kalender-grid { gap: 1px; }
  .admin-cal-grid { gap: 2px; }
  .admin-cal-tag { min-height: 46px; }
  .card { padding: .875rem; }
  #alleQuartale { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ─── Report Card ──────────────────────────────────────── */
.report-card {
  max-width: 420px;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid rgba(169,180,185,.15);
  box-shadow: 0 2px 16px rgba(0,101,145,.07);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.report-card-icon {
  font-size: 2rem;
  line-height: 1;
}
.report-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2a3439;
}
.report-card-desc {
  font-size: .875rem;
  color: #566166;
  line-height: 1.5;
}
.report-fields {
  display: flex;
  gap: 1rem;
}
.report-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.report-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #566166;
}
/* Custom Dropdown */
.cdd {
  position: relative;
  width: 100%;
}
.cdd-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem .85rem;
  border: 1.5px solid rgba(169,180,185,.35);
  border-radius: .625rem;
  background: #f7f9fb;
  color: #2a3439;
  font-size: .9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  text-align: left;
}
.cdd-trigger:hover,
.cdd-open .cdd-trigger {
  border-color: #006591;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0,101,145,.1);
}
.cdd-arrow {
  color: #006591;
  font-size: .75rem;
  transition: transform .15s;
}
.cdd-open .cdd-arrow {
  transform: rotate(180deg);
}
.cdd-list {
  display: none;
  position: absolute;
  top: calc(100% + .35rem);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid rgba(0,101,145,.2);
  border-radius: .625rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  z-index: 200;
  list-style: none;
  margin: 0;
  padding: .3rem;
  max-height: 220px;
  overflow-y: auto;
}
.cdd-open .cdd-list {
  display: block;
}
.cdd-item {
  padding: .5rem .75rem;
  border-radius: .375rem;
  font-size: .875rem;
  font-weight: 500;
  color: #2a3439;
  cursor: pointer;
  transition: background .1s, color .1s;
}
.cdd-item:hover {
  background: #eef6fb;
  color: #006591;
}
.cdd-item.cdd-active {
  background: #006591;
  color: #fff;
  font-weight: 700;
}
.report-preview {
  font-size: .82rem;
  font-weight: 600;
  color: #006591;
  background: rgba(0,101,145,.06);
  border-radius: .5rem;
  padding: .5rem .85rem;
  min-height: 1.8rem;
}
.btn-report {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  background: #006591;
  color: #fff;
  border: none;
  border-radius: .625rem;
  font-size: .95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn-report:hover {
  background: #005278;
  transform: translateY(-1px);
}
.btn-report:active {
  transform: translateY(0);
}

/* ─── Admin Gesamtkalender ──────────────────────────────── */
.admin-cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
  text-align: center;
  font-size: .7rem;
  font-weight: 700;
  color: #566166;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 0 0 .25rem;
}
.admin-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.admin-cal-tag {
  min-height: 90px;
  border-radius: .5rem;
  padding: .4rem .35rem .35rem;
  background: #f7f9fb;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.admin-cal-tag.leer { background: transparent; }
.admin-cal-tag.wochenende { background: transparent; opacity: .45; }
.admin-cal-tag.heute { background: #e8f4fd; }
.cal-tag-nr {
  font-size: .75rem;
  font-weight: 600;
  color: #566166;
  margin-bottom: 2px;
}
.cal-tag-nr.heute-nr {
  background: #006591;
  color: #fff;
  border-radius: 99px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
}
.cal-bar {
  border-radius: .25rem;
  padding: 2px 4px;
  min-height: 18px;
  display: flex;
  align-items: center;
  cursor: default;
}

/* ─── MOBILE ONLY / DESKTOP ONLY ──────────────────────────── */
.mobile-only { display: none; }
.desktop-only { display: block; }

@media (max-width: 768px) {
  .mobile-only { display: block; }
  .desktop-only { display: none !important; }
  .cal-nav-wrap { display: none !important; }
}

/* ─── WEEK STRIP CALENDAR ───────────────────────────────────── */
.week-strip {
  display: flex;
  gap: 6px;
}
.week-day-pill {
  flex: 1;
  min-width: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .65rem .25rem .55rem;
  border-radius: .875rem;
  background: #f2f4f6;
  gap: .25rem;
}
.week-day-pill.today { background: #006591; }
.week-day-pill.today .wdp-name { color: rgba(255,255,255,.75); }
.week-day-pill.today .wdp-num { color: #fff; }
.week-day-pill.weekend { opacity: .5; }
.wdp-name {
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #566166;
  letter-spacing: .04em;
}
.wdp-num {
  font-size: 1rem;
  font-weight: 800;
  font-family: 'Manrope', sans-serif;
  color: #191c1e;
  line-height: 1;
}
.wdp-dots {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: center;
  min-height: 8px;
}
.wdp-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

/* ─── TEAM STATUS ROW ───────────────────────────────────────── */
.team-status-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.team-status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  flex-shrink: 0;
}
.tsi-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg,#006591,#004c6e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  font-family: 'Manrope', sans-serif;
  position: relative;
  flex-shrink: 0;
}
.tsi-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #fff;
}
.tsi-name {
  font-size: .65rem;
  font-weight: 600;
  color: #566166;
  text-align: center;
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── MITARBEITER MOBILE CARDS ──────────────────────────────── */
.ma-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(25,28,30,.04);
  border: 1px solid rgba(0,0,0,.03);
  margin-bottom: .75rem;
}
.ma-card-header {
  display: flex;
  align-items: center;
  gap: .875rem;
  margin-bottom: 1rem;
}
.ma-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg,#006591,#004c6e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  font-family: 'Manrope', sans-serif;
  flex-shrink: 0;
}
.ma-card-info { flex: 1; min-width: 0; }
.ma-name {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  color: #191c1e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ma-role {
  display: inline-block;
  font-size: .62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .15rem .5rem;
  border-radius: 99px;
  margin-top: .25rem;
}
.ma-role.admin { background: #ffdcbf; color: #6b3c00; }
.ma-role.mitarbeiter { background: #dbeafe; color: #1e3a5f; }
.ma-urlaubstage { text-align: right; flex-shrink: 0; }
.ma-tage-zahl {
  font-size: 1.2rem;
  font-weight: 800;
  color: #006591;
  font-family: 'Manrope', sans-serif;
  line-height: 1.1;
}
.ma-tage-label {
  font-size: .6rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ma-bar-wrap {
  width: 100%;
  height: 6px;
  background: #eceef0;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: .4rem;
}
.ma-bar {
  height: 100%;
  background: linear-gradient(90deg,#006591,#004c6e);
  border-radius: 99px;
  transition: width .3s;
}
.ma-stats { display: flex; justify-content: space-between; }
.ma-stat-text { font-size: .65rem; font-weight: 600; color: #9ca3af; }

/* ─── MOBILE SEARCH ─────────────────────────────────────────── */
.mobile-search-wrap {
  position: relative;
  margin-bottom: .875rem;
}
.mobile-search {
  width: 100%;
  background: #eceef0;
  border: none;
  border-radius: 99px;
  padding: .75rem 1rem .75rem 2.75rem;
  font-size: .9rem;
  color: #191c1e;
  font-family: inherit;
  outline: none;
  min-height: auto;
}
.mobile-search::placeholder { color: #9ca3af; }
.mobile-search-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .9rem;
  pointer-events: none;
}

/* ─── Toast ────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: #fff;
  border-radius: .5rem;
  padding: .75rem 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  font-size: .875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .5rem;
  animation: toastIn .3s ease;
  max-width: 320px;
  border-left: 3px solid #006591;
}
.toast.success { border-left-color: #22c55e; }
.toast.error { border-left-color: #ef4444; }
.toast.fade-out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100%); } }
@media (max-width: 768px) {
  .toast-container { top: auto; bottom: 5rem; right: .5rem; left: .5rem; }
  .toast { max-width: 100%; }
}

/* ─── Gantt Zwei-Panel ─────────────────────────────────── */
.gantt-names-panel { width: 160px; }
.gantt-name-full {
  display: flex;
  padding: 0 .75rem;
  white-space: nowrap;
  width: 100%;
  box-sizing: border-box;
}
.gantt-name-initials { display: none; width: 100%; justify-content: center; }
@media (max-width: 768px) {
  .gantt-names-panel { width: 40px; }
  .gantt-name-full { display: none; }
  .gantt-name-initials { display: flex; }
}
