/* My Bookings + Update Booking (shared) */
:root {
    --bk-primary: #1f6feb;
    --bk-primary-dark: #1558bf;
    --bk-danger: #d93025;
    --bk-text: #1b1f27;
    --bk-muted: #667085;
    --bk-border: #e4e7ec;
    --bk-bg: #f6f7f9;
    --bk-card: #ffffff;
    --bk-radius: 12px;
}

.bk-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 16px 56px;
    font-family: "Outfit", system-ui, sans-serif;
    color: var(--bk-text);
}
.bk-page--narrow { max-width: 860px; }

.bk-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}
.bk-head h1 { margin: 0 0 4px; font-size: 1.7rem; }
.bk-head p { margin: 0; color: var(--bk-muted); }
.bk-back { display: inline-block; margin-bottom: 12px; color: var(--bk-primary); text-decoration: none; font-weight: 500; }

/* Filters */
.bk-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.bk-filters input, .bk-filters select,
.bk-form input, .bk-form select, .bk-form textarea {
    font: inherit;
    padding: 10px 12px;
    border: 1px solid var(--bk-border);
    border-radius: 8px;
    background: #fff;
    color: var(--bk-text);
    width: 100%;
    box-sizing: border-box;
}
.bk-filters input { flex: 1 1 220px; width: auto; }
.bk-filters select { width: auto; }
.bk-filters input:focus, .bk-filters select:focus,
.bk-form input:focus, .bk-form select:focus, .bk-form textarea:focus {
    outline: 2px solid rgba(31, 111, 235, .35);
    border-color: var(--bk-primary);
}

/* Table */
.bk-table-wrap {
    overflow-x: auto;
    background: var(--bk-card);
    border: 1px solid var(--bk-border);
    border-radius: var(--bk-radius);
}
.bk-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.bk-table th, .bk-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--bk-border); font-size: .94rem; white-space: nowrap; }
.bk-table th { background: #fafbfc; color: var(--bk-muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.bk-table tbody tr:last-child td { border-bottom: 0; }
.bk-table tbody tr:hover { background: #fafcff; }
.bk-table .num { text-align: right; }
.bk-loading, .bk-error-row { text-align: center !important; color: var(--bk-muted); padding: 28px !important; }
.bk-error-row { color: var(--bk-danger); }
.sub { display: block; color: var(--bk-muted); font-size: .8rem; }

.bk-link {
    background: none; border: 0; padding: 0; cursor: pointer;
    font: inherit; font-weight: 600; color: var(--bk-primary); text-decoration: underline;
}
.bk-link:hover { color: var(--bk-primary-dark); }

/* Badges */
.bk-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #eef0f3; color: #475467; }
.bk-badge--confirmed { background: #e0edff; color: #1558bf; }
.bk-badge--on_trip { background: #fff3d6; color: #9a6700; }
.bk-badge--completed { background: #dcf5e4; color: #157f3d; }
.bk-badge--cancelled { background: #fde4e1; color: #b3261e; }
.bk-badge--pending_payment { background: #eef0f3; color: #475467; }

/* Buttons */
.bk-btn {
    display: inline-flex; align-items: center; justify-content: center;
    font: inherit; font-weight: 600; font-size: .9rem;
    padding: 9px 16px; border-radius: 8px; cursor: pointer; text-decoration: none;
    border: 1px solid var(--bk-border); background: #fff; color: var(--bk-text);
}
.bk-btn:hover { background: #f2f4f7; }
.bk-btn:disabled { opacity: .5; cursor: not-allowed; }
.bk-btn--primary { background: var(--bk-primary); border-color: var(--bk-primary); color: #fff; }
.bk-btn--primary:hover { background: var(--bk-primary-dark); }
.bk-btn--danger { background: var(--bk-danger); border-color: var(--bk-danger); color: #fff; }
.bk-btn--danger:hover { background: #b3261e; }
.bk-btn--sm { padding: 5px 10px; font-size: .8rem; }
.bk-row-actions { display: flex; gap: 6px; }

/* Empty state */
.bk-empty { text-align: center; padding: 48px 16px; color: var(--bk-muted); }
.bk-empty__icon { font-size: 2.4rem; }
.bk-empty h3 { margin: 8px 0 4px; color: var(--bk-text); }

/* Pagination */
.bk-pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; }
.bk-pager__info { color: var(--bk-muted); font-size: .9rem; }
.bk-pager__buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.bk-pager__buttons button {
    min-width: 38px; padding: 7px 10px; font: inherit; font-size: .9rem;
    border: 1px solid var(--bk-border); border-radius: 8px; background: #fff; cursor: pointer;
}
.bk-pager__buttons button:hover:not(:disabled) { background: #f2f4f7; }
.bk-pager__buttons button.is-active { background: var(--bk-primary); border-color: var(--bk-primary); color: #fff; }
.bk-pager__buttons button:disabled { opacity: .45; cursor: not-allowed; }
.bk-pager__gap { padding: 7px 4px; color: var(--bk-muted); }

/* Dialogs */
.bk-dialog { border: 0; border-radius: 16px; padding: 0; width: min(680px, 94vw); max-height: 92vh; box-shadow: 0 24px 60px rgba(16, 24, 40, .28); }
.bk-dialog::backdrop { background: rgba(16, 24, 40, .5); }
.bk-dialog__panel { position: relative; padding: 24px; font-family: "Outfit", system-ui, sans-serif; color: var(--bk-text); }
.bk-dialog__close { position: absolute; top: 10px; right: 14px; background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--bk-muted); }
.bk-dialog__footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.bk-dialog h2 { margin: 0 0 4px; font-size: 1.3rem; }
.bk-dialog h3 { margin: 18px 0 8px; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--bk-muted); }

/* Key/value grid */
.bk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 18px; }
.bk-grid div span { display: block; font-size: .78rem; color: var(--bk-muted); }
.bk-grid div strong { font-weight: 600; }

/* Mini table (payments) */
.bk-mini { width: 100%; border-collapse: collapse; font-size: .9rem; }
.bk-mini th, .bk-mini td { padding: 7px 6px; border-bottom: 1px solid var(--bk-border); text-align: left; }
.bk-mini th { color: var(--bk-muted); font-weight: 600; font-size: .78rem; }
.bk-mini .num { text-align: right; }

/* Bill lines */
.bk-bill { margin-top: 16px; border: 1px dashed var(--bk-border); border-radius: 10px; padding: 14px 16px; background: #fcfcfd; }
.bk-bill .line { display: flex; justify-content: space-between; padding: 4px 0; font-size: .94rem; }
.bk-bill .line.muted { color: var(--bk-muted); }
.bk-bill .line.total { border-top: 1px solid var(--bk-border); margin-top: 6px; padding-top: 8px; font-weight: 700; font-size: 1.05rem; }
.bk-bill .line.balance { font-weight: 700; color: var(--bk-primary-dark); }

/* Cards & forms (update page) */
.bk-card { background: var(--bk-card); border: 1px solid var(--bk-border); border-radius: var(--bk-radius); padding: 20px; margin-bottom: 16px; }
.bk-card h2 { margin: 0 0 14px; font-size: 1.1rem; }
.bk-card--danger { border-color: #f4c7c3; }
.bk-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.bk-form label { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 600; }
.bk-form label small { font-weight: 400; color: var(--bk-muted); }
.bk-form__wide { grid-column: 1 / -1; }
.bk-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }

.bk-message { padding: 10px 14px; border-radius: 8px; background: #fde4e1; color: #b3261e; margin-bottom: 14px; }
.bk-message.is-ok { background: #dcf5e4; color: #157f3d; }

/* Receipt */
.rcpt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 2px solid var(--bk-text); padding-bottom: 12px; margin-bottom: 12px; }
.rcpt-brand { font-size: 1.2rem; font-weight: 700; }
.rcpt-meta { text-align: right; font-size: .85rem; color: var(--bk-muted); }
.rcpt-meta strong { color: var(--bk-text); }
.rcpt-note { text-align: center; color: var(--bk-muted); font-size: .8rem; margin-top: 16px; }

@media (max-width: 600px) {
    .bk-head h1 { font-size: 1.35rem; }
    .bk-dialog__panel { padding: 18px; }
}

/* Print: only the receipt */
@media print {
    .site-header, .bk-page, .no-print, #detailDialog, .toast { display: none !important; }
    #receiptDialog { position: static; width: 100%; max-height: none; box-shadow: none; display: block; }
    #receiptDialog::backdrop { display: none; }
    body { background: #fff; }
}
