/* ---------------------------------------------------------
   bookings.css — Buchungsverwaltung (Nayax-Stil)
   Klassen mit bk- präfixiert, ergänzt domain.css / table.css.
--------------------------------------------------------- */

/* ── Page header ──────────────────────────────────────── */
.bk-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.bk-head__text h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.3px;
    border-left: 3px solid var(--brand);
    padding-left: 12px;
    line-height: 1.2;
}
.bk-head__text p {
    font-size: 13px;
    color: var(--text-soft);
    margin-top: 3px;
    padding-left: 15px;
}

/* ── Stats row (6 items) ──────────────────────────────── */
.bk-quick-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

/* ── Status pills — booking-specific variants ─────────── */
/* These extend .pill from domain.css */
.st-current   { background: #ECFDF5; color: #047857; }
.st-current::before   { background: #10B981; }

.st-arriving  { background: #EFF6FF; color: #1D4ED8; }
.st-arriving::before  { background: #3B82F6; }

.st-departing { background: #FFF7ED; color: #B45309; }
.st-departing::before { background: #F59E0B; }

/* pending / upcoming both → amber (same as .st-pending in domain.css) */
.st-upcoming  { background: #FFF7ED; color: #B45309; }
.st-upcoming::before  { background: #F59E0B; }

/* ── Pulse animation dot ──────────────────────────────── */
.bk-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    position: relative;
    flex-shrink: 0;
}
.bk-pulse::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid #10B981;
    opacity: 0;
    animation: bk-pulse-ring 1.8s ease-out infinite;
}
@keyframes bk-pulse-ring {
    0%   { opacity: .55; transform: scale(.7); }
    100% { opacity: 0;   transform: scale(1.9); }
}

/* ── Section headers (used before tile grids) ─────────── */
.bk-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.bk-section-head h2 {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.bk-count-badge {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-soft);
    padding: 2px 9px;
    line-height: 1.4;
}

/* ── Currently-here tiles ─────────────────────────────── */
.bk-live-section {
    margin-bottom: 20px;
}
.bk-live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
}
.bk-live-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid #10B981;
    border-radius: var(--radius);
    padding: 12px 14px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: box-shadow .15s, border-color .15s;
}
.bk-live-tile:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
    border-left-color: #047857;
}
.bk-live-tile__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 4px;
}
.bk-live-tile__apt {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.bk-live-tile__live {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .03em;
    color: #047857;
    background: #ECFDF5;
    border-radius: 4px;
    padding: 1px 6px;
    line-height: 1.6;
    flex-shrink: 0;
}
.bk-live-tile__guest {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.bk-live-tile__dates {
    font-size: 11.5px;
    color: var(--text-soft);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
}
.bk-live-tile__nights {
    margin-left: auto;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 1px 7px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-mute);
    flex-shrink: 0;
}

/* ── Today arrivals + departures ──────────────────────── */
.bk-today-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}
.bk-today-col {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.bk-today-col__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
}
.bk-today-col__head h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.bk-today-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.bk-today-dot--arriving  { background: #3B82F6; }
.bk-today-dot--departing { background: #F59E0B; }

.bk-today-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-soft);
    text-decoration: none;
    color: inherit;
    transition: background .1s;
}
.bk-today-row:last-child { border-bottom: none; }
.bk-today-row:hover { background: var(--bg-soft); }

.bk-today-row__main {
    flex: 1;
    min-width: 0;
}
.bk-today-row__main strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bk-today-row__main small {
    display: block;
    font-size: 11.5px;
    color: var(--text-mute);
    margin-top: 1px;
}
.bk-today-row__meta {
    font-size: 11.5px;
    color: var(--text-soft);
    flex-shrink: 0;
    font-weight: 500;
}

/* ── Filter bar: tabs + search ────────────────────────── */
.bk-filter-bar {
    display: flex;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 0 16px;
    overflow: hidden;
    gap: 0;
    flex-wrap: wrap;
}

.bk-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    min-width: 0;
}
.bk-tabs::-webkit-scrollbar { display: none; }

.bk-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 13px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-soft);
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s;
    text-decoration: none;
    flex-shrink: 0;
}
.bk-tab:hover { color: var(--text); }
.bk-tab.is-active {
    color: var(--text);
    font-weight: 600;
    border-bottom-color: var(--brand);
}
.bk-tab .ct {
    background: var(--bg-soft);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-mute);
    padding: 1px 7px;
    min-width: 18px;
    text-align: center;
    line-height: 1.5;
}
.bk-tab.is-active .ct {
    background: var(--brand-soft);
    border-color: transparent;
    color: var(--brand-deep);
}

.bk-search-wrap {
    display: flex;
    align-items: center;
    padding: 8px 0 8px 12px;
    flex-shrink: 0;
    border-left: 1px solid var(--border-soft);
    margin-left: 12px;
}
.bk-search-label {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    padding: 6px 12px;
    color: var(--text-mute);
    cursor: text;
    transition: border-color .15s;
}
.bk-search-label:focus-within {
    border-color: var(--brand);
    color: var(--text-soft);
}
.bk-search-label input {
    background: none;
    border: none;
    outline: none;
    font-size: 12.5px;
    color: var(--text);
    font-family: inherit;
    width: 170px;
}
.bk-search-label input::placeholder { color: var(--text-mute); }

/* ── Table wrapper (round bottom corners only) ────────── */
.bk-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    overflow-x: auto;
}

/* Guest cell: name + email stacked */
.bk-guest strong {
    display: block;
    font-weight: 600;
    color: var(--text);
}
.bk-guest small {
    display: block;
    font-size: 11.5px;
    color: var(--text-mute);
    margin-top: 1px;
}

/* Date column */
.bk-dates {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}
.bk-dates small {
    color: var(--text-mute);
    font-size: 11.5px;
    margin-left: 2px;
}
.bk-arrow { color: var(--text-mute); }

/* Door code */
.bk-code {
    font-family: 'Outfit', ui-monospace, monospace;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .08em;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 2px 7px;
    color: var(--text);
}
.bk-dash { color: var(--text-mute); }

/* Total amount cell */
.bk-amount {
    font-weight: 700;
    color: var(--text);
    font-size: 13px;
    white-space: nowrap;
}

/* Details link */
.bk-detail {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand-deep);
    text-decoration: none;
    white-space: nowrap;
    padding: 5px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    transition: background .15s, border-color .15s;
}
.bk-detail:hover {
    background: var(--brand-soft);
    border-color: var(--brand);
}

/* Empty state */
.bk-empty {
    text-align: center;
    padding: 56px 24px;
    color: var(--text-mute);
    font-size: 13.5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.bk-empty i { font-size: 28px; color: var(--border-strong); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1280px) {
    .bk-quick-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .bk-today-grid  { grid-template-columns: 1fr; }
    .bk-quick-stats { grid-template-columns: repeat(2, 1fr); }
    .bk-search-label input { width: 130px; }
}
@media (max-width: 640px) {
    .bk-quick-stats { grid-template-columns: repeat(2, 1fr); }
    .bk-filter-bar  { padding: 0 12px; }
    .bk-search-wrap {
        border-left: none;
        border-top: 1px solid var(--border-soft);
        margin-left: 0;
        padding: 8px 0;
        width: 100%;
    }
    .bk-search-label { flex: 1; }
    .bk-search-label input { flex: 1; width: auto; }
}

/* =========================================================
   mb- — Booking Detail Page (manage-booking-details)
   ========================================================= */

/* ── Page head ─────────────────────────────────────────── */
.mb-top { margin-bottom: 20px; }

.mb-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color .15s;
}
.mb-back:hover { color: var(--brand); }

.mb-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 20px;
}

.mb-eyebrow {
    margin: 0 0 6px;
    color: var(--brand);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 11px;
}

.mb-title-row h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--text);
}

.mb-sub {
    margin: 6px 0 0;
    color: var(--text-soft);
    font-size: 13.5px;
}

.mb-statuses {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ── Alert ─────────────────────────────────────────────── */
.mb-alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin: 0 0 18px;
    font-size: 13.5px;
    font-weight: 600;
}
.mb-alert--ok {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.mb-alert--error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* ── Status chips ──────────────────────────────────────── */
.mb-chip {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 12px;
    border-radius: var(--radius-pill);
    background: var(--brand-soft);
    color: var(--brand-deep);
    font-weight: 700;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.mb-chip--soft {
    background: var(--bg-soft);
    color: var(--text-soft);
}

/* ── KPI strip ─────────────────────────────────────────── */
.mb-grid--kpi {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.mb-kpi {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
}

.mb-kpi span {
    display: block;
    color: var(--text-soft);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 6px;
}

.mb-kpi strong {
    display: block;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
    word-break: break-word;
}

.mb-kpi small {
    display: block;
    margin-top: 4px;
    color: var(--text-mute);
    font-size: 11.5px;
    word-break: break-word;
}

/* ── Two-column layout ─────────────────────────────────── */
.mb-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
}

.mb-main,
.mb-side {
    display: grid;
    gap: 16px;
    align-content: start;
}

/* ── Card ──────────────────────────────────────────────── */
.mb-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.mb-card--sticky {
    position: sticky;
    top: 80px;
}

.mb-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-soft);
}

.mb-card__head h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-soft);
}

/* ── Info grid ─────────────────────────────────────────── */
.mb-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mb-info-grid > div {
    background: var(--bg-soft);
    border-radius: var(--radius);
    padding: 12px 14px;
}

.mb-info-grid span {
    display: block;
    color: var(--text-mute);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 5px;
}

.mb-info-grid strong {
    display: block;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--text);
    word-break: break-word;
}

/* ── Access section ────────────────────────────────────── */
.mb-access { display: grid; gap: 0; }

.mb-access-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
}
.mb-access-row:last-child { border-bottom: 0; }

.mb-access-row span {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.mb-access-row strong {
    text-align: right;
    word-break: break-word;
    font-size: 13px;
    color: var(--text);
}

.mb-access-row a {
    color: var(--brand);
    text-decoration: none;
}
.mb-access-row a:hover { text-decoration: underline; }

.mb-access-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 0;
}
.mb-access-actions form { margin: 0; }

/* ── Line items (extras / invoices) ───────────────────── */
.mb-lines { display: grid; gap: 8px; }

.mb-line {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
}

.mb-line > strong {
    color: var(--text);
    font-size: 14px;
    white-space: nowrap;
}

.mb-line small {
    display: block;
    margin-top: 3px;
    color: var(--text-mute);
    font-size: 12px;
    line-height: 1.4;
}

.mb-empty {
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    color: var(--text-mute);
    font-size: 13px;
}

/* ── Price summary ─────────────────────────────────────── */
.mb-summary { display: grid; gap: 0; }

.mb-summary > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
}
.mb-summary > div:last-child { border-bottom: 0; }

.mb-summary span {
    display: block;
    font-size: 13px;
    color: var(--text-soft);
    margin-bottom: 0;
}

.mb-summary strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.mb-summary__total {
    padding-top: 12px !important;
    margin-top: 4px;
}
.mb-summary__total span {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.mb-summary__total strong {
    font-size: 17px;
    color: var(--brand);
}

/* ── Price edit form ───────────────────────────────────── */
.mb-price-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
}

.mb-price-form__label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-soft);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.mb-price-form__row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.mb-price-form__input {
    width: 100%;
    height: 36px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 0 10px;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color .15s;
}
.mb-price-form__input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

.mb-price-form__hint {
    margin: 7px 0 0;
    color: var(--text-mute);
    font-size: 12px;
    line-height: 1.45;
}

/* ── Side action buttons ───────────────────────────────── */
.mb-side-actions {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
}

/* ── Notes ─────────────────────────────────────────────── */
.mb-notes h3 {
    margin: 14px 0 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.mb-notes h3:first-child { margin-top: 0; }
.mb-notes p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-soft);
    word-break: break-word;
    white-space: pre-wrap;
}

/* ── Danger button + full-width util ──────────────────── */
.btn--danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}
.btn--danger:hover { filter: brightness(.88); }

.btn--full {
    width: 100%;
    justify-content: center;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
    .mb-layout { grid-template-columns: 1fr; }
    .mb-card--sticky { position: static; }
    .mb-grid--kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .mb-title-row { flex-direction: column; }
    .mb-statuses { justify-content: flex-start; }
    .mb-grid--kpi { grid-template-columns: 1fr; }
    .mb-info-grid { grid-template-columns: 1fr; }
    .mb-access-row,
    .mb-line,
    .mb-summary > div { flex-direction: column; }
    .mb-access-row strong { text-align: left; }
    .mb-price-form__row { grid-template-columns: 1fr; }
    .mb-price-form__row .btn { width: 100%; }
    .mb-access-actions { flex-direction: column; }
    .mb-access-actions .btn { width: 100%; }
}
