/* ── Preise: Flash & Sync ──────────────────────────────────────────────────── */
.flash-inline { margin-bottom: .75rem; }

.preisliste {
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.sync-last { font-size: .85rem; color: var(--sidebar-section); margin: 0 0 .75rem; }
.sync-never { color: var(--muted-light); font-style: italic; }

/* ── Preise: Tabellen-Zellen ──────────────────────────────────────────────── */
.tbl td.cell-name   { font-weight: 600; white-space: nowrap; }
.tbl td.cell-meta   { font-size: 0.9rem; white-space: nowrap; }
.tbl td.cell-center { text-align: center; }
.del-form { display: inline; }

/* ── Preisliste: Card-Layout ─────────────────────────────────────────────── */
.saison-cards {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.saison-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .6rem 1rem;
    flex-wrap: wrap;
}
.saison-card-head { display: flex; align-items: center; gap: .6rem; min-width: 120px; flex: 0 0 120px; overflow: hidden; padding-left: .5rem; }
.saison-card-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saison-card-meta {
    display: flex;
    gap: 1rem;
    font-size: .85rem;
    color: var(--muted);
    white-space: nowrap;
    min-width: 180px;
    flex: 0 0 180px;
}
.saison-card-meta .ti { margin-right: .25rem; }
.saison-card-foot {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: auto;
    position: relative;
}
.saison-card-foot .input-addon { width: 110px; flex-shrink: 0; }
.saison-card-foot .js-del-open { margin-left: 1rem; }
.preis-toast {
    position: fixed;
    z-index: 9999;
    background: #16a34a;
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    padding: .25rem .6rem;
    border-radius: 6px;
    pointer-events: none;
    opacity: 1;
    transition: opacity .3s ease;
    transform: translateY(-4px);
}
.preis-toast--out { opacity: 0; }
.saison-card-foot .input-addon input { width: 70px; }
.saison-card-minnights { display: flex; flex-direction: column; gap: .1rem; min-width: 80px; flex-shrink: 0; margin: 0 10px; }
@media (max-width: 640px) { .saison-card-minnights { margin: 0; } }
.saison-card-minnights-label { font-size: .72rem; color: var(--muted); }
.saison-card-minnights-val { font-size: .9rem; font-weight: 600; color: var(--body-text); }
.sync-preview-prices { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.sync-preview-price { display: flex; flex-direction: column; gap: .1rem; }
.sync-preview-price small { font-weight: 400; color: var(--muted); font-size: .75rem; }
.sync-preview-price--base .saison-card-minnights-val { font-weight: 800; font-size: 1.05rem; }
.btn-label-desktop { margin-left: .35rem; }
.btn-icon-left { margin-right: .35rem; }
@media (max-width: 640px) {
    .saison-card { flex-direction: column; align-items: stretch; }
    .saison-card-head { min-width: 0; flex: none; }
    .saison-card-meta { min-width: 0; flex: none; }
    .saison-card-foot { margin-left: 0; flex-wrap: wrap; }
    .btn-label-desktop { display: none; }
}

/* ── Preise: View-Toggle ──────────────────────────────────────────────────── */
.view-toggle {
    position: relative;
    display: flex;
    gap: 0;
    margin: -18px -20px 1.4rem -55px;
    border-bottom: 2px solid var(--border);
    background: #ffffff;
    border-radius: 0;
    max-width: unset;
}
.vt-tab {
    padding: 1.1rem 1.6rem;
}
.view-toggle .vt-tab:first-child {
    padding-left: 55px;
    min-width: 100px;
    text-align: center;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    transition: color .15s;
}
.vt-tab:hover { color: var(--body-text); text-decoration: none; }
.vt-tab--active { color: var(--accent); }
.vt-typ-select { display: flex; align-items: center; padding: 0 .5rem; }
.vt-indicator {
    position: absolute;
    bottom: -2px;
    height: 2px;
    background: var(--accent);
    transition: left .22s ease, width .22s ease;
    pointer-events: none;
}

/* ── Preise: Nav & Jahr-Selector ──────────────────────────────────────────── */
.kal-nav {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.5rem;
}
.kal-nav .kal-new-btn { margin-left: 1rem; }
.kal-nav #kal-prev i,
.kal-nav #kal-next i,
.kal-nav .btn:not(.kal-new-btn) i { font-size: 1.1rem; }
.kal-nav #kal-year {
    font-size: 1rem;
    font-weight: 700;
    min-width: 60px;
    text-align: center;
}
.ch-year-select {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .25rem .5rem;
    background: #fff;
    cursor: pointer;
    min-width: 14ch;
}

/* ── Kalender: Monats-Grid ────────────────────────────────────────────────── */
#kal-months {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .65rem;
    margin-bottom: 1.5rem;
}
.kal-month {
    background: #fff;
    border-radius: 10px;
    padding: .7rem;
    box-shadow: var(--shadow-card);
}
.kal-month-name {
    font-weight: normal;
    font-size: 1rem;
    margin-bottom: .5rem;
    color: #0f172a;
    text-align: center;
}
.kal-week-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}
.kal-wlabel {
    color: var(--muted-light);
    text-align: center;
    padding-bottom: 3px;
    font-weight: 600;
}
.kal-days-grid { margin-top: 3px; }
#kal-months { user-select: none; }
.kal-empty { height: 38px; }

/* ── Kalender: Tag-Zelle ──────────────────────────────────────────────────── */
.kal-day {
    height: 38px;
    min-width: 46px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding-right: .35rem;
    gap: 1px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    user-select: none;
    line-height: 1.1;
    position: relative;
    overflow: hidden;
}
.kal-day.has-season::before {
    content: '';
    position: absolute;
    left: .35rem;
    top: .35rem;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--kat-color, transparent);
}
.kal-day:not(.has-season) {
    background: repeating-linear-gradient(
        135deg,
        #f1f5f9,
        #f1f5f9 2px,
        #e9edf2 2px,
        #e9edf2 6px
    );
}
.kal-day:not(.has-season) { align-items: center; justify-content: center; padding-right: 0; }
.kal-day:not(.has-season) .kal-d { color: #a3adb8; font-size: 0.9rem; text-align: center; }
.kal-day:not(.has-season):hover  { background: #e2e8f0; }
.kal-d { font-size: .7rem; color: #94a3b8; line-height: 1; }
.kal-p { font-size: .8rem; color: var(--text); font-weight: 500; line-height: 1; padding-top: 2px; }
.kal-min { font-size: .78rem; color: var(--muted); }
.kal-day.has-season .kal-min { color: var(--muted); }
.kal-day.has-season          { background: none; border-radius: 6px; }
.kal-day.has-season .kal-d   { color: #c2cdda; }
.kal-day.selected            { background: #bfdbfe !important; border-radius: 0; }
.kal-day.selected .kal-d     { color: #3c3e47; }

/* ── Kalender-Modal / Side-Panel ─────────────────────────────────────────── */
.kal-modal {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kal-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .45);
}
.kal-modal-box {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    width: 100%;
    max-width: 440px;
    padding: 1.75rem;
}
.kal-modal-box--sm { max-width: 420px; }
.kal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    font-weight: 600;
    font-size: 1rem;
}
.kal-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
    padding: 0 .25rem;
}
.kal-modal-close:hover { color: var(--body-text); }
.kal-modal-footer { display: flex; gap: .5rem; margin-top: 2rem; }
.kal-form-field { margin-bottom: 1.1rem; }
.kal-form-row { margin-bottom: 1.1rem; gap: 1rem; flex-wrap: nowrap; }
.kal-form-field--half { flex: 1; min-width: 0; }
.kal-anreisetage { display: flex; gap: .5rem; flex-wrap: wrap; }
.kal-anreisetag { display: flex; align-items: center; gap: .3rem; font-size: .85rem; font-weight: 500; cursor: pointer; }

.kal-bulk-form {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}
.kal-bulk-form h3 { margin: 0 0 1rem; font-size: 1rem; }

/* ── Löschen-Modal ────────────────────────────────────────────────────────── */
.del-modal-text { margin: 0 0 1.25rem; color: var(--muted); font-size: .95rem; padding: 0 1.5rem; }
#del-modal-confirm { padding-left: 1.75rem; padding-right: 1.75rem; margin-right: 1rem; }

/* ── Season-Tooltip ───────────────────────────────────────────────────────── */
.season-tooltip {
    position: absolute;
    z-index: 1000;
    background: #1e293b;
    color: #f1f5f9;
    border-radius: 8px;
    padding: .5rem .75rem;
    font-size: .8rem;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    min-width: 120px;
}
.season-tooltip.hidden { display: none; }
.season-tooltip-name { font-weight: 700; margin-bottom: .25rem; }
.season-tooltip-row { display: flex; align-items: center; gap: .35rem; line-height: 1.7; }
.season-tooltip-row .ti { font-size: .85rem; opacity: .75; }

/* ── Preise: Aktionen & Buttons ──────────────────────────────────────────── */
.page-nav-meta { font-size: .8rem; color: var(--muted); margin: 0 1.5rem; line-height: 1.3; }
.page-nav-meta.sync-never { color: #f59e0b; }
.page-nav-meta.sync-pending { color: #f59e0b; max-width: 120px; }
.preis-actions-cell { display: flex; gap: .35rem; align-items: center; }
.preis-spanne { font-weight: 700; font-size: 1.05rem; }
.btn-disabled { opacity: .35; pointer-events: none; }
.js-preis-save,
.js-preis-undo { visibility: hidden; }
.js-preis-save.visible,
.js-preis-undo.visible { visibility: visible; }
.icon-md { font-size: 1rem; margin-right: .5rem; }

/* ── Kalender Side-Panel (Desktop) ───────────────────────────────────────── */
.kal-layout {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}
.kal-layout #kal-months {
    flex: 1;
    min-width: 0;
}
.kal-side-panel {
    width: 320px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.10);
    position: sticky;
    top: 1rem;
}
.kal-side-panel.hidden { display: none; }

@media (max-width: 899px) {
    .kal-layout { display: block; }
    .kal-side-panel { display: none !important; }
}

/* ── Channels-Grid ────────────────────────────────────────────────────────── */
.ch-all-wrap {
    overflow-x: auto;
    margin-left: -55px;
    margin-right: -20px;
    padding-left: 55px;
    padding-right: 20px;
    width: calc(100% + 55px + 20px);
}
.ch-all-wrap .ch-grid-wrap {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 2rem;
    overflow-x: visible;
    width: max-content;
    min-width: 100%;
}
.ch-all-wrap .ch-grid {
    width: 100%;
}
.ch-typ-name { margin: 1.5rem 0 .5rem; font-size: 1rem; font-weight: 700; color: #0f172a; position: sticky; left: 0; }
.ch-typ-name:first-child { margin-top: 0; }
.ch-no-kanaele { margin-bottom: 1.5rem; }
.ch-grid-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow-card);
    margin-left: -55px;
    margin-right: -20px;
}
.ch-grid {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
}
.ch-grid th,
.ch-grid td {
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    white-space: nowrap;
    font-size: .88rem;
}
.ch-grid th { background: #f8fafc; font-weight: 600; color: inherit; font-size: .9rem; padding-top: 1rem; padding-bottom: 1rem; }
.ch-grid thead tr:first-child th:first-child { border-radius: 8px 0 0 0; }
.ch-grid thead tr:first-child th:last-child  { border-radius: 0 8px 0 0; }
.ch-grid tbody tr:last-child td:first-child  { border-radius: 0 0 0 8px; }
.ch-grid tbody tr:last-child td:last-child   { border-radius: 0 0 8px 0; }
.ch-grid tbody tr:last-child td { border-bottom: none; }
.ch-grid tbody tr:hover td { background: var(--surface-muted); }
.ch-th-label,
.ch-td-label {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
    min-width: 160px;
    padding: .4rem 1rem .4rem 1rem;
    text-align: left;
    border-right: 2px solid var(--border-input);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.ch-th-label { display: table-cell; vertical-align: middle; background: #f8fafc; padding-right: 2rem; text-align: right; min-width: 160px; width: 160px; max-width: 160px; font-weight: 700; }
.ch-th-icon { width: 2rem; }
.ch-td-icon { width: 2rem; text-align: center; color: var(--muted); font-size: 1.2rem; }
.ch-th-day { text-align: center; width: 2.6rem; min-width: 2.6rem; max-width: 2.6rem; }
.ch-grid th.ch-th-day--we { font-weight: 800; background: #f0f3f6; }
.ch-th-dow { display: block; font-size: .75rem; font-weight: 400; color: var(--muted); line-height: 1; margin-bottom: .1rem; }
.ch-th-day--we .ch-th-dow { color: inherit; }
.ch-th-actions { border-right: none; width: 5rem; }
.ch-td-price { text-align: center; width: 2.6rem; min-width: 2.6rem; max-width: 2.6rem; }
.ch-td-empty { color: var(--muted-light); text-align: center; width: 2.6rem; min-width: 2.6rem; max-width: 2.6rem; }
.ch-kanal-logo { width: 20px; height: 20px; object-fit: contain; border-radius: 3px; flex-shrink: 0; }
.ch-kanal-name { display: block; font-weight: 600; }
.ch-kanal-meta { display: block; font-size: .78rem; color: var(--muted); }
.ch-row-min td { background: var(--bg-subtle, #f8f9fa); color: var(--muted); font-size: .82rem; }
.ch-row-min .ch-td-icon { font-size: 1.2rem; }
.ch-row-base td { background: var(--bg-subtle, #f8f9fa); font-weight: 600; }
.ch-row-base .ch-kanal-name { color: var(--text); }
.ch-row-base .ch-kanal-meta { color: var(--muted); font-weight: 400; }
.ch-row-base .ch-td-icon { font-size: 1.2rem; font-weight: 400; }
.ch-row-bel td { padding: 0; height: 6px; border-bottom: 1px solid var(--border); }
.ch-row-bel .ch-td-label,
.ch-row-bel .ch-td-icon { visibility: hidden; }
.ch-td-bel { width: 2.6rem; min-width: 2.6rem; max-width: 2.6rem; padding: 0 !important; }
.ch-bel-bar { display: block; height: 6px; }
.ch-bel-bar--0 { background-color: #ef4444; }
.ch-bel-bar--1 { background-color: #f97316; }
.ch-bel-bar--2 { background-color: #3b82f6; }
.ch-bel-bar--3 { background-color: #9ca3af; }
.ch-bel-bar--anreise { width: 50%; margin-left: 50%; border-radius: 3px 0 0 3px; }
.ch-bel-bar--abreise { width: 50%; border-radius: 0 3px 3px 0; }
.ch-bel-bar--mitte { border-radius: 0; }
.ch-bel-wechsel { display: flex; gap: 3px; width: 100%; height: 6px; }
.ch-bel-wechsel .ch-bel-bar { flex: 1; margin: 0; border-radius: 0; }
.ch-bel-wechsel .ch-bel-bar--abreise { border-radius: 0 3px 3px 0; }
.ch-bel-wechsel .ch-bel-bar--anreise { border-radius: 3px 0 0 3px; }
.ch-td-actions {
    border-right: none;
    display: flex;
    gap: .15rem;
    align-items: center;
    padding: .3rem .4rem;
}
.ch-kanal-edit-label { display: inline-block; font-weight: 600; padding: .45rem 0; }

/* ── Channel-Verwaltung (/channels) ──────────────────────────────────────── */
.ch-mgmt { margin-bottom: 2rem; }
.ch-mgmt-objekt { margin-bottom: 1.75rem; }
.ch-mgmt-objekt-name {
    font-weight: 700;
    font-size: 1.05rem;
    padding: .5rem 0 .4rem;
    border-bottom: 2px solid var(--border-input);
    margin-bottom: .75rem;
}
.ch-mgmt-typ { margin-bottom: 1.25rem; padding-left: .5rem; }
.ch-mgmt-typ-header { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }
.ch-mgmt-typ-name { font-weight: 600; }
.ch-mgmt-tbl { margin-top: 0; }
.ch-mgmt-leer { margin: .25rem 0 0; color: var(--muted); font-size: .88rem; }
