/* =====================================================================
   QR Code display modal (#qrCodeDisplayModal) — applied to BOTH
   desktop and mobile. Kills the purple header bar, cleans up the
   layout, provides a graceful fallback when the QR image is missing.
   ===================================================================== */
#qrCodeDisplayModal .modal-header {
    background: #fff !important;
    color: #111827 !important;
    border-bottom: 1px solid #f3f4f6 !important;
    padding: 16px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}
#qrCodeDisplayModal .modal-title {
    color: #111827 !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
}
#qrCodeDisplayModal .close {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border: none !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.15rem !important;
    cursor: pointer;
    padding: 0 !important;
}
#qrCodeDisplayModal .modal-body {
    padding: 24px 20px !important;
    text-align: center;
}
#qrCodeDisplayModal .qr-image-wrap {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 200px !important;
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
}
#qrCodeDisplayModal .qr-image-wrap img {
    max-width: 260px !important;
    width: 100% !important;
    height: auto !important;
    background: #fff;
    padding: 8px;
    border-radius: 8px;
}

@media (max-width: 767px) {
    #qrCodeDisplayModal.modal-overlay,
    #qrCodeDisplayModal {
        padding: 0 !important;
    }
    #qrCodeDisplayModal .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 20px 20px 0 0 !important;
        align-self: flex-end !important;
    }
}

/* =====================================================================
   Booking details modal (#bookingModal) — mobile-only modernisation.
   All rules scoped inside @media (max-width: 767px) so desktop keeps
   its current look.
   ===================================================================== */

@media (max-width: 767px) {
    /* ---------------------------------------------------------------
       Modal frame — full-width, no rounded corners for max real estate.
       Header sits at the top with the reference + close X.
       Overflow is pinned to a SINGLE container (.modal-body) so iOS
       doesn't juggle three nested scrollers on touch scroll (that was
       the source of the visible flicker/repaint).
       --------------------------------------------------------------- */
    #bookingModal.modal-overlay {
        padding: 0 !important;
        overflow: hidden !important;         /* base has overflow-y:auto */
    }
    #bookingModal .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;         /* base has overflow-y:auto */
    }
    /* Modal body is the ONLY scroll container. Hardware-accelerated
       momentum on iOS + isolate paint to this subtree. */
    #bookingModal .modal-body {
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
        transform: translateZ(0);
        contain: paint;
    }

    /* ---------------------------------------------------------------
       Reference + status header block (first .booking-info-card row)
       — cleaner layout, no overlap with close button.
       --------------------------------------------------------------- */
    #bookingModal .booking-modal-header,
    #bookingModal .modal-header {
        padding: 14px 18px !important;
        border-bottom: 1px solid #f3f4f6 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;
    }
    #bookingModal .modal-close,
    #bookingModal .close {
        flex-shrink: 0 !important;
        width: 32px !important;
        height: 32px !important;
        background: #f3f4f6 !important;
        border-radius: 50% !important;
        border: none !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #6b7280 !important;
        font-size: 1.15rem !important;
    }

    /* ---------------------------------------------------------------
       Restructure the top header block on mobile:
         - Hide the "REFERÊNCIA DA RESERVA" eyebrow label
         - Ref number moves up to the top row (larger)
         - Status pills (Não Compareceu / CONFIRMADA / etc) stack below
       The header is `.modal-body > div > div:first-child` — a flex row
       with the ref-wrapper on the left and status-wrapper on the right.
       --------------------------------------------------------------- */
    #bookingModal .modal-body > div > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        padding: 14px 16px !important;
    }
    /* Hide the eyebrow label inside the ref-wrapper */
    #bookingModal .modal-body > div > div:first-child > div:first-child > div:first-child {
        display: none !important;
    }
    /* Ref-wrapper takes full width; ref number is the whole thing */
    #bookingModal .modal-body > div > div:first-child > div:first-child {
        width: 100% !important;
    }
    /* Ref number — bigger, bolder */
    #bookingModal .modal-body > div > div:first-child > div:first-child > div:not(:first-child) {
        font-size: 1.15rem !important;
        font-weight: 800 !important;
        color: #111827 !important;
        letter-spacing: 0.02em !important;
    }
    /* Status wrapper — full width row of pills, wraps on narrow */
    #bookingModal .modal-body > div > div:first-child > div:nth-child(2) {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        align-items: center !important;
        width: 100% !important;
        margin: 0 !important;
    }
    /* Trim pill padding a bit so two fit comfortably per row */
    #bookingModal .modal-body > div > div:first-child > div:nth-child(2) > span {
        padding: 4px 10px !important;
        font-size: 0.72rem !important;
    }

    /* ---------------------------------------------------------------
       Section cards inside the modal body — cleaner, tighter, same
       design language as the notifications/quick-actions cards.
       --------------------------------------------------------------- */
    #bookingModal .modal-body {
        padding: 12px !important;
        background: #f9fafb !important;
        overflow-y: auto !important;
        flex: 1 !important;
    }
    /* Any inline-styled div that carries the "card" look (border +
       border-radius). Uniform card chrome. */
    #bookingModal .modal-body > div[style*="border-radius"],
    #bookingModal .modal-body > div[style*="border"],
    #bookingModal .booking-info-card,
    #bookingModal .booking-section-card {
        background: #fff !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 12px !important;
        padding: 14px 16px !important;
        margin-bottom: 10px !important;
        box-shadow: none !important;
    }
    /* Section eyebrow labels (REFERÊNCIA / CLIENTE / PAGAMENTO etc.) */
    #bookingModal .modal-body [style*="text-transform: uppercase"] {
        font-size: 0.7rem !important;
        letter-spacing: 0.05em !important;
        color: #9ca3af !important;
        font-weight: 700 !important;
        margin-bottom: 6px !important;
    }

    /* ---------------------------------------------------------------
       Payment row — Método on its own row (full width), then Estado
       + Quantia Total side-by-side on the second row. Overrides the
       base mobile-optimized.css rule that stacks all three.
       --------------------------------------------------------------- */
    #bookingModalBody .bm-payment-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    #bookingModalBody .bm-payment-row > *:first-child {
        flex: 1 1 100% !important;
    }
    #bookingModalBody .bm-payment-row > *:nth-child(2) {
        flex: 1 1 calc(50% - 6px) !important;
        min-width: 0 !important;
    }
    #bookingModalBody .bm-payment-row > .bm-total {
        flex: 1 1 calc(50% - 6px) !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        text-align: right !important;
    }

    /* ---------------------------------------------------------------
       Prestadores section — hidden on mobile (per user's request).
       Assigning providers is a desktop-only workflow.
       --------------------------------------------------------------- */
    #bookingModal #providerAssignmentSection,
    #bookingModal #providerAssignmentSection ~ *,
    #bookingModal #currentProviderDisplay,
    #bookingModal [id*="providerSelect_"],
    #bookingModal .bm-two-col > div:has(#providerAssignmentSection) {
        /* First rule hides the section content; the wrapper card below
           lets us hide the whole outer bordered box. */
    }
    /* The wrapper card for the providers section contains
       #providerAssignmentSection. Kill the whole wrapper via :has(). */
    #bookingModal .modal-body div:has(> #providerAssignmentSection) {
        display: none !important;
    }

    /* ---------------------------------------------------------------
       Footer buttons — flex 2x2 with explicit ordering so:
         Row 1: Reenviar Confirmação | Editar
         Row 2: Cancelar             | Fechar
       Flex-basis 50% ensures each pair splits the row exactly.
       --------------------------------------------------------------- */
    #bookingModal .booking-modal-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        padding: 12px !important;
        padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
        border-top: 1px solid #f3f4f6 !important;
        background: #fff !important;
        margin: 0 !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
    }
    /* All direct children (Cancel, Resend, .action-buttons-group, Close)
       take an equal 50% flex slot. */
    #bookingModal .booking-modal-actions > * {
        flex: 1 1 calc(50% - 4px) !important;
        max-width: calc(50% - 4px) !important;
        min-width: 0 !important;
        margin: 0 !important;
    }
    /* The action-buttons-group is a flex container itself so its child
       Editar can fill it. */
    #bookingModal .booking-modal-actions .action-buttons-group {
        display: flex !important;
        padding: 0 !important;
    }
    /* Outer buttons — visual styling only. Width/flex comes from the
       `> *` rule above (flex-basis 50%). Don't override that here or
       buttons stretch to 100% and blow the 2-col layout. */
    #bookingModal .booking-modal-actions > .btn,
    #bookingModal .booking-modal-actions > .btn-danger,
    #bookingModal .booking-modal-actions > .btn-warning,
    #bookingModal .booking-modal-actions > .btn-secondary,
    #bookingModal .booking-modal-actions > .btn-success,
    #bookingModal .booking-modal-actions > .btn-primary {
        height: 42px !important;
        padding: 0 10px !important;
        border-radius: 10px !important;
        font-weight: 600 !important;
        font-size: 0.8rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        box-shadow: none !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    /* The Editar button lives inside .action-buttons-group — it should
       fill that group's flex slot (which is 50% of the row). */
    #bookingModal .booking-modal-actions .action-buttons-group > .btn {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 100% !important;
        height: 42px !important;
        margin: 0 !important;
        padding: 0 10px !important;
        border-radius: 10px !important;
        font-weight: 600 !important;
        font-size: 0.8rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        box-shadow: none !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Explicit visual order for the 4 items — Reenviar+Editar row 1,
       Cancelar+Fechar row 2 (per user request). */
    #bookingModal .booking-modal-actions > .resend-btn { order: 1 !important; }
    #bookingModal .booking-modal-actions > .action-buttons-group { order: 2 !important; }
    #bookingModal .booking-modal-actions > .btn-danger { order: 3 !important; }
    #bookingModal .booking-modal-actions > .btn-secondary:not(.resend-btn) { order: 4 !important; }

    /* Colour scheme (unified with drawers + FAB) */
    #bookingModal .booking-modal-actions > .btn-danger {
        background: #fff !important;
        color: #b91c1c !important;
        border: 1.5px solid #fecaca !important;
    }
    #bookingModal .booking-modal-actions > .btn-secondary,
    #bookingModal .booking-modal-actions > .resend-btn {
        background: #f3f4f6 !important;
        color: #374151 !important;
        border: 1px solid #e5e7eb !important;
    }
    #bookingModal .booking-modal-actions .action-buttons-group > .btn-warning {
        background: linear-gradient(135deg, #667eea, #764ba2) !important;
        color: #fff !important;
        border: none !important;
    }

    /* Shrink icons so labels fit */
    #bookingModal .booking-modal-actions svg {
        width: 14px !important;
        height: 14px !important;
        margin: 0 !important;
        margin-right: 4px !important;
        flex-shrink: 0 !important;
    }

    /* =====================================================================
       Quick Check-in modal (#quickCheckInModal) — same modernisation.
       ===================================================================== */
    #quickCheckInModal.modal-overlay,
    #checkInModal.modal-overlay,
    #checkInModal.modal {
        padding: 0 !important;
        overflow: hidden !important;
        align-items: flex-end !important;    /* dock to bottom edge */
    }
    #quickCheckInModal .modal-content,
    #checkInModal .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 92dvh !important;
        margin: 0 !important;
        border-radius: 20px 20px 0 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    /* Header — white bg, dark title, drop the purple bar */
    #quickCheckInModal .modal-header,
    #checkInModal .modal-header {
        background: #fff !important;
        color: #111827 !important;
        border-bottom: 1px solid #f3f4f6 !important;
        padding: 16px 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    #quickCheckInModal .modal-header .modal-title,
    #quickCheckInModal .modal-header h3,
    #checkInModal .modal-header .modal-title,
    #checkInModal .modal-header h3 {
        color: #111827 !important;
        font-size: 1.05rem !important;
        font-weight: 700 !important;
        margin: 0 !important;
    }
    #quickCheckInModal .close,
    #checkInModal .close {
        background: #f3f4f6 !important;
        color: #6b7280 !important;
        border: none !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.15rem !important;
        cursor: pointer;
    }

    /* Body — smoother spacing + single scroll container */
    #quickCheckInModal .modal-body,
    #checkInModal .modal-body {
        background: #fff !important;
        padding: 16px 18px !important;
        overflow-y: auto !important;
        flex: 1 !important;
        max-height: none !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
        transform: translateZ(0);
        contain: paint;
    }
    /* Status heading (icon + title + ref) tighter */
    #quickCheckInModal .modal-body > div > div:first-child,
    #checkInModal .modal-body > div > div:first-child {
        margin-bottom: 14px !important;
    }
    #quickCheckInModal .modal-body h4,
    #checkInModal .modal-body h4 {
        font-size: 1.05rem !important;
        margin: 4px 0 2px !important;
    }
    /* Info card — modern rounded, subtle border */
    #quickCheckInModal .modal-body > div > div:nth-child(2),
    #checkInModal .modal-body > div > div:nth-child(2) {
        background: #fff !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 12px !important;
        padding: 6px 14px !important;
        margin-bottom: 14px !important;
    }
    /* Each info row — tighter padding */
    #quickCheckInModal .modal-body > div > div:nth-child(2) > div > div,
    #checkInModal .modal-body > div > div:nth-child(2) > div > div {
        padding: 10px 0 !important;
    }
    /* Prompt text */
    #quickCheckInModal .modal-body > div > p,
    #checkInModal .modal-body > div > p {
        color: #4b5563 !important;
        font-size: 0.9rem !important;
        margin-top: 8px !important;
    }

    /* Footer — 3 buttons stacked full-width. Cancel = grey secondary.
       Warning (No Show) = orange filled. Primary (Check-in) = purple
       gradient. Order: primary → warning → cancel (top to bottom). */
    #quickCheckInModal .modal-footer,
    #checkInModal .modal-footer {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        padding: 12px 18px calc(12px + env(safe-area-inset-bottom)) !important;
        border-top: 1px solid #f3f4f6 !important;
        background: #fff !important;
        margin: 0 !important;
    }
    #quickCheckInModal .modal-footer .btn,
    #checkInModal .modal-footer .btn {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: 44px !important;
        margin: 0 !important;
        padding: 0 12px !important;
        border-radius: 10px !important;
        font-weight: 600 !important;
        font-size: 0.9rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        box-shadow: none !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    /* Explicit ordering (top → bottom): primary → warning → cancel */
    #quickCheckInModal .modal-footer .btn-primary,
    #checkInModal .modal-footer .btn-primary { order: 1 !important; }
    #quickCheckInModal .modal-footer .btn-warning,
    #checkInModal .modal-footer .btn-warning { order: 2 !important; }
    #quickCheckInModal .modal-footer .btn-secondary,
    #checkInModal .modal-footer .btn-secondary { order: 3 !important; }
    /* Colours */
    #quickCheckInModal .modal-footer .btn-primary,
    #checkInModal .modal-footer .btn-primary {
        background: linear-gradient(135deg, #667eea, #764ba2) !important;
        color: #fff !important;
        border: none !important;
    }
    #quickCheckInModal .modal-footer .btn-warning,
    #checkInModal .modal-footer .btn-warning {
        background: #f59e0b !important;
        color: #fff !important;
        border: none !important;
    }
    #quickCheckInModal .modal-footer .btn-secondary,
    #checkInModal .modal-footer .btn-secondary {
        background: #f3f4f6 !important;
        color: #374151 !important;
        border: 1px solid #e5e7eb !important;
    }

    /* Check-in confirmation modal only has 2 buttons (Check In + Cancel)
       — put them side-by-side instead of stacked. quickCheckInModal has 3
       so it stays column-stacked. */
    #checkInModal .modal-footer {
        flex-direction: row !important;
    }
    #checkInModal .modal-footer .btn {
        flex: 1 1 calc(50% - 4px) !important;
    }

    /* =========================================================================
       Quick Assign Provider modal — Bookings list row action.
       Full-viewport frame, clean light header (no purple gradient), balanced
       manual assign row, sticky bottom action for Fechar. Matches the design
       language of the modernised booking detail modal.
       ========================================================================= */
    #quickAssignProviderModal.modal,
    #quickAssignProviderModal.modal[style] {
        padding: 0 !important;
    }
    #quickAssignProviderModal .modal-content,
    #quickAssignProviderModal .modal-content[style] {
        width: 100% !important;
        max-width: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    /* Header — kill the purple gradient, light card look with close X */
    #quickAssignProviderModal .modal-header {
        padding: 14px 16px !important;
        background: #fff !important;
        color: #111827 !important;
        border-bottom: 1px solid #f3f4f6 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;
        flex-shrink: 0 !important;
    }
    #quickAssignProviderModal .modal-header h2 {
        font-size: 1.05rem !important;
        font-weight: 700 !important;
        color: #111827 !important;
        margin: 0 !important;
        flex: 1 !important;
    }
    #quickAssignProviderModal .modal-header .close-modal,
    #quickAssignProviderModal .modal-header .close {
        flex-shrink: 0 !important;
        width: 32px !important;
        height: 32px !important;
        min-height: 32px !important;
        background: #f3f4f6 !important;
        border-radius: 50% !important;
        border: none !important;
        color: #374151 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 18px !important;
        line-height: 1 !important;
        cursor: pointer !important;
        padding: 0 !important;
        opacity: 1 !important;
    }

    /* Body — the ONLY scroll container, momentum on iOS, room for the sticky
       Fechar bar at bottom so content isn't hidden behind it */
    #quickAssignProviderModal .modal-body,
    #quickAssignProviderModal .modal-body[style] {
        padding: 16px !important;
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Booking context card */
    #quickAssignProviderModal .modal-body > div[style*="background: #f8fafc"] {
        padding: 12px 14px !important;
        border-radius: 10px !important;
        margin-bottom: 14px !important;
        background: #f9fafb !important;
        border: 1px solid #e5e7eb !important;
    }

    /* PRESTADORES label + list */
    #quickAssignProviderModal #quickAssignCurrentProviders {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    /* Each provider chip: full-width row with name/role on the left and the
       × remove button flush to the right (was cramped in the middle). */
    #quickAssignProviderModal #quickAssignCurrentProviders > div,
    #quickAssignProviderModal #quickAssignCurrentProviders > div[style] {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0.4rem !important;
        width: 100% !important;
        margin: 0 !important;
        background: #f9fafb !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 10px !important;
        padding: 10px 12px !important;
        box-sizing: border-box !important;
    }
    /* Push the remove button to the right edge of its chip */
    #quickAssignProviderModal #quickAssignCurrentProviders > div > button,
    #quickAssignProviderModal #quickAssignCurrentProviders > div > button[style] {
        margin-left: auto !important;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        border-radius: 50% !important;
        background: #fee2e2 !important;
        color: #dc2626 !important;
        font-size: 16px !important;
        line-height: 1 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        border: none !important;
    }

    /* Manual assign row — dropdown + Atribuir button balanced. The inline HTML
       gives the select flex:1 and the button natural width, which on mobile
       renders as tiny select + huge button. Force a 2:1 split. */
    #quickAssignProviderModal #quickAssignFormContainer > div[style*="display: flex"] {
        display: grid !important;
        grid-template-columns: 2fr 1fr !important;
        gap: 8px !important;
    }
    #quickAssignProviderModal #quickAssignProviderSelect {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 44px !important;
        padding: 8px 12px !important;
        border: 1px solid #d1d5db !important;
        border-radius: 10px !important;
        font-size: 0.95rem !important;
        background: #fff !important;
        box-sizing: border-box !important;
    }
    #quickAssignProviderModal #quickAssignManualBtn {
        width: 100% !important;
        min-width: 0 !important;
        height: 44px !important;
        padding: 0 !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        border-radius: 10px !important;
        background: linear-gradient(135deg, #667eea, #764ba2) !important;
        color: #fff !important;
        border: none !important;
        box-shadow: 0 6px 16px rgba(102, 126, 234, 0.25) !important;
    }

    /* Auto-assign button — normalize with the manual one */
    #quickAssignProviderModal #quickAssignAutoBtn {
        width: 100% !important;
        height: 44px !important;
        padding: 0 !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        border-radius: 10px !important;
        background: #eef2ff !important;
        color: #4338ca !important;
        border: 1px solid #c7d2fe !important;
        box-shadow: none !important;
        margin-top: 10px !important;
    }
    #quickAssignProviderModal #quickAssignAutoBtn svg {
        width: 16px !important;
        height: 16px !important;
    }

    /* Fechar row → sticky bottom bar */
    #quickAssignProviderModal .modal-body > div[style*="justify-content: flex-end"]:last-child {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        margin: 0 !important;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)) 16px !important;
        background: #fff !important;
        border-top: 1px solid #f3f4f6 !important;
        z-index: 5 !important;
        display: flex !important;
    }
    #quickAssignProviderModal .modal-body > div[style*="justify-content: flex-end"]:last-child > .btn {
        width: 100% !important;
        height: 44px !important;
        border-radius: 10px !important;
        background: #f3f4f6 !important;
        color: #374151 !important;
        border: 1px solid #e5e7eb !important;
        font-weight: 600 !important;
    }
}
