:root {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: #172033;
    background: #eef2f7;
    --bg: #eef2f7;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --line: #d9e2ef;
    --text: #172033;
    --muted: #667085;
    --brand: #0f766e;
    --brand-dark: #115e59;
    --blue: #2563eb;
    --danger: #dc2626;
    --sidebar: #102033;
    --sidebar-2: #162a42;
    --shadow: 0 14px 35px rgba(15, 23, 42, .12);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
a { color: #1d4ed8; text-decoration: none; }
button, input, select, textarea { font: inherit; }

/* Login / nicht angemeldet */
.login-body {
    min-height: 100vh;
    background: radial-gradient(circle at top left, #d9f99d 0, transparent 28%), linear-gradient(135deg, #0f172a 0%, #115e59 100%);
}
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}
.login-wrapper .card {
    width: min(460px, 100%);
}

/* Programm-Oberfläche */
.app-body { min-height: 100vh; overflow: hidden; background: var(--bg); }
.app-shell {
    height: 100vh;
    display: grid;
    grid-template-columns: 286px minmax(0, 1fr);
    background: var(--bg);
}
.app-sidebar {
    min-height: 100vh;
    color: #e5edf7;
    background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 8px 0 24px rgba(15, 23, 42, .18);
    z-index: 2;
}
.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    padding: 10px 8px 16px;
    border-bottom: 1px solid rgba(255,255,255,.13);
}
.app-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: white;
    background: linear-gradient(135deg, #14b8a6, #0f766e);
    box-shadow: 0 10px 24px rgba(20,184,166,.28);
}
.app-brand strong { display:block; font-size: 16px; line-height: 1.15; }
.app-brand small { display:block; color:#b9c6d6; margin-top:3px; font-size:12px; }
.app-nav { display:flex; flex-direction:column; gap:6px; }
.app-nav-heading {
    margin: 15px 10px 6px;
    font-size: 11px;
    color: #8ea0b8;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
}
.app-nav-item, .app-nav-placeholder {
    display:block;
    color:#dbe7f5;
    padding: 11px 12px;
    border-radius: 12px;
    font-weight: 700;
}
.app-nav-item:hover { background: rgba(255,255,255,.10); color:white; }
.app-nav-item.active { background: #ffffff; color:#0f172a; box-shadow: 0 10px 24px rgba(0,0,0,.16); }
.app-nav-placeholder { color:#8ea0b8; background: rgba(255,255,255,.05); cursor: default; }
.app-main {
    height: 100vh;
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}
.app-topbar {
    min-height: 82px;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--line);
    padding: 15px 24px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap: 18px;
    backdrop-filter: blur(10px);
}
.app-page-kicker { color: var(--brand); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.app-topbar h1 { margin: 2px 0 0; font-size: 24px; line-height: 1.15; }
.app-userbox { display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.app-user-name { min-width: 150px; text-align:right; }
.app-user-name strong, .app-user-name small { display:block; }
.app-user-name small { color: var(--muted); font-size: 12px; }
.app-content {
    min-height: 0;
    overflow: auto;
    padding: 22px 24px 34px;
}

/* Startseite: nur Button, aber als Programm-Kachel */
.start-launch {
    min-height: calc(100vh - 150px);
    display:flex;
    align-items:center;
    justify-content:center;
}
.start-launch .card { width:min(620px, 100%); text-align:center; }
.start-launch .button { font-size: 18px; padding: 16px 24px; border-radius: 16px; }

/* Basiselemente */
.card {
    background: var(--panel);
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}
.card h1:first-child, .card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:18px; }
label { display:block; font-weight:800; margin-bottom:6px; }
input, select, textarea {
    width:100%;
    padding:11px 12px;
    border:1px solid #cfd8e6;
    border-radius:11px;
    margin-bottom:12px;
    background:white;
    color: var(--text);
}
input:focus, select:focus, textarea:focus {
    outline: 3px solid rgba(20, 184, 166, .18);
    border-color: #14b8a6;
}
textarea { min-height:90px; }
button, .button {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    background: var(--brand);
    color:white;
    border:0;
    border-radius:11px;
    padding:10px 14px;
    cursor:pointer;
    font-weight:800;
    box-shadow: 0 8px 18px rgba(15, 118, 110, .18);
}
button:hover, .button:hover { background: var(--brand-dark); color:white; }
.button.secondary, button.secondary { background:#475569; box-shadow:none; }
.button.secondary:hover, button.secondary:hover { background:#334155; }
button.danger, .button.danger { background:var(--danger); box-shadow:none; }
button.danger:hover, .button.danger:hover { background:#b91c1c; }
.button.tiny { padding:5px 8px; font-size:12px; border-radius:8px; }
.error { background:#fee2e2; color:#991b1b; padding:12px; border-radius:12px; border:1px solid #fecaca; }
.success { background:#dcfce7; color:#166534; padding:12px; border-radius:12px; border:1px solid #bbf7d0; }
.warning { background:#fef3c7; color:#92400e; padding:12px; border-radius:12px; border:1px solid #fde68a; }
.muted { color:var(--muted); }
.small { font-size:12px; }

.table-wrap { width:100%; overflow:auto; border:1px solid var(--line); border-radius:16px; background:white; }
table { width:100%; border-collapse:collapse; background:white; }
th, td { padding:12px 13px; border-bottom:1px solid #e8edf5; text-align:left; vertical-align:top; }
th { background:#f8fafc; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:#475569; }
tr:hover td { background:#fbfdff; }
.badge { display:inline-flex; align-items:center; padding:4px 9px; border-radius:999px; background:#e5e7eb; margin:2px; font-size:12px; font-weight:800; }
.badge.ok { background:#dcfce7; color:#166534; }
.badge.blocked { background:#fee2e2; color:#991b1b; }
.code-input { letter-spacing: .35em; font-size: 22px; text-align: center; font-weight: bold; }

/* Benutzerverwaltung / Rechte */
.highlight-card { border: 2px solid #99f6e4; }
.filter-row { display:grid; grid-template-columns: 1fr 220px auto auto; gap:10px; align-items:start; margin-bottom:16px; }
.action-row { display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; padding-top:14px; border-top:1px solid #e5e7eb; }
.permission-group { border:1px solid #e5e7eb; border-radius:14px; padding:14px; margin-bottom:12px; background:#fafafa; }
.permission-group h3 { margin-top:0; text-transform:capitalize; }
.permission-group-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.permission-group-head h3 { margin:0; }
.checkbox-list label { display:flex; gap:8px; align-items:flex-start; font-weight:normal; margin:7px 0; }
.checkbox-list input[type="checkbox"] { width:auto; margin:2px 0 0; }
.inline-actions { display:flex; gap:8px; flex-wrap:wrap; }
.inline-actions form { display:inline; margin:0; }
.mini-actions { display:flex; gap:6px; flex-wrap:wrap; }
.permission-list { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap:4px 12px; }
.permission-group.compact { padding:10px; }
.permission-list.compact { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.badge-wrap { display:flex; gap:6px; flex-wrap:wrap; margin:8px 0 14px; }
.status-checks { margin: 6px 0 14px; }
.role-list { display:grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap:4px 12px; }

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .app-sidebar { min-height:auto; display:block; padding:12px; }
    .app-brand { padding-bottom:10px; }
    .app-nav { margin-top:10px; display:grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
    .app-nav-heading { grid-column:1/-1; margin-top:8px; }
    .app-main { height: calc(100vh - 220px); }
    .app-topbar { align-items:flex-start; flex-direction:column; }
    .app-userbox { justify-content:flex-start; }
    .app-user-name { text-align:left; }
}
@media (max-width: 760px) {
    .app-content { padding:16px; }
    .filter-row { grid-template-columns: 1fr; }
    .permission-group-head { align-items:flex-start; flex-direction:column; }
    .app-fullscreen-btn { display:none; }
}

/* v10: echte Programm-Oberfläche statt langer Formularseite */
.app-content {
    padding: 14px 16px 18px;
    overflow: hidden;
}
.page-intro.compact-intro {
    min-height: 74px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    padding: 14px 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.page-intro h1 { margin: 0 0 3px; font-size: 22px; }
.page-intro p { margin: 0; color: var(--muted); }
.notice-stack {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}
.notice-stack p { margin: 0; }
.admin-workbench {
    height: calc(100vh - 190px);
    min-height: 520px;
    display: grid;
    grid-template-columns: minmax(580px, 1.15fr) minmax(460px, .85fr);
    gap: 14px;
}
.work-panel {
    min-height: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .09);
    overflow: auto;
}
.panel-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}
.sticky-panel-head {
    position: sticky;
    top: 0;
    z-index: 5;
}
.panel-head h2 { margin: 0 0 2px; font-size: 18px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 13px; }
.program-form { padding: 14px 16px 0; }
.form-section {
    background: #fbfdff;
    border: 1px solid #e6edf6;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
}
.form-section h3 { margin: 0 0 10px; font-size: 15px; }
.tight-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 10px 12px; }
.tight-grid input { margin-bottom: 0; }
.inline-checks {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.inline-checks label { margin: 0; }
.role-list {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 8px;
}
.role-list label {
    margin: 0;
    padding: 9px 10px;
    border: 1px solid #e0e7f0;
    border-radius: 12px;
    background: #fff;
}
.permissions-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.permissions-panel {
    max-height: 330px;
    overflow: auto;
}
details.permission-group.compact {
    padding: 0;
    margin-bottom: 8px;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.permission-group-head {
    list-style: none;
    cursor: pointer;
    padding: 10px 12px;
    background: #f3f7fb;
    font-weight: 900;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.permission-group-head::-webkit-details-marker { display: none; }
.permission-group-head::before {
    content: '▸';
    display: inline-block;
    margin-right: 8px;
    transition: transform .15s ease;
}
details[open] > .permission-group-head::before { transform: rotate(90deg); }
.permission-count { font-size: 12px; color: var(--muted); font-weight: 800; }
.permission-mini-actions { padding: 10px 12px 0; }
.permission-list.compact {
    grid-template-columns: repeat(2, minmax(210px, 1fr));
    gap: 4px 10px;
    padding: 8px 12px 12px;
}
.permission-list label {
    padding: 6px 7px;
    border-radius: 9px;
    margin: 0;
}
.permission-list label:hover { background: #f8fafc; }
.effective-rights-box {
    margin: 0 16px 12px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid #e6edf6;
    background: #fbfdff;
}
.effective-rights-box summary { cursor: pointer; font-weight: 900; }
.quick-admin-actions {
    padding: 0 16px 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.sticky-actions {
    position: sticky;
    bottom: 0;
    background: rgba(255,255,255,.96);
    margin: 0 -16px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    backdrop-filter: blur(10px);
}
.compact-filter {
    padding: 12px 16px;
    grid-template-columns: 1fr 150px auto auto;
    margin: 0;
    border-bottom: 1px solid var(--line);
}
.compact-filter input, .compact-filter select { margin-bottom: 0; }
.fixed-table {
    border: 0;
    border-radius: 0;
    max-height: calc(100% - 122px);
    overflow: auto;
}
.fixed-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
}
.user-table-wrap table { min-width: 720px; }
.selected-row td { background: #ecfeff !important; }
.compact-actions {
    min-width: 220px;
}
.compact-actions .button, .compact-actions button {
    padding: 7px 9px;
    font-size: 13px;
    border-radius: 9px;
}
.list-panel td { font-size: 14px; }
.list-panel th:nth-child(1) { width: 34%; }
.list-panel th:nth-child(2) { width: 24%; }
.list-panel th:nth-child(3) { width: 18%; }
.list-panel th:nth-child(4) { width: 24%; }

@media (min-width: 1200px) {
    .app-sidebar { width: 270px; }
    .app-shell { grid-template-columns: 270px minmax(0, 1fr); }
}
@media (max-width: 1180px) {
    .admin-workbench { grid-template-columns: 1fr; height: auto; overflow: visible; }
    .app-content { overflow: auto; }
    .work-panel { max-height: none; }
    .permissions-panel { max-height: 360px; }
}
@media (max-width: 760px) {
    .page-intro.compact-intro { flex-direction: column; align-items: flex-start; }
    .tight-grid, .role-list, .permission-list.compact { grid-template-columns: 1fr; }
    .compact-filter { grid-template-columns: 1fr; }
    .admin-workbench { min-height: 0; }
}


/* v11: Scroll-Fix für Rollen & Rechte und innere Rechtebereiche */
.app-content {
    overflow: auto;
}
.users-workbench {
    overflow: hidden;
}
.users-workbench .work-panel {
    overflow: auto;
}
.users-workbench .permissions-panel {
    max-height: min(380px, calc(100vh - 430px));
    min-height: 190px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding-right: 10px;
}
.users-workbench .permissions-panel > h3,
.users-workbench .permissions-panel > p,
.users-workbench .permissions-toolbar {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #fbfdff;
}
.users-workbench .permissions-panel > h3 { padding-top: 2px; }
.users-workbench .permissions-toolbar { padding-bottom: 8px; }

/* Normale Verwaltungsseiten wie Rollen & Rechte dürfen wieder im Arbeitsbereich scrollen. */
.app-content > .card:last-child {
    margin-bottom: 28px;
}

/* v12: Objekt-/Häuserverwaltung als Programm-Modul */
.module-workbench {
    height: calc(100vh - 158px);
    min-height: 560px;
    display: grid;
    grid-template-columns: minmax(420px, .72fr) minmax(620px, 1.28fr);
    gap: 18px;
    overflow: hidden;
}
.module-workbench .work-panel {
    background: var(--panel);
    border: 1px solid rgba(15,23,42,.07);
    border-radius: 18px;
    box-shadow: var(--shadow);
    min-height: 0;
    overflow: auto;
}
.module-workbench .panel-head {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--line);
    padding: 16px 18px 12px;
    backdrop-filter: blur(10px);
}
.module-workbench .panel-head h2 { margin: 0 0 4px; }
.module-workbench .compact-form { padding: 16px 18px 0; }
.tight-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tight-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plain-details {
    margin: 8px 0 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    background: #fbfdff;
}
.plain-details summary {
    cursor: pointer;
    padding: 12px 14px;
    font-weight: 900;
    background: #f3f7fb;
}
.plain-details > *:not(summary) { margin-left: 14px; margin-right: 14px; }
.plain-details .tight-grid { margin: 14px; }
.checkline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 14px;
}
.checkline input { width: auto; margin: 0; }
.sticky-actions.clean { margin-left: -18px; margin-right: -18px; }
.houses-filter { grid-template-columns: minmax(260px, 1fr) 160px auto auto; }
.houses-table-wrap { max-height: calc(100% - 128px); }
.houses-table-wrap table { min-width: 780px; }
@media (max-width: 1180px) {
    .module-workbench { grid-template-columns: 1fr; height: auto; overflow: visible; }
    .module-workbench .work-panel { max-height: none; }
}
@media (max-width: 760px) {
    .tight-grid.two, .tight-grid.three, .houses-filter { grid-template-columns: 1fr; }
}

/* v16: Preise / Saisons im Programm-Layout */
.prices-workbench {
    grid-template-columns: minmax(420px, .72fr) minmax(720px, 1.28fr);
}
.prices-filter {
    grid-template-columns: minmax(190px, 1fr) 130px 130px auto;
    margin-bottom: 0;
}
.prices-table-wrap {
    max-height: calc(100% - 102px);
}
.prices-table-wrap table {
    min-width: 980px;
}
.stat-preview {
    margin: 14px 18px 18px;
    padding: 14px;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    border-radius: 14px;
    display: grid;
    gap: 4px;
}
.stat-preview strong { color: #1e3a8a; }
.stat-preview small { color: #475569; margin-top: 4px; }
.badge.ok {
    background: #dcfce7;
    color: #166534;
}
.badge.muted-badge {
    background: #e2e8f0;
    color: #475569;
}
.price-active { margin-top: 28px; }
@media (max-width: 1180px) {
    .prices-workbench { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .prices-filter { grid-template-columns: 1fr; }
}


/* v19: Fix Preisperioden-Seite nach v18 - Layout, UTF-8 durch Header, Button-Aliasse */
.btn {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    background: var(--brand);
    color:white;
    border:0;
    border-radius:11px;
    padding:10px 14px;
    cursor:pointer;
    font-weight:800;
    box-shadow: 0 8px 18px rgba(15, 118, 110, .18);
    text-decoration:none;
}
.btn:hover { background: var(--brand-dark); color:white; }
.btn.primary { background: var(--brand); }
.btn.danger { background: var(--danger); box-shadow:none; }
.btn.danger:hover { background:#b91c1c; }
.btn.small { padding:6px 9px; font-size:12px; border-radius:8px; }
.panel {
    background: var(--panel);
    border: 1px solid rgba(15,23,42,.07);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 16px 18px;
    margin-bottom: 14px;
}
.panel-compact { padding: 14px 18px; }
.panel-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 14px;
}
.panel h1, .panel h2 { margin-top:0; }
.panel p { color: var(--muted); }
.split-grid { display:grid; gap:16px; min-height:0; }
.split-grid-40-60 { grid-template-columns: minmax(420px, .75fr) minmax(700px, 1.25fr); }
.prices-workspace { height: calc(100vh - 142px); min-height:560px; overflow:hidden; display:flex; flex-direction:column; }
.prices-workspace > .split-grid { flex:1; min-height:0; overflow:hidden; }
.scroll-panel { min-height:0; overflow:auto; }
.form-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px 12px; align-items:end; }
.form-grid label { margin:0; }
.form-grid input, .form-grid select, .form-grid textarea { margin-bottom:0; }
.form-grid .full-span, .full-span { grid-column:1 / -1; }
.compact-form { margin-top: 8px; }
.panel-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.panel-toolbar h2 { margin:0; }
.toolbar-form { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.toolbar-form input, .toolbar-form select { width:auto; margin:0; min-width:130px; }
.small-input { max-width:110px; }
.compact-table th, .compact-table td { padding:9px 10px; font-size:13px; }
.table-wrap.slim { max-height: 220px; }
.muted-row td { color: var(--muted); background:#f8fafc; }
.actions { white-space:nowrap; }
.hint { font-size:13px; color:var(--muted); }
.alert { margin: 10px 0 0; }
@media (max-width: 1180px) {
    .prices-workspace { height:auto; overflow:visible; }
    .prices-workspace > .split-grid { overflow:visible; }
    .split-grid-40-60 { grid-template-columns: 1fr; }
    .scroll-panel { overflow:visible; }
}
@media (max-width: 760px) {
    .form-grid { grid-template-columns: 1fr; }
    .panel-toolbar { flex-direction:column; align-items:flex-start; }
    .toolbar-form input, .toolbar-form select { width:100%; }
}

/* v21: Preisperioden komplett überarbeitet - kompakte Programmseite */
.price-page {
    height: calc(100vh - 142px);
    min-height: 560px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    overflow: hidden;
}
.price-context-bar {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    padding: 12px 14px;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 130px auto minmax(260px, 1fr);
    gap: 10px;
    align-items: end;
}
.price-context-bar input,
.price-context-bar select { margin-bottom: 0; }
.price-context-info {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    padding-bottom: 8px;
}
.price-workbench {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(720px, 1.25fr) minmax(420px, .75fr);
    gap: 14px;
    overflow: hidden;
}
.price-panel {
    min-height: 0;
    overflow: auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}
.price-panel .panel-head {
    position: sticky;
    top: 0;
    z-index: 6;
    padding: 13px 16px;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
}
.price-panel-body { padding: 14px 16px 18px; }
.price-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}
.price-form-grid label { margin: 0; }
.price-form-grid input,
.price-form-grid select,
.price-form-grid textarea { margin-bottom: 0; }
.price-form-grid .full-span { grid-column: 1 / -1; }
.price-toolbar {
    display:flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items:center;
}
.price-summary {
    display:grid;
    grid-template-columns: repeat(4, minmax(120px,1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.price-metric {
    border: 1px solid #e6edf6;
    border-radius: 14px;
    background: #fbfdff;
    padding: 10px 12px;
}
.price-metric small { display:block; color: var(--muted); font-weight: 800; }
.price-metric strong { display:block; font-size: 18px; margin-top: 3px; }
.price-table-wrap { max-height: calc(100vh - 360px); }
.price-table-wrap table { min-width: 1040px; }
.price-row-inactive td { color: var(--muted); background: #f8fafc; }
.price-help {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 13px;
}
.price-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.price-actions.sticky {
    position: sticky;
    bottom: 0;
    background: rgba(255,255,255,.96);
    border-top: 1px solid var(--line);
    margin: 14px -16px -18px;
    padding: 12px 16px;
    backdrop-filter: blur(10px);
}
@media (max-width: 1250px) {
    .price-page { height: auto; overflow: visible; }
    .price-workbench { grid-template-columns: 1fr; overflow: visible; }
    .price-panel { overflow: visible; }
    .price-context-bar { grid-template-columns: 1fr 130px auto; }
    .price-context-info { grid-column: 1 / -1; }
    .price-table-wrap { max-height: none; }
}
@media (max-width: 760px) {
    .price-context-bar, .price-form-grid, .price-summary { grid-template-columns: 1fr; }
}

/* v22 Preisperioden: echte Programmseite, kein links/rechts Gefummel */
.price-page-v22 {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    min-width: 0;
}
.price-page-v22 .page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 0 0 auto;
}
.price-page-v22 .page-title-row h1 {
    margin: 0 0 4px 0;
}
.price-page-v22 .page-title-row p,
.price-page-v22 .card-head p {
    margin: 0;
    color: #64748b;
}
.price-page-v22 .app-card {
    background: #fff;
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
    padding: 14px 16px;
    min-width: 0;
}
.price-page-v22 .compact-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
.price-page-v22 .compact-head h2 {
    margin: 0 0 3px 0;
    font-size: 20px;
}
.price-top-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    align-items: start;
}
.inline-form,
.compact-form,
.context-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    min-width: 0;
}
.inline-form label,
.compact-form label,
.context-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 700;
    color: #0f172a;
    min-width: 140px;
}
.inline-form input,
.inline-form select,
.compact-form input,
.context-form input,
.context-form select,
.price-main-form input,
.price-main-form select,
.price-main-form textarea {
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    padding: 9px 10px;
    min-height: 38px;
    background: #fff;
    font: inherit;
    max-width: 100%;
}
.price-editor-card .context-form {
    padding: 10px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    margin-bottom: 12px;
}
.price-main-form {
    min-width: 0;
}
.price-form-grid-v22 {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 10px;
    align-items: end;
}
.price-form-grid-v22 label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 700;
    color: #0f172a;
    min-width: 0;
}
.price-form-grid-v22 .full-span {
    grid-column: 1 / -1;
}
.readonly-field {
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    padding: 8px 10px;
    background: #f8fafc;
    min-height: 38px;
}
.readonly-field span {
    display: block;
    color: #64748b;
    font-size: 12px;
}
.readonly-field strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
}
.form-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}
.price-summary-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.price-summary-inline span {
    background: #f1f5f9;
    border: 1px solid #dbe4ef;
    border-radius: 999px;
    padding: 7px 10px;
    color: #334155;
    white-space: nowrap;
}
.coverage-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
}
.coverage-box span {
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(255,255,255,.7);
}
.coverage-ok {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}
.coverage-warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}
.price-period-scroll {
    max-height: 42vh;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.price-period-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
}
.price-period-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #eef2f7;
}
.price-period-table th,
.price-period-table td {
    padding: 8px 9px;
    vertical-align: middle;
}
.price-period-table tr.row-selected td {
    background: #eff6ff;
}
.price-row-inactive td {
    opacity: .55;
    text-decoration: line-through;
}
.nowrap { white-space: nowrap; }
.notice-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.notice-stack .success,
.notice-stack .error {
    margin: 0;
    border-radius: 10px;
    padding: 10px 12px;
}
.notice-stack .success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}
.notice-stack .error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
@media (max-width: 1100px) {
    .price-top-grid { grid-template-columns: 1fr; }
    .price-form-grid-v22 { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}
@media (max-width: 760px) {
    .price-form-grid-v22 { grid-template-columns: 1fr; }
    .inline-form label, .compact-form label, .context-form label { min-width: 100%; }
}

/* v29 Netcodes / Codelocks */
.netcodes-page { display:flex; flex-direction:column; gap:14px; min-height:0; }
.netcodes-intro { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.netcodes-intro h2 { margin:0 0 6px; }
.netcodes-intro p { margin:0; color:var(--muted); }
.netcode-status { display:flex; flex-direction:column; gap:6px; align-items:flex-end; font-size:13px; color:var(--muted); }
.netcodes-grid-top { display:grid; grid-template-columns:minmax(360px, .85fr) minmax(420px, 1.15fr); gap:14px; }
.netcodes-lock-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.netcodes-table-scroll { max-height:260px; overflow:auto; border:1px solid var(--border); border-radius:16px; }
.netcodes-table-scroll.small { max-height:210px; }
.netcodes-table-scroll table { min-width:1080px; margin:0; }
.netcode-code { font-size:18px; letter-spacing:1px; color:#0f766e; }
.actions-cell { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.actions-cell form { margin:0; }
.button.tiny { padding:6px 9px; font-size:12px; border-radius:10px; }
.checkline { display:flex; gap:8px; align-items:center; font-weight:800; }
.checkline input { width:auto; margin:0; }
.button-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
code { background:#f1f5f9; border:1px solid #e2e8f0; border-radius:8px; padding:2px 5px; font-size:12px; }
@media (max-width: 1100px) {
  .netcodes-grid-top { grid-template-columns:1fr; }
  .netcodes-lock-form { grid-template-columns:1fr 1fr; }
  .netcodes-intro { flex-direction:column; }
  .netcode-status { align-items:flex-start; }
}
@media (max-width: 720px) {
  .netcodes-lock-form, .form-grid { grid-template-columns:1fr; }
}

/* Update v30 - Buchungen Grundmodul */
.bookings-page-v30 {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
}
.bookings-page-v30 .booking-form-card,
.bookings-page-v30 .booking-list-card {
    overflow: hidden;
}
.booking-grid-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.bookings-page-v30 .form-block {
    border: 1px solid rgba(22, 54, 92, .10);
    background: rgba(255,255,255,.72);
    border-radius: 16px;
    padding: 12px;
}
.bookings-page-v30 .form-block h3,
.bookings-page-v30 .booking-preview h3 {
    margin: 0 0 10px;
    font-size: 15px;
}
.form-grid-6,
.form-grid-5,
.form-grid-4 {
    display: grid;
    gap: 10px;
}
.form-grid-6 { grid-template-columns: 1.5fr repeat(5, minmax(110px, 1fr)); }
.form-grid-5 { grid-template-columns: repeat(5, minmax(130px, 1fr)); }
.form-grid-4 { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.bookings-page-v30 label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    color: #475569;
    font-weight: 700;
}
.bookings-page-v30 input,
.bookings-page-v30 select,
.bookings-page-v30 textarea {
    width: 100%;
    min-height: 38px;
}
.booking-preview {
    border: 1px solid rgba(25, 118, 210, .16);
    background: linear-gradient(180deg, rgba(232,244,255,.95), rgba(255,255,255,.88));
    border-radius: 16px;
    padding: 12px;
}
.locked-price {
    background: linear-gradient(180deg, rgba(240,253,244,.95), rgba(255,255,255,.88));
    border-color: rgba(22, 163, 74, .18);
}
.booking-kpi-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}
.booking-kpi-row span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(15,23,42,.08);
    box-shadow: 0 8px 20px rgba(15,23,42,.04);
}
.booking-kpi-row strong {
    font-size: 16px;
    color: #0f172a;
}
.booking-kpi-row small {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}
.mini-table-wrap,
.booking-table-scroll {
    overflow: auto;
    max-width: 100%;
}
.booking-table-scroll {
    max-height: 360px;
}
.compact-table th,
.compact-table td {
    padding: 8px 9px;
    white-space: nowrap;
}
.sticky-actions {
    position: sticky;
    bottom: -1px;
    z-index: 3;
    background: rgba(248, 250, 252, .96);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(15,23,42,.08);
    padding-top: 10px;
}
.button.warning {
    background: #f59e0b;
    color: #111827;
    border-color: #d97706;
}
.button.tiny {
    padding: 5px 8px;
    font-size: 12px;
    min-height: auto;
}
.badge.strong {
    font-weight: 800;
    background: #dbeafe;
    color: #1e3a8a;
}
.is-muted-row {
    opacity: .62;
}
.list-filter-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.list-filter-form input { min-width: 220px; }
@media (max-width: 1200px) {
    .form-grid-6,
    .form-grid-5,
    .form-grid-4,
    .booking-kpi-row {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
}
@media (max-width: 760px) {
    .form-grid-6,
    .form-grid-5,
    .form-grid-4,
    .booking-kpi-row {
        grid-template-columns: 1fr;
    }
}

/* v31 Buchungsmaske: Excel-nahe Arbeitsbereiche ohne Seitensprung */
.bookings-page-v31 .booking-grid-form-v31 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.bookings-page-v31 .form-block {
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255,255,255,0.86);
    border-radius: 14px;
    padding: 14px;
}
.bookings-page-v31 .form-block h3 {
    margin: 0 0 10px 0;
    font-size: 15px;
    letter-spacing: .01em;
}
.bookings-page-v31 .form-grid-6 {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 10px;
    align-items: end;
}
.bookings-page-v31 .form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 10px;
    align-items: end;
}
.bookings-page-v31 .wide-2 { grid-column: span 2; }
.bookings-page-v31 .in-grid-check {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 10px;
    background: #fff;
}
.bookings-page-v31 .booking-table-scroll {
    max-height: 360px;
    overflow: auto;
}
.bookings-page-v31 .booking-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
}
.bookings-page-v31 .booking-kpi-row span {
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}
.bookings-page-v31 .booking-kpi-row strong { display: block; font-size: 16px; }
.bookings-page-v31 .booking-kpi-row small { color: #64748b; }
@media (max-width: 1400px) {
    .bookings-page-v31 .form-grid-6 { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
    .bookings-page-v31 .form-grid-4 { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
}
@media (max-width: 800px) {
    .bookings-page-v31 .form-grid-6,
    .bookings-page-v31 .form-grid-4 { grid-template-columns: 1fr; }
    .bookings-page-v31 .wide-2 { grid-column: span 1; }
}


/* v32 Buchungen: kompakte Excel-nahe Arbeitsmaske ohne horizontales Scrollen */
.bookings-page-v32{padding:12px;}
.compact-booking-title{margin-bottom:10px;}
.bookings-page-v32 .page-title-row h1{font-size:24px;margin:0 0 2px;}
.bookings-page-v32 .page-title-row p{margin:0;color:#64748b;}
.booking-workbench-card{padding:12px;overflow:visible;}
.booking-excel-form{display:block;width:100%;}
.booking-excel-layout{display:grid;grid-template-columns:minmax(280px,1fr) minmax(320px,1.15fr) minmax(280px,1fr);gap:12px;align-items:start;}
.booking-panel{background:#f8fafc;border:1px solid #d9e2ef;border-radius:12px;padding:12px;box-shadow:inset 0 1px 0 rgba(255,255,255,.7);}
.booking-panel h2{font-size:17px;margin:0 0 10px;color:#0f172a;}
.excel-field-grid{display:grid;gap:8px;}
.excel-field-grid.two-col{grid-template-columns:1fr 1fr;}
.excel-field-grid.guest-info-grid{grid-template-columns:1fr;}
.excel-field-grid label{font-weight:700;font-size:13px;color:#0f172a;display:flex;flex-direction:column;gap:3px;}
.excel-field-grid input,.excel-field-grid select,.booking-panel textarea{width:100%;box-sizing:border-box;border:1px solid #c9d5e7;border-radius:8px;padding:8px 9px;background:#fff;color:#0f172a;font-size:14px;min-height:36px;}
.excel-field-grid input[readonly]{background:#eef4fb;color:#1f2937;font-weight:700;}
.excel-field-grid input[type="date"]{min-width:0;}
.boxed-check{justify-content:center;background:#fff;border:1px solid #c9d5e7;border-radius:8px;padding:8px 10px;min-height:36px;}
.boxed-check input{width:auto;min-height:auto;margin-right:7px;}
.booking-bottom-row{display:grid;grid-template-columns:1fr minmax(320px,.9fr);gap:12px;margin-top:12px;align-items:stretch;}
.notes-panel textarea{min-height:82px;resize:vertical;}
.action-panel .button-row-wrap{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px;}
.compact-price-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;font-size:13px;color:#334155;}
.compact-price-summary span{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:7px 8px;}
.compact-booking-list{margin-top:12px;padding:12px;}
.compact-booking-list .card-head{margin-bottom:8px;}
.booking-table-scroll{max-height:330px;overflow:auto;border:1px solid #e2e8f0;border-radius:10px;}
.booking-table-scroll table{min-width:980px;}
@media (max-width: 1350px){.booking-excel-layout{grid-template-columns:1fr 1fr}.panel-guest{grid-column:1 / -1}.excel-field-grid.guest-info-grid{grid-template-columns:repeat(5,1fr)}}
@media (max-width: 950px){.booking-excel-layout,.booking-bottom-row{grid-template-columns:1fr}.excel-field-grid.two-col,.excel-field-grid.guest-info-grid{grid-template-columns:1fr}}

/* v36: berechnetes, aber manuell überschreibbares Feld */
.excel-field-grid input.editable-calculated-field {
    background:#eef4fb;
    color:#0f172a;
    font-weight:700;
    border-color:#b8c7dc;
}
.excel-field-grid input.editable-calculated-field:focus {
    background:#fff;
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

/* v37: Bemerkungen und Speichern in den freien Arbeitsbereich unter Grundangaben/Reisedaten */
.bookings-page-v32 .notes-panel,
.bookings-page-v32 .action-panel {
    grid-column: 1 / span 2;
}
.bookings-page-v32 .notes-panel {
    margin-top: 0;
}
.bookings-page-v32 .booking-notes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.bookings-page-v32 .booking-notes-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}
.bookings-page-v32 .notes-panel textarea {
    min-height: 112px;
    resize: vertical;
}
.bookings-page-v32 .action-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
}
.bookings-page-v32 .action-panel h2 {
    margin: 0;
}
.bookings-page-v32 .action-panel .button-row-wrap {
    margin-bottom: 0;
    justify-content: flex-end;
}
.bookings-page-v32 .action-panel .compact-price-summary {
    flex: 1 1 auto;
    max-width: 560px;
}
@media (max-width: 1350px) {
    .bookings-page-v32 .notes-panel,
    .bookings-page-v32 .action-panel {
        grid-column: 1 / -1;
    }
}
@media (max-width: 950px) {
    .bookings-page-v32 .booking-notes-grid {
        grid-template-columns: 1fr;
    }
    .bookings-page-v32 .action-panel {
        display: block;
    }
    .bookings-page-v32 .action-panel .button-row-wrap {
        justify-content: flex-start;
        margin-top: 8px;
    }
}

/* v38: Bemerkungen wirklich in den freien linken Arbeitsraum direkt unter Grundangaben/Reisedaten */
.booking-excel-layout-v38 {
    display: grid;
    grid-template-columns: minmax(620px, 2.2fr) minmax(320px, .95fr);
    gap: 12px;
    align-items: start;
}
.booking-excel-layout-v38 .booking-main-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}
.booking-excel-layout-v38 .booking-top-two {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.1fr);
    gap: 12px;
    align-items: start;
}
.bookings-page-v32 .booking-excel-layout-v38 .notes-panel,
.bookings-page-v32 .booking-excel-layout-v38 .action-panel {
    grid-column: auto;
    margin-top: 0;
}
.booking-excel-layout-v38 .panel-guest {
    align-self: start;
}
@media (max-width: 1350px) {
    .booking-excel-layout-v38 {
        grid-template-columns: 1fr;
    }
    .booking-excel-layout-v38 .booking-top-two {
        grid-template-columns: 1fr 1fr;
    }
    .booking-excel-layout-v38 .excel-field-grid.guest-info-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }
}
@media (max-width: 950px) {
    .booking-excel-layout-v38 .booking-top-two,
    .booking-excel-layout-v38 .booking-notes-grid,
    .booking-excel-layout-v38 .excel-field-grid.guest-info-grid {
        grid-template-columns: 1fr;
    }
}

/* v39: Buchungsmaske ohne Liste; Reinigungskosten im linken Arbeitsraum */
.bookings-page-v32 .cleaning-panel {
    margin-top: 0;
}
.bookings-page-v32 .cleaning-cost-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
}
.bookings-page-v32 .cleaning-panel .editable-calculated-field {
    background: #eaf2fb;
    color: #102033;
    font-weight: 800;
}
.bookings-list-page .booking-list-card {
    height: calc(100vh - 190px);
    display: flex;
    flex-direction: column;
    min-height: 420px;
}
.bookings-list-page .standalone-booking-table {
    flex: 1;
    overflow: auto;
}
@media (max-width: 950px) {
    .bookings-page-v32 .cleaning-cost-grid {
        grid-template-columns: 1fr;
    }
}

/* v44 Buchungsliste: Programm-Ansicht, Jahresfilter, Vollsuche */
.improved-bookings-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: calc(100vh - 110px);
}

.booking-list-toolbar-card {
    padding: 12px 14px;
}

.booking-list-toolbar {
    display: grid;
    grid-template-columns: 120px 140px minmax(320px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.booking-list-toolbar .filter-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #49606f;
    margin-bottom: 4px;
}

.booking-list-toolbar input,
.booking-list-toolbar select {
    width: 100%;
    height: 38px;
}

.booking-list-toolbar .filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

.booking-list-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 1fr)) minmax(180px, 1.4fr);
    gap: 10px;
}

.kpi-card {
    background: linear-gradient(180deg, #ffffff, #f3f7fa);
    border: 1px solid #d7e1e8;
    border-radius: 14px;
    padding: 10px 14px;
    box-shadow: 0 8px 20px rgba(31, 56, 76, 0.06);
}

.kpi-card span {
    display: block;
    font-size: 12px;
    color: #60727f;
    margin-bottom: 3px;
}

.kpi-card strong {
    display: block;
    font-size: 21px;
    color: #203240;
}

.full-height-list-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.full-height-list-card .card-head {
    flex: 0 0 auto;
}

.improved-table-scroll {
    flex: 1;
    min-height: 360px;
    max-height: calc(100vh - 360px);
    overflow: auto;
    border-top: 1px solid #e1e8ed;
}

.booking-list-table {
    min-width: 1320px;
}

.booking-list-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #edf4f7;
    box-shadow: 0 1px 0 #d8e2e8;
}

.booking-list-table tbody tr:hover {
    background: #f3f9fc;
}

.booking-list-table .money-cell {
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
}

.house-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef5f0;
    border: 1px solid #d4e6d9;
    white-space: nowrap;
    font-weight: 600;
}

.badge.private {
    background: #e9f0ff;
    color: #234d8d;
    border-color: #c8d8f8;
}

.badge.danger-badge {
    background: #fff0f0;
    color: #a63838;
    border-color: #f0caca;
}

tr.status-private td:first-child strong::before {
    content: "P ";
    color: #315f9d;
}

tr.status-storno td:first-child strong::before {
    content: "ST ";
    color: #9d3d31;
}

.row-actions {
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .booking-list-toolbar {
        grid-template-columns: 1fr 1fr;
    }
    .booking-list-toolbar .search-filter,
    .booking-list-toolbar .filter-actions {
        grid-column: 1 / -1;
    }
    .booking-list-kpis {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}

/* v45 Belegungsplan */
.occupancy-page {
    min-height: calc(100vh - 130px);
}
.occupancy-toolbar-card {
    margin-bottom: 12px;
}
.occupancy-toolbar {
    grid-template-columns: minmax(120px, 160px) minmax(180px, 240px) auto;
}
.occupancy-kpis {
    margin-bottom: 12px;
}
.occupancy-legend {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #334155;
}
.legend-note {
    margin-left: auto;
    font-size: 12px;
    color: #64748b;
}
.occ-sample {
    width: 22px;
    height: 14px;
    display: inline-block;
    border-radius: 4px;
    border: 1px solid rgba(15,23,42,.15);
}
.occ-sample.occ-booked { background: #2563eb; }
.occ-sample.occ-blocked-by-house { background: #7c3aed; }
.occ-sample.occ-blocked-by-part { background: #f59e0b; }
.occ-sample.occ-private { background: #16a34a; }
.occupancy-year-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}
.occupancy-month-card {
    padding: 0;
    overflow: hidden;
    min-width: 0;
}
.occupancy-month-head {
    padding: 10px 12px;
    background: linear-gradient(180deg, #f8fafc, #eef2ff);
    border-bottom: 1px solid #dbe3ef;
}
.occupancy-month-head h2 {
    font-size: 17px;
    margin: 0;
}
.occupancy-month-head small {
    color: #64748b;
}
.occupancy-month-scroll {
    overflow: auto;
    max-height: 470px;
}
.occupancy-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    min-width: 930px;
    table-layout: fixed;
    font-size: 11px;
}
.occupancy-table th,
.occupancy-table td {
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}
.occupancy-table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
}
.occ-house-col {
    position: sticky;
    left: 0;
    z-index: 5;
    width: 155px;
    min-width: 155px;
    max-width: 155px;
    background: #ffffff;
    text-align: left;
    padding: 6px 8px;
    box-shadow: 4px 0 8px rgba(15, 23, 42, .05);
}
.occupancy-table thead .occ-house-col {
    background: #f1f5f9;
    z-index: 6;
}
.occ-house-col strong {
    display: block;
    font-size: 12px;
    color: #0f172a;
    line-height: 1.15;
}
.occ-house-col small {
    display: block;
    color: #64748b;
    font-weight: 500;
    margin-top: 2px;
}
.occ-day-head {
    width: 25px;
    min-width: 25px;
    max-width: 25px;
    height: 38px;
    text-align: center;
    vertical-align: middle;
    padding: 2px 0;
}
.occ-day-head span {
    display: block;
    font-size: 11px;
    line-height: 1.1;
}
.occ-day-head small {
    display: block;
    font-size: 8px;
    color: #94a3b8;
    line-height: 1.1;
}
.occ-day-head.weekend,
.occ-day-cell.weekend {
    background: #f8fafc;
}
.occ-day-cell {
    width: 25px;
    height: 28px;
    min-width: 25px;
    max-width: 25px;
    padding: 0;
    text-align: center;
    vertical-align: middle;
    background: #ffffff;
}
.occ-day-cell.free:hover {
    background: #ecfdf5;
}
.occ-day-cell.occupied {
    position: relative;
    overflow: hidden;
}
.occ-day-cell.occupied a {
    display: block;
    width: 100%;
    height: 28px;
    text-decoration: none;
    color: #ffffff;
    line-height: 28px;
}
.occ-day-cell.occupied span {
    display: none;
}
.occ-day-cell.booked-direct { background: #2563eb; }
.occ-day-cell.blocked-by-house { background: #7c3aed; }
.occ-day-cell.blocked-by-part { background: #f59e0b; }
.occ-day-cell.private-booking { background: #16a34a; }
.occ-day-cell.occupied:hover {
    filter: brightness(.92);
    outline: 2px solid rgba(15,23,42,.20);
    outline-offset: -2px;
}
.occ-day-cell.occupied::after {
    content: '';
    position: absolute;
    left: 4px;
    right: 4px;
    top: 7px;
    height: 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.22);
    pointer-events: none;
}
.occ-day-cell.blocked-by-part::after {
    background: rgba(255,255,255,.32);
}
@media (max-width: 1500px) {
    .occupancy-year-grid { grid-template-columns: 1fr; }
    .occupancy-month-scroll { max-height: 520px; }
}
@media (max-width: 900px) {
    .occupancy-toolbar { grid-template-columns: 1fr; }
    .legend-note { margin-left: 0; width: 100%; }
}

/* v46 Belegungsplan wie Excel-PDF */
.excel-occupancy-page .page-title-row p {
    max-width: 980px;
}
.excel-plan-sheet {
    margin-top: 16px;
    padding: 14px 16px 18px;
    overflow: auto;
    background: #ffffff;
}
.excel-plan-head {
    display: grid;
    grid-template-columns: 110px 1fr 260px;
    align-items: end;
    gap: 14px;
    margin-bottom: 8px;
    color: #111827;
}
.excel-plan-year {
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}
.excel-plan-title {
    font-size: 24px;
    font-weight: 900;
}
.excel-plan-send {
    font-size: 13px;
    line-height: 1.3;
    text-align: right;
    font-weight: 700;
}
.excel-calendar-wrap {
    overflow-x: auto;
    border-top: 1px solid #0f172a;
    border-bottom: 1px solid #0f172a;
    padding-bottom: 2px;
}
.excel-months-row {
    display: grid;
    grid-template-columns: repeat(12, minmax(92px, 1fr));
    min-width: 1280px;
    gap: 0;
}
.excel-month-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 10px;
    line-height: 1.05;
    border-right: 2px solid #000;
}
.excel-month-table:first-child {
    border-left: 2px solid #000;
}
.excel-month-table th {
    background: #d9ffd7;
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    height: 16px;
    padding: 1px 2px;
}
.excel-month-table td {
    height: 15px;
    padding: 0;
    vertical-align: middle;
}
.excel-month-table .weekend-row .excel-date-label {
    background: #d9d9d9;
}
.excel-date-label {
    width: 54px;
    white-space: nowrap;
    color: #111827;
    text-align: left;
    padding-left: 2px !important;
}
.excel-date-label span {
    display: inline-block;
    min-width: 14px;
}
.excel-day-bars {
    width: 38px;
    height: 15px;
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #fff;
}
.excel-slot {
    display: block;
    width: 100%;
    height: 15px;
    background: transparent;
    position: relative;
    text-decoration: none;
}
.excel-slot.is-booked.slot-yellow,
.legend-block.slot-yellow,
.excel-unit-head.slot-yellow { background: #ffff00; }
.excel-slot.is-booked.slot-blue,
.legend-block.slot-blue,
.excel-unit-head.slot-blue { background: #004cff; color: #fff; }
.excel-slot.is-booked.slot-red,
.legend-block.slot-red,
.excel-unit-head.slot-red { background: #ff0000; color: #fff; }
.excel-slot.is-private::after {
    content: '';
    position: absolute;
    left: 1px;
    right: 1px;
    bottom: 1px;
    height: 2px;
    background: #111827;
    opacity: .55;
}
.excel-slot.is-turnover {
    outline: 2px solid #ff00ff;
    outline-offset: -2px;
    background-image: linear-gradient(to bottom, rgba(255,0,255,.95) 0 50%, transparent 50% 100%);
}
.excel-slot.is-turnover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 45%, #ff00ff 45%, #ff00ff 55%, transparent 55%);
    pointer-events: none;
}
.excel-slot:hover {
    filter: brightness(.90);
}
.empty-day .excel-date-label,
.empty-day .excel-day-bars {
    background: #f8fafc;
}
.excel-booking-area {
    display: grid;
    grid-template-columns: minmax(520px, 1fr) 260px;
    gap: 22px;
    margin-top: 10px;
    align-items: start;
}
.excel-booking-columns {
    display: grid;
    grid-template-columns: repeat(var(--col-count), minmax(170px, 1fr));
    gap: 0;
    max-width: 900px;
}
.excel-booking-column {
    min-width: 0;
}
.excel-unit-head {
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    border: 1px solid #111827;
    padding: 2px 4px;
    color: #111827;
}
.excel-booking-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 11px;
}
.excel-booking-table th {
    background: #e6ffe5;
    border-bottom: 2px solid #111827;
    color: #111827;
    padding: 2px 3px;
    text-align: center;
    font-weight: 900;
}
.excel-booking-table td {
    background: #d9ffd7;
    padding: 2px 3px;
    border-bottom: 1px solid rgba(15,23,42,.08);
    text-align: center;
    height: 18px;
}
.excel-booking-table tr:nth-child(even) td {
    background: #c9ffc8;
}
.excel-booking-table td a {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
}
.excel-booking-table td a:hover {
    text-decoration: underline;
}
.excel-booking-table .turnover-date {
    background: #ff00ff !important;
    color: #111827;
    font-weight: 900;
}
.private-note {
    color: #d40000;
    font-weight: 900;
    margin-left: 4px;
}
.empty-list {
    color: #64748b;
    font-style: italic;
}
.excel-plan-legend {
    font-size: 12px;
    font-weight: 800;
    color: #111827;
    display: grid;
    gap: 8px;
    align-content: start;
    padding-top: 22px;
}
.legend-block {
    display: inline-block;
    width: 52px;
    height: 15px;
    margin-right: 8px;
    border: 1px solid rgba(15,23,42,.18);
    vertical-align: middle;
}
.turnover-legend {
    margin-top: 18px;
    line-height: 1.45;
    text-decoration: underline;
}
.turnover-legend i {
    display: inline-block;
    width: 48px;
    height: 28px;
    background: #ff00ff;
    margin-right: 8px;
    vertical-align: middle;
}
@media (max-width: 1400px) {
    .excel-booking-area { grid-template-columns: 1fr; }
    .excel-plan-legend { grid-template-columns: repeat(3, minmax(150px, 1fr)); padding-top: 0; }
    .turnover-legend { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
    .excel-plan-head { grid-template-columns: 1fr; text-align: left; }
    .excel-plan-year, .excel-plan-send { text-align: left; }
    .excel-booking-columns { grid-template-columns: 1fr; }
}

/* v47 Belegungsplan: Auswahl sichtbar, Anzeige-Modus und Belegungsplanliste */
.occupancy-toolbar {
    grid-template-columns: minmax(120px, 150px) minmax(220px, 260px) minmax(240px, 320px) auto;
    align-items: end;
}
.occupancy-toolbar .filter-field select,
.occupancy-toolbar .filter-field input {
    min-width: 0;
    width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}
.occupancy-toolbar .mode-filter select,
.occupancy-toolbar .group-filter select {
    min-width: 220px;
}
.occupancy-toolbar .filter-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: end;
}
.occupancy-list-sheet {
    margin-top: 16px;
    padding: 14px 16px 18px;
    overflow: hidden;
    background: #fff;
}
.occupancy-list-head {
    margin-bottom: 10px;
}
.occupancy-list-scroll {
    max-height: calc(100vh - 260px);
    overflow: auto;
    border: 1px solid #111827;
    background: #fff;
}
.occupancy-list-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 12px;
    color: #111827;
}
.occupancy-list-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #d9d9d9;
    border-bottom: 2px solid #111827;
    padding: 5px 6px;
    text-align: left;
    font-weight: 900;
}
.occupancy-list-table td {
    padding: 4px 6px;
    border-bottom: 1px solid rgba(15, 23, 42, .18);
    background: #e6ffe5;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.occupancy-list-table tr:nth-child(even) td {
    background: #ccffcc;
}
.occupancy-list-table tr.is-private-row td {
    background: #fff7cc;
}
.occupancy-list-table td a {
    color: #0f172a;
    font-weight: 900;
    text-decoration: none;
}
.occupancy-list-table td a:hover {
    text-decoration: underline;
}
.occupancy-list-table th:nth-child(1), .occupancy-list-table td:nth-child(1) { width: 110px; }
.occupancy-list-table th:nth-child(2), .occupancy-list-table td:nth-child(2) { width: 135px; }
.occupancy-list-table th:nth-child(3), .occupancy-list-table td:nth-child(3),
.occupancy-list-table th:nth-child(4), .occupancy-list-table td:nth-child(4) { width: 96px; }
.occupancy-list-table th:nth-child(5), .occupancy-list-table td:nth-child(5),
.occupancy-list-table th:nth-child(6), .occupancy-list-table td:nth-child(6),
.occupancy-list-table th:nth-child(7), .occupancy-list-table td:nth-child(7) { width: 62px; text-align: center; }
.occupancy-list-table th:nth-child(8), .occupancy-list-table td:nth-child(8) { width: 220px; }
.occupancy-list-table th:nth-child(9), .occupancy-list-table td:nth-child(9) { width: 90px; }
.occupancy-list-table th:nth-child(10), .occupancy-list-table td:nth-child(10) { width: 90px; text-align: right; }
.occupancy-list-table th:nth-child(11), .occupancy-list-table td:nth-child(11) { width: 90px; }

@media (max-width: 1100px) {
    .occupancy-toolbar { grid-template-columns: 1fr 1fr; }
    .occupancy-toolbar .filter-actions { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    .occupancy-toolbar { grid-template-columns: 1fr; }
    .occupancy-toolbar .mode-filter select,
    .occupancy-toolbar .group-filter select { min-width: 0; }
}

/* v48 Belegungsplan: Verwalterliste, Statusfarben, PDF/Druck */
.occupancy-toolbar .filter-actions .button {
    white-space: nowrap;
}
.occupancy-status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 10px;
    font-size: 12px;
    font-weight: 900;
}
.occupancy-status-legend span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border: 1px solid #111827;
}
.occ-legend-red { background: #ff0000; color: #fff; }
.occ-legend-white { background: #fff; color: #111827; }
.occ-legend-yellow { background: #ffff00; color: #111827; }
.occ-legend-lastminute { background: linear-gradient(90deg, #ffff00 0 50%, #fff 50% 100%); color: #111827; }
.occ-legend-green { background: #d9ffd7; color: #111827; }
.occ-legend-private { background: #d8c7ad; color: #111827; }

.occupancy-list-table {
    min-width: 1360px;
}
.occupancy-list-table thead th {
    line-height: 1.1;
    white-space: nowrap;
}
.occupancy-list-table tr.occ-row-status-departed td {
    background: #ff0000 !important;
    color: #fff;
}
.occupancy-list-table tr.occ-row-status-departed td a {
    color: #fff;
}
.occupancy-list-table tr.occ-row-status-onsite td {
    background: #ffffff !important;
    color: #111827;
}
.occupancy-list-table tr.occ-row-status-new td {
    background: #ffff00 !important;
    color: #111827;
}
.occupancy-list-table tr.occ-row-status-lastminute td {
    background: linear-gradient(90deg, #ffff00 0 50%, #fff 50% 100%) !important;
    color: #111827;
}
.occupancy-list-table tr.occ-row-status-upcoming td {
    background: #d9ffd7 !important;
    color: #111827;
}
.occupancy-list-table tr.occ-row-status-private td {
    background: #d8c7ad !important;
    color: #111827;
}
.occupancy-list-table th:nth-child(10), .occupancy-list-table td:nth-child(10),
.occupancy-list-table th:nth-child(11), .occupancy-list-table td:nth-child(11),
.occupancy-list-table th:nth-child(12), .occupancy-list-table td:nth-child(12) {
    width: 110px;
    text-align: right;
}
.occupancy-list-table th:nth-child(13), .occupancy-list-table td:nth-child(13) {
    width: 150px;
}
.excel-slot.is-turnover {
    outline: 2px solid #ff00ff;
    outline-offset: -2px;
    background-image: linear-gradient(to bottom, rgba(255,0,255,.95) 0 50%, rgba(255,255,255,.75) 50% 100%);
}

@media print {
    @page { size: A4 landscape; margin: 7mm; }
    body {
        background: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .app-sidebar,
    .app-header,
    .program-sidebar,
    .topbar,
    .page-title-row,
    .occupancy-toolbar-card,
    .booking-list-kpis,
    .sidebar,
    nav,
    .no-print {
        display: none !important;
    }
    .app-shell,
    .app-main,
    .program-main,
    .content,
    main {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
        overflow: visible !important;
        background: #fff !important;
    }
    .program-page,
    .occupancy-page,
    .excel-occupancy-page {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
        background: #fff !important;
    }
    .app-card,
    .excel-plan-sheet,
    .occupancy-list-sheet {
        box-shadow: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #fff !important;
    }
    .excel-plan-sheet,
    .occupancy-list-sheet {
        page-break-after: always;
        break-after: page;
        overflow: visible !important;
    }
    .excel-calendar-wrap,
    .occupancy-list-scroll {
        overflow: visible !important;
        max-height: none !important;
        border: 0 !important;
    }
    .excel-months-row {
        min-width: 0 !important;
        grid-template-columns: repeat(12, 1fr) !important;
    }
    .excel-month-table {
        font-size: 8.3px !important;
        line-height: 1 !important;
    }
    .excel-month-table th {
        font-size: 9px !important;
        height: 12px !important;
    }
    .excel-month-table td {
        height: 11px !important;
    }
    .excel-date-label {
        width: 39px !important;
        font-size: 8px !important;
    }
    .excel-day-bars {
        width: 28px !important;
        height: 11px !important;
    }
    .excel-slot {
        height: 11px !important;
    }
    .excel-booking-area {
        grid-template-columns: minmax(520px, 1fr) 230px !important;
        gap: 14px !important;
        margin-top: 6px !important;
    }
    .excel-booking-table {
        font-size: 8.8px !important;
    }
    .excel-booking-table td {
        height: 13px !important;
        padding: 1px 2px !important;
    }
    .excel-unit-head,
    .excel-booking-table th,
    .excel-plan-legend {
        font-size: 9px !important;
    }
    .excel-plan-head {
        grid-template-columns: 90px 1fr 220px !important;
        margin-bottom: 4px !important;
    }
    .excel-plan-year,
    .excel-plan-title {
        font-size: 16px !important;
    }
    .excel-plan-send {
        font-size: 10px !important;
    }
    .occupancy-list-table {
        min-width: 0 !important;
        font-size: 7.8px !important;
        table-layout: fixed !important;
    }
    .occupancy-list-table thead th,
    .occupancy-list-table td {
        padding: 2px 3px !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }
    .occupancy-list-table thead th {
        position: static !important;
    }
    .occupancy-status-legend {
        font-size: 8px !important;
        gap: 4px !important;
    }
    .occupancy-status-legend span {
        min-height: 14px !important;
        padding: 1px 4px !important;
    }
}

/* v49 Belegungsplan: sichtbare Auswahl, saubere PDF-Seite, Legende für Halbtag/Privat */
.occupancy-toolbar-card,
.occupancy-toolbar {
    overflow: visible !important;
}
.occupancy-toolbar {
    grid-template-columns: minmax(130px, 160px) minmax(250px, 300px) minmax(300px, 1fr) !important;
    gap: 12px 14px !important;
}
.occupancy-toolbar .filter-field select {
    height: 46px !important;
    min-height: 46px !important;
    line-height: 1.25 !important;
    padding: 0 42px 0 18px !important;
    border-radius: 12px !important;
    display: block !important;
}
.occupancy-toolbar .filter-actions {
    grid-column: 1 / -1 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 10px !important;
    overflow: visible !important;
}
.excel-slot.is-private {
    border-left: 2px dashed #6b4f2a !important;
    border-right: 2px dashed #6b4f2a !important;
    background-image: repeating-linear-gradient(135deg, rgba(120, 82, 35, .45) 0 3px, transparent 3px 7px) !important;
}
.excel-slot.is-private.is-booked.slot-yellow { background-color: #ffff00; }
.excel-slot.is-private.is-booked.slot-blue { background-color: #004cff; }
.excel-slot.is-private.is-booked.slot-red { background-color: #ff0000; }
.excel-slot.is-private::after { display: none !important; }
.legend-half {
    display: inline-block;
    width: 52px;
    height: 15px;
    margin-right: 8px;
    border: 1px solid rgba(15,23,42,.35);
    vertical-align: middle;
}
.legend-arrival { background: linear-gradient(90deg, transparent 0 50%, #ff0000 50% 100%); }
.legend-departure { background: linear-gradient(90deg, #ff0000 0 50%, transparent 50% 100%); }
.legend-private-dashed {
    background: repeating-linear-gradient(135deg, #d8c7ad 0 4px, #fff 4px 8px);
    border: 2px dashed #6b4f2a !important;
}

@media print {
    .app-topbar,
    .app-userbox,
    .app-user-name,
    .app-sidebar,
    .page-title-row,
    .occupancy-toolbar-card,
    .booking-list-kpis,
    .occupancy-kpis,
    .filter-actions,
    button,
    .button {
        display: none !important;
    }
    .app-shell,
    .app-main,
    .app-content,
    body,
    html {
        overflow: visible !important;
        height: auto !important;
        min-height: 0 !important;
    }
    .excel-plan-sheet {
        width: 100% !important;
        min-height: 180mm !important;
        padding: 0 !important;
        margin: 0 !important;
        page-break-inside: avoid;
        break-inside: avoid-page;
    }
    .excel-calendar-wrap { width: 100% !important; }
    .excel-months-row { width: 100% !important; }
    .excel-month-table { font-size: 8.8px !important; }
    .excel-date-label { width: 42px !important; }
    .excel-day-bars { width: 31px !important; }
    .excel-plan-legend {
        grid-template-columns: 1fr !important;
        gap: 4px !important;
        font-size: 8.7px !important;
    }
    .legend-half,
    .legend-block { width: 36px !important; height: 11px !important; }
    .turnover-legend i { width: 36px !important; height: 18px !important; }
    .occupancy-list-sheet { page-break-before: always; break-before: page; }
}

/* v50 Jahresauswertung */
.report-page { display: flex; flex-direction: column; gap: 14px; }
.report-toolbar { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.report-toolbar .field { min-width: 150px; }
.report-grid-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.report-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 1180px; }
.report-table th, .report-table td { border: 1px solid #111827; padding: 6px 8px; text-align: right; white-space: nowrap; }
.report-table th:first-child, .report-table td:first-child { text-align: left; }
.report-table thead th { background: #cfcfcf; color: #000; font-weight: 800; }
.report-table .r-yellow td:not(.label-cell), .report-table .r-yellow th:not(.label-cell) { background: #fff200; }
.report-table .r-peach td { background: #f7c9ad; }
.report-table .r-grey td, .report-table .r-grey th { background: #c8c8c8; }
.report-table .label-cell { background: #bfbfbf !important; font-weight: 800; color: #000; }
.report-table .sum-line td { font-weight: 900; border-top: 3px solid #111827; }
.report-blocks { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
.report-detail-stack { display: flex; flex-direction: column; gap: 14px; }
.report-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-sm); }
.report-card h3 { margin: 0 0 10px; font-size: 16px; }
.report-center-box { border: 2px solid #2f855a; background: #f7fafc; text-align: center; padding: 16px; font-weight: 900; margin-bottom: 18px; }
.report-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.report-kpi { text-align: center; padding: 10px; }
.report-kpi strong { display: block; font-size: 22px; color: #000; border-bottom: 3px double #111; padding-bottom: 5px; }
.report-kpi span { display: block; font-size: 12px; color: #111827; margin-bottom: 6px; }
.report-note { color: var(--muted); font-size: 13px; }
.report-print-actions { margin-left: auto; display: flex; gap: 8px; }
@media (max-width: 1200px) { .report-blocks { grid-template-columns: 1fr; } }
@media print {
    .app-sidebar, .app-topbar, .report-toolbar, .report-print-actions { display: none !important; }
    .app-shell, .app-main, .app-content { display: block !important; overflow: visible !important; height: auto !important; padding: 0 !important; }
    body { background: #bfbfbf !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .report-card, .report-grid-scroll { box-shadow: none !important; border-radius: 0 !important; overflow: visible !important; }
    .report-table { font-size: 9px; min-width: 0; }
    .report-table th, .report-table td { padding: 3px 4px; }
    @page { size: A4 landscape; margin: 8mm; }
}

/* v54 Jahresauswertung: kompaktere Tabellenzellen */
.report-table { font-size: 12px; }
.report-table th, .report-table td { padding: 4px 6px; }
.report-card { padding: 10px; }
.report-card h3 { font-size: 15px; margin-bottom: 8px; }
.report-blocks { gap: 12px; }
.report-detail-stack { gap: 10px; }
.report-center-box { padding: 12px; margin-bottom: 12px; }
.report-kpis { gap: 8px; }
.report-kpi { padding: 6px; }
.report-kpi strong { font-size: 18px; }
.report-note { font-size: 12px; }

/* v56 Jahresauswertung: kompaktere Tabellenzellen */
.report-page {
  font-size: 13px;
}
.report-page .card.report-toolbar {
  padding: 14px 18px;
  margin-bottom: 14px;
}
.report-page .report-note {
  font-size: 12px;
  line-height: 1.35;
  margin-top: 10px;
}
.report-grid-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.report-table {
  border-collapse: collapse;
  width: 100%;
  table-layout: auto;
  font-size: 12px;
}
.report-table th,
.report-table td {
  padding: 4px 7px;
  line-height: 1.15;
  white-space: nowrap;
  vertical-align: middle;
}
.report-table th {
  font-size: 11px;
  letter-spacing: .01em;
}
.report-table .label-cell,
.report-table td.label-cell {
  min-width: 120px;
  max-width: 170px;
  white-space: nowrap;
}
.report-table th:nth-child(2),
.report-table td:nth-child(2),
.report-table th:nth-child(3),
.report-table td:nth-child(3),
.report-table th:nth-child(4),
.report-table td:nth-child(4),
.report-table th:nth-child(5),
.report-table td:nth-child(5),
.report-table th:nth-child(6),
.report-table td:nth-child(6),
.report-table th:nth-child(10),
.report-table td:nth-child(10) {
  min-width: 74px;
}
.report-table th:nth-child(7),
.report-table td:nth-child(7),
.report-table th:nth-child(8),
.report-table td:nth-child(8),
.report-table th:nth-child(9),
.report-table td:nth-child(9) {
  min-width: 62px;
}
.report-table th:nth-child(11),
.report-table td:nth-child(11),
.report-table th:nth-child(12),
.report-table td:nth-child(12),
.report-table th:nth-child(13),
.report-table td:nth-child(13),
.report-table th:nth-child(15),
.report-table td:nth-child(15),
.report-table th:nth-child(16),
.report-table td:nth-child(16) {
  min-width: 66px;
}
.report-table th:nth-child(14),
.report-table td:nth-child(14) {
  min-width: 125px;
}
.report-card {
  padding: 10px 12px;
  margin-bottom: 12px;
}
.report-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}
.report-blocks {
  gap: 12px;
}
.report-detail-stack {
  gap: 10px;
}
.report-center-box {
  padding: 12px 10px;
  font-size: 14px;
}
.report-kpis {
  gap: 10px;
}
.report-kpi span {
  font-size: 11px;
}
.report-kpi strong {
  font-size: 18px;
}

@media print {
  .report-page { font-size: 10px; }
  .report-table { font-size: 9px; }
  .report-table th, .report-table td { padding: 2px 4px; line-height: 1.05; }
  .report-card { padding: 6px; margin-bottom: 6px; }
}

/* v59 Reinigung */
.cleaning-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.cleaning-card {
  padding: 14px;
  margin-bottom: 14px;
}
.cleaning-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}
.cleaning-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}
.cleaning-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
}
.cleaning-form-grid input,
.cleaning-form-grid select {
  min-height: 34px;
}
.cleaning-span-2 { grid-column: span 2; }
.cleaning-actions { display: flex; align-items: end; }
.cleaning-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.cleaning-kpis div {
  border: 1px solid #d6e0ec;
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
}
.cleaning-kpis span {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 5px;
}
.cleaning-kpis strong {
  font-size: 18px;
}
.cleaning-table-scroll { max-width: 100%; overflow: auto; }
.cleaning-table {
  font-size: 12px;
  min-width: 920px;
}
.cleaning-table th,
.cleaning-table td {
  padding: 5px 7px;
  vertical-align: middle;
}
.cleaning-table .num { text-align: right; white-space: nowrap; }
.cleaning-money-input {
  width: 82px;
  min-height: 28px;
  padding: 4px 6px;
  text-align: right;
}
.cleaning-invoice-select {
  min-width: 130px;
  max-width: 190px;
  min-height: 28px;
  padding: 4px 6px;
}
.button.tiny {
  padding: 5px 8px;
  font-size: 12px;
  min-height: 28px;
}
.small-top-space { margin-top: 10px; }
.cleaning-status-done,
.cleaning-row-done { background: #dcfce7; }
.cleaning-status-partial { background: #fef9c3; }
.cleaning-status-open,
.cleaning-row-open { background: #fee2e2; }
.cleaning-row-planned { background: #f1f5f9; }
.cleaning-row-private { background: #e7ded3; }
.cleaning-booking-list { max-height: 58vh; }
.cleaning-booking-list thead th { position: sticky; top: 0; z-index: 2; }
.compact-filter { align-items: end; }
@media (max-width: 1100px) {
  .cleaning-dashboard-grid { grid-template-columns: 1fr; }
  .cleaning-form-grid { grid-template-columns: 1fr 1fr; }
  .cleaning-span-2 { grid-column: span 2; }
}
@media (max-width: 720px) {
  .cleaning-form-grid { grid-template-columns: 1fr; }
  .cleaning-span-2 { grid-column: span 1; }
}

/* v65 Reinigung: korrektes App-Layout und kompaktere Bedienung */
.cleaning-module { display: flex; flex-direction: column; gap: 12px; }
.cleaning-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 14px 16px; }
.cleaning-toolbar h2 { margin: 0 0 4px; font-size: 22px; }
.cleaning-toolbar .filter-bar { margin-left: auto; }
.cleaning-dashboard-grid { grid-template-columns: minmax(0, 1.75fr) minmax(260px, .85fr); }
.cleaning-card { border-radius: 14px; }
.cleaning-card h2 { font-size: 17px; }
.cleaning-form-grid input,
.cleaning-form-grid select { width: 100%; border-radius: 8px; }
.cleaning-form-grid { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
.cleaning-summary-card .cleaning-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cleaning-kpis div { padding: 8px 9px; }
.cleaning-kpis strong { font-size: 16px; }
.cleaning-table { min-width: 1080px; border-collapse: collapse; }
.cleaning-table th { background: #c9c9c9; color: #06101f; font-size: 11px; text-transform: uppercase; }
.cleaning-table th,
.cleaning-table td { border: 1px solid #111827; padding: 4px 6px; line-height: 1.15; }
.cleaning-table tbody tr:nth-child(even) td { filter: none; }
.cleaning-table input,
.cleaning-table select { min-height: 26px; border-radius: 5px; font-size: 12px; }
.cleaning-money-input { width: 78px; }
.cleaning-booking-list { max-height: 62vh; border-radius: 10px; }
.cleaning-booking-list thead th { background: #c9c9c9; }
.cleaning-row-done td { background: #c8f7c5 !important; }
.cleaning-row-open td { background: #ffd6d6 !important; }
.cleaning-row-planned td { background: #e5e7eb !important; }
.cleaning-row-private td { background: #d6ccc2 !important; }
.cleaning-table .button.tiny { padding: 4px 8px; min-height: 26px; }
.cleaning-span-2 { grid-column: span 2; }
.cleaning-actions { justify-content: flex-start; }
@media (max-width: 1200px) {
  .cleaning-form-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .cleaning-dashboard-grid { grid-template-columns: 1fr; }
}
@media print {
  .cleaning-toolbar, .no-print { display: none !important; }
  .cleaning-booking-list { max-height: none; overflow: visible; }
  .cleaning-table { font-size: 9px; min-width: 0; width: 100%; }
  .cleaning-table th, .cleaning-table td { padding: 2px 3px; }
}

/* Zahlungen v81 */
.payments-hero{margin-bottom:14px}.payments-filter-grid{display:grid;grid-template-columns:150px 220px 210px minmax(240px,1fr) 120px;gap:12px;align-items:end}.payments-filter-grid label{display:flex;flex-direction:column;font-weight:800;color:#0f172a;gap:5px}.payments-summary-grid{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:10px;margin:12px 0}.payments-summary-grid.mini{grid-template-columns:repeat(3,minmax(140px,220px));margin:10px 0 16px}.pay-card{background:#f8fafc;border:1px solid #cbd5e1;border-radius:12px;padding:10px 12px;min-height:64px}.pay-card span{display:block;font-size:12px;color:#64748b;margin-bottom:6px}.pay-card strong{display:block;font-size:18px;color:#0f172a}.pay-card-expected strong{color:#0f766e}.pay-card-paid strong{color:#15803d}.pay-card-open strong{color:#b91c1c}.payments-group-card{margin-top:10px;margin-bottom:14px}.payments-table{width:100%;border-collapse:collapse;background:white}.payments-table th,.payments-table td{border:1px solid #111827;padding:6px 8px;font-size:13px;vertical-align:middle}.payments-table th{background:#c9c9c9;color:#020617;text-transform:uppercase;font-weight:900}.payments-table.compact th,.payments-table.compact td{padding:5px 7px;font-size:12px}.payment-main-table td:nth-child(6),.payment-main-table td:nth-child(7),.payment-main-table td:nth-child(8),.payments-group-card td:nth-child(3),.payments-group-card td:nth-child(4),.payments-group-card td:nth-child(5){text-align:right;white-space:nowrap}.payment-row-bezahlt{background:#dcfce7}.payment-row-offen{background:#fee2e2}.payment-row-teilweise{background:#fef3c7}.payment-row-privat{background:#d6ccc2}.payment-row-ohne{background:#e5e7eb}.payment-status-pill{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:3px 9px;font-size:12px;font-weight:900;white-space:nowrap}.payment-status-pill.bezahlt{background:#16a34a;color:white}.payment-status-pill.offen{background:#dc2626;color:white}.payment-status-pill.teilweise{background:#f59e0b;color:#111827}.payment-status-pill.privat{background:#8b5e34;color:white}.payment-status-pill.ohne{background:#64748b;color:white}.payment-detail-card{margin:14px 0;border:2px solid #0f766e}.payment-detail-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.payment-detail-head h2{margin:0 0 6px}.payment-detail-head p{margin:0;color:#475569}.payment-entry-form{display:grid;grid-template-columns:160px 160px minmax(200px,1fr) minmax(260px,1fr) 160px;gap:12px;align-items:end;margin:12px 0 18px}.payment-entry-form label{display:flex;flex-direction:column;font-weight:800;gap:5px}.button.small{padding:6px 10px;font-size:12px}.muted{color:#64748b}@media(max-width:1250px){.payments-filter-grid{grid-template-columns:repeat(2,minmax(180px,1fr))}.payments-summary-grid{grid-template-columns:repeat(3,minmax(120px,1fr))}.payment-entry-form{grid-template-columns:repeat(2,minmax(180px,1fr))}}@media(max-width:850px){.payments-summary-grid{grid-template-columns:1fr}.payments-filter-grid,.payment-entry-form{grid-template-columns:1fr}.payment-detail-head{flex-direction:column}.payment-main-table{font-size:12px}}

/* v82 Zahlungen: Anzeige-Hinweis und Schnellfilter */
.payments-info-card{margin-top:14px;margin-bottom:14px;padding:14px 16px;font-size:14px;line-height:1.45}
.payments-quick-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}
.button.active{background:#0f766e;color:#fff;border-color:#0f766e}
