/* ── Design Tokens ────────────────────────────────────────────────────────── */
:root {
    --accent:          #2a8dd5;
    --accent-hover:    #2b8bd1;

    --sidebar-bg:      #26374b;
    --sidebar-border:  #334155;
    --sidebar-text:    #94a3b8;
    --sidebar-hover:   #324b69;
    --sidebar-section: #3d587a;

    --body-bg:         #ECEEF0;
    --body-text:       #1e293b;

    --surface:         #e8ecf0;
    --surface-muted:   #f8fafc;

    --nav-label: #b8c4d6;
    --button-color:    #ffffff;
    --btn-bg-secondary: #dfe6ea;

    --border: #eeeef3;
    --border-input:    #cbd5e1;

    --muted:           #586373;
    --muted-light: #8e9eb3;

    --shadow-card:     1px 1px 3px 1px rgba(178,191,202,.15);
}

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    margin: 0;
    font-family: 'Mulish', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--body-text);
    background: var(--body-bg);
}

button {
    font-family: 'Mulish', system-ui, sans-serif;
    font-size: 14px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { margin: 1.75rem 0 .25rem; font-size: 1.2rem; }
.btn + h1 { margin-top: 1.25rem; }
h2 { margin: 0 0 .5rem; font-size: 1.2rem; }
h3 { margin: 0 0 .5rem; font-size: 1rem; }
hr.sep { border: none; border-top: 1px solid var(--border); margin: 1.75rem 0; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.topbar {
    height: 55px;
    background: #324b69;
}

.topbar-inner {
    max-width: calc(220px + 1100px);
    display: flex;
    align-items: center;
    padding: 0 20px 0 1.5rem;
    height: 100%;
    position: relative;
}

.topbar-logo {
    height: 30px;
    width: auto;
    margin-left: 2px;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-left: 2rem;
}
.topbar-nav a {
    color: var(--surface);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    padding: .65rem 2rem;
    border-radius: 6px;
    min-width: 150px;
    text-align: center;
}
.topbar-nav a:hover { color: #fff; background: rgba(255,255,255,.1); }
.topbar-nav a.active { color: #fff; background: #26374b; }



.topbar-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-left: 95px;
}

.topbar-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--sidebar-bg);
    border: none;
    border-radius: 50px;
    padding: .35rem .75rem;
    position: relative;
}
.topbar-search svg { width: .9rem; height: .9rem; stroke-width: 2; color: var(--surface); flex-shrink: 0; }
.topbar-search .ti { color: var(--surface); font-size: .9rem; -webkit-text-stroke: .4px var(--surface); }
.topbar-search-input {
    background: none;
    border: none;
    outline: none;
    color: var(--surface);
    font-size: .9rem;
    line-height: 1.4;
    width: 180px;
}
.topbar-search-input::placeholder { color: #a0aebb; }
.topbar-search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 320px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    z-index: 500;
    overflow: hidden;
}
.topbar-search-dropdown.open { display: block; }
.topbar-search-item {
    display: flex;
    flex-direction: column;
    padding: .75rem 1rem;
    text-decoration: none;
    color: #0f172a;
    gap: .3rem;
    border-bottom: 1px solid var(--border);
}
.topbar-search-item:last-child { border-bottom: none; }
.topbar-search-item:hover,
.topbar-search-item.keyboard-focus { background: var(--surface); text-decoration: none; }
.tsi-name { display: inline-flex; align-items: center; gap: .3rem; font-size: 1rem; font-weight: 600; color: inherit; }
.tsi-name .ti { color: inherit; }
.tsi-meta { display: inline-flex; align-items: center; gap: .3rem; font-size: .875rem; color: var(--muted); }
.tsi-meta .ti { color: inherit; }

.topbar-btn {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .42rem 1.1rem;
    background: transparent;
    border: none;
    color: var(--surface);
    border-radius: 50px;
    font-size: .9rem;
    font-family: inherit;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease;
}
.topbar-btn { margin-left: auto; color: var(--nav-label); }
.topbar-btn .ti { font-size: 1.1rem; color: var(--surface); }
.topbar-btn:hover { background: rgba(0,0,0,.15); text-decoration: none; }

.topbar-user-menu {
    position: relative;
    margin-left: .5rem;
}


.topbar-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + .5rem);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    min-width: 200px;
    z-index: 200;
    overflow: hidden;
}
.topbar-user-menu.open .topbar-dropdown { display: block; }

.topbar-dropdown-user {
    padding: .65rem 1rem .5rem;
    font-size: .8rem;
    font-weight: 700;
    color: #64748b;
    border-bottom: 1px solid var(--border);
    margin-bottom: .25rem;
}
.topbar-dropdown form { margin: 0; }
.topbar-dropdown a { text-decoration: none; }
.topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    padding: 1.6rem 1.1rem 1rem;
    font-size: .95rem;
    font-family: inherit;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}
.topbar-dropdown-item:hover { background: #f1f5f9; }
.topbar-dropdown-item svg { width: 1rem; height: 1rem; stroke-width: 2; flex-shrink: 0; }

.layout {
    display: flex;
    height: calc(100vh - 55px);
    overflow: hidden;
}

.sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    transition: width .2s ease;
}

.sidebar.collapsed { width: 75px; }
.sidebar.collapsed .nav-label { display: none; }
.sidebar.collapsed .nav-section { margin: .45rem 1.25rem .1rem; }
.sidebar.collapsed .sidebar-nav a {
    justify-content: center;
    padding: .6rem 0;
    margin: .1rem 6px;
}

.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto 1.25rem 1.25rem auto;
    padding: .4rem;
    background: none;
    border: none;
    color: #7a8ea8;
    cursor: pointer;
    border-radius: 6px;
    font-size: 1.35rem;
}
.sidebar-collapse-btn:hover { background: var(--sidebar-border); color: var(--surface); }
.sidebar.collapsed .sidebar-collapse-btn { margin: auto auto 1.25rem; }

.sidebar-brand {
    display: block;
    padding: 1.25rem 1.25rem 1rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--surface);
    border-bottom: 1px solid var(--sidebar-border);
    text-decoration: none;
}

.sidebar-nav { padding: 1.1rem 0 0; flex: 1; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: .6rem 1rem;
    margin: .1rem 1rem;
    border-radius: .375rem;
    color: var(--surface);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
}

.sidebar-nav a svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; stroke-width: 2; }
.sidebar-nav a .ti { font-size: 1.25rem; }
.sidebar-nav a .nav-label { color: var(--nav-label); }

.sidebar-nav a:hover { background: var(--sidebar-hover); color: var(--surface); }
.sidebar-nav a.active { background: #324b69; color: var(--surface); }

.sidebar-nav .nav-section {
    display: block;
    padding: .5rem 1.25rem .25rem;
    margin: .45rem 2rem .1rem;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #7a8ea8;
    border-top: 1px solid #3d5166;
}

.sidebar-footer {
    padding: .75rem 1.25rem;
    border-top: 1px solid #3d5166;
    font-size: .82rem;
}

.sidebar-footer form { display: inline; }

.sidebar-footer button {
    background: none;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
    font-size: .82rem;
    padding: 0;
}

.sidebar-footer button:hover { color: var(--surface); }

.main-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-y: auto;
    transition: opacity .12s ease;
}
.main-wrap.htmx-swapping { opacity: 0; transition: opacity .08s ease; }

.main-content {
    flex: 1;
    padding: 18px 20px 15px 55px;
    max-width: 1100px;
    overflow-x: hidden;
}
@media (max-width: 1024px) {
    .main-content { padding: 18px 20px 15px 30px; }
}
@media (max-width: 768px) {
    .main-content { padding: 14px 20px; }
}
@media (max-width: 640px) {
    .main-content { padding: 12px 16px; }
}

/* ── Flash-Meldungen ──────────────────────────────────────────────────────── */
.flash-wrap { padding: .75rem 2.5rem 0; }

.alert {
    padding: .65rem 1rem;
    border-radius: 5px;
    margin-bottom: .5rem;
    font-size: .9rem;
    max-height: 100px;
    overflow: hidden;
}

.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; display: flex; align-items: center; gap: .5rem; }
.alert-icon { font-size: 1.2rem; flex-shrink: 0; }
.alert-danger,
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; display: flex; align-items: center; gap: .5rem; }
.alert-warning { background: #fef9c3; color: #854d0e; border: 1px solid #fef08a; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; display: flex; align-items: center; gap: .5rem; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    padding: .5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary { background: var(--accent); color: var(--button-color); }
.btn-primary:hover { background: var(--accent-hover); color: var(--surface); text-decoration: none; }

.btn-secondary { background: #fff; color: var(--sidebar-border); border-radius: 999px; border: 1px solid var(--border-input); }
.btn-secondary:hover { background: var(--border-input); color: var(--sidebar-border); text-decoration: none; }

.btn-success { background: var(--accent); color: var(--button-color); padding: .55rem 1.6rem; margin-right: 1rem; }
.btn-success:hover { background: var(--accent-hover); color: var(--surface); text-decoration: none; }

.btn-danger { background: #ef4444; color: var(--button-color); padding: .25rem .55rem; }
.btn-danger:hover { background: #dc2626; color: var(--surface); text-decoration: none; }

.btn svg { width: .85rem; height: .85rem; stroke-width: 2; vertical-align: middle; margin-right: .55rem; }


/* ── Sync-Schritte ────────────────────────────────────────────────────────── */

/* ── Formulare ────────────────────────────────────────────────────────────── */
.form-box {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    max-width: 420px;
}
.form-row {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.form-group label {
    font-size: .8rem;
    color: #555;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: .4rem .6rem;
    border: 1px solid var(--border-input);
    border-radius: 4px;
    font-size: .9rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid var(--accent);
    border-color: transparent;
}

.form-group.grow { flex: 2; min-width: 160px; }
.form-group.w-130 { width: 130px; }
.input-addon { display: flex; align-items: stretch; border-radius: 4px; overflow: hidden; }
.input-addon .input-addon-text {
  display: flex; align-items: center; padding: 0 .6rem;
  background: var(--surface); border: 1px solid #c8d0da; border-right: none;
  border-radius: 6px 0 0 6px; color: var(--muted); font-size: .9rem; white-space: nowrap;
}
.input-addon input { border-radius: 0 6px 6px 0; flex: 1; min-width: 0; }
.input-addon--sm { max-width: 160px; }
.input-addon-select {
  border: 1px solid var(--border-input); border-left: none;
  border-radius: 0 6px 6px 0; padding: .4rem .5rem;
  font-size: .9rem; font-family: inherit; background: #fff;
}

/* ── Preis-Einstellung Layout ────────────────────────────────────────────── */
.einst-layout { display: flex; gap: 1.5rem; align-items: flex-start; margin-top: 1.25rem; }
.einst-nav {
  flex: 0 0 180px; display: flex; flex-direction: column; gap: .15rem;
  background: var(--surface-muted); border: 1px solid var(--border); border-radius: 8px; padding: .5rem;
}
.einst-nav-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .75rem; border-radius: 6px;
  font-size: .88rem; color: var(--text, #1e293b); text-decoration: none;
}
.einst-nav-item:hover { background: var(--bg-subtle, #f1f5f9); }
.einst-nav-item--active { background: var(--accent); color: #fff; font-weight: 600; }
.einst-nav-item--active:hover { background: var(--accent); }
.einst-content { flex: 1; min-width: 0; }

/* ── Form-Checks (Radio/Checkbox) ────────────────────────────────────────── */
.form-check { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; }
.form-check--inline { flex-wrap: wrap; gap: .5rem; }
.form-check input[type=radio],
.form-check input[type=checkbox] { margin: 0; accent-color: var(--accent); }
.form-check label { font-size: .9rem; cursor: pointer; margin: 0; }
.form-select { padding: .4rem .6rem; border: 1px solid var(--border-input); border-radius: 4px; font-size: .9rem; font-family: inherit; }
.form-select-sm { padding: .3rem .5rem; border: 1px solid var(--border-input); border-radius: 4px; font-size: .85rem; font-family: inherit; }
.form-textarea { width: 100%; box-sizing: border-box; padding: .4rem .6rem; border: 1px solid var(--border-input); border-radius: 4px; font-size: .9rem; font-family: inherit; resize: vertical; }

@media (max-width: 640px) {
  .einst-layout { flex-direction: column; }
  .einst-nav { flex-direction: row; flex-wrap: wrap; flex: none; width: 100%; }
}

/* ── Aufklappbare Formulare ───────────────────────────────────────────────── */
.form-collapsible summary {
    cursor: pointer;
    font-size: .88rem;
    font-weight: 600;
    color: var(--accent);
    list-style: none;
    padding: .1rem 0;
    margin-bottom: 0;
}

.form-collapsible summary::-webkit-details-marker { display: none; }
.form-collapsible summary:hover { color: var(--accent-hover); }

.form-collapsible[open] summary { margin-bottom: .85rem; }

.form-collapsible-inner {
    border-top: 1px solid var(--border);
    padding: .75rem 1.5rem;
    background: var(--surface-muted);
}

/* ── Tabellen ─────────────────────────────────────────────────────────────── */
.tbl {
    width: 100%;
    border-collapse: collapse;
}

.tbl th {
    background: #fff;
    padding: .7rem 1rem;
    text-align: left;
    font-size: .9rem;
    font-weight: normal;
    color: var(--muted-light);
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

.tbl td {
    padding: .6rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.tbl tbody tr:last-child td { border-bottom: none; }

.tbl td.cell-actions { white-space: nowrap; display: flex; gap: 2rem; align-items: center; justify-content: flex-end; }

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background: none;
    padding: 0;
}
.btn-icon svg { width: 1rem; height: 1rem; stroke-width: 2; }
.btn-icon--danger { color: inherit; font-size: .95rem; }
.btn-icon--danger:hover { background: #fee2e2; }
.btn-icon-placeholder { display: inline-block; width: 2rem; }
.tbl td.cell-right   { text-align: right; white-space: nowrap; }

.tbl input[type=text],
.tbl input[type=number],
.saison-card-foot input[type=text],
.saison-card-foot input[type=number] {
    width: 80px;
    padding: .45rem .75rem;
    border: 1px solid var(--border-input);
    border-radius: 4px;
    font-size: .9rem;
}

.tbl .input-addon input[type=text],
.tbl .input-addon input[type=number],
.saison-card-foot .input-addon input[type=text],
.saison-card-foot .input-addon input[type=number] { border-radius: 0 4px 4px 0; }

.tbl input[type=number]:focus {
    outline: 2px solid var(--accent);
    border-color: transparent;
}


/* ── Karten-Grid ──────────────────────────────────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.card h3 { margin: 0 0 .3rem; font-size: 1rem; }
.card p  { margin: 0 0 .75rem; font-size: .82rem; color: var(--muted); }

/* ── Objekt-Gruppe ────────────────────────────────────────────────────────── */
.objekt-gruppe {
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.objekt-header {
    padding: 0.7rem 1.2rem;
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.objekt-header-actions { display: flex; gap: 2rem; align-items: center; }
.objekt-currency {
  font-size: .75rem; font-weight: 400; color: var(--accent);
  background: rgba(42,141,213,.1); padding: .15rem .5rem;
  border-radius: 4px; margin-left: .75rem;
}

.objekt-leer { padding: .75rem 1.5rem; margin: 0; color: var(--muted); font-size: .9rem; }

.channex-objekt-body { padding: 1rem 1.25rem; }
.channex-objekt-body .form-group { margin-bottom: .75rem; max-width: 400px; }
.channex-typ-tbl { margin-top: .75rem; }
.channex-typ-tbl input[type=text] {
    width: 100%;
    max-width: 260px;
    padding: .35rem .5rem;
    border: 1px solid var(--border-input);
    border-radius: 4px;
    font-size: .85rem;
}
.channex-typ-tbl input[type=text]:focus { outline: 2px solid var(--accent); border-color: transparent; }

/* ── Request-Preview ─────────────────────────────────────────────────────── */
.mt-24 { margin-top: 1.5rem; }

.payload-details { margin-top: 1.5rem; }
.payload-summary {
    cursor: pointer;
    font-weight: 600;
    font-size: .95rem;
    padding: .6rem .75rem;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--border-input);
    list-style: none;
    user-select: none;
}
.payload-summary::-webkit-details-marker { display: none; }
.payload-summary::before { content: '▶ '; font-size: .7rem; }
details[open] .payload-summary::before { content: '▼ '; }
.payload-details .form-box { margin-top: .5rem; }
.request-block { margin-bottom: 1rem; }
.request-label {
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    margin-bottom: .3rem;
}
.request-pre {
    background: var(--body-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .75rem 1rem;
    font-size: .82rem;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
    color: var(--body-text);
}

/* ── View-Toggle ─────────────────────────────────────────────────────────── */

.typ-switcher {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}
.typ-switcher-btn {
    padding: .4rem 1rem;
    border-radius: 9999px;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--muted);
    background: var(--border);
}
.typ-switcher-btn:hover { background: var(--border-input); text-decoration: none; }
.typ-switcher-btn.active { background: var(--accent); color: #fff; }

.hidden { display: none !important; }

/* ── Channel Mapping IFrame ───────────────────────────────────────────────── */
.mapping-block {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
    background: var(--surface);
}

.mapping-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .65rem 1rem;
    background: var(--body-bg);
    border-bottom: 1px solid var(--border);
    font-size: .95rem;
}

.mapping-block-id {
    font-size: .75rem;
    color: var(--muted);
    font-family: 'Courier New', monospace;
}

.mapping-iframe {
    width: 100%;
    height: 680px;
    display: block;
    border: none;
}

/* ── Buchungs-Status ──────────────────────────────────────────────────────── */
.booking-status {
    display: inline-block;
    padding: .15rem .5rem;
    border-radius: 4px;
    font-size: .78rem;
    font-weight: 600;
    text-transform: capitalize;
    background: var(--border);
    color: var(--muted);
}

.booking-status--new      { background: #60a5fa; color: #fff; margin-right: .75rem; }
.booking-status--modified { background: #fef9c3; color: #854d0e; }
.booking-status--cancelled { background: #fee2e2; color: #991b1b; }

/* ── Hilfstexte ───────────────────────────────────────────────────────────── */
.meta      { color: #000; font-size: .9rem; margin-bottom: 1.5rem; }
.text-muted { color: var(--muted-light); font-size: .9rem; }

/* ── Auth / Login ─────────────────────────────────────────────────────────── */
#home-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.page-home .main-wrap {
    position: relative;
    background: var(--sidebar-bg);
}
.page-home .main-content {
    position: relative;
    z-index: 1;
}
.home-card {
    background: #fff;
    border-radius: 8px;
    padding: 2rem 2.5rem;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.page-home .sidebar-nav {
    filter: blur(1.5px);
    pointer-events: none;
    user-select: none;
    opacity: .6;
}
.page-home .sidebar-collapse-btn {
    pointer-events: none;
    opacity: .4;
}

.page-auth {
    background: var(--sidebar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
}

#auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.auth-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem 2.5rem 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
}

.auth-logo {
    display: block;
    height: 48px;
    margin: 0 auto 1.5rem;
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--body-text);
    margin: 0 0 .35rem;
    text-align: center;
}

.auth-subtitle {
    font-size: .9rem;
    color: var(--muted);
    text-align: center;
    margin: 0 0 1.75rem;
}

.auth-form .form-group { margin-bottom: 1.1rem; }

.auth-form .form-label {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    color: var(--body-text);
    margin-bottom: .35rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.auth-form .form-input {
    width: 100%;
    padding: .65rem .9rem;
    font-size: .95rem;
    font-family: inherit;
    border: 1px solid var(--border-input);
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--body-text);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}

.auth-form .form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(42,141,213,.15);
}

.auth-form .form-input::placeholder { color: var(--muted-light); }

.auth-remember {
    margin-top: 1rem;
}

.auth-remember-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .88rem;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

.auth-remember-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
    cursor: pointer;
}

.btn-block {
    width: 100%;
    justify-content: center;
    margin-top: 1.5rem;
    padding: .75rem 1rem;
    font-size: 1rem;
}


.input-password-wrap {
    position: relative;
}

.input-password-wrap .form-input {
    padding-right: 2.8rem;
}

.password-toggle-btn {
    position: absolute;
    right: .65rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: .25rem;
    cursor: pointer;
    color: var(--muted-light);
    display: flex;
    align-items: center;
    border-radius: 4px;
    font-size: 1.25rem;
}

.password-toggle-btn:hover { color: var(--muted); }
.password-toggle-btn svg { width: 1.1rem; height: 1.1rem; stroke-width: 2; }

/* Full-width pages */
.page-wide .main-content {
    max-width: none;
}

/* Legacy iframe */
.page-legacy .main-content {
    padding: 0;
    max-width: none;
    width: 100%;
    display: flex;
    flex-direction: column;
}
.legacy-iframe {
    flex: 1;
    width: 100%;
    border: none;
    min-height: calc(100vh - 55px);
}

/* ── Mobile / Hamburger ───────────────────────────────────────────────────── */
.topbar-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--surface);
    font-size: 1.4rem;
    cursor: pointer;
    padding: .3rem .4rem;
    margin-right: .5rem;
    line-height: 1;
}

@media (max-width: 768px) {
    .topbar-hamburger { display: flex; align-items: center; }
    .sidebar-collapse-btn { display: none; }

    .sidebar {
        position: fixed;
        top: 55px;
        left: 0;
        height: calc(100vh - 55px);
        z-index: 200;
        transform: translateX(-100%);
        transition: transform .22s ease;
        width: 220px !important;
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .sidebar.mobile-open .nav-label { display: inline !important; }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 55px 0 0 0;
        background: rgba(0,0,0,.35);
        z-index: 199;
    }
    .sidebar-overlay.active { display: block; }

    .layout { overflow: visible; }
    .main-wrap { overflow-y: auto; }

    .topbar-actions { margin-left: .75rem; }
    .topbar-search { display: none; }
}


/* ── Fehlerseiten ─────────────────────────────────────────────────────────── */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}
.error-code {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    opacity: .25;
    margin-bottom: .5rem;
}
.error-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 .75rem;
    color: #0f172a;
}
.error-msg {
    color: var(--muted);
    margin-bottom: 1.75rem;
    max-width: 380px;
}
.error-detail {
    background: #f1f5f9;
    border: 1px solid var(--border-input);
    border-radius: 6px;
    padding: .75rem 1rem;
    font-size: .8rem;
    color: #991b1b;
    text-align: left;
    max-width: 600px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── Buchungsliste ────────────────────────────────────────────────────────── */
.booking-list {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.booking-item {
    background: #fff;
    border: 1px solid #d6dade;
    border-radius: 12px;
    overflow: hidden;
}

.booking-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .9rem 1.1rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
}
.booking-toggle:hover { background: #e5e9ed; }

.booking-main { flex: 1; min-width: 0; }

.booking-row1 {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.booking-row2 {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .4rem;
}

.booking-ota {
    font-size: .8rem;
    color: var(--muted);
}

.booking-dates {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .9rem;
    color: #0f172a;
    margin-right: .5rem;
}

.booking-amount {
    margin-left: auto;
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
}

.booking-guest {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-weight: 600;
    font-size: .95rem;
}

.booking-unit {
    font-size: .82rem;
    color: var(--muted);
    margin-left: auto;
}

.booking-detail-btn {
    flex-shrink: 0;
    margin-left: auto;
    font-size: .875rem;
    padding: .35rem .85rem;
}
.booking-detail-btn:hover { text-decoration: none; }

.booking-chevron {
    font-size: 1.1rem;
    color: var(--muted);
    transition: transform .2s ease;
    flex-shrink: 0;
}

.booking-detail {
    display: none;
    padding: .75rem 1.1rem 1rem;
    border-top: 1px solid #d6dade;
    background: #fff;
}

.booking-dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .3rem 1.25rem;
    margin: 0;
    font-size: .875rem;
}

.booking-dl dt {
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.booking-dl dd {
    margin: 0;
    color: #0f172a;
}

.page-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: .5rem;
}
.page-header h1 { margin: 0; }
.page-header .meta { margin: 0; width: 100%; }

/* ── Page-Nav (Preise) ──────────────────────────────────────────────────── */
.page-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.page-nav-channex {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.page-nav-objekt {
  font-weight: 600;
  color: var(--text);
  margin-right: 15px;
  margin-top: 4px;
}
.icon-muted { font-size: 1.05rem; color: var(--muted); }
.js-modal-delete-btn { display: none; margin-left: auto; }

/* ── Select2 Overrides ───────────────────────────────────────────────────── */
.select2-container--default .select2-selection--single {
    height: 38px;
    border-color: var(--border);
    border-radius: 6px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px;
    padding-left: .75rem;
    padding-right: 2rem;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}
.select2-results__option {
    padding: .5rem .75rem;
}

/* ── Pikaday ─────────────────────────────────────────────────────────────── */
.pika-single {
    z-index: 9999;
    display: block;
    position: relative;
    font-family: inherit;
    font-size: .9rem;
    color: #0f172a;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,.12);
}
.pika-single.is-hidden  { display: none; }
.pika-single.is-bound   { position: absolute; }
.pika-lendar            { padding: .75rem; }
.pika-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
}
.pika-label {
    font-weight: 700;
    font-size: .95rem;
    position: relative;
    display: inline-block;
}
.pika-label select {
    position: absolute;
    z-index: 99;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}
.pika-prev, .pika-next {
    background: none;
    border: none;
    cursor: pointer;
    width: 28px; height: 28px;
    border-radius: 6px;
    position: relative;
    text-indent: -9999px;
    overflow: hidden;
}
.pika-prev:hover, .pika-next:hover { background: var(--bg-subtle, #f1f5f9); }
.pika-prev::before, .pika-next::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    border: 5px solid transparent;
}
.pika-prev::before  { border-right-color: #64748b; transform: translate(-70%, -50%); }
.pika-next::before  { border-left-color:  #64748b; transform: translate(-30%, -50%); }
.pika-prev.is-disabled, .pika-next.is-disabled { opacity: .3; cursor: default; }
.pika-table {
    width: 100%;
    border-collapse: collapse;
}
.pika-table th {
    text-align: center;
    font-size: .72rem;
    font-weight: 600;
    color: var(--muted);
    padding: .25rem .1rem;
}
.pika-table td { padding: .15rem; }
.pika-button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: .35rem .2rem;
    text-align: center;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 6px;
    font-size: .88rem;
    color: #0f172a;
}
.pika-button:hover          { background: var(--bg-subtle, #f1f5f9); }
.is-today   .pika-button    { font-weight: 700; color: var(--accent); }
.is-selected .pika-button   { background: var(--accent); color: #fff; font-weight: 700; }
.is-inrange  .pika-button   { background: color-mix(in srgb, var(--accent) 15%, transparent); }
.is-disabled .pika-button,
.is-outside-current-month .pika-button { color: #cbd5e1; cursor: default; }
.is-outside-current-month .pika-button:hover { background: none; }

