/* Plus Jakarta Sans, lokal ausgeliefert (SIL Open Font License, siehe fonts/OFL.txt) */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/plus-jakarta-sans-latin-400-normal.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: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/plus-jakarta-sans-latin-ext-400-normal.woff2') format('woff2'); 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; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/plus-jakarta-sans-latin-500-normal.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: 'Plus Jakarta Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/plus-jakarta-sans-latin-ext-500-normal.woff2') format('woff2'); 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; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/plus-jakarta-sans-latin-600-normal.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: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/plus-jakarta-sans-latin-ext-600-normal.woff2') format('woff2'); 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; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/plus-jakarta-sans-latin-700-normal.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: 'Plus Jakarta Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/plus-jakarta-sans-latin-ext-700-normal.woff2') format('woff2'); 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; }

:root {
  --navy: #0B2F52;
  --blue: #13518D;
  --blue-soft: #2A6DB0;
  --ink: #14202E;
  --ink-2: #344358;
  --muted: #55657A;
  --line: #DCE3EC;
  --line-2: #E7ECF2;
  --ground: #F2F5F9;
  --tint: #E4EDF7;
  --on-navy: #D0E0F2;
  --on-navy-2: #A9C4E0;
  --ok-bg: #E3F4EA;    --ok: #176B3A;
  --work-bg: #FDF0D8;  --work: #8A5300;
  --error-bg: #FBE6E6; --error: #A12626;
  --neutral-bg: #E7ECF9; --neutral: #34478A;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--ink);
  background: var(--ground);
}
h1, h2 { margin: 0; letter-spacing: -0.01em; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }

.stack { display: flex; flex-direction: column; }
.stack-4 { display: flex; flex-direction: column; gap: 4px; }
.stack-6 { display: flex; flex-direction: column; gap: 6px; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; }

/* ---------- Marke ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; }
.brand-icon.small { width: 40px; height: 40px; }
.brand-name { font-size: 17px; font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--on-navy-2); }

/* ---------- Anmeldung ---------- */
.login { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login-intro {
  flex: 1 1 480px; min-width: 0; background: var(--navy); color: #fff;
  padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
}
.intro-text { display: flex; flex-direction: column; gap: 28px; max-width: 520px; }
.intro-text h1 { font-size: 44px; line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; }
.intro-text p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--on-navy); }
.intro-text ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.intro-text li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.5; }
.intro-text li svg { flex: 0 0 22px; margin-top: 1px; }
.intro-foot { font-size: 13px; color: var(--on-navy-2); }

.login-form-wrap { flex: 1 1 480px; min-width: 0; padding: 56px 32px; display: flex; align-items: center; justify-content: center; }
.login-form { width: 100%; max-width: 420px; border-radius: 20px; padding: 36px; display: flex; flex-direction: column; gap: 22px; }
.login-form h2 { font-size: 26px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }
.field input {
  height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid #C5CEDA;
  font-size: 15px; color: var(--ink); background: #fff;
}
.field input:focus-visible, .search:focus-within, .date-filter input:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); min-height: 44px; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }

.btn-primary {
  height: 50px; border: 0; border-radius: 12px; background: var(--blue); color: #fff;
  font-size: 16px; font-weight: 700; cursor: pointer;
}
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.btn-secondary {
  height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.btn-secondary:disabled { color: #A3AFBF; cursor: not-allowed; }
.btn-ghost-dark {
  height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.25);
  background: transparent; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
}

.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.alert-error { background: var(--error-bg); color: #7A1D1D; border: 1px solid #F0C4C4; }
.mx { margin: 0 20px 16px; }

/* ---------- App-Rahmen ---------- */
.app { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: stretch; }
.sidebar {
  flex: 1 1 248px; max-width: 288px; min-width: 0; background: var(--navy); color: #fff;
  padding: 24px 16px; display: flex; flex-direction: column; gap: 28px;
}
.sidebar .brand { padding: 0 8px; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--on-navy); }
.nav-item.active { background: rgba(255,255,255,0.14); color: #fff; font-weight: 600; }
.host-box { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; background: rgba(255,255,255,0.08); }
.host-name { font-size: 15px; font-weight: 700; }
.ap-field { display: flex; flex-direction: column; gap: 6px; }
/* Mehrfachauswahl der Apartments in der Seitenleiste */
.ap-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  min-height: 44px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.1); color: #fff; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer;
}
.ap-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.ap-toggle:focus-visible, .ap-apply:focus-visible, .ap-link:focus-visible, .ap-filter:focus-visible { outline: 2px solid #8CBBE8; outline-offset: 1px; }
.ap-summary { line-height: 1.35; }
.ap-panel { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; background: rgba(0,0,0,0.18); }
.ap-quick { display: flex; justify-content: space-between; gap: 8px; }
.ap-link { min-height: 32px; padding: 0 4px; border: 0; background: transparent; color: #8CBBE8; font-size: 13px; font-weight: 600; cursor: pointer; }
.ap-link:hover { text-decoration: underline; }
.ap-filter {
  height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08); color: #fff; font-size: 13px;
}
.ap-filter::placeholder { color: var(--on-navy-2); }
.ap-list { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; }
.ap-list label { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 4px; font-size: 13px; color: var(--on-navy); cursor: pointer; border-radius: 6px; }
.ap-list label:hover { background: rgba(255,255,255,0.08); }
.ap-list input { width: 16px; height: 16px; accent-color: #8CBBE8; flex: 0 0 auto; }
.ap-hint { font-size: 12px; color: #FFC9C9; }
.ap-apply { height: 40px; border: 0; border-radius: 8px; background: #fff; color: var(--navy); font-size: 14px; font-weight: 700; cursor: pointer; }
.check-list .hint { color: var(--muted); font-size: 12px; }

.content { flex: 999 1 560px; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.page-head h1 { font-size: 28px; }
.head-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.search {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); min-width: 260px; color: var(--muted);
}
.search input { border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--ink); flex: 1; min-width: 0; }
.user-pill {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px 0 6px; border-radius: 22px;
  background: #fff; border: 1px solid var(--line); color: var(--ink); cursor: pointer;
}
.user-pill svg { color: var(--muted); }
.user-pill:hover { border-color: #C5CEDA; background: var(--ground); }
.user-pill:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 10;
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px;
  background: var(--navy); color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 12px 32px rgba(11, 47, 82, 0.3);
}
.avatar { width: 32px; height: 32px; border-radius: 16px; background: var(--tint); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: 0 0 auto; }
.user-name { font-size: 14px; font-weight: 600; }

/* ---------- Kennzahlen ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.kpi { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi-value { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tone-ok { color: var(--ok); }
.tone-work { color: var(--work); }
.tone-error { color: var(--error); }

/* ---------- Tabelle ---------- */
.table-card { overflow: hidden; }
.table-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 44px; padding: 0 16px; border-radius: 22px; font-size: 14px; font-weight: 600; cursor: pointer;
  background: #fff; color: var(--ink); border: 1px solid var(--line);
}
.chip[aria-pressed="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.chip .count { opacity: 0.75; font-weight: 500; margin-left: 4px; }
.date-filter { display: flex; align-items: center; gap: 8px; }
.date-filter input { height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); }

.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
th {
  text-align: left; padding: 10px 20px; background: var(--ground);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
}
td { padding: 14px 20px; border-bottom: 1px solid var(--line-2); font-size: 14px; vertical-align: middle; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.guest { display: flex; align-items: center; gap: 12px; min-width: 0; font-weight: 700; }
.guest .avatar { width: 36px; height: 36px; border-radius: 18px; }
.status {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.status.ok { background: var(--ok-bg); color: var(--ok); }
.status.storno { background: var(--work-bg); color: var(--work); }
.status.error { background: var(--error-bg); color: var(--error); }
.status.other { background: var(--neutral-bg); color: var(--neutral); }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }

.table-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; }
.pager { display: flex; gap: 8px; }

/* ---------- Seiten ---------- */
.page { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.section-title { font-size: 17px; font-weight: 700; }
.alert-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #BFE3CD; }

.btn-compact { height: 44px; padding: 0 18px; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.btn-danger {
  height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--error); color: #fff;
  font-size: 14px; font-weight: 700; cursor: pointer;
}
.btn-danger:disabled { opacity: 0.6; cursor: progress; }
.icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 0; background: transparent; color: var(--blue); cursor: pointer;
}
.icon-btn:hover { background: var(--tint); }
.icon-btn.danger { color: var(--error); }
.icon-btn.danger:hover { background: var(--error-bg); }
.icon-btn:disabled { color: #A3AFBF; background: transparent; cursor: not-allowed; }
.actions { display: flex; justify-content: flex-end; gap: 4px; }
.you { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 6px; }

.btn-link {
  height: 44px; padding: 0 8px; border: 0; background: transparent; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--blue);
}
.btn-link:hover { text-decoration: underline; }
.date-range { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.align-start { align-items: flex-start; }
.cell-main { font-weight: 600; }
.cell-sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
td .guest .stack { min-width: 0; }
.storno-row td { color: var(--muted); }
.storno-row .cell-main { text-decoration: line-through; }

/* ---------- Dashboard ---------- */
.segmented {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; align-self: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
}
.segmented button {
  height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent;
  font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.segmented button:hover { background: var(--ground); }
.segmented button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.segmented button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; align-items: start; }
.widget { display: flex; flex-direction: column; overflow: hidden; }
.widget-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; }
.widget-head h2 { margin: 0; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line-2);
}
.mini-list .avatar { width: 36px; height: 36px; border-radius: 18px; }
.mini-list .info-btn { flex: 0 0 auto; margin-left: -4px; }
.mini-list .grow { display: flex; flex-direction: column; gap: 2px; }
.mini-list .name { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list .meta { font-size: 13px; color: var(--muted); }
.mini-list .empty-item { justify-content: center; color: var(--muted); font-size: 14px; padding: 28px 20px; }
.mini-list .more { justify-content: center; font-size: 13px; color: var(--muted); }

/* ---------- Benutzerverwaltung ---------- */
.host-picker { padding: 20px; display: flex; flex-wrap: wrap; gap: 16px; }
.grow { flex: 1 1 200px; min-width: 0; }
.grow-2 { flex: 2 1 320px; min-width: 0; }
.field select {
  height: 48px; padding: 0 12px; border-radius: 12px; border: 1px solid #C5CEDA;
  font: inherit; font-size: 15px; color: var(--ink); background: #fff;
}
.field select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.form-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Jahresübersicht im Dashboard ---------- */
.dash-year { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.year-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.year-title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.widget-head h3 { margin: 0; }
.alert-info { background: var(--tint); color: #0D3B68; border: 1px solid #C9DAEE; }

/* ---------- Statistik ---------- */
:root { --chart-1: #2A6DB0; --grid: #E7ECF2; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.filter-row .segmented { align-self: auto; }
.stat-content { display: flex; flex-direction: column; gap: 24px; transition: opacity 0.15s; }
.stat-content.is-loading, .dash-grid.is-loading { opacity: 0.5; pointer-events: none; }
.kpi-delta { font-size: 13px; font-weight: 600; }
.kpi-delta.up { color: var(--ok); }
.kpi-delta.down { color: var(--error); }
.kpi-delta.flat { color: var(--muted); font-weight: 500; }
.kpi-value-sm { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.chart-card { overflow: visible; }
.chart { position: relative; padding: 4px 16px 16px; min-height: 120px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: inherit; font-size: 12px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart text.value { fill: var(--ink); font-weight: 600; }
.chart .bar { fill: var(--chart-1); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:focus { outline: none; }
.chart g:hover .bar, .chart g:focus-within .bar { fill: var(--blue); }
.chart .empty-chart { color: var(--muted); font-size: 14px; padding: 32px 4px; text-align: center; }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; transform: translate(-50%, calc(-100% - 10px));
  background: var(--ink); color: #fff; font-size: 13px; line-height: 1.45; padding: 8px 10px; border-radius: 8px;
  white-space: nowrap; box-shadow: 0 8px 20px rgba(20, 32, 46, 0.25);
}
.chart-tip strong { display: block; font-weight: 700; }
.table-details { padding: 0; overflow: hidden; }
.table-details summary { padding: 16px 20px; font-weight: 600; cursor: pointer; min-height: 44px; }
.table-details table { min-width: 520px; }
th.r, td.r { text-align: right; }
.stat-note { margin: 0; line-height: 1.5; }

/* ---------- Spaltenbreiten änderbar (Buchungen, Meldungen) ---------- */
table[data-spalten] th { position: relative; }
.col-resizer {
  position: absolute; top: 0; right: -5px; z-index: 2; width: 10px; height: 100%;
  cursor: col-resize; touch-action: none; outline: none;
}
.col-resizer::after {
  content: ""; position: absolute; top: 20%; bottom: 20%; left: 4px; width: 2px; border-radius: 1px;
  background: var(--line);
}
.col-resizer:hover::after, .col-resizer:focus-visible::after, .col-resizer.aktiv::after { background: var(--blue); top: 0; bottom: 0; }
table.fixed-cols { table-layout: fixed; min-width: 0; }
table.fixed-cols td, table.fixed-cols th { overflow: hidden; text-overflow: ellipsis; }
table.fixed-cols .guest { min-width: 0; }
body.spalte-ziehen, body.spalte-ziehen * { cursor: col-resize !important; user-select: none; }

/* ---------- Check-in-Daten ---------- */
.info-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 0; background: transparent; color: var(--blue); cursor: pointer;
}
.info-btn:hover { background: var(--tint); }
.info-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.info-btn:disabled { color: #A3AFBF; background: transparent; cursor: not-allowed; }
.ci-content { display: flex; flex-direction: column; gap: 18px; max-height: 60vh; overflow-y: auto; }
.ci-section h3 { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.ci-grid { margin: 0; display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 6px 16px; font-size: 14px; }
.ci-grid dt { color: var(--muted); }
.ci-grid dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.ci-grid a { color: var(--blue); text-decoration: underline; }
.ci-guests { width: 100%; min-width: 0; border-collapse: collapse; font-size: 14px; }
.ci-guests th { padding: 6px 10px; font-size: 11px; }
.ci-guests td { padding: 8px 10px; }
.ci-meta { font-size: 12px; color: var(--muted); }

/* ---------- Benutzermenü ---------- */
.user-pill[aria-expanded="true"] svg { transform: rotate(180deg); }
.user-menu {
  position: fixed; z-index: 20; min-width: 220px; padding: 6px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(11, 47, 82, 0.18);
  display: flex; flex-direction: column;
}
.menu-item {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; text-align: left; cursor: pointer;
}
.menu-item svg { color: var(--muted); }
.menu-item:hover, .menu-item:focus-visible { background: var(--ground); outline: none; }
.menu-sep { height: 1px; margin: 4px 6px; background: var(--line-2); }

/* ---------- Einstellungen ---------- */
.settings-card { overflow: hidden; }
.settings-list { list-style: none; margin: 0; padding: 0; }
.settings-list li {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; border-top: 1px solid var(--line-2);
}
.settings-list .grow { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.zeit-cell { display: flex; align-items: center; gap: 8px; }
.zeit-cell input {
  height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.zeit-cell input:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.zeit-cell .zeit-status { font-size: 12px; color: var(--muted); min-width: 70px; }
.karten-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.karten-add .field { flex: 1 1 160px; }
.karten-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.karten-suche { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid #C5CEDA; flex: 1 1 160px; max-width: 240px; }
.karten-list {
  list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 12px;
}
.karten-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 8px 0 14px;
  border-bottom: 1px solid var(--line-2); font-variant-numeric: tabular-nums; font-size: 14px;
}
.karten-list li:last-child { border-bottom: 0; }
.karten-list .empty-item { justify-content: center; color: var(--muted); padding: 20px; }
.karten-list .next { font-size: 12px; font-weight: 600; color: var(--ok); margin-left: 8px; }

/* ---------- API-Zugänge ---------- */
.check-list {
  max-height: 260px; overflow-y: auto; border: 1px solid #C5CEDA; border-radius: 12px;
  display: flex; flex-direction: column;
}
.check-list label {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px;
  font-size: 14px; border-bottom: 1px solid var(--line-2); cursor: pointer;
}
.check-list label:last-child { border-bottom: 0; }
.check-list label:hover { background: var(--ground); }
.check-list input { width: 18px; height: 18px; accent-color: var(--blue); flex: 0 0 auto; }
.check-list .nr { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.check-list .empty-item { padding: 16px; color: var(--muted); font-size: 14px; }
.key-row { display: flex; gap: 8px; }
.key-row input {
  flex: 1; min-width: 0; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid #C5CEDA;
  font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--ground); color: var(--ink);
}
.alert-warn { background: var(--work-bg); color: #6B4100; border: 1px solid #F2D9A8; }
.host-list { font-size: 14px; line-height: 1.45; }
code.key-prefix { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--muted); }

/* ---------- Dialoge ---------- */
.dialog {
  width: min(520px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 20px;
  color: var(--ink); box-shadow: 0 24px 64px rgba(11, 47, 82, 0.28);
}
.dialog-wide { width: min(640px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(11, 47, 82, 0.45); }
.dialog-body { padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.dialog-body h2 { font-size: 22px; }
.dialog-text { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.field input:read-only { background: var(--ground); color: var(--muted); }

/* ---------- Benutzerverwaltung: Betreiber und Apartments ---------- */
.tool-select {
  height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  font: inherit; font-size: 14px; color: var(--ink); max-width: 100%;
}
.tool-select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.field-label { font-size: 14px; font-weight: 600; }
.check-list-tall { max-height: 320px; }
.check-list .group-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 4px 6px 4px 12px;
  background: var(--ground); border-bottom: 1px solid var(--line-2); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); position: sticky; top: 0;
}
.check-list .group-head .btn-link { height: 32px; font-size: 13px; text-transform: none; letter-spacing: 0; }
.ap-names { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.45; }

/* ---------- Seitenleiste: Apartments nach Betreiber gruppiert ---------- */
.ap-group { padding: 8px 4px 2px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.75; }

/* ---------- Support-Ansicht (Admin sieht einen anderen Betreiber) ---------- */
.ansicht-bar {
  position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--work-bg); color: #6B4100;
  border: 1px solid #F2D9A8; font-size: 14px; line-height: 1.45;
}
.ansicht-bar .grow { flex: 1 1 240px; }
.ansicht-bar .btn-link { color: #6B4100; }
.pick-list {
  max-height: 340px; overflow-y: auto; border: 1px solid #C5CEDA; border-radius: 12px;
  display: flex; flex-direction: column;
}
.pick-list .pick-group { padding: 10px 14px 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: var(--ground); }
.pick-list button {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border: 0;
  border-bottom: 1px solid var(--line-2); background: #fff; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
}
.pick-list button:last-child { border-bottom: 0; }
.pick-list button:hover, .pick-list button:focus-visible { background: var(--ground); outline: none; }
.pick-list button[aria-current="true"] { background: var(--tint); }
.pick-list .stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pick-list .sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-list .nr { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.pick-list .empty-item { padding: 16px; color: var(--muted); font-size: 14px; }

/* ---------- Betreiber: Statusfilter, Apartments anlegen/bearbeiten ---------- */
.tools-right { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.check-list .check-item { display: flex; align-items: center; border-bottom: 1px solid var(--line-2); }
.check-list .check-item:last-child { border-bottom: 0; }
.check-list .check-item label { flex: 1; min-width: 0; border-bottom: 0; }
.check-list .check-item .icon-btn { flex: 0 0 auto; margin-right: 4px; }
.ap-new-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form-section { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 16px 0 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.form-section legend { padding: 0 8px 0 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.form-section .check { min-height: 36px; }

@media (max-width: 640px) {
  .dialog-body { padding: 20px; }
  .login-intro { padding: 32px 24px; }
  .intro-text h1 { font-size: 32px; }
  .login-form-wrap { padding: 32px 16px; }
  .login-form { padding: 24px; }
  .sidebar { max-width: none; flex-basis: 100%; }
  .content { padding: 20px 16px; }
  .search { min-width: 0; flex: 1 1 100%; }
}
