:root {
    --bookings-border: #e6ebf3;
    --bookings-muted: #64748b;
    --bookings-soft: #f8fafc;
    --bookings-ink: #0f172a;
}

.bookings-workspace[hidden] {
    display: none !important;
}

.app-main.bookings-workspace-open > .app-header,
.app-main.bookings-workspace-open > .calendar-panel,
.app-main.bookings-workspace-open > #settingsWorkspace,
.app-main.bookings-workspace-open > #contactsWorkspace,
.app-main.bookings-workspace-open > #availabilityWorkspace,
.app-main.bookings-workspace-open > .settings-workspace {
    display: none !important;
}

.bookings-workspace {
    width: 100%;
    min-height: calc(100vh - 36px);
}

.bookings-screen {
    display: grid;
    gap: 14px;
}

.bookings-toolbar {
    background: #fff;
    border: 1px solid var(--bookings-border);
    border-radius: 24px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .035);
}

.bookings-kicker {
    display: inline-flex;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .115em;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.bookings-toolbar h1 {
    margin: 0;
    color: var(--bookings-ink);
    font-size: clamp(28px, 2.7vw, 38px);
    line-height: 1;
    letter-spacing: -.05em;
    font-weight: 930;
}

.bookings-toolbar p {
    margin: 7px 0 0;
    color: var(--bookings-muted);
    font-size: 13px;
    line-height: 1.35;
    font-weight: 650;
    max-width: 760px;
}

.bookings-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.bookings-stat-grid article {
    background: #fff;
    border: 1px solid var(--bookings-border);
    border-radius: 20px;
    padding: 14px 16px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .03);
}

.bookings-stat-grid span {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 900;
}

.bookings-stat-grid strong {
    display: block;
    margin-top: 5px;
    color: var(--bookings-ink);
    font-size: 26px;
    line-height: 1;
    font-weight: 930;
}

.bookings-search-card {
    border: 1px solid var(--bookings-border);
    background: #fff;
    border-radius: 20px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .03);
}

.bookings-search-box {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    min-width: 0;
}

.bookings-search-box span {
    color: #94a3b8;
    font-size: 18px;
    text-align: center;
}

.bookings-search-box input {
    border: 0;
    outline: 0;
    width: 100%;
    min-width: 0;
    color: var(--bookings-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 650;
}

.bookings-count-pill {
    border: 1px solid #eef2f7;
    background: var(--bookings-soft);
    color: var(--bookings-muted);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.bookings-list-card {
    width: 100%;
    min-height: 250px;
    background: #fff;
    border: 1px solid var(--bookings-border);
    border-radius: 22px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .035);
    overflow: hidden;
}

.bookings-table {
    display: grid;
    width: 100%;
}

.bookings-table-head,
.bookings-row {
    display: grid;
    grid-template-columns:
        minmax(190px, 1fr)
        minmax(130px, .78fr)
        minmax(170px, .9fr)
        120px
        96px
        minmax(168px, auto);
    align-items: center;
    gap: 12px;
}

.bookings-table-head {
    padding: 11px 14px;
    background: #f8fafc;
    color: #94a3b8;
    border-bottom: 1px solid #eef2f7;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.bookings-row {
    min-width: 0;
    border-bottom: 1px solid #eef2f7;
    background: #fff;
    padding: 12px 14px;
    text-align: left;
}

.bookings-row:last-child {
    border-bottom: 0;
}

.bookings-row:hover {
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
}

.bookings-person {
    min-width: 0;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.bookings-avatar,
.bookings-detail-avatar {
    border-radius: 15px;
    background: #fff7ed;
    color: #c2410c;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.bookings-avatar {
    width: 40px;
    height: 40px;
    font-size: 13px;
}

.bookings-person strong,
.bookings-person span,
.bookings-row-meta {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bookings-person strong {
    display: block;
    color: var(--bookings-ink);
    font-size: 14px;
    font-weight: 900;
}

.bookings-person span,
.bookings-row-meta {
    display: block;
    color: var(--bookings-muted);
    font-size: 12px;
    font-weight: 700;
}

.bookings-row-actions {
    display: grid;
    grid-template-columns: repeat(5, 32px);
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.booking-icon-action {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    background: #f8fafc;
    color: #64748b;
    display: inline-grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
    transition: transform .14s ease, background .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}

.booking-icon-action svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.booking-icon-action:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #fff;
    border-color: rgba(249, 115, 22, .36);
    color: #c2410c;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.booking-icon-action.booking-action-sync:hover:not(:disabled) {
    border-color: rgba(37, 99, 235, .26);
    color: #2563eb;
}

.booking-icon-action.booking-action-confirm {
    background: #eff6ff;
    color: #2563eb;
    border-color: #dbeafe;
}

.booking-icon-action.booking-action-confirm:hover:not(:disabled) {
    background: #ecfdf5;
    color: #047857;
    border-color: #bbf7d0;
}

.booking-icon-action.booking-action-cancel {
    background: #fff7ed;
    color: #c2410c;
    border-color: #ffedd5;
}

.booking-icon-action.booking-action-cancel:hover:not(:disabled) {
    background: #fff1f2;
    color: #be123c;
    border-color: #fecdd3;
}

.booking-icon-action[disabled],
.booking-icon-action.is-disabled {
    opacity: .34;
    cursor: not-allowed;
    pointer-events: auto;
    filter: grayscale(.12);
    transform: none;
    box-shadow: none;
}

.bookings-action-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.booking-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    background: #f1f5f9;
    color: #475569;
}

.booking-status.is-confirmed,
.booking-status.is-completed {
    background: #ecfdf5;
    color: #047857;
}

.booking-status.is-requested,
.booking-status.is-tentative {
    background: #fff7ed;
    color: #c2410c;
}

.booking-status.is-cancelled,
.booking-status.is-no_show {
    background: #fff1f2;
    color: #be123c;
}


.booking-sync-chip {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-top: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.booking-sync-chip.is-synced {
    background: #ecfdf5;
    color: #047857;
    border-color: #bbf7d0;
}

.booking-sync-chip.is-failed {
    background: #fff1f2;
    color: #be123c;
    border-color: #fecdd3;
}

.booking-sync-chip.is-pending {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

#contextBookings .bookings-context-block {
    display: grid;
    gap: 10px;
}

#contextBookings .bookings-section-card {
    width: 100%;
    border: 1px solid var(--bookings-border);
    background: #fff;
    color: var(--bookings-ink);
    border-radius: 18px;
    padding: 12px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    text-align: left;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
    transition: border-color .16s ease, background .16s ease;
}

#contextBookings .bookings-section-card:hover,
#contextBookings .bookings-section-card.is-active {
    border-color: rgba(249, 115, 22, .42);
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
}

#contextBookings .bookings-section-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #fff7ed;
    color: #c2410c;
    font-size: 17px;
}

#contextBookings .bookings-section-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

#contextBookings .bookings-section-copy strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.05;
}

#contextBookings .bookings-section-copy small {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

#contextBookings .bookings-section-count {
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1px solid #eef2f7;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

#contextBookings .bookings-context-summary {
    margin-top: auto;
}

#contextBookings .bookings-context-note {
    border: 1px dashed #e2e8f0;
    background: #fff;
    border-radius: 16px;
    padding: 10px 12px;
    color: var(--bookings-muted);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bookings-inquiry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.booking-inquiry-card {
    background: #fff;
    border: 1px solid var(--bookings-border);
    border-radius: 22px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .035);
}

.booking-inquiry-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.booking-inquiry-head h3 {
    margin: 0;
    color: var(--bookings-ink);
    font-size: 20px;
    font-weight: 930;
    letter-spacing: -.04em;
}

.booking-inquiry-head p,
.booking-inquiry-message {
    margin: 6px 0 0;
    color: var(--bookings-muted);
    font-size: 13px;
    font-weight: 650;
}

.booking-inquiry-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.booking-inquiry-meta span {
    border: 1px solid #eef2f7;
    background: #f8fafc;
    border-radius: 14px;
    padding: 9px 10px;
    color: #475569;
    font-size: 12px;
    font-weight: 750;
}

.booking-inquiry-meta strong {
    display: block;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 10px;
    font-weight: 900;
    margin-bottom: 3px;
}

.booking-inquiry-card footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.bookings-empty-state {
    min-height: 230px;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
    gap: 8px;
    padding: 24px;
}

.bookings-empty-state strong {
    color: var(--bookings-ink);
    font-size: 17px;
    font-weight: 900;
}

.bookings-empty-state p {
    color: var(--bookings-muted);
    margin: 0;
    max-width: 420px;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 650;
}

.bookings-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(15, 23, 42, .38);
    display: grid;
    place-items: center;
    padding: 24px;
}

.bookings-modal {
    width: min(820px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff;
    border-radius: 28px;
    border: 1px solid var(--bookings-border);
    box-shadow: 0 30px 90px rgba(15, 23, 42, .24);
    padding: 22px;
}

.bookings-view-modal {
    width: min(680px, 100%);
}

.bookings-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.bookings-modal-head h2 {
    margin: 0;
    color: var(--bookings-ink);
    font-size: 26px;
    font-weight: 930;
    letter-spacing: -.04em;
}

.bookings-modal-head p {
    margin: 6px 0 0;
    color: var(--bookings-muted);
    font-size: 14px;
    font-weight: 650;
}

.bookings-modal-close {
    width: 38px;
    height: 38px;
    border: 1px solid #eef2f7;
    background: #fff;
    border-radius: 14px;
    color: #64748b;
    font-size: 22px;
    line-height: 1;
}

.bookings-form {
    display: grid;
    gap: 14px;
}

.bookings-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.bookings-form label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 12px;
    font-weight: 850;
}

.bookings-form input,
.bookings-form textarea,
.bookings-form select {
    width: 100%;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 14px;
    padding: 11px 12px;
    color: var(--bookings-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    outline: 0;
}

.bookings-form input:focus,
.bookings-form textarea:focus,
.bookings-form select:focus {
    border-color: rgba(233, 145, 56, .48);
    box-shadow: 0 0 0 4px rgba(233, 145, 56, .10);
}

.bookings-form-full {
    grid-column: 1 / -1;
}

.bookings-sync-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px dashed #e2e8f0;
    border-radius: 16px;
    padding: 12px;
    color: #475569;
    font-size: 13px;
    font-weight: 750;
}

.bookings-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.bookings-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.bookings-detail-field {
    border: 1px solid #eef2f7;
    background: #f8fafc;
    border-radius: 16px;
    padding: 11px 12px;
    display: grid;
    gap: 3px;
}

.bookings-detail-field span {
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 10px;
    font-weight: 850;
}

.bookings-detail-field strong {
    color: #1e293b;
    font-size: 13px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.bookings-notes {
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 12px;
    margin-top: 10px;
}

.bookings-notes p {
    margin: 5px 0 0;
    color: #475569;
    line-height: 1.45;
    font-size: 13px;
    font-weight: 650;
    white-space: pre-wrap;
}

.bookings-inline-error,
.bookings-inline-success {
    border-radius: 16px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 12px;
}

.bookings-inline-error {
    border: 1px solid #fecdd3;
    background: #fff1f2;
    color: #991b1b;
}

.bookings-inline-success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.danger-soft {
    color: #b91c1c !important;
}

@media (max-width: 1240px) {
    .bookings-table-head,
    .bookings-row {
        grid-template-columns:
            minmax(190px, 1.1fr)
            minmax(130px, .85fr)
            minmax(170px, .9fr)
            118px
            minmax(316px, auto);
    }

    .bookings-table-head span:nth-child(5),
    .bookings-row > .bookings-row-meta:nth-child(5) {
        display: none;
    }
}

@media (max-width: 920px) {
    .bookings-stat-grid,
    .bookings-inquiry-grid {
        grid-template-columns: 1fr;
    }

    .bookings-table-head {
        display: none;
    }

    .bookings-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .bookings-row-actions {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        justify-content: stretch;
        width: 100%;
    }

    .bookings-form-grid,
    .bookings-detail-grid {
        grid-template-columns: 1fr;
    }

    .bookings-toolbar,
    .bookings-search-card {
        grid-template-columns: 1fr;
        display: grid;
    }
}



/* Bookings Phase 1C: use native sidebar section classes, no custom separator.
   The separator comes from .sidebar-section and its top offset from .calendar-list-section in app.css. */
#contextBookings > .sidebar-section.bookings-context-block {
    display: grid;
    gap: 10px;
}

#contextBookings > .sidebar-section.bookings-context-summary {
    margin-top: auto;
}

/* Keep cards compact inside the native sidebar-section wrapper. */
#contextBookings .bookings-section-card {
    min-height: 0;
}


/* Bookings Phase 1D: native option cards inside native sidebar section.
   Uses the same option classes as Disponibilidad:
   .sidebar-section.calendar-list-section + .settings-option.availability-open-card
   This only corrects card geometry/count pill; the separator remains native. */
#contextBookings > .sidebar-section.calendar-list-section.bookings-context-block {
    display: block !important;
}

#contextBookings > .sidebar-section.bookings-context-block {
    gap: 0 !important;
}

#contextBookings .bookings-section-card.settings-option.availability-open-card {
    width: 100% !important;
    min-height: 64px !important;
    height: auto !important;
    padding: 12px !important;
    margin: 0 0 8px !important;
    border-radius: 18px !important;
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) 28px !important;
    align-items: center !important;
    gap: 10px !important;
    text-align: left !important;
}

#contextBookings .bookings-section-card.settings-option.availability-open-card:last-child {
    margin-bottom: 0 !important;
}

#contextBookings .bookings-section-card .settings-option-icon.bookings-section-icon {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 14px !important;
    display: grid !important;
    place-items: center !important;
}

#contextBookings .bookings-section-card .settings-option-copy.bookings-section-copy {
    min-width: 0 !important;
    display: grid !important;
    gap: 3px !important;
}

#contextBookings .bookings-section-card .settings-option-copy.bookings-section-copy strong,
#contextBookings .bookings-section-card .settings-option-copy.bookings-section-copy small {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

#contextBookings .bookings-section-card .settings-option-arrow.bookings-section-count {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 999px !important;
    display: grid !important;
    place-items: center !important;
    border: 1px solid #eef2f7 !important;
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

#contextBookings .bookings-section-card.is-active .settings-option-arrow.bookings-section-count,
#contextBookings .bookings-section-card.active .settings-option-arrow.bookings-section-count {
    border-color: rgba(249, 115, 22, .30) !important;
    background: #fff7ed !important;
    color: #c2410c !important;
}
/* Bookings Phase 2B — inquiry action icons and native modal confirmations */
.booking-inquiry-actions {
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
    gap: 6px !important;
    margin-top: 14px;
}

.booking-inquiry-action.booking-action-tentative:hover:not(:disabled) {
    border-color: rgba(249, 115, 22, .32);
    color: #c2410c;
}

.booking-inquiry-action.booking-action-decline,
.booking-icon-action.booking-action-decline {
    background: #fff7ed;
    color: #c2410c;
    border-color: #ffedd5;
}

.booking-inquiry-action.booking-action-decline:hover:not(:disabled),
.booking-icon-action.booking-action-decline:hover:not(:disabled) {
    background: #fff1f2;
    color: #be123c;
    border-color: #fecdd3;
}

.booking-inquiry-card.is-approved,
.booking-inquiry-card.is-declined,
.booking-inquiry-card.is-archived {
    opacity: .78;
}

.bookings-confirm-modal {
    max-width: 480px;
}

.bookings-confirm-modal .bookings-modal-head p {
    max-width: 36rem;
}

.btn.btn-danger {
    background: #be123c;
    color: #fff;
    border-color: #be123c;
}

.btn.btn-danger:hover {
    background: #9f1239;
    border-color: #9f1239;
}

/* Bookings Phase 2B — public inquiries UX follow-up */
.bookings-inquiry-grid {
    grid-template-columns: minmax(0, 1fr) !important;
}

.booking-inquiry-card {
    width: 100%;
}

.booking-inquiry-card .booking-inquiry-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bookings-row.is-highlight {
    animation: bookings-row-highlight 2.8s ease-out 1;
    box-shadow: inset 4px 0 0 rgba(249, 115, 22, .55);
    background: linear-gradient(90deg, rgba(255, 247, 237, .92), rgba(255,255,255,.98) 42%);
}

@keyframes bookings-row-highlight {
    0% {
        background: rgba(255, 237, 213, .95);
        box-shadow: inset 4px 0 0 rgba(249, 115, 22, .9), 0 12px 28px rgba(249, 115, 22, .14);
    }
    100% {
        background: linear-gradient(90deg, rgba(255, 247, 237, .92), rgba(255,255,255,.98) 42%);
        box-shadow: inset 4px 0 0 rgba(249, 115, 22, .55);
    }
}

.booking-icon-action.is-loading {
    position: relative;
    pointer-events: none;
    opacity: .72;
}

.booking-icon-action.is-loading svg {
    opacity: 0;
}

.booking-icon-action.is-loading::after {
    content: '';
    width: 15px;
    height: 15px;
    border-radius: 999px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: bookings-action-spin .72s linear infinite;
}

@keyframes bookings-action-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    .booking-inquiry-card .booking-inquiry-meta {
        grid-template-columns: 1fr;
    }
}

/* Bookings Phase 2C — emails and visible activity */
.bookings-view-modal {
    width: min(760px, 100%);
}

.bookings-timeline-card,
.bookings-email-card {
    border: 1px solid #eef2f7;
    border-radius: 18px;
    padding: 13px;
    margin-top: 12px;
    background: #fff;
}

.bookings-timeline-card > header,
.bookings-email-card > header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.bookings-timeline-card > header strong,
.bookings-email-card > header strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
}

.bookings-timeline-card > header span,
.bookings-email-card > header span {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
}

.bookings-timeline,
.bookings-email-list {
    display: grid;
    gap: 8px;
}

.bookings-timeline-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 9px;
    position: relative;
    padding: 3px 0;
}

.bookings-timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 20px;
    bottom: -8px;
    width: 1px;
    background: #e2e8f0;
}

.bookings-timeline-dot {
    width: 15px;
    height: 15px;
    margin-top: 3px;
    border-radius: 999px;
    background: #f97316;
    box-shadow: inset 0 0 0 4px #fff7ed;
    border: 1px solid rgba(249, 115, 22, .22);
    z-index: 1;
}

.bookings-timeline-item.is-email_queued .bookings-timeline-dot {
    background: #2563eb;
    box-shadow: inset 0 0 0 4px #eff6ff;
    border-color: rgba(37, 99, 235, .22);
}

.bookings-timeline-item.is-calendar_sync_failed .bookings-timeline-dot {
    background: #e11d48;
    box-shadow: inset 0 0 0 4px #fff1f2;
    border-color: rgba(225, 29, 72, .22);
}

.bookings-timeline-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.bookings-timeline-row strong {
    color: #1e293b;
    font-size: 13px;
    font-weight: 900;
}

.bookings-timeline-row time,
.bookings-email-status time {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.bookings-timeline-item p {
    margin: 2px 0 0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.bookings-timeline-item small {
    display: block;
    margin-top: 2px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 750;
}

.bookings-email-card.is-empty {
    background: #f8fafc;
}

.bookings-email-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #eef2f7;
    background: #f8fafc;
    border-radius: 15px;
    padding: 10px 11px;
}

.bookings-email-item strong {
    display: block;
    color: #1e293b;
    font-size: 13px;
    font-weight: 900;
}

.bookings-email-item span,
.bookings-email-item small {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.bookings-email-item em {
    display: block;
    margin-top: 4px;
    color: #be123c;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.bookings-email-status {
    display: grid;
    justify-items: end;
    align-content: start;
    gap: 4px;
    min-width: 92px;
}

.bookings-email-status span {
    border-radius: 999px;
    padding: 4px 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.bookings-email-item.is-sent .bookings-email-status span {
    background: #dcfce7;
    color: #15803d;
}

.bookings-email-item.is-failed .bookings-email-status span {
    background: #fff1f2;
    color: #be123c;
}

.bookings-email-item.is-pending .bookings-email-status span {
    background: #fff7ed;
    color: #c2410c;
}

@media (max-width: 720px) {
    .bookings-email-item,
    .bookings-timeline-row,
    .bookings-timeline-card > header,
    .bookings-email-card > header {
        align-items: flex-start;
        flex-direction: column;
    }

    .bookings-email-status {
        justify-items: start;
    }
}

/* Bookings Phase 2D — public inquiries as table rows, toast feedback, no inline module messages */
.bookings-table--inquiries .bookings-table-head,
.bookings-table-head--inquiries,
.bookings-row--inquiry {
    grid-template-columns:
        minmax(190px, 1fr)
        minmax(130px, .78fr)
        minmax(170px, .9fr)
        120px
        96px
        minmax(168px, auto);
}

.bookings-row--inquiry {
    align-items: center;
}

.bookings-inquiry-row-message {
    grid-column: 1 / -1;
    margin: -2px 0 2px 50px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bookings-toast-stack {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 99999;
    display: grid;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

.bookings-toast {
    pointer-events: auto;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 18px 52px rgba(15, 23, 42, .16);
    animation: bookings-toast-in .18s ease-out both;
}

.bookings-toast.is-hiding {
    animation: bookings-toast-out .18s ease-in both;
}

.bookings-toast.is-success {
    border-color: #bbf7d0;
}

.bookings-toast.is-error {
    border-color: #fecdd3;
}

.bookings-toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 950;
}

.bookings-toast.is-success .bookings-toast-icon {
    background: #dcfce7;
    color: #15803d;
}

.bookings-toast.is-error .bookings-toast-icon {
    background: #ffe4e6;
    color: #be123c;
}

.bookings-toast-text {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    min-width: 0;
}

.bookings-toast-close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.bookings-toast-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

@keyframes bookings-toast-in {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes bookings-toast-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(8px) scale(.98); }
}

@media (max-width: 980px) {
    .bookings-inquiry-row-message {
        margin-left: 0;
        white-space: normal;
    }
}

/* Phase 2E: page-level premium loaders */
.bookings-workspace {
  position: relative;
}

.bookings-page-loader {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(248, 250, 252, .72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: bookingsLoaderFadeIn .16s ease-out both;
}

.bookings-page-loader.is-hiding {
  animation: bookingsLoaderFadeOut .18s ease-in both;
}

.bookings-page-loader-card {
  width: min(360px, 100%);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 24px 26px;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 80px rgba(15, 23, 42, .16);
  text-align: center;
}

.bookings-page-loader-card strong {
  color: #0f172a;
  font-weight: 950;
  letter-spacing: -.02em;
}

.bookings-page-loader-card small {
  max-width: 280px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.bookings-page-loader-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(249, 115, 22, .18);
  border-top-color: #f97316;
  animation: bookingsLoaderSpin .75s linear infinite;
}

@keyframes bookingsLoaderSpin {
  to { transform: rotate(360deg); }
}

@keyframes bookingsLoaderFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bookingsLoaderFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Phase 2I — booking reference code */
.bookings-reference {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 3px 0 2px;
    padding: 3px 7px;
    border: 1px solid #e5eaf3;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
}


/* Phase 7I: custom SVG icons for Reservas context sections. */
#contextBookings .bookings-section-svg {
    width: 22px;
    height: 22px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
    overflow: visible;
}

#contextBookings .bookings-section-card.is-active .bookings-section-svg,
#contextBookings .bookings-section-card:hover .bookings-section-svg {
    color: var(--pc-orange-dark, #c2410c);
}

/* Phase 7I2 — iconos de subsecciones neutros cuando no están activos. */
#contextBookings .bookings-section-card:not(.is-active):not(.active) .bookings-section-svg,
#contextBookings .bookings-section-card:not(.is-active):not(.active):hover .bookings-section-svg {
    color: #111827;
}

#contextBookings .bookings-section-card.is-active .bookings-section-svg,
#contextBookings .bookings-section-card.active .bookings-section-svg {
    color: var(--pc-orange-dark, #c2410c);
}


/* Phase 7J — semantic colors for booking icon actions. */
.booking-icon-action.booking-action-view {
    background: #eff6ff;
    color: #2563eb;
    border-color: #dbeafe;
}

.booking-icon-action.booking-action-edit {
    background: #f8fafc;
    color: #334155;
    border-color: #e2e8f0;
}

.booking-icon-action.booking-action-sync {
    background: #f5f3ff;
    color: #7c3aed;
    border-color: #ddd6fe;
}

.booking-icon-action.booking-action-confirm {
    background: #ecfdf5;
    color: #047857;
    border-color: #bbf7d0;
}

.booking-icon-action.booking-action-cancel,
.booking-icon-action.booking-action-decline {
    background: #fff1f2;
    color: #be123c;
    border-color: #fecdd3;
}

.booking-icon-action.booking-action-view:hover:not(:disabled) {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.booking-icon-action.booking-action-edit:hover:not(:disabled) {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}

.booking-icon-action.booking-action-sync:hover:not(:disabled) {
    background: #ede9fe;
    color: #6d28d9;
    border-color: #c4b5fd;
}

/* Phase 7K — títulos de módulo normalizados al tamaño de Disponibilidad. */
.bookings-toolbar h1 {
    font-size: 22px !important;
    line-height: 1.08;
    letter-spacing: -.04em;
}
