/* Lavanderia Pro - Estilos Customizados */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html,
body {
    height: 100dvh;
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    color: #111827;
    overflow: hidden
}

::-webkit-scrollbar {
    width: 4px;
    height: 4px
}

::-webkit-scrollbar-track {
    background: transparent
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px
}

/* ── Sidebar ── */
#sidebar {
    width: 220px;
    flex-shrink: 0;
    height: 100dvh;
    transition: transform 0.3s ease-in-out;
}

/* Efeito de transição para mobile */
@media(max-width:768px) {
    #sidebar {
        position: fixed !important;
        z-index: 50 !important;
        height: 100dvh !important;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    #sidebar.mobile-open {
        transform: translateX(0);
    }
}

/* ── Sidebar Overlay ── */
#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(1px);
}

@media(max-width:768px) {
    #sidebar-overlay {
        display: block;
    }

    #sidebar-overlay.active {
        display: block;
        animation: fadeOverlay 0.3s ease;
    }
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    transition: all .15s;
    text-decoration: none
}

.nav-item:hover {
    background: #f3f4f6;
    color: #111827
}

.nav-item.active {
    color: #1d4ed8;
    background: #eff6ff;
    font-weight: 600
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 3px;
    background: #1d4ed8;
    border-radius: 0 2px 2px 0
}

.nav-item i {
    width: 15px;
    text-align: center;
    font-size: 12px
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    white-space: nowrap
}

.badge .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0
}

.badge-recebida {
    background: #f3f4f6;
    color: #374151
}

.badge-recebida .dot {
    background: #9ca3af
}

.badge-lavando {
    background: #fef9c3;
    color: #854d0e
}

.badge-lavando .dot {
    background: #ca8a04
}

.badge-pronta {
    background: #dbeafe;
    color: #1e40af
}

.badge-pronta .dot {
    background: #3b82f6
}

.badge-entregue {
    background: #dcfce7;
    color: #166534
}

.badge-entregue .dot {
    background: #22c55e
}

.badge-atrasado {
    background: #fee2e2;
    color: #991b1b
}

.badge-atrasado .dot {
    background: #ef4444
}

.badge-pago {
    background: #dcfce7;
    color: #166534
}

.badge-pago .dot {
    background: #22c55e
}

.badge-aberto {
    background: #fef9c3;
    color: #854d0e
}

.badge-aberto .dot {
    background: #ca8a04
}

.badge-rascunho {
    background: #e5e7eb;
    color: #374151
}

.badge-rascunho .dot {
    background: #6b7280
}

.badge-ativo {
    background: #dcfce7;
    color: #166534
}

.badge-ativo .dot {
    background: #22c55e
}

.badge-inativo {
    background: #fee2e2;
    color: #991b1b
}

.badge-inativo .dot {
    background: #ef4444
}

/* ── Toast ── */
#toast-container {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    max-width: 340px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    font-size: 13px;
    font-weight: 500;
    pointer-events: all;
    animation: toastIn .3s cubic-bezier(.34, 1.56, .64, 1)
}

.toast-close {
    margin-left: auto;
    opacity: .5;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit
}

.toast-close:hover {
    opacity: 1
}

.toast-success {
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
    color: #15803d
}

.toast-error {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    color: #dc2626
}

.toast-warning {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    color: #b45309
}

.toast-info {
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
    color: #1d4ed8
}

@keyframes toastIn {
    from {
        transform: translateX(110%);
        opacity: 0
    }

    to {
        transform: translateX(0);
        opacity: 1
    }
}

@keyframes toastOut {
    to {
        transform: translateX(110%);
        opacity: 0
    }
}

/* ── Modal principal (z-index 9000) ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(15, 23, 42, .4);
    backdrop-filter: blur(1px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeOverlay .18s ease
}

@keyframes fadeOverlay {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.modal-box {
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    animation: modalIn .2s cubic-bezier(.34, 1.25, .64, 1);
    max-height: 90vh;
    overflow: hidden;
}

/* Responsive modal height for mobile */
@media(max-width:768px) {
    .modal-box {
        max-height: 95dvh;
    }

    .modal-box.modal-lg {
        max-width: 96dvw;
        max-height: 95dvh;
    }

    .modal-box.modal-xl {
        max-width: 98dvw;
        max-height: 96dvh;
    }
}

.modal-hdr {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    font-size: 13.5px;
    color: #334155;
    line-height: 1.6;
}

.modal-ftr {
    padding: 14px 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-shrink: 0;
    background: #f8fafc;
}

.modal-box.modal-lg {
    max-width: 720px
}

.modal-box.modal-xl {
    max-width: 900px;
    max-height: 96dvh
}

.modal-box.view-fechamento-modal {
    max-width: 98dvw;
}

@keyframes modalIn {
    from {
        transform: scale(.94) translateY(12px);
        opacity: 0
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1
    }
}

/* ── Sub-modal (z-index 9500) ── */
.modal-overlay-sub {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(15, 23, 42, .35);
    backdrop-filter: blur(1px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeOverlay .18s ease
}

/* ── Lightbox tela cheia (z-index 9800) ── */
#lightbox {
    position: fixed;
    inset: 0;
    z-index: 9800;
    background: rgba(0, 0, 0, .95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center
}

#lightbox img {
    max-width: 100%;
    max-height: 85dvh;
    object-fit: contain;
    transform-origin: center;
    transition: transform .2s;
    cursor: zoom-in;
    border-radius: 4px
}

#lightbox img.zoomed {
    cursor: zoom-out;
    transform: scale(2)
}

#lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, .15);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center
}

#lightbox-close:hover {
    background: rgba(255, 255, 255, .3)
}

/* ── Cropper modal (z-index 9600) ── */
#cropper-overlay {
    position: fixed;
    inset: 0;
    z-index: 9600;
    background: rgba(0, 0, 0, .9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px
}

#cropper-container {
    width: 100%;
    max-width: 600px;
    max-height: 70dvh;
    overflow: hidden;
    border-radius: 8px;
    background: #000
}

#cropper-img {
    display: block;
    max-width: 100%;
    max-height: 70dvh
}

.cropper-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center
}

/* ── Login ── */
.login-gradient {
    height: 100dvh;
    background: linear-gradient(145deg, #0f172a 0%, #1d4ed8 60%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px
}

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 56px rgba(0, 0, 0, .22)
}

/* ── Inputs ── */
.inp {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
    background: #fafafa;
    color: #111827
}

.inp:focus {
    outline: none;
    border-color: #1d4ed8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .09)
}

.inp:disabled {
    opacity: .6;
    cursor: not-allowed;
    background: #f3f4f6
}

textarea.inp {
    resize: vertical;
    min-height: 60px
}

.money-wrap {
    position: relative
}

.money-prefix {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    pointer-events: none
}

.money-wrap .inp[data-money] {
    padding-left: 34px
}

/* ── Custom Select ── */
.sel-wrap {
    position: relative;
    display: inline-block;
    width: 100%
}

.sel-wrap::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: #9ca3af;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none
}

.sel-wrap select.inp {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 32px;
    cursor: pointer;
    background: #fafafa
}

.sel-wrap select.inp:focus {
    border-color: #1d4ed8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .09)
}

/* ── Custom Multi-Select ── */
.multi-sel-wrap {
    position: relative;
    width: 100%
}

.multi-sel-btn {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    padding: 7px 7px 7px 12px;
    font-size: 13px;
    font-family: inherit;
    background: #fafafa;
    color: #111827;
    cursor: pointer;
    text-align: left;
    transition: border-color .15s, box-shadow .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px
}

.multi-sel-btn:focus,
.multi-sel-btn.open {
    outline: none;
    border-color: #1d4ed8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .09)
}

.multi-sel-btn .ms-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: #6b7280
}

.multi-sel-btn .ms-label.has-value {
    color: #111827
}

.multi-sel-btn .ms-arrow {
    color: #9ca3af;
    font-size: 10px;
    flex-shrink: 0;
    transition: transform .2s
}

.multi-sel-btn.open .ms-arrow {
    transform: rotate(180deg)
}

.multi-sel-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    animation: ddIn .15s ease
}

.multi-sel-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: background .1s
}

.multi-sel-option:hover {
    background: #f3f4f6
}

.multi-sel-option input[type=checkbox] {
    width: 14px;
    height: 14px;
    accent-color: #1d4ed8;
    cursor: pointer;
    flex-shrink: 0
}

.multi-sel-option.selected {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 500
}

@keyframes ddIn {
    from {
        opacity: 0;
        transform: translateY(-6px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* ── Range Slider ── */
.range-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #6b7280;
    font-weight: 500
}

.range-slider-dual {
    position: relative;
    height: 20px;
    display: flex;
    align-items: center
}

.range-slider-dual input[type=range] {
    position: absolute;
    width: 100%;
    height: 4px;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    pointer-events: none;
    outline: none
}

.range-slider-dual input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #1d4ed8;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    cursor: pointer;
    pointer-events: all;
    transition: transform .15s
}

.range-slider-dual input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.15)
}

.range-slider-dual input[type=range]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #1d4ed8;
    border: 2px solid #fff;
    cursor: pointer;
    pointer-events: all
}

.range-track {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: #e5e7eb;
    border-radius: 99px;
    pointer-events: none
}

.range-fill {
    position: absolute;
    height: 4px;
    background: #1d4ed8;
    border-radius: 99px;
    pointer-events: none
}

/* ── Cards ── */
.card {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04)
}

.card-hover {
    transition: box-shadow .2s, transform .2s
}

.card-hover:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .07);
    transform: translateY(-1px)
}

/* ── Progress bar ── */
.progress-track {
    height: 6px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden
}

.progress-fill {
    height: 100%;
    border-radius: 99px;
    transition: width .5s ease
}

/* ── Table ── */
.tbl-row:hover {
    background: #f9fafb
}

.tbl-scroll {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch
}

.tbl-scroll table {
    min-width: 600px;
    table-layout: fixed;
}

/* Financeiro column widths */
.tbl-fin-col-hotel {
    width: 20% !important;
}

.tbl-fin-col-periodo {
    width: 22% !important;
}

.tbl-fin-col-vencimento {
    width: 14% !important;
}

.tbl-fin-col-valor {
    width: 12% !important;
}

.tbl-fin-col-status {
    width: 15% !important;
}

.tbl-fin-col-acoes {
    width: 17% !important;
}

/* Usuários column widths */
.tbl-user-col-nome {
    width: 25% !important;
}

.tbl-user-col-tipo {
    width: 14% !important;
}

.tbl-user-col-empresa {
    width: 22% !important;
}

.tbl-user-col-status {
    width: 12% !important;
}

.tbl-user-col-criado {
    width: 13% !important;
}

.tbl-user-col-acoes {
    width: 14% !important;
}

/* Comandas column widths */
.tbl-cmd-col-foto {
    width: 5% !important;
}

.tbl-cmd-col-hotel {
    width: 20% !important;
}

.tbl-cmd-col-motorista {
    width: 16% !important;
}

.tbl-cmd-col-pecas {
    width: 7% !important;
}

.tbl-cmd-col-status {
    width: 10% !important;
}

.tbl-cmd-col-acao {
    width: 25% !important;
}

/* Fechamento preview table - column widths for peças */
.tbl-fech-col-comanda {
    width: 12% !important;
}

.tbl-fech-col-peca {
    min-width: 220px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.tbl-fech-col-total {
    width: 10% !important;
}

/* Ensure table headers and cells use text overflow for long content */
.tbl-scroll table.table-fixed-layout th,
.tbl-scroll table.table-fixed-layout td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Qty ── */
.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all .15s;
    border: none;
    user-select: none;
    flex-shrink: 0
}

.qty-minus {
    background: #e5e7eb;
    color: #374151
}

.qty-minus:hover {
    background: #d1d5db
}

.qty-plus {
    background: #1d4ed8;
    color: #fff
}

.qty-plus:hover {
    background: #1e40af
}

.qty-input {
    width: 72px;
    text-align: center;
    border: 1.5px solid #e5e7eb;
    border-radius: 5px;
}

/* ── Tabs de Configurações ── */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.qty-input:focus {
    outline: none;
    border-color: #1d4ed8;
    background: #fff
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    opacity: 1
}

/* ── Buttons ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1d4ed8;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
    white-space: nowrap
}

.btn-primary:hover {
    background: #1e40af
}

.btn-primary:disabled {
    background: #93c5fd;
    cursor: not-allowed
}

.btn-primary .btn-label {
    display: inline
}

.btn-white {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #374151;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
    white-space: nowrap
}

.btn-white:hover {
    background: #f9fafb
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #374151;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
    white-space: nowrap
}

.btn-secondary:hover {
    background: #f9fafb
}

.btn-danger {
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap
}

.btn-danger:hover {
    background: #dc2626
}

/* ── Icon btn ── */
.icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all .15s;
    background: transparent;
    color: #9ca3af
}

.icon-btn:hover {
    color: #374151;
    background: #f3f4f6
}

.icon-btn.edit:hover {
    background: #eff6ff;
    color: #1d4ed8
}

.icon-btn.del:hover {
    background: #fef2f2;
    color: #ef4444
}

.icon-btn.view:hover {
    background: #eff6ff;
    color: #1d4ed8
}

.icon-btn.rot:hover {
    background: #fffbeb;
    color: #d97706
}

.icon-btn.dl:hover {
    background: #f0fdf4;
    color: #16a34a
}

.icon-btn.copy:hover {
    background: #eff6ff;
    color: #1d4ed8
}

.icon-btn.photo:hover {
    background: #fdf4ff;
    color: #9333ea
}

.icon-btn.reset:hover {
    background: #fffbeb;
    color: #d97706
}

/* ── Labels ── */
.lbl {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #9ca3af;
    margin-bottom: 3px
}

/* ── Stat card ── */
.stat-card {
    padding: 18px 20px
}

.stat-num {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    color: #111827
}

.stat-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #9ca3af;
    margin-bottom: 6px
}

/* ── Page animation ── */
.page-enter {
    animation: pgIn .2s ease
}

@keyframes pgIn {
    from {
        opacity: 0;
        transform: translateY(6px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* ── User card btn ── */
.user-card-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 3px 5px;
    border-radius: 6px;
    transition: background .15s;
    text-align: left
}

.user-card-btn:hover {
    background: #f3f4f6
}

/* ── Modal error ── */
.modal-err {
    margin-top: 10px;
    padding: 9px 11px;
    border-radius: 6px;
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    color: #dc2626;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 7px
}

/* ── Notification dropdown ── */
#notif-dropdown {
    position: fixed;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .11);
    z-index: 8500;
    overflow: hidden;
    width: 300px;
    animation: ddIn .15s ease
}

/* ── Overlay sidebar mobile ── */
#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 49;
    background: rgba(0, 0, 0, .35)
}

#sidebar-overlay.active {
    display: block
}

/* ── Page header util ── */
.page-hdr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px
}

.page-hdr-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto
}

/* ── Filter bar ── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end
}

.filter-bar .filter-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 130px;
    flex: 1
}

.filter-bar .filter-actions {
    display: flex;
    align-items: flex-end;
    gap: 6px
}

/* ── Ocultar input de busca da barra superior ── */
.relative.hide-mobile {
    display: none !important;
}

/* ── Mobile Filters Toggle ── */
.filters-mobile-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    user-select: none
}

.filters-mobile-toggle i.toggle-icon {
    margin-left: auto;
    font-size: 10px;
    transition: transform .2s;
    color: #9ca3af
}

/* ── Rodapé global ── */
.site-footer {
    text-align: center;
    font-size: 10px;
    color: #d1d5db;
    margin-top: 24px;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding-bottom: 12px
}

/* ── Responsive ── */
/* Desktop: ham oculto, avatar topo oculto */
#ham-btn {
    display: none !important
}

.top-avatar-mobile {
    display: none !important
}

@media(max-width:768px) {
    #sidebar {
        display: none !important;
        position: fixed !important;
        z-index: 50 !important;
        height: 100dvh !important
    }

    #sidebar.mobile-open {
        display: flex !important;
        flex-direction: column
    }

    #main-wrapper {
        margin-left: 0 !important
    }

    #ham-btn {
        display: flex !important
    }

    .top-avatar-mobile {
        display: inline-flex !important
    }

    .hide-mobile {
        display: none !important
    }

    .nova-comanda-motorista .btn-label {
        display: none !important
    }

    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .btn-white {
        padding: 8px 10px
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important
    }

    .dash-top-grid {
        grid-template-columns: 1fr !important
    }

    .filter-bar .filter-field {
        min-width: 120px
    }

    /* Mobile Filters Toggle logic */
    .filters-mobile-toggle {
        display: flex
    }

    .filters-container .filter-bar {
        display: none;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #f3f4f6
    }

    .filters-container.filters-open .filter-bar {
        display: flex
    }

    .filters-container.filters-open .toggle-icon {
        transform: rotate(180deg)
    }

    /* Keep "Limpar" label visible in filters on mobile */
    .filter-bar .filter-actions .btn-label {
        display: inline !important
    }

    /* Usuários mobile columns - increase widths for better readability */
    .tbl-user-col-nome {
        width: 30% !important;
    }

    .tbl-user-col-tipo {
        width: 18% !important;
    }

    .tbl-user-col-empresa {
        width: 22% !important;
    }

    .tbl-user-col-status {
        width: 15% !important;
    }

    .tbl-user-col-criado {
        width: 15% !important;
    }

    /* Financeiro mobile columns */
    .tbl-fin-col-valor {
        width: 20% !important;
    }

    .tbl-fin-col-status {
        width: 18% !important;
    }

    .tbl-fin-col-hotel {
        width: 18% !important;
    }

    .tbl-fin-col-periodo {
        width: 18% !important;
    }

    .tbl-fin-col-vencimento {
        width: 16% !important;
    }

    /* Precificação mobile column widths */
    .tbl-prec-col-pecas {
        width: 42% !important;
    }

    .tbl-prec-col-padrao {
        width: 14% !important;
    }

    .tbl-prec-col-especifico {
        width: 32% !important;
    }

    .tbl-prec-col-reset {
        width: 12% !important;
    }
}

@media(max-width:480px) {
    .filter-bar .filter-field {
        min-width: 100%;
        flex: 1 1 100%
    }
}

/* ── Loading Screen ── */
.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px
}