/* ====== Fonts (self-hosted, DSGVO) ====== */
@font-face { font-family:'Poppins'; font-style:normal; font-weight:400; font-display:swap; src:url('/assets/fonts/poppins/poppins-400.woff2') format('woff2'); }
@font-face { font-family:'Poppins'; font-style:normal; font-weight:500; font-display:swap; src:url('/assets/fonts/poppins/poppins-500.woff2') format('woff2'); }
@font-face { font-family:'Poppins'; font-style:normal; font-weight:600; font-display:swap; src:url('/assets/fonts/poppins/poppins-600.woff2') format('woff2'); }
@font-face { font-family:'Poppins'; font-style:normal; font-weight:700; font-display:swap; src:url('/assets/fonts/poppins/poppins-700.woff2') format('woff2'); }

/* ====== Variablen ====== */
:root {
    --color-primary:   #2563EB;
    --color-danger:    #dc2626;
    --color-success:   #16a34a;
    --color-free:      #dcfce7;
    --color-booked:    #fca5a5;
    --color-text:      #0D1B3D;
    --color-muted:     #6B7280;
    --color-border:    #e2e8f0;
    --color-bg:        #F2F4F7;
    --color-bg-admin:  #F2F4F7;
    --radius:          8px;
    --radius-lg:       12px;
    --shadow:          0 1px 3px rgba(0,0,0,.08);
    --shadow-md:       0 4px 12px rgba(0,0,0,.1);
    --sidebar-w:       240px;
    --topbar-h:        56px;
    --sidebar-bg:      #0D1B3D;
    --sidebar-text:    #94a3b8;
    --sidebar-active:  #ffffff;
    --sidebar-hover:   rgba(255,255,255,.06);
}

/* ====== Reset & Base ====== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Poppins', system-ui, sans-serif; color: var(--color-text); background: var(--color-bg); font-size: .9375rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { font-weight: 600; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ====== Buttons ====== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem 1rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    background: var(--color-border);
    color: var(--color-text);
    line-height: 1.4;
    transition: opacity .15s, box-shadow .15s;
    white-space: nowrap;
    min-height: 38px;
}
.btn--primary   { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn--secondary { background: #fff; color: var(--color-text); border-color: var(--color-border); }
.btn--danger    { background: var(--color-danger);  color: #fff; border-color: var(--color-danger);  }
.btn--small     { padding: .3rem .65rem; font-size: .8rem; min-height: 30px; }
.btn:hover { opacity: .85; text-decoration: none; }
.btn:active { opacity: .95; }

/* ====== Formulare ====== */
.form-group  { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: .75rem; margin-top: 1.25rem; }
.form-card { background: var(--color-bg-admin); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.form-card--muted { background: var(--color-bg); }
.form-card__title { font-size: .95rem; font-weight: 600; margin: 0 0 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--color-border); color: var(--color-text); }
label        { font-size: .875rem; font-weight: 500; }
.required    { color: var(--color-danger); }
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="password"],
select,
textarea {
    padding: .45rem .75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    width: 100%;
    background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }
textarea { resize: vertical; }

/* ====== Alerts ====== */
.alert { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .9rem; }
.alert--error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert--warning { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.alert--success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }

/* ====== Cookie-Banner (vanilla-cookieconsent) ====== */
.pub-footer-link-btn { background: none; border: none; color: #64748b; cursor: pointer; font-size: .875rem; font-family: inherit; padding: 0; text-decoration: none; }
.pub-footer-link-btn:hover { color: #94a3b8; text-decoration: none; }
.sidebar-legal-btn { background: none; border: none; color: inherit; cursor: pointer; font-size: inherit; font-family: inherit; padding: 0; }
.sidebar-legal-btn:hover { text-decoration: underline; }

/* ====== Login ====== */
.page-login  { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box   { background: #fff; padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 380px; }
.login-box h1 { margin-bottom: 1.25rem; font-size: 1.5rem; }

/* ====== Admin Layout — Sidebar ====== */
.layout-admin { background: var(--color-bg-admin); }

/* Sidebar */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    display: flex; flex-direction: column;
    z-index: 200;
    transition: transform .25s ease;
    overflow: hidden;
}
.sidebar-brand {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.1rem 1rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}
.sidebar-logo { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 700; font-size: .95rem; text-decoration: none; }
.sidebar-logo:hover { text-decoration: none; opacity: .9; }
.sidebar-logo-icon { font-size: 1.1rem; }
.sidebar-logo-img  { height: 32px; width: auto; display: block; background: #fff; padding: 4px 8px; border-radius: 6px; }
.sidebar-copyright { padding: .6rem 1rem; font-size: .7rem; color: rgba(255,255,255,.35); line-height: 1.5; border-top: 1px solid rgba(255,255,255,.06); flex-shrink: 0; }
.sidebar-version   { font-size: .65rem; opacity: .8; }
.sidebar-legal     { font-size: .65rem; }
.sidebar-legal a   { color: rgba(255,255,255,.35); text-decoration: none; }
.sidebar-legal a:hover { color: rgba(255,255,255,.7); text-decoration: underline; }
.login-logo        { text-align: center; margin-bottom: 1.5rem; }
.sidebar-close { display: none; background: none; border: none; color: var(--sidebar-text); font-size: 1.1rem; cursor: pointer; padding: .25rem; line-height: 1; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem 0; }
.nav-group { margin-bottom: 1.25rem; }
.nav-group-label { display: block; padding: .25rem 1rem; font-size: .65rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(148,163,184,.5); margin-bottom: .25rem; }

.nav-link {
    display: flex; align-items: center; gap: .65rem;
    padding: .55rem 1rem;
    color: var(--sidebar-text);
    font-size: .875rem;
    font-weight: 450;
    border-radius: 6px;
    margin: 1px .5rem;
    transition: background .15s, color .15s;
    text-decoration: none;
}
.nav-link:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.nav-link--active { background: rgba(255,255,255,.1); color: var(--sidebar-active); font-weight: 600; }
.nav-icon { font-size: .95rem; width: 1.2rem; text-align: center; flex-shrink: 0; }
.nav-label { flex: 1; }

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,.06);
    padding: .75rem 1rem;
    display: flex; align-items: center; gap: .75rem;
    flex-shrink: 0;
}
.sidebar-user { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; }
.sidebar-user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--color-primary); color: #fff;
    font-size: .8rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sidebar-user-info { display: flex; flex-direction: column; min-width: 0; }
.sidebar-user-name { font-size: .8rem; font-weight: 600; color: #fff; truncate: ellipsis; overflow: hidden; white-space: nowrap; }
.sidebar-user-role { font-size: .7rem; color: var(--sidebar-text); }
.sidebar-logout { color: var(--sidebar-text); font-size: 1.1rem; flex-shrink: 0; text-decoration: none; }
.sidebar-logout:hover { color: var(--color-danger); text-decoration: none; }

/* Hauptbereich */
.admin-wrapper {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex; flex-direction: column;
}

/* Topbar */
.admin-topbar {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; gap: .75rem;
    height: var(--topbar-h);
    padding: 0 1.5rem;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
}
.hamburger {
    display: none;
    flex-direction: column; gap: 4px;
    background: none; border: none; cursor: pointer; padding: .4rem;
    border-radius: var(--radius);
}
.hamburger span { display: block; width: 20px; height: 2px; background: var(--color-text); border-radius: 2px; transition: .2s; }
.hamburger:hover { background: var(--color-bg-admin); }
.topbar-title { font-size: 1rem; font-weight: 600; color: var(--color-text); flex: 1; }
.topbar-logout { display: none; font-size: .85rem; color: var(--color-muted); }

/* Content */
.admin-main { flex: 1; padding: 1.5rem; }
.admin-section { background: #fff; padding: 1.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; flex-wrap: wrap; gap: .5rem; }
.section-header h1 { font-size: 1.3rem; font-weight: 700; }

/* Mobile overlay */
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 190;
}
.sidebar-overlay--visible { display: block; }

/* ====== Tabellen ====== */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th { text-align: left; padding: .65rem .75rem; background: var(--color-bg-admin); border-bottom: 2px solid var(--color-border); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--color-muted); font-weight: 600; white-space: nowrap; }
.data-table td { padding: .65rem .75rem; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--color-bg); }
.actions     { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.inline-form { display: inline-flex; }
.comment-cell { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Kartenansicht auf Mobile */
@media (max-width: 700px) {
    .table-scroll { overflow: visible; }
    .data-table           { display: block; }
    .data-table thead     { display: none !important; }
    .data-table tbody     { display: flex; flex-direction: column; gap: .75rem; }
    .data-table tr        { display: block; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: .875rem; box-shadow: var(--shadow); }
    .data-table tr:hover td { background: transparent; }
    .group-header         { display: none !important; }

    /* Alle Zellen als Label-Wert-Paar */
    .data-table td {
        display: flex; align-items: baseline; gap: .6rem;
        padding: .2rem 0; border: none;
        font-size: .875rem; line-height: 1.5;
    }
    .data-table td::before {
        content: attr(data-label);
        font-size: .65rem; font-weight: 700;
        color: var(--color-muted);
        text-transform: uppercase; letter-spacing: .06em;
        min-width: 75px; flex-shrink: 0;
    }
    /* Aktions-Zeile: kein Label, Buttons nebeneinander */
    .data-table td.actions {
        display: flex; flex-wrap: wrap; gap: .4rem;
        border-top: 1px solid var(--color-border);
        padding-top: .65rem; margin-top: .4rem;
    }
    .data-table td.actions::before { display: none; }

    /* Leere Zellen verstecken */
    .td-empty { display: none !important; }
}

/* ====== Dashboard ====== */
/* Stat-Karten */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.75rem; }
.stat-grid--5 { grid-template-columns: repeat(5, 1fr); }
.stat-card { display: flex; align-items: center; gap: 1rem; background: var(--color-bg-admin); border-radius: var(--radius); padding: 1.25rem 1.5rem; border: 1px solid var(--color-border); box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.stat-card__icon { font-size: 1.75rem; width: 3rem; height: 3rem; border-radius: .75rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-card--orange .stat-card__icon { background: #fff4ed; }
.stat-card--green  .stat-card__icon { background: #f0fdf4; }
.stat-card--blue   .stat-card__icon { background: #eff6ff; }
.stat-card--purple .stat-card__icon { background: #faf5ff; }
.stat-card--teal   .stat-card__icon { background: #f0fdfa; }
.stat-card__body { min-width: 0; }
.stat-card__value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; color: var(--color-text); white-space: nowrap; }
.stat-card--orange .stat-card__value { color: var(--color-primary); }
.stat-card--green  .stat-card__value { color: #16a34a; }
.stat-card--blue   .stat-card__value { color: #2563eb; }
.stat-card--purple .stat-card__value { color: #7c3aed; }
.stat-card--teal   .stat-card__value { color: #0d9488; }
.stat-card__label { font-size: .8rem; color: var(--color-muted); margin-top: .15rem; }
.stat-card__context { font-size: .75rem; color: var(--color-muted); margin-top: .25rem; opacity: .75; }
.stat-card__context a { color: var(--color-primary); text-decoration: none; }
.stat-card__context a:hover { text-decoration: underline; }

/* Dashboard Filter-Tabs */
.dash-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; }
.dash-tab { padding: .35rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 500; color: var(--color-muted); background: var(--color-bg-admin); border: 1px solid var(--color-border); text-decoration: none; transition: background .15s, color .15s; }
.dash-tab:hover { background: var(--color-border); color: var(--color-text); }
.dash-tab--active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.dash-filter-label { font-size: .85rem; color: var(--color-muted); margin: -.5rem 0 1rem; }

/* Dashboard Sektionen */
.dash-section { margin-bottom: 2rem; }
.dash-section__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.dash-section__title { font-size: 1.05rem; font-weight: 600; margin: 0; }
.dash-section__sub { font-size: .8rem; font-weight: 400; color: var(--color-muted); margin-left: .35rem; }

/* Badges */
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 500; }
.badge--confirmed   { background: #dcfce7; color: #166534; }
.badge--provisional { background: #fef9c3; color: #854d0e; }

/* Leerer Zustand */
.empty-state-card { text-align: center; padding: 2rem; background: var(--color-bg-admin); border-radius: var(--radius); border: 1px dashed var(--color-border); color: var(--color-muted); }
.empty-state-card__icon { font-size: 2rem; margin-bottom: .5rem; }

/* btn--sm */
.btn--sm { padding: .35rem .75rem; font-size: .8rem; }

/* Legacy (noch genutzt in anderen Bereichen) */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.dashboard-card { background: var(--color-bg-admin); padding: 1.25rem; border-radius: var(--radius); text-align: center; }
.dashboard-card h2 { font-size: 1rem; margin-bottom: .5rem; color: var(--color-muted); }
.dashboard-stat { font-size: 2.5rem; font-weight: 700; color: var(--color-primary); margin-bottom: .75rem; }
.unit-list { list-style: none; padding: 0; }
.unit-list li { padding: .4rem 0; border-bottom: 1px solid var(--color-border); }

/* ====== Kalender (öffentlich) ====== */
.calendar-wrap      { max-width: 700px; margin: 2rem auto; padding: 1.5rem; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.calendar-unit-name { font-size: 1.3rem; font-weight: 700; margin-bottom: .25rem; }
.calendar-unit-desc { font-weight: 400; color: var(--color-muted); }
.calendar-nav       { display: flex; align-items: center; justify-content: space-between; margin: 1rem 0; }
.calendar-month-title { font-size: 1.15rem; font-weight: 600; }
.calendar-legend    { display: flex; gap: 1rem; margin-bottom: .75rem; font-size: .85rem; }
.legend-item        { display: flex; align-items: center; gap: .4rem; }
.legend-item::before { content: ''; width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.legend-item--free::before   { background: var(--color-free); border: 1px solid #86efac; }
.legend-item--booked::before { background: var(--color-booked); border: 1px solid #ef4444; }
.calendar-grid      { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.calendar-weekday   { text-align: center; font-size: .75rem; font-weight: 600; color: var(--color-muted); padding: .3rem 0; }
.calendar-day       { border-radius: 4px; min-height: 50px; padding: .3rem; font-size: .85rem; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.calendar-day--empty  { background: transparent; }
.calendar-day--free   { background: var(--color-free); }
.calendar-day--booked { background: var(--color-booked); color: #7f1d1d; }
.calendar-day-num   { font-weight: 600; }
.calendar-day-label { font-size: .65rem; color: var(--color-danger); margin-top: .15rem; }
.calendar-ics-link  { margin-top: 1rem; font-size: .85rem; color: var(--color-muted); text-align: center; }

/* ====== Kalender — Embed-Modus (Iframe) ====== */
body.body--embed { margin: 0; }
.calendar-wrap--embed {
    max-width: 100%;
    margin: 0;
    padding: .75rem;
    border-radius: 0;
    box-shadow: none;
}

@media (max-width: 380px) {
    .calendar-wrap--embed .calendar-nav       { flex-wrap: wrap; gap: .5rem; }
    .calendar-wrap--embed .calendar-legend    { font-size: .75rem; gap: .5rem; }
    .calendar-wrap--embed .calendar-day-label { display: none; }
}

.embed-footer { padding: 8px 12px; text-align: center; border-top: 1px solid var(--color-border); }
.embed-footer__link { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--color-muted); text-decoration: none; }
.embed-footer__link:hover { color: var(--color-primary); }
.embed-footer__logo { display: block; opacity: .85; }

/* ====== Hilfklassen ====== */
.empty-state { color: var(--color-muted); padding: 2rem 0; text-align: center; font-size: .9rem; }

/* ====== Responsive — Mobile first ====== */

/* Tablet & kleiner: Sidebar als Overlay */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar--open { transform: translateX(0); box-shadow: var(--shadow-md); }
    .sidebar-close { display: block; }
    .admin-wrapper { margin-left: 0; }
    .hamburger { display: flex; }
    .topbar-logout { display: inline; }
    .admin-topbar { padding: 0 1rem; }
    .admin-main { padding: 1rem; }
}

/* Smartphone */
@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
    .form-actions { flex-wrap: wrap; }
    .section-header { flex-direction: column; align-items: flex-start; }
    .section-header .btn { align-self: flex-start; }
    .admin-section { padding: 1rem; border-radius: var(--radius); }
    .admin-main { padding: .75rem; }
    .data-table { font-size: .8rem; min-width: 480px; }
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .stat-grid, .stat-grid--5 { grid-template-columns: 1fr 1fr; }
    .year-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
    .month-block { padding: .5rem; }
    .day-cell { min-height: 32px; }
    .cal-toolbar { flex-direction: column; align-items: stretch; gap: .5rem; }
    .cal-toolbar__right { flex-wrap: wrap; }
    .price-edit-panel { left: .75rem; right: .75rem; transform: none; width: auto; }
    .ics-export-url { flex-direction: column; }
    .btn { min-height: 42px; font-size: .875rem; }
    .btn--small { min-height: 34px; }
}

/* ====== Formulare — Erweiterungen ====== */
.form-fieldset { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.form-fieldset legend { padding: 0 .5rem; font-weight: 600; font-size: .9rem; }
.input-addon { display: flex; gap: .4rem; }
.input-addon input { flex: 1; }
.input-addon__select { width: auto; flex-shrink: 0; }
.checkbox-group { display: flex; flex-direction: column; gap: .4rem; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; font-size: .9rem; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: auto; }

/* ====== Preistabelle im Buchungsformular ====== */
.price-preview { background: var(--color-bg-admin); border-radius: var(--radius); padding: 1rem; margin: .75rem 0; }
.price-preview h3 { font-size: .95rem; margin-bottom: .5rem; }
.price-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.price-table td { padding: .25rem .5rem; }
.price-table td:last-child { text-align: right; }
.price-discount td { color: var(--color-success); }
.price-total { border-top: 1px solid var(--color-border); }

/* ====== ICS Export Box ====== */
.ics-export-box { margin-top: 1.5rem; padding: 1rem; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: var(--radius); }
.ics-export-box h3 { font-size: 1rem; margin-bottom: .5rem; color: #2563EB; }
.ics-export-url { display: flex; gap: .5rem; margin: .5rem 0; }
.ics-export-url input,
.ics-export-url textarea { font-family: monospace; font-size: .8rem; flex: 1; background: #fff; resize: vertical; }
.ics-export-hint { font-size: .8rem; color: var(--color-muted); }

/* ====== Kalender Toolbar ====== */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: .5rem; }
.cal-toolbar__center { display: flex; align-items: center; gap: .5rem; }
.cal-toolbar__right  { display: flex; gap: .4rem; flex-wrap: wrap; }
.cal-year-label { font-size: 1.1rem; font-weight: 700; min-width: 80px; text-align: center; }
.unit-selector { padding: .4rem .6rem; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: .9rem; }

/* ====== Legende ====== */
.cal-legend { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; font-size: .8rem; }
.legend-chip { padding: .2rem .6rem; border-radius: 20px; font-size: .75rem; font-weight: 500; }
.legend-chip--booked       { background: #fca5a5; color: #7f1d1d; }
.legend-chip--provisional  { background: repeating-linear-gradient(45deg,#fed7aa,#fed7aa 4px,#fff7ed 4px,#fff7ed 8px); color: #92400e; border: 1px solid #fdba74; }
.legend-chip--buffer  { background: repeating-linear-gradient(45deg, #fce7f3, #fce7f3 4px, #fff 4px, #fff 8px); color: #9d174d; border: 1px solid #f9a8d4; }
.legend-chip--blocked { background: #dbeafe; color: #1d4ed8; }
.legend-chip--price   { background: #fed7aa; color: #92400e; border: 1px solid #fb923c; }
.legend-chip--free    { background: #dcfce7; color: #15803d; }

/* ====== Jahreskalender ====== */
.cal-year-section { max-width: 100%; overflow-x: auto; }
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; margin-bottom: 1.5rem; }
.month-block { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); padding: .75rem; }
.month-title { font-weight: 600; font-size: .85rem; text-align: center; margin-bottom: .5rem; color: var(--color-primary); }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.day-header { text-align: center; font-size: .65rem; font-weight: 600; color: var(--color-muted); padding: .2rem 0; }
.day-cell { border-radius: 3px; padding: .15rem .1rem; min-height: 42px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; transition: opacity .15s; position: relative; }
.day-cell:hover { opacity: .8; }
.day-cell--empty { background: transparent; cursor: default; }
.day-cell--free        { background: #dcfce7; }
.day-cell--booked      { background: #fca5a5; }
.day-cell--provisional { background: repeating-linear-gradient(45deg,#fed7aa,#fed7aa 4px,#fff7ed 4px,#fff7ed 8px); }
.day-cell--buffer      { background: repeating-linear-gradient(45deg,#fce7f3,#fce7f3 4px,#fff 4px,#fff 8px); }
.day-cell--blocked { background: #dbeafe; }
.day-cell--price   { background: #fed7aa; border: 1px solid #fb923c; }
.day-cell--today   { outline: 2px solid var(--color-primary); outline-offset: -1px; }
.day-cell--selecting { outline: 2px solid #f59e0b; background: #fef3c7 !important; }
.day-num     { font-size: .7rem; font-weight: 700; line-height: 1; }
.day-price   { font-size: .55rem; color: var(--color-muted); line-height: 1; }
.day-warning { font-size: .65rem; line-height: 1; color: #b45309; }

/* ====== Preiseingabe Panel ====== */
.price-edit-panel { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: #fff; border: 2px solid #1d4ed8; border-radius: var(--radius); box-shadow: 0 4px 24px rgba(0,0,0,.2); padding: .75rem 1.25rem; display: flex; align-items: center; gap: .75rem; z-index: 100; flex-wrap: wrap; }
.price-edit-panel form { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.price-edit-panel input[type="number"] { width: 100px; }
.pp-date { font-weight: 700; font-size: .95rem; color: #1d4ed8; white-space: nowrap; }
.pp-label-txt { font-size: .85rem; color: var(--color-muted); }

/* ====== Timeline / Channel Manager ====== */
.cm-section { overflow-x: auto; }
.cm-grid { display: grid; grid-template-columns: 160px repeat(var(--cm-days), minmax(28px, 1fr)); gap: 2px; min-width: 700px; }
.cm-header-unit { font-size: .75rem; font-weight: 600; color: var(--color-muted); padding: .3rem .4rem; }
.cm-header-day  { text-align: center; font-size: .7rem; font-weight: 600; color: var(--color-muted); padding: .3rem 0; }
.cm-unit-label  { font-size: .8rem; padding: .3rem .4rem; display: flex; align-items: center; border-right: 2px solid var(--color-border); }
.cm-unit-label a { color: var(--color-text); }
.cm-cell { min-height: 34px; border-radius: 2px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: opacity .15s; }
.cm-cell:hover { opacity: .75; }
.cm-cell--free        { background: #dcfce7; }
.cm-cell--booked      { background: #fee2e2; }
.cm-cell--provisional { background: repeating-linear-gradient(45deg,#fed7aa,#fed7aa 4px,#fff7ed 4px,#fff7ed 8px); }
.cm-cell--buffer      { background: repeating-linear-gradient(45deg,#fce7f3,#fce7f3 4px,#fff 4px,#fff 8px); }
.cm-cell--blocked { background: #dbeafe; }
.cm-guest { font-size: .6rem; color: #991b1b; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 95%; }
.cm-warn  { font-size: .65rem; color: #b45309; line-height: 1; }
.cm-today { outline: 2px solid var(--color-primary); outline-offset: -1px; }
.cm-weekend { background: var(--color-bg-admin); }

/* ====== Rollen-Badges & Status ====== */
.role-badge          { display:inline-block; padding:.2rem .6rem; border-radius:20px; font-size:.75rem; font-weight:600; }
.role-badge--admin   { background:#eff6ff; color:#2563EB; }
.role-badge--editor  { background:#dcfce7; color:#15803d; }
.badge-ok            { display:inline-block; padding:.15rem .5rem; border-radius:20px; font-size:.75rem; background:#dcfce7; color:#15803d; }
.badge-danger        { display:inline-block; padding:.15rem .5rem; border-radius:20px; font-size:.75rem; background:#fee2e2; color:#991b1b; }
.badge               { display:inline-block; padding:.15rem .5rem; border-radius:20px; font-size:.75rem; font-weight:500; }
.badge--confirmed    { background:#dcfce7; color:#15803d; }
.badge--provisional  { background:repeating-linear-gradient(45deg,#fed7aa,#fed7aa 4px,#fff7ed 4px,#fff7ed 8px); color:#92400e; border:1px solid #fdba74; }
.radio-group         { display:flex; gap:1.25rem; align-items:center; flex-wrap:wrap; }
.radio-label         { display:flex; align-items:center; gap:.5rem; cursor:pointer; }
.unit-checkbox-grid  { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:.5rem; margin-bottom:.5rem; }
.form-hint           { font-size:.8rem; color:var(--color-muted); margin-top:.25rem; }

/* ====== Sortierbare Tabelle ====== */
.sort-link       { color: var(--color-muted); text-decoration: none; white-space: nowrap; font-weight: 600; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.sort-link:hover { color: var(--color-primary); text-decoration: none; }
.sort-link.sort-active { color: var(--color-primary); }
.sort-hint       { font-size: .8rem; font-weight: 400; color: var(--color-muted); margin-left: .5rem; }
.sort-reset      { font-size: .75rem; color: var(--color-danger); margin-left: .25rem; }
.sort-reset:hover { text-decoration: none; opacity: .8; }
.group-header td { background: var(--color-bg-admin); font-weight: 700; font-size: .85rem; color: var(--color-primary); padding: .4rem .75rem; border-top: 2px solid var(--color-border); }
.col-nights      { text-align: center; width: 60px; }

/* ====== Responsive Kalender ====== */
@media (max-width: 900px) {
    .year-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .cal-toolbar { flex-direction: column; align-items: flex-start; }
}

/* ====== Public / Landing Pages ====== */
.pub-body { background: #fff; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }

/* --- Shared Public Header --- */
.pub-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}
.pub-nav {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; gap: 2rem;
}
.pub-logo img { height: 30px; display: block; }
.pub-nav-links { display: flex; align-items: center; gap: 1.5rem; }
.pub-nav-links a:not(.btn) { color: var(--color-text); font-size: .9rem; font-weight: 500; }
.pub-nav-links a:not(.btn):hover { color: var(--color-primary); text-decoration: none; }

/* --- Shared Public Footer --- */
.pub-footer { background: var(--sidebar-bg); padding: 2.5rem 0; }
.pub-footer-inner {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1rem;
}
.pub-footer-logo { height: 26px; filter: brightness(0) invert(1) opacity(.55); }
.pub-footer-links { display: flex; gap: 1.5rem; }
.pub-footer-links a { color: #64748b; font-size: .875rem; }
.pub-footer-links a:hover { color: #94a3b8; text-decoration: none; }
.pub-footer-copy { color: #475569; font-size: .875rem; }

/* --- Hero --- */
.landing-hero {
    background: linear-gradient(140deg, #0D1B3D 0%, #13224a 55%, #1b2e63 100%);
    padding: 6rem 0 5rem;
}
.hero-inner {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.hero-text h1 {
    font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 800; line-height: 1.15;
    margin-bottom: 1.25rem; color: #fff;
}
.hero-text h1 em { font-style: normal; color: var(--color-primary); }
.hero-text p { font-size: 1.05rem; color: #94a3b8; margin-bottom: 2rem; line-height: 1.8; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn--lg { padding: .8rem 2rem; font-size: 1rem; min-height: 46px; }
.btn--ghost {
    background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.3);
}
.btn--ghost:hover { background: rgba(255,255,255,.08); opacity: 1; }

/* App-Mockup im Hero */
.app-mockup {
    background: #fff; border-radius: 14px;
    box-shadow: 0 32px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06);
    overflow: hidden;
    transform: perspective(900px) rotateY(-5deg) rotateX(2deg);
    transition: transform .4s ease;
}
.app-mockup:hover { transform: perspective(900px) rotateY(-1deg) rotateX(0); }
.mock-chrome {
    background: var(--sidebar-bg); padding: .5rem .8rem;
    display: flex; align-items: center; gap: .4rem;
}
.mock-dot { width: 10px; height: 10px; border-radius: 50%; }
.mock-dot-r { background: #ff5f57; }
.mock-dot-y { background: #febc2e; }
.mock-dot-g { background: #28c840; }
.mock-topbar {
    background: var(--color-bg-admin); padding: .55rem 1rem;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--color-border);
}
.mock-topbar-title { font-weight: 700; font-size: .82rem; color: var(--color-text); }
.mock-new { background: var(--color-primary); color: #fff; padding: .2rem .6rem; border-radius: 5px; font-size: .7rem; font-weight: 600; }
.mock-thead, .mock-row {
    display: grid; grid-template-columns: 1.4fr .85fr .85fr .7fr;
    padding: .4rem .9rem; gap: .4rem; align-items: center;
}
.mock-thead { border-bottom: 1px solid var(--color-border); }
.mock-thead span { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--color-muted); }
.mock-row span { font-size: .76rem; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-row:nth-child(even) { background: var(--color-bg); }
.mock-ok   { display:inline-block; padding:.1rem .45rem; border-radius:4px; font-size:.65rem; font-weight:700; background:#dcfce7; color:#15803d; }
.mock-prov { display:inline-block; padding:.1rem .45rem; border-radius:4px; font-size:.65rem; font-weight:700; background:#fef9c3; color:#854d0e; }

/* --- Feature-Sektion --- */
.landing-features { padding: 5.5rem 0; background: var(--color-bg); }
.section-label { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--color-primary); margin-bottom: .6rem; }
.section-title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; color: var(--color-text); margin-bottom: .75rem; }
.section-sub { font-size: 1rem; color: var(--color-muted); margin-bottom: 3rem; max-width: 540px; line-height: 1.75; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feat-card {
    background: #fff; border-radius: var(--radius-lg); padding: 1.75rem;
    border: 1px solid var(--color-border); box-shadow: var(--shadow);
    transition: box-shadow .2s, transform .2s;
}
.feat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.feat-icon {
    width: 46px; height: 46px; background: #eff6ff; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;
    color: var(--color-primary);
}
.feat-icon svg { width: 22px; height: 22px; }
.feat-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: .4rem; color: var(--color-text); }
.feat-card p { font-size: .875rem; color: var(--color-muted); line-height: 1.7; }

/* --- So funktioniert's --- */
.landing-steps { padding: 5.5rem 0; background: #fff; }
.steps-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem;
    margin-top: 3rem; position: relative;
}
.steps-grid::before {
    content: ''; position: absolute; top: 28px; left: calc(16.66% + 28px);
    right: calc(16.66% + 28px); height: 2px;
    background: linear-gradient(90deg, var(--color-primary), #2563EB88);
    pointer-events: none;
}
.step { text-align: center; padding: 0 .5rem; }
.step-num {
    width: 56px; height: 56px; background: var(--color-primary); color: #fff;
    border-radius: 50%; font-size: 1.35rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.25rem; box-shadow: 0 8px 20px rgba(37,99,235,.35);
    position: relative; z-index: 1;
}
.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; color: var(--color-text); }
.step p { font-size: .9rem; color: var(--color-muted); line-height: 1.7; }

/* --- CTA-Banner --- */
.landing-cta-banner { background: var(--color-primary); padding: 5rem 0; text-align: center; }
.landing-cta-banner h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; color: #fff; margin-bottom: .75rem; }
.landing-cta-banner p { color: rgba(255,255,255,.8); margin-bottom: 2rem; font-size: 1.05rem; }
.btn--white { background: #fff; color: var(--color-primary); border-color: #fff; font-weight: 700; }
.btn--white:hover { background: #f5f5f5; opacity: 1; }

/* --- Legal Pages (Impressum / Datenschutz) --- */
.legal-body { background: var(--color-bg); }
.legal-main { max-width: 780px; margin: 0 auto; padding: 3.5rem 1.5rem 6rem; }
.legal-main h1 { font-size: 1.9rem; font-weight: 800; margin-bottom: .4rem; color: var(--color-text); }
.legal-updated { color: var(--color-muted); font-size: .875rem; margin-bottom: 3rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--color-border); }
.legal-main h2 { font-size: 1.1rem; font-weight: 700; margin: 2.25rem 0 .65rem; color: var(--color-text); }
.legal-main p, .legal-main li { color: var(--color-muted); line-height: 1.85; margin-bottom: .75rem; font-size: .9375rem; }
.legal-main ul { padding-left: 1.5rem; margin-bottom: .75rem; }
.legal-main a { color: var(--color-primary); }
.legal-main address { font-style: normal; color: var(--color-muted); line-height: 2; }

/* --- Registrierungs-Seite --- */
.register-main {
    display: flex; align-items: flex-start; justify-content: center;
    min-height: calc(100vh - 64px); padding: 3rem 1rem 4rem; background: var(--color-bg);
}
.register-box {
    background: #fff; border-radius: var(--radius-lg); padding: 2.5rem;
    box-shadow: var(--shadow-md); width: 100%; max-width: 620px;
}
.register-logo { text-align: center; margin-bottom: 1.25rem; }
.register-box h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: .25rem; text-align: center; }
.register-sub { text-align: center; color: var(--color-muted); font-size: .875rem; margin-bottom: 1.75rem; }

/* --- Preise-Seite --- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; max-width: 1080px; margin-left: auto; margin-right: auto; }
.price-card {
    background: #fff; border-radius: var(--radius-lg); padding: 2rem;
    border: 1px solid var(--color-border); box-shadow: var(--shadow);
    position: relative; display: flex; flex-direction: column; gap: 1.5rem;
    transition: box-shadow .2s, transform .2s;
}
.price-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.price-card--featured {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary), var(--shadow-md);
}
.price-card-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--color-primary); color: #fff; padding: .2rem .85rem;
    border-radius: 20px; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.price-plan-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--color-primary); margin-bottom: .5rem; }
.price-amount { display: flex; align-items: baseline; gap: .3rem; margin-bottom: .25rem; }
.price-value { font-size: 2.5rem; font-weight: 800; color: var(--color-text); }
.price-period { font-size: .9rem; color: var(--color-muted); }
.price-tagline { font-size: .875rem; color: var(--color-muted); }
.price-features { list-style: none; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.price-feature { font-size: .9rem; color: var(--color-text); display: flex; gap: .6rem; align-items: flex-start; }
.pf-check { color: var(--color-success); font-weight: 700; flex-shrink: 0; }
.price-annual-note { font-size: .8rem; color: var(--color-muted); text-align: center; }

/* FAQ */
.faq-item { margin-bottom: 1.75rem; padding-bottom: 1.75rem; border-bottom: 1px solid var(--color-border); }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; color: var(--color-text); }
.faq-item p { color: var(--color-muted); line-height: 1.75; font-size: .9375rem; }

/* --- Trial-Banner im Admin --- */
.trial-banner {
    display: flex; align-items: center; justify-content: center; gap: 1rem;
    padding: .65rem 1.5rem; background: #eff6ff; color: #2563EB;
    font-size: .875rem; border-bottom: 1px solid #bfdbfe;
}
.trial-banner--urgent { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.trial-banner-link { font-weight: 700; color: inherit; text-decoration: underline; white-space: nowrap; }
.trial-banner-link:hover { opacity: .8; }

/* --- Responsive Landing --- */
@media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; }
    .app-mockup { display: none; }
    .features-grid { grid-template-columns: 1fr 1fr; }
    .steps-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
    .steps-grid::before { display: none; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 600px) {
    .features-grid { grid-template-columns: 1fr; }
    .pub-footer-inner { flex-direction: column; text-align: center; }
    .pub-footer-links { justify-content: center; }
    .landing-hero { padding: 4rem 0 3rem; }
    .landing-features, .landing-steps { padding: 4rem 0; }
    .landing-cta-banner { padding: 3.5rem 0; }
    .pub-nav-links a:not(.btn) { display: none; }
    .register-box { padding: 1.5rem; }
    .form-row { grid-template-columns: 1fr; }
}
