/* ==========================================================================
   Design Tokens & Tailwind CSS Variables
   Permite estilizacao nativa consistente com a escala oficial do Tailwind
   ========================================================================== */
:root {
    /* ── Cores Base ── */
    --color-white: #ffffff;
    --color-black: #000000;

    /* ── Tailwind Slate ── */
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;

    /* ── Tailwind Gray ── */
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;

    /* ── Tailwind Blue ── */
    --color-blue-50: #eff6ff;
    --color-blue-100: #dbeafe;
    --color-blue-200: #bfdbfe;
    --color-blue-300: #93c5fd;
    --color-blue-400: #60a5fa;
    --color-blue-500: #3b82f6;
    --color-blue-600: #2563eb;
    --color-blue-700: #1d4ed8;
    --color-blue-800: #1e40af;
    --color-blue-900: #1e3a8a;

    /* ── Tailwind Red ── */
    --color-red-50: #fef2f2;
    --color-red-100: #fee2e2;
    --color-red-200: #fecaca;
    --color-red-400: #f87171;
    --color-red-500: #ef4444;
    --color-red-600: #dc2626;
    --color-red-700: #b91c1c;
    --color-red-800: #991b1b;

    /* ── Tailwind Green ── */
    --color-green-50: #f0fdf4;
    --color-green-100: #dcfce7;
    --color-green-200: #bbf7d0;
    --color-green-400: #4ade80;
    --color-green-500: #22c55e;
    --color-green-600: #16a34a;
    --color-green-700: #15803d;
    --color-green-800: #166534;

    /* ── Tailwind Amber & Yellow ── */
    --color-amber-50: #fffbeb;
    --color-amber-100: #fef3c7;
    --color-amber-200: #fde68a;
    --color-amber-300: #fcd34d;
    --color-amber-400: #fbbf24;
    --color-amber-500: #f59e0b;
    --color-amber-600: #d97706;
    --color-amber-700: #b45309;
    --color-amber-800: #92400e;
    --color-yellow-100: #fef9c3;
    --color-yellow-200: #fef08a;
    --color-yellow-500: #eab308;
    --color-yellow-600: #ca8a04;
    --color-yellow-700: #a16207;
    --color-yellow-800: #854d0e;

    /* ── Raios de Borda (Border Radius) ── */
    --radius-none: 0px;
    --radius-sm: 2px;
    --radius: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-full: 9999px;

    /* ── Sombras (Box Shadows) ── */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* ── Transições (Transitions) ── */
    --transition-fast: all 0.15s ease;
    --transition-normal: all 0.2s ease;
    --transition-slow: all 0.3s ease-in-out;
    --transition-transform: transform 0.3s ease-in-out;

    /* ── Tipografia: Tamanhos de Fonte ── */
    --font-size-2xs: 9.5px;
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-base: 15px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 30px;

    /* ── Tipografia: Pesos de Fonte ── */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* ── Espaçamento: Escala de Gaps ── */
    --gap-xs: 4px;
    --gap-sm: 6px;
    --gap-md: 8px;
    --gap-base: 10px;
    --gap-lg: 12px;
    --gap-xl: 16px;
}

/* Lavanderia Pro - Estilos Customizados */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html,
body {
    height: 100dvh;
    font-family: 'Inter', sans-serif;
    background: var(--color-slate-50);
    color: var(--color-gray-900);
    overflow: hidden
}

select,
option {
    font-family: 'Inter', sans-serif;
}

/* Grid de campos da comanda (responsivo) */
.comanda-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-base);
}
@media (min-width: 768px) {
    .comanda-fields-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* ── Sidebar ── */
#sidebar {
    width: 220px;
    flex-shrink: 0;
    height: 100dvh;
    transition: var(--transition-transform);
}

/* 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: var(--transition-transform);
    }

    #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: var(--gap-base);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--color-gray-500);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    transition: var(--transition-fast);
    text-decoration: none
}

.nav-item:hover {
    background: var(--color-gray-100);
    color: var(--color-gray-900)
}

.nav-item.active {
    color: var(--color-blue-700);
    background: var(--color-blue-50);
    font-weight: var(--font-weight-semibold)
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 3px;
    background: var(--color-blue-700);
    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: var(--gap-xs);
    padding: 2px 8px;
    border-radius: var(--radius);
    font-size: 10.5px;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: .3px;
    white-space: nowrap
}

.badge .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0
}

.badge-recebida {
    background: var(--color-gray-100);
    color: var(--color-gray-700)
}

.comanda-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-base);
}
@media (min-width: 768px) {
  .comanda-fields-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.badge-recebida .dot {
    background: var(--color-gray-400)
}

.badge-lavando {
    background: var(--color-yellow-100);
    color: var(--color-yellow-800)
}

.badge-lavando .dot {
    background: var(--color-yellow-600)
}

.badge-pronta {
    background: var(--color-blue-100);
    color: var(--color-blue-800)
}

.badge-pronta .dot {
    background: var(--color-blue-500)
}

.badge-entregue {
    background: var(--color-green-100);
    color: var(--color-green-800)
}

.badge-entregue .dot {
    background: var(--color-green-500)
}

.badge-atrasado {
    background: var(--color-red-100);
    color: var(--color-red-800)
}

.badge-atrasado .dot {
    background: var(--color-red-500)
}

.badge-pago {
    background: var(--color-green-100);
    color: var(--color-green-800)
}

.badge-pago .dot {
    background: var(--color-green-500)
}

.badge-aberto {
    background: var(--color-yellow-100);
    color: var(--color-yellow-800)
}

.badge-aberto .dot {
    background: var(--color-yellow-600)
}

.badge-rascunho {
    background: var(--color-gray-200);
    color: var(--color-gray-700)
}

.badge-rascunho .dot {
    background: var(--color-gray-500)
}

.badge-ativo {
    background: var(--color-green-100);
    color: var(--color-green-800)
}

.badge-ativo .dot {
    background: var(--color-green-500)
}

.badge-inativo {
    background: var(--color-red-100);
    color: var(--color-red-800)
}

.badge-inativo .dot {
    background: var(--color-red-500)
}

.badge-trial {
    background: var(--color-yellow-100);
    color: var(--color-yellow-800)
}

.badge-trial .dot {
    background: var(--color-yellow-600)
}

/* ── Toast ── */
#toast-container {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    pointer-events: none
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--gap-base);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    max-width: 340px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    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: var(--color-green-50);
    border-left: 3px solid var(--color-green-500);
    color: var(--color-green-700)
}

.toast-error {
    background: var(--color-red-50);
    border-left: 3px solid var(--color-red-500);
    color: var(--color-red-600)
}

.toast-warning {
    background: var(--color-amber-50);
    border-left: 3px solid #f59e0b;
    color: var(--color-amber-700)
}

.toast-info {
    background: var(--color-blue-50);
    border-left: 3px solid var(--color-blue-500);
    color: var(--color-blue-700)
}

@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: var(--color-white);
    border-radius: var(--radius-xl);
    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;
}

.modal-hdr {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-slate-100);
    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: var(--color-slate-700);
    line-height: 1.6;
}

.modal-ftr {
    padding: 14px 20px;
    border-top: 1px solid var(--color-slate-100);
    display: flex;
    gap: var(--gap-base);
    justify-content: flex-end;
    flex-shrink: 0;
    background: var(--color-slate-50);
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
}

.modal-box.modal-lg {
    max-width: 720px;
}

.modal-box.modal-xl {
    max-width: 900px;
    max-height: 90vh;
}

.modal-box.view-fechamento-modal {
    max-width: 98dvw;
}

/* Responsive modal height for mobile */
@media(max-width:768px) {
    .modal-box {
        max-height: 80dvh;
    }

    .modal-box.modal-lg {
        max-width: 96dvw;
        max-height: 80dvh;
    }

    .modal-box.modal-xl {
        max-width: 98dvw;
        max-height: 80dvh;
    }
}

@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 0.2s ease;
    cursor: zoom-in;
    border-radius: var(--radius)
}

#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: var(--color-white);
    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: var(--gap-lg);
    padding: 16px
}

#cropper-container {
    width: 100%;
    max-width: 600px;
    max-height: 70dvh;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #000
}

#cropper-img {
    display: block;
    max-width: 100%;
    max-height: 70dvh
}

.cropper-actions {
    display: flex;
    gap: var(--gap-base);
    flex-wrap: wrap;
    justify-content: center
}

/* ── Login ── */
.login-gradient {
    height: 100dvh;
    background: linear-gradient(145deg, var(--color-slate-900) 0%, var(--color-blue-700) 60%, var(--color-blue-500) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px
}

.login-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    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 var(--color-gray-200);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-size: var(--font-size-sm);
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
    background: #fafafa;
    color: var(--color-gray-900)
}

.inp:focus {
    outline: none;
    border-color: var(--color-blue-700);
    background: var(--color-white);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .09)
}

.inp:disabled {
    opacity: .6;
    cursor: not-allowed;
    background: var(--color-gray-100)
}

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: var(--font-weight-bold);
    color: var(--color-gray-500);
    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: var(--color-gray-400);
    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: var(--color-blue-700);
    background: var(--color-white);
    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 var(--color-gray-200);
    border-radius: var(--radius-md);
    padding: 7px 7px 7px 12px;
    font-size: var(--font-size-sm);
    font-family: inherit;
    background: #fafafa;
    color: var(--color-gray-900);
    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: var(--gap-sm)
}

.multi-sel-btn:focus,
.multi-sel-btn.open {
    outline: none;
    border-color: var(--color-blue-700);
    background: var(--color-white);
    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: var(--font-size-sm);
    color: var(--color-gray-500)
}

.multi-sel-btn .ms-label.has-value {
    color: var(--color-gray-900)
}

.multi-sel-btn .ms-arrow {
    color: var(--color-gray-400);
    font-size: 10px;
    flex-shrink: 0;
    transition: transform 0.2s ease
}

.multi-sel-btn.open .ms-arrow {
    transform: rotate(180deg)
}

.multi-sel-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    width: max-content;
    max-width: min(380px, calc(100vw - 32px));
    box-sizing: border-box;
    background: var(--color-white);
    border: 1.5px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, .12), 0 8px 10px -6px rgba(0, 0, 0, .08);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: ddIn .15s ease;
}

.multi-sel-dropdown.align-right {
    left: auto;
    right: 0;
}

.multi-sel-search {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-gray-100);
    background: #fafafa;
    flex-shrink: 0;
}

.multi-sel-search i {
    font-size: var(--font-size-xs);
    color: var(--color-gray-400);
}

.multi-sel-search input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 12px;
    color: var(--color-gray-900);
    font-family: inherit;
    outline: none;
}

.multi-sel-search input::placeholder {
    color: var(--color-gray-400);
}

.multi-sel-search .ms-search-clear {
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    color: var(--color-gray-400);
    border-radius: 50%;
    flex-shrink: 0;
    transition: color .15s, background-color .15s;
}

.multi-sel-search .ms-search-clear:hover {
    color: var(--color-red-500);
    background-color: var(--color-red-100);
}

.multi-sel-search .ms-search-clear i {
    font-size: var(--font-size-xs);
    color: inherit;
}

/* Input com botão de limpar nos filtros */
.filter-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.filter-input-wrap .inp {
    padding-right: 28px !important;
}

.filter-input-wrap .filter-input-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: var(--color-gray-400);
    border-radius: 50%;
    flex-shrink: 0;
    transition: color .15s, background-color .15s;
    z-index: 2;
}

.filter-input-wrap .filter-input-clear:hover {
    color: var(--color-red-500);
    background-color: var(--color-red-100);
}

.filter-input-wrap .filter-input-clear i {
    font-size: var(--font-size-xs);
    color: inherit;
}

.multi-sel-list {
    max-height: 250px;
    overflow-y: auto;
    padding: 4px 0;
}

.multi-sel-group-header {
    padding: 6px 12px 2px 12px;
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--color-gray-400);
    background: var(--color-white);
    user-select: none;
}

.multi-sel-option {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12.5px;
    color: var(--color-gray-700);
    transition: background .1s;
    user-select: none;
}

.multi-sel-option:hover {
    background: var(--color-gray-100)
}

.multi-sel-option .ms-checkbox {
    width: 15px;
    height: 15px;
    border-radius: var(--radius);
    border: 1.5px solid var(--color-gray-300);
    background: var(--color-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color .15s;
    box-sizing: border-box;
}

.multi-sel-option .ms-check-icon {
    font-size: 9px;
    color: var(--color-white);
    display: none;
}

.multi-sel-option.selected {
    background: var(--color-blue-50);
    color: var(--color-blue-700);
    font-weight: var(--font-weight-semibold);
}

.multi-sel-option.selected .ms-checkbox {
    background: var(--color-blue-700);
    border-color: var(--color-blue-700);
}

.multi-sel-option.selected .ms-check-icon {
    display: block;
}

.multi-sel-option .ms-opt-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-sel-empty {
    padding: 14px 12px;
    font-size: 12px;
    color: var(--color-gray-400);
    text-align: center;
}

/* ── Custom Date Range Picker ── */
.date-range-wrap {
    position: relative;
    width: 100%;
}

.date-range-btn {
    width: 100%;
    border: 1.5px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    padding: 7px 30px 7px 12px;
    font-size: var(--font-size-sm);
    font-family: inherit;
    background: #fafafa;
    color: var(--color-gray-900);
    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;
    position: relative;
}

.date-range-btn:focus,
.date-range-btn.open {
    outline: none;
    border-color: var(--color-blue-700);
    background: var(--color-white);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .09);
}

.date-range-btn .dr-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--font-size-sm);
    color: var(--color-gray-500);
}

.date-range-btn .dr-label.has-value {
    color: var(--color-gray-900);
    font-weight: var(--font-weight-medium);
}

.date-range-btn .dr-calendar-icon {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gray-400);
    font-size: var(--font-size-sm);
    pointer-events: none;
}

.date-range-wrap .date-range-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: var(--color-gray-400);
    border-radius: 50%;
    flex-shrink: 0;
    transition: color .15s, background-color .15s;
    z-index: 3;
}

.date-range-wrap .date-range-clear:hover {
    color: var(--color-red-500);
    background-color: var(--color-red-100);
}

.date-range-wrap .date-range-clear i {
    font-size: var(--font-size-xs);
    color: inherit;
}

.date-range-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 280px;
    width: 300px;
    max-width: min(340px, calc(100vw - 32px));
    box-sizing: border-box;
    background: var(--color-white);
    border: 1.5px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, .12), 0 8px 10px -6px rgba(0, 0, 0, .08);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 14px;
    gap: var(--gap-lg);
    animation: ddIn .15s ease;
}

.date-range-dropdown.align-right {
    left: auto;
    right: 0;
}

.date-range-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-base);
}

.date-range-input-item {
    display: flex;
    flex-direction: column;
    gap: var(--gap-xs);
}

.date-range-input-item label {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-500);
    text-transform: uppercase;
    letter-spacing: .3px;
}

.date-range-input-item input[type="date"] {
    width: 100%;
    padding: 6px 8px;
    font-size: 12px;
    border: 1.5px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    background: #fafafa;
    color: var(--color-gray-900);
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
}

.date-range-input-item input[type="date"]:focus {
    border-color: var(--color-blue-700);
    background: var(--color-white);
    box-shadow: 0 0 0 2px rgba(29, 78, 216, .1);
}

.date-range-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--color-gray-100);
    gap: var(--gap-md);
}

@keyframes ddIn {
    from {
        opacity: 0;
        transform: translateY(-6px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* ── Range Slider ── */
.range-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--gap-xs)
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: var(--font-size-xs);
    color: var(--color-gray-500);
    font-weight: var(--font-weight-medium)
}

.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: var(--color-blue-700);
    border: 2px solid var(--color-white);
    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: var(--color-blue-700);
    border: 2px solid var(--color-white);
    cursor: pointer;
    pointer-events: all
}

.range-track {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-gray-200);
    border-radius: var(--radius-full);
    pointer-events: none
}

.range-fill {
    position: absolute;
    height: 4px;
    background: var(--color-blue-700);
    border-radius: var(--radius-full);
    pointer-events: none
}

/* ── Cards ── */
.card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-gray-200);
    box-shadow: var(--shadow-sm)
}

.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: var(--color-gray-200);
    border-radius: var(--radius-full);
    overflow: hidden
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width .5s ease
}

/* ── Table ── */
.tbl-row {
    transition: background 0.15s ease;
}

.tbl-row:hover {
    background: var(--color-gray-100) !important;
}

.tbl-row[style*="#fff5f5"]:hover {
    background: var(--color-red-100) !important;
}

.tbl-row.selected,
.tbl-row:has(input[type="checkbox"]:checked) {
    background: var(--color-gray-200) !important;
}

.tbl-row.selected:hover,
.tbl-row:has(input[type="checkbox"]:checked):hover {
    background: var(--color-gray-300) !important;
}

.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-chk {
    width: 44px !important;
    min-width: 44px !important;
    text-align: center !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
}
.tbl-fin-col-hotel {
    width: auto !important;
    min-width: 180px !important;
}
.tbl-fin-col-periodo {
    width: 180px !important;
    min-width: 180px !important;
}
.tbl-fin-col-vencimento {
    width: 110px !important;
    min-width: 110px !important;
}
.tbl-fin-col-valor {
    width: 110px !important;
    min-width: 110px !important;
}
.tbl-fin-col-status {
    width: 110px !important;
    min-width: 110px !important;
}
.tbl-fin-col-acoes {
    width: 180px !important;
    min-width: 180px !important;
}

/* Fechamentos Cliente column widths */
.tbl-cli-fech-col-periodo {
    width: auto !important;
    min-width: 180px !important;
}
.tbl-cli-fech-col-vencimento {
    width: 140px !important;
    min-width: 140px !important;
}
.tbl-cli-fech-col-valor {
    width: 120px !important;
    min-width: 120px !important;
    text-align: right !important;
}
.tbl-cli-fech-col-status {
    width: 110px !important;
    min-width: 110px !important;
}
.tbl-cli-fech-col-acoes {
    width: 130px !important;
    min-width: 130px !important;
}

/* Usuários (Admin) column widths */
.tbl-user-col-chk {
    width: 44px !important;
    min-width: 44px !important;
    text-align: center !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
}
.tbl-user-col-nome {
    width: auto !important;
    min-width: 200px !important;
}
.tbl-user-col-tipo {
    width: 130px !important;
    min-width: 130px !important;
}
.tbl-user-col-criado {
    width: 120px !important;
    min-width: 120px !important;
}
.tbl-user-col-acoes {
    width: 100px !important;
    min-width: 100px !important;
}

/* Clientes (Admin) column widths */
.tbl-cli-col-chk {
    width: 44px !important;
    min-width: 44px !important;
    text-align: center !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
}
.tbl-cli-col-nome {
    width: auto !important;
    min-width: 200px !important;
}
.tbl-cli-col-contato {
    width: 140px !important;
    min-width: 140px !important;
}
.tbl-cli-col-documento {
    width: 150px !important;
    min-width: 150px !important;
}
.tbl-cli-col-telefone {
    width: 130px !important;
    min-width: 130px !important;
}
.tbl-cli-col-criado {
    width: 110px !important;
    min-width: 110px !important;
}
.tbl-cli-col-acoes {
    width: 100px !important;
    min-width: 100px !important;
}

/* Peças column widths */
.tbl-peca-col-chk {
    width: 44px !important;
    min-width: 44px !important;
    text-align: center !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
}
.tbl-peca-col-nome {
    width: auto !important;
    min-width: 200px !important;
}
.tbl-peca-col-preco {
    width: 140px !important;
    min-width: 140px !important;
}
.tbl-peca-col-status {
    width: 110px !important;
    min-width: 110px !important;
}
.tbl-peca-col-acoes {
    width: 100px !important;
    min-width: 100px !important;
}

/* Precificação column widths */
.tbl-prc-col-peca {
    width: auto !important;
    min-width: 140px !important;
}
.tbl-prc-col-padrao {
    width: 110px !important;
    min-width: 110px !important;
}
.tbl-prc-col-especifico {
    width: 130px !important;
    min-width: 130px !important;
}
.tbl-prc-col-reset {
    width: 70px !important;
    min-width: 70px !important;
}

/* Contratos column widths */
.tbl-ctr-col-chk {
    width: 44px !important;
    min-width: 44px !important;
    text-align: center !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
}
.tbl-ctr-col-titulo {
    width: auto !important;
    min-width: 200px !important;
}
.tbl-ctr-col-cliente {
    width: 170px !important;
    min-width: 170px !important;
}
.tbl-ctr-col-vigencia {
    width: 240px !important;
    min-width: 240px !important;
}
.tbl-ctr-col-status {
    width: 130px !important;
    min-width: 130px !important;
}
.tbl-ctr-col-acoes {
    width: 220px !important;
    min-width: 220px !important;
}

/* Orçamentos column widths */
.tbl-orc-col-chk {
    width: 44px !important;
    min-width: 44px !important;
    text-align: center !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
}
.tbl-orc-col-nome {
    width: auto !important;
    min-width: 200px !important;
}
.tbl-orc-col-contato {
    width: 160px !important;
    min-width: 160px !important;
}
.tbl-orc-col-status {
    width: 120px !important;
    min-width: 120px !important;
}
.tbl-orc-col-acoes {
    width: 240px !important;
    min-width: 240px !important;
}

/* Super Admin - Usuários column widths */
.tbl-sa-usr-col-chk {
    width: 44px !important;
    min-width: 44px !important;
    text-align: center !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
}
.tbl-sa-usr-col-usuario {
    width: auto !important;
    min-width: 200px !important;
}
.tbl-sa-usr-col-email {
    width: 220px !important;
    min-width: 220px !important;
}
.tbl-sa-usr-col-empresa {
    width: 220px !important;
    min-width: 220px !important;
}
.tbl-sa-usr-col-status {
    width: 100px !important;
    min-width: 100px !important;
}
.tbl-sa-usr-col-criado {
    width: 110px !important;
    min-width: 110px !important;
}
.tbl-sa-usr-col-acoes {
    width: 100px !important;
    min-width: 100px !important;
}

/* Super Admin - Empresas column widths */
.tbl-sa-emp-col-chk {
    width: 44px !important;
    min-width: 44px !important;
    text-align: center !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
}
.tbl-sa-emp-col-empresa {
    width: auto !important;
    min-width: 220px !important;
}
.tbl-sa-emp-col-dominio {
    width: 250px !important;
    min-width: 250px !important;
}
.tbl-sa-emp-col-plano {
    width: 160px !important;
    min-width: 160px !important;
}
.tbl-sa-emp-col-vencimento {
    width: 110px !important;
    min-width: 110px !important;
}
.tbl-sa-emp-col-status {
    width: 125px !important;
    min-width: 125px !important;
}
.tbl-sa-emp-col-acoes {
    width: 120px !important;
    min-width: 120px !important;
}

/* Super Admin - Logs de Segurança column widths */
.tbl-sa-log-col-chk {
    width: 44px !important;
    min-width: 44px !important;
    text-align: center !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
}
.tbl-sa-log-col-data {
    width: 160px !important;
    min-width: 160px !important;
}
.tbl-sa-log-col-tipo {
    width: 120px !important;
    min-width: 120px !important;
}
.tbl-sa-log-col-ator {
    width: 110px !important;
    min-width: 110px !important;
}
.tbl-sa-log-col-evento {
    width: auto !important;
    min-width: 300px !important;
}
.tbl-sa-log-col-usuario {
    width: 240px !important;
    min-width: 240px !important;
}
.tbl-sa-log-col-ip {
    width: 280px !important;
    min-width: 280px !important;
}
.tbl-sa-log-col-empresa {
    width: 180px !important;
    min-width: 180px !important;
}
.tbl-sa-log-col-acoes {
    width: 90px !important;
    min-width: 90px !important;
}

/* Comandas column widths (Enterprise Standard) */
.tbl-cmd-col-chk {
    width: 44px !important;
    min-width: 44px !important;
    text-align: center !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
}
.tbl-cmd-col-codigo {
    width: 135px !important;
    min-width: 135px !important;
}
.tbl-cmd-col-faturamento {
    width: 48px !important;
    min-width: 48px !important;
    text-align: center !important;
}
.tbl-cmd-col-data {
    width: 110px !important;
    min-width: 110px !important;
}
.tbl-cmd-col-data-entrega {
    width: 110px !important;
    min-width: 110px !important;
}
.tbl-cmd-col-hotel {
    width: auto !important;
    min-width: 180px !important;
}
.tbl-cmd-col-motorista {
    width: 140px !important;
    min-width: 140px !important;
}
.tbl-cmd-col-operador {
    width: 140px !important;
    min-width: 140px !important;
}
.tbl-cmd-col-pecas {
    width: 85px !important;
    min-width: 85px !important;
}
.tbl-cmd-col-valor {
    width: 110px !important;
    min-width: 110px !important;
    text-align: right !important;
}
.tbl-cmd-col-status {
    width: 120px !important;
    min-width: 120px !important;
}
.tbl-cmd-col-acao {
    width: 180px !important;
    min-width: 180px !important;
}

/* Clientes (Hotéis) column widths */
.tbl-cli-col-nome {
    width: auto !important;
    min-width: 200px !important;
}
.tbl-cli-col-contato {
    width: 150px !important;
    min-width: 150px !important;
}
.tbl-cli-col-documento {
    width: 170px !important;
    min-width: 170px !important;
}
.tbl-cli-col-telefone {
    width: 140px !important;
    min-width: 140px !important;
}
.tbl-cli-col-criado {
    width: 130px !important;
    min-width: 130px !important;
}
.tbl-cli-col-acoes {
    width: 100px !important;
    min-width: 100px !important;
}

/* Cliente - Fechamentos column widths */
.tbl-cli-fech-col-periodo {
    width: auto !important;
    min-width: 180px !important;
}
.tbl-cli-fech-col-vencimento {
    width: 170px !important;
    min-width: 170px !important;
}
.tbl-cli-fech-col-valor {
    width: 110px !important;
    min-width: 110px !important;
}
.tbl-cli-fech-col-status {
    width: 130px !important;
    min-width: 130px !important;
}
.tbl-cli-fech-col-acoes {
    width: 160px !important;
    min-width: 160px !important;
}

/* Fechamento preview table - column widths for peças */
.tbl-fech-col-comanda {
    width: auto !important;
    min-width: 75px !important;
}

/* Dashboard Últimas Coletas table */
.tbl-dash-col-hotel {
    width: auto !important;
    min-width: 180px !important;
}
.tbl-dash-col-comanda {
    width: 105px !important;
    min-width: 105px !important;
}
.tbl-dash-col-itens {
    width: 105px !important;
    min-width: 105px !important;
}
.tbl-dash-col-horario {
    width: 110px !important;
    min-width: 110px !important;
}
.tbl-dash-col-motorista {
    width: 130px !important;
    min-width: 130px !important;
}
.tbl-dash-col-status {
    width: 130px !important;
    min-width: 130px !important;
}

/* Super Admin Dashboard - Últimas Empresas Cadastradas table */
.tbl-sa-dash-col-empresa {
    width: auto !important;
    min-width: 264px !important;
}
.tbl-sa-dash-col-dominio {
    width: 250px !important;
    min-width: 250px !important;
}
.tbl-sa-dash-col-status {
    width: 130px !important;
    min-width: 130px !important;
}
.tbl-sa-dash-col-cadastro {
    width: 160px !important;
    min-width: 160px !important;
}

.tbl-fech-col-peca {
    width: auto !important;
    min-width: 50px !important;
    max-width: 80px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.tbl-fech-col-total {
    width: auto !important;
    min-width: 60px !important;
    max-width: 80px !important;
}

.tbl-fech-col-valor {
    width: auto !important;
    min-width: 90px !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !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: var(--font-weight-bold);
    transition: var(--transition-fast);
    border: none;
    user-select: none;
    flex-shrink: 0
}

.qty-minus {
    background: var(--color-gray-200);
    color: var(--color-gray-700)
}

.qty-minus:hover {
    background: var(--color-gray-300)
}

.qty-plus {
    background: var(--color-blue-700);
    color: var(--color-white)
}

.qty-plus:hover {
    background: var(--color-blue-800)
}

.qty-input {
    width: 72px;
    text-align: center;
    border: 1.5px solid var(--color-gray-200);
    border-radius: var(--radius-md);
}

/* ── Tabs de Configurações ── */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.qty-input:focus {
    outline: none;
    border-color: var(--color-blue-700);
    background: var(--color-white)
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    opacity: 1
}

/* ── Buttons ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--gap-sm);
    background: var(--color-blue-700);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
    white-space: nowrap
}

.btn-primary:hover {
    background: var(--color-blue-800)
}

.btn-primary:disabled {
    background: var(--color-blue-300);
    cursor: not-allowed
}

.btn-primary .btn-label {
    display: inline
}

.btn-white {
    display: inline-flex;
    align-items: center;
    gap: var(--gap-sm);
    background: var(--color-white);
    color: var(--color-gray-700);
    border: 1.5px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
    white-space: nowrap
}

.btn-white:hover {
    background: var(--color-gray-50)
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--gap-sm);
    background: var(--color-white);
    color: var(--color-gray-700);
    border: 1.5px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
    white-space: nowrap
}

.btn-secondary:hover {
    background: var(--color-gray-50)
}

.btn-danger {
    background: var(--color-red-500);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: var(--gap-sm);
    white-space: nowrap
}

.btn-danger:hover {
    background: var(--color-red-600)
}

.btn-danger:disabled {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
}

/* ── Icon btn ── */
.icon-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    transition: var(--transition-fast);
    background: transparent;
    color: var(--color-gray-400)
}

.icon-btn:disabled,
.icon-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.icon-btn:hover {
    color: var(--color-gray-700);
    background: var(--color-gray-100)
}

.icon-btn.edit:hover {
    background: var(--color-blue-50);
    color: var(--color-blue-700)
}

.icon-btn.del:hover {
    background: var(--color-red-50);
    color: var(--color-red-500)
}

.icon-btn.view:hover {
    background: var(--color-blue-50);
    color: var(--color-blue-700)
}

.icon-btn.rot:hover {
    background: var(--color-amber-50);
    color: var(--color-amber-600)
}

.icon-btn.dl:hover {
    background: var(--color-green-50);
    color: var(--color-green-600)
}

.icon-btn.dl-green,
.icon-btn.green {
    color: var(--color-green-600);
}

.icon-btn.dl-green:hover,
.icon-btn.green:hover {
    background: var(--color-green-50);
    color: var(--color-green-700);
}

.icon-btn.copy:hover {
    background: var(--color-blue-50);
    color: var(--color-blue-700)
}

.icon-btn.photo:hover {
    background: #fdf4ff;
    color: #9333ea
}

.icon-btn.reset:hover {
    background: var(--color-amber-50);
    color: var(--color-amber-600)
}

.icon-btn.send:hover {
    background: var(--color-blue-50);
    color: var(--color-blue-700);
}

.icon-btn.approve:hover {
    background: var(--color-green-50);
    color: var(--color-green-600);
}

.icon-btn.cancel:hover {
    background: var(--color-red-50);
    color: var(--color-red-500);
}

.icon-btn.whatsapp:hover {
    background: var(--color-green-50);
    color: var(--color-green-600);
}

.icon-btn.print:hover {
    background: var(--color-gray-100);
    color: var(--color-gray-800);
}

.icon-btn.pdf:hover {
    background: var(--color-red-50);
    color: var(--color-red-600);
}

.icon-btn.pix:hover {
    background: #f0fdf4;
    color: #77B6A8;
}

.icon-btn.star:hover {
    background: var(--color-amber-50);
    color: var(--color-amber-600);
}

.icon-btn.plug:hover,
.icon-btn.test:hover {
    background: var(--color-blue-50);
    color: var(--color-blue-700);
}

.icon-btn.bordered {
    border: 1px solid var(--color-gray-300);
    background: var(--color-white);
    color: var(--color-gray-500);
}

.icon-btn.bordered:hover {
    border-color: var(--color-gray-400);
}

.icon-btn.bordered.edit:hover {
    border-color: var(--color-blue-300);
    background: var(--color-blue-50);
    color: var(--color-blue-700);
}

.icon-btn.bordered.del:hover {
    border-color: var(--color-red-300);
    background: var(--color-red-50);
    color: var(--color-red-600);
}

.icon-btn-bordered {
    width: auto;
    height: 28px;
    padding: 0 8px;
    gap: var(--gap-xs);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    background: var(--color-white);
    color: var(--color-gray-500);
    font-size: 11px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-btn-bordered:hover {
    background: var(--color-gray-50);
    color: var(--color-gray-800);
    border-color: var(--color-gray-400);
}

.icon-btn-bordered.star:hover {
    background: var(--color-amber-50);
    color: var(--color-amber-700);
    border-color: var(--color-amber-300);
}

.icon-btn-bordered.test:hover {
    background: var(--color-blue-50);
    color: var(--color-blue-700);
    border-color: var(--color-blue-300);
}

.icon-btn-bordered.edit:hover {
    background: var(--color-blue-50);
    color: var(--color-blue-700);
    border-color: var(--color-blue-300);
}

.icon-btn-bordered.del:hover {
    background: var(--color-red-50);
    color: var(--color-red-600);
    border-color: var(--color-red-300);
}

.btn-secondary-prec-enviar i {
    color: var(--color-gray-400);
    transition: var(--transition-fast);
}

.btn-secondary-prec-enviar:hover i {
    color: var(--color-blue-700);
}

/* ── Labels ── */
.lbl {
    display: block;
    font-size: 10.5px;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--color-gray-400);
    margin-bottom: 3px
}

/* ── Stat card & KPI Indicators (SaaS Boilerplate Standard) ── */
.stat-card {
    padding: 14px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border-radius: var(--radius-md);
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
}

.stat-card > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card-elevated {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-card-elevated:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card-elevated .stat-num-elevated {
    font-size: clamp(20px, 2.2vw, 32px);
    font-weight: var(--font-weight-extrabold);
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.5px;
    white-space: normal;
    word-break: normal;
}

.stat-card-elevated .stat-sub-elevated {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
    margin-top: 6px;
}

.stat-num {
    font-size: clamp(14px, 1.25vw, 19px);
    font-weight: var(--font-weight-extrabold);
    line-height: 1.15;
    color: var(--color-gray-900);
    letter-spacing: -0.3px;
    white-space: normal;
    word-break: normal;
}

.stat-label {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--color-gray-400);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-trend {
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
    display: inline-flex;
    align-items: flex-start;
    gap: 4px;
    margin-top: 4px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.25;
    max-width: 100%;
}

.kpi-trend i {
    flex-shrink: 0;
    margin-top: 2px;
}

.kpi-trend.positive {
    color: var(--color-green-600);
}

.kpi-trend.negative {
    color: var(--color-red-600);
}

.kpi-trend.warning {
    color: var(--color-amber-600);
}

.kpi-trend.neutral {
    color: var(--color-gray-400);
}

.kpi-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* ── Page animation ── */
.page-enter {
    animation: pgIn .2s ease
}

@keyframes pgIn {
    from {
        opacity: 0;
        transform: translateY(6px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* ── Sidebar Footer & User Card (Nivelamento com Rodapé) ── */
.sidebar-footer {
    height: 44px;
    box-sizing: border-box;
    padding: 0 10px;
    border-top: 1px solid var(--color-gray-100);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    background: var(--color-white);
}

.user-card-btn {
    width: 100%;
    height: 32px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    background: var(--color-gray-50);
    border: 1px solid var(--color-gray-100);
    cursor: pointer;
    font-family: inherit;
    padding: 3px 8px;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    text-align: left;
}

.user-card-btn:hover {
    background: var(--color-white);
    border-color: var(--color-gray-200);
    box-shadow: var(--shadow-sm);
}

.user-avatar,
#sb-avatar {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background: var(--color-blue-700);
    color: var(--color-white);
    font-size: 10px !important;
    font-weight: var(--font-weight-bold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.user-name,
#sb-name {
    font-size: var(--font-size-xs) !important;
    font-weight: var(--font-weight-semibold) !important;
    color: var(--color-gray-900) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    letter-spacing: -0.2px;
    line-height: 1.2 !important;
}

.user-role-row {
    display: flex;
    align-items: center;
    gap: var(--gap-xs);
    overflow: hidden;
    white-space: nowrap;
    line-height: 1;
}

.user-role-badge,
#sb-role {
    font-size: 9.5px !important;
    font-weight: 400 !important;
    color: var(--color-gray-400) !important;
    letter-spacing: normal !important;
    text-transform: capitalize !important;
    flex-shrink: 0;
    line-height: 1 !important;
}

.user-hotel-badge,
#sb-hotel {
    font-size: 8.5px !important;
    font-weight: var(--font-weight-semibold) !important;
    color: var(--color-blue-600) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1 !important;
}

.user-edit-icon {
    color: var(--color-slate-400);
    font-size: 9px;
    margin-left: auto;
    flex-shrink: 0;
}

/* ── Rodapé Padrão do Painel (Desktop) ── */
.page-footer {
    height: 44px;
    box-sizing: border-box;
    padding: 0 20px;
    border-top: 1px solid var(--color-gray-100);
    background: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--color-gray-500);
    flex-shrink: 0;
}

.footer-copyright {
    display: flex;
    align-items: center;
    gap: var(--gap-xs);
    font-size: 11.5px;
    color: var(--color-gray-500);
}

.footer-copyright strong {
    color: var(--color-gray-700);
    font-weight: var(--font-weight-semibold);
}

.badge-version {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: var(--radius);
    font-size: 10px;
    font-weight: var(--font-weight-medium);
    background: transparent;
    color: var(--color-gray-400);
    border: 1px solid var(--color-gray-100);
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
}

/* ── Modal error ── */
.modal-err {
    margin-top: 10px;
    padding: 9px 11px;
    border-radius: var(--radius-md);
    background: var(--color-red-50);
    border: 1.5px solid var(--color-red-200);
    color: var(--color-red-600);
    font-size: 12.5px;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    line-height: 1.45;
}

.modal-err i {
    margin-top: 2px;
}

/* ── Notification dropdown ── */
#notif-dropdown {
    position: fixed;
    background: var(--color-white);
    border: 1.5px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    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
}

/* ── Grid de campos das comandas ── */
.comanda-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: var(--gap-base);
}

@media(max-width:768px) {
    .comanda-fields-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* ── Page header util ── */
.page-hdr {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap-lg);
    margin-bottom: 16px;
    width: 100%;
}

.page-hdr > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
}

.page-hdr > div:first-child h1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-hdr > div:first-child p {
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 1.35;
}

.page-hdr-right {
    display: flex !important;
    align-items: center;
    gap: var(--gap-md);
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .page-hdr {
        gap: var(--gap-md);
        margin-bottom: 12px;
    }
    
    .page-hdr > div:first-child h1 {
        font-size: 17px !important;
    }
    
    .page-hdr > div:first-child p {
        font-size: var(--font-size-xs) !important;
        line-height: 1.3;
    }

    .page-hdr-right {
        gap: var(--gap-sm);
    }
    
    .page-hdr-right .btn-primary,
    .page-hdr-right .btn-secondary {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
}

/* ── Filter bar ── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-md);
    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: var(--gap-sm)
}

/* ── Ocultar input de busca da barra superior ── */
.relative.hide-mobile {
    display: none !important;
}

/* ── Mobile Filters Toggle ── */
.filters-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 2px 0;
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-700);
    user-select: none;
}

.filters-mobile-toggle i.toggle-icon {
    font-size: 10px;
    transition: transform 0.2s ease;
    color: var(--color-gray-400);
}

.filters-container:not(.filters-open) .filters-mobile-clear {
    display: none !important;
}

.filters-container.filters-open .filters-mobile-clear {
    display: inline-flex !important;
}

/* ── Bulk Actions Bar (Enterprise Standard) ── */
.bulk-actions-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: var(--color-slate-800);
    color: var(--color-white);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.bulk-actions-bar.active {
    display: flex;
}

/* ── Filters Desktop Header ── */
.filters-desktop-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.filters-desktop-title {
    font-size: 11.5px;
    font-weight: var(--font-weight-bold);
    color: var(--color-slate-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
}

/* ── Data Table Empty State Card (Enterprise Standard) ── */
.empty-card {
    padding: 48px 24px;
    text-align: center;
    color: var(--color-gray-500);
}

.empty-card-icon {
    font-size: 42px;
    color: var(--color-gray-300);
    margin-bottom: 12px;
}

.empty-card-title {
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    color: var(--color-gray-600);
    margin: 0 0 4px 0;
}

.empty-card-desc {
    font-size: var(--font-size-sm);
    color: var(--color-gray-400);
    margin: 0;
}

/* ── Data Table Pagination Bar (Enterprise Standard) ── */
.pagination-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap-base);
    padding: 12px 16px;
    background: var(--color-white);
    border-top: 1px solid var(--color-gray-100);
    border-bottom: 1px solid var(--color-gray-200);
    border-left: 1px solid var(--color-gray-200);
    border-right: 1px solid var(--color-gray-200);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.card > .pagination-wrap,
.card .pagination-wrap {
    border-bottom: none;
    border-left: none;
    border-right: none;
}

.page-info {
    font-size: 12px;
    color: var(--color-slate-500);
}

.page-controls {
    display: flex;
    align-items: center;
    gap: var(--gap-xs);
}

.page-btn {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    color: var(--color-gray-700);
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border-radius: var(--radius);
    font-size: 11.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.page-btn:hover:not(:disabled) {
    background: var(--color-slate-100);
    border-color: var(--color-slate-300);
    color: var(--color-gray-900);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Rodapé global ── */
.site-footer {
    text-align: center;
    font-size: 10px;
    color: var(--color-gray-300);
    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
}

/* Desktop Sticky Columns (Fixação das primeiras colunas apenas no Desktop) */
@media (min-width: 769px) {
    /* Financeiro */
    .tbl-fin-col-chk {
        position: sticky !important;
        left: 0 !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-fin-col-chk {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-fin-col-hotel {
        position: sticky !important;
        left: 44px !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-fin-col-hotel {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-row:hover td.tbl-fin-col-chk,
    .tbl-row:hover td.tbl-fin-col-hotel {
        background: var(--color-gray-100) !important;
    }
    .tbl-row[style*="#fff5f5"] td.tbl-fin-col-chk,
    .tbl-row[style*="#fff5f5"] td.tbl-fin-col-hotel {
        background: #fff5f5 !important;
    }
    .tbl-row[style*="#fff5f5"]:hover td.tbl-fin-col-chk,
    .tbl-row[style*="#fff5f5"]:hover td.tbl-fin-col-hotel {
        background: var(--color-red-100) !important;
    }
    .tbl-row.selected td.tbl-fin-col-chk,
    .tbl-row.selected td.tbl-fin-col-hotel,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-fin-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-fin-col-hotel {
        background: var(--color-gray-200) !important;
    }
    .tbl-row.selected:hover td.tbl-fin-col-chk,
    .tbl-row.selected:hover td.tbl-fin-col-hotel,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-fin-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-fin-col-hotel {
        background: var(--color-gray-300) !important;
    }

    /* Usuários (Admin) */
    .tbl-user-col-chk {
        position: sticky !important;
        left: 0 !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-user-col-chk {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-user-col-nome {
        position: sticky !important;
        left: 44px !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-user-col-nome {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-row:hover td.tbl-user-col-chk,
    .tbl-row:hover td.tbl-user-col-nome {
        background: var(--color-gray-100) !important;
    }
    .tbl-row.selected td.tbl-user-col-chk,
    .tbl-row.selected td.tbl-user-col-nome,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-user-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-user-col-nome {
        background: var(--color-gray-200) !important;
    }
    .tbl-row.selected:hover td.tbl-user-col-chk,
    .tbl-row.selected:hover td.tbl-user-col-nome,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-user-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-user-col-nome {
        background: var(--color-gray-300) !important;
    }

    /* Clientes (Admin) */
    .tbl-cli-col-chk {
        position: sticky !important;
        left: 0 !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-cli-col-chk {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-cli-col-nome {
        position: sticky !important;
        left: 44px !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-cli-col-nome {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-row:hover td.tbl-cli-col-chk,
    .tbl-row:hover td.tbl-cli-col-nome {
        background: var(--color-gray-100) !important;
    }
    .tbl-row.selected td.tbl-cli-col-chk,
    .tbl-row.selected td.tbl-cli-col-nome,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-cli-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-cli-col-nome {
        background: var(--color-gray-200) !important;
    }
    .tbl-row.selected:hover td.tbl-cli-col-chk,
    .tbl-row.selected:hover td.tbl-cli-col-nome,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-cli-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-cli-col-nome {
        background: var(--color-gray-300) !important;
    }

    /* Peças */
    .tbl-peca-col-chk {
        position: sticky !important;
        left: 0 !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-peca-col-chk {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-peca-col-nome {
        position: sticky !important;
        left: 44px !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-peca-col-nome {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-row:hover td.tbl-peca-col-chk,
    .tbl-row:hover td.tbl-peca-col-nome {
        background: var(--color-gray-100) !important;
    }
    .tbl-row.selected td.tbl-peca-col-chk,
    .tbl-row.selected td.tbl-peca-col-nome,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-peca-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-peca-col-nome {
        background: var(--color-gray-200) !important;
    }
    .tbl-row.selected:hover td.tbl-peca-col-chk,
    .tbl-row.selected:hover td.tbl-peca-col-nome,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-peca-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-peca-col-nome {
        background: var(--color-gray-300) !important;
    }

    /* Precificação */
    .tbl-prc-col-peca {
        position: sticky !important;
        left: 0 !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-prc-col-peca {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-row:hover td.tbl-prc-col-peca {
        background: var(--color-gray-100) !important;
    }

    /* Contratos */
    .tbl-ctr-col-chk {
        position: sticky !important;
        left: 0 !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-ctr-col-chk {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-ctr-col-titulo {
        position: sticky !important;
        left: 0 !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    table:has(.tbl-ctr-col-chk) .tbl-ctr-col-titulo {
        left: 44px !important;
    }
    th.tbl-ctr-col-titulo {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-row:hover td.tbl-ctr-col-chk,
    .tbl-row:hover td.tbl-ctr-col-titulo {
        background: var(--color-gray-100) !important;
    }
    .tbl-row.selected td.tbl-ctr-col-chk,
    .tbl-row.selected td.tbl-ctr-col-titulo,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-ctr-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-ctr-col-titulo {
        background: var(--color-gray-200) !important;
    }
    .tbl-row.selected:hover td.tbl-ctr-col-chk,
    .tbl-row.selected:hover td.tbl-ctr-col-titulo,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-ctr-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-ctr-col-titulo {
        background: var(--color-gray-300) !important;
    }

    /* Orçamentos */
    .tbl-orc-col-chk {
        position: sticky !important;
        left: 0 !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-orc-col-chk {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-orc-col-nome {
        position: sticky !important;
        left: 44px !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-orc-col-nome {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-row:hover td.tbl-orc-col-chk,
    .tbl-row:hover td.tbl-orc-col-nome {
        background: var(--color-gray-100) !important;
    }
    .tbl-row.selected td.tbl-orc-col-chk,
    .tbl-row.selected td.tbl-orc-col-nome,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-orc-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-orc-col-nome {
        background: var(--color-gray-200) !important;
    }
    .tbl-row.selected:hover td.tbl-orc-col-chk,
    .tbl-row.selected:hover td.tbl-orc-col-nome,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-orc-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-orc-col-nome {
        background: var(--color-gray-300) !important;
    }

    /* Super Admin - Usuários */
    .tbl-sa-usr-col-chk {
        position: sticky !important;
        left: 0 !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-sa-usr-col-chk {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-sa-usr-col-usuario {
        position: sticky !important;
        left: 44px !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-sa-usr-col-usuario {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-row:hover td.tbl-sa-usr-col-chk,
    .tbl-row:hover td.tbl-sa-usr-col-usuario {
        background: var(--color-gray-100) !important;
    }
    .tbl-row.selected td.tbl-sa-usr-col-chk,
    .tbl-row.selected td.tbl-sa-usr-col-usuario,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-sa-usr-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-sa-usr-col-usuario {
        background: var(--color-gray-200) !important;
    }
    .tbl-row.selected:hover td.tbl-sa-usr-col-chk,
    .tbl-row.selected:hover td.tbl-sa-usr-col-usuario,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-sa-usr-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-sa-usr-col-usuario {
        background: var(--color-gray-300) !important;
    }

    /* Super Admin - Empresas */
    .tbl-sa-emp-col-chk {
        position: sticky !important;
        left: 0 !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-sa-emp-col-chk {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-sa-emp-col-empresa {
        position: sticky !important;
        left: 44px !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-sa-emp-col-empresa {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-row:hover td.tbl-sa-emp-col-chk,
    .tbl-row:hover td.tbl-sa-emp-col-empresa {
        background: var(--color-gray-100) !important;
    }
    .tbl-row.selected td.tbl-sa-emp-col-chk,
    .tbl-row.selected td.tbl-sa-emp-col-empresa,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-sa-emp-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-sa-emp-col-empresa {
        background: var(--color-gray-200) !important;
    }
    .tbl-row.selected:hover td.tbl-sa-emp-col-chk,
    .tbl-row.selected:hover td.tbl-sa-emp-col-empresa,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-sa-emp-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-sa-emp-col-empresa {
        background: var(--color-gray-300) !important;
    }

    /* Super Admin - Logs de Segurança */
    .tbl-sa-log-col-chk {
        position: sticky !important;
        left: 0 !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-sa-log-col-chk {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }

    /* Comandas */
    .tbl-cmd-col-chk {
        position: sticky !important;
        left: 0 !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-cmd-col-chk {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-cmd-col-codigo {
        position: sticky !important;
        left: 44px !important;
        z-index: 2 !important;
        background: var(--color-white) !important;
        border-top: inherit !important;
    }
    th.tbl-cmd-col-codigo:first-child,
    td.tbl-cmd-col-codigo:first-child {
        left: 0 !important;
    }
    th.tbl-cmd-col-codigo {
        z-index: 4 !important;
        background: var(--color-gray-50) !important;
    }
    .tbl-row:hover td.tbl-cmd-col-chk,
    .tbl-row:hover td.tbl-cmd-col-codigo {
        background: var(--color-gray-100) !important;
    }
    .tbl-row.selected td.tbl-cmd-col-chk,
    .tbl-row.selected td.tbl-cmd-col-codigo,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-cmd-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked) td.tbl-cmd-col-codigo {
        background: var(--color-gray-200) !important;
    }
    .tbl-row.selected:hover td.tbl-cmd-col-chk,
    .tbl-row.selected:hover td.tbl-cmd-col-codigo,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-cmd-col-chk,
    .tbl-row:has(input[type="checkbox"]:checked):hover td.tbl-cmd-col-codigo {
        background: var(--color-gray-300) !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;
        overflow-y: auto !important;
        height: 100% !important;
        -webkit-overflow-scrolling: touch;
    }

    #topbar {
        position: sticky !important;
        top: 0 !important;
        z-index: 30 !important;
        flex-shrink: 0 !important;
    }

    #page-content {
        flex: 1 0 auto !important;
        overflow-y: visible !important;
    }

    .page-footer {
        position: static !important;
        flex-shrink: 0 !important;
        height: 44px !important;
        min-height: 44px !important;
        padding: 0 14px !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: var(--gap-md) !important;
        margin-top: 12px !important;
        box-sizing: border-box !important;
    }

    .footer-copyright {
        font-size: var(--font-size-xs);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #ham-btn {
        display: flex !important
    }

    .top-avatar-mobile {
        display: inline-flex !important
    }

    .hide-mobile {
        display: none !important
    }

    .nova-comanda-motorista .btn-label {
        display: inline !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-desktop-hdr {
        display: none !important;
    }

    .filters-mobile-toggle {
        display: flex
    }

    .filters-container .filter-bar {
        display: none;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--color-gray-100);
        grid-template-columns: 1fr 1fr;
        gap: var(--gap-md);
    }

    .filter-bar .filter-field {
        min-width: 0 !important;
        width: 100% !important;
    }

    .filters-container.filters-open .filter-bar {
        display: grid !important;
    }

    .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: 25% !important;
    }

    .tbl-fin-col-vencimento {
        width: 16% !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: var(--color-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--gap-xl)
}
#loading-site-name {
    opacity: 0;
    transition: opacity 0.25s ease-out;
}
.bubbles-loader {
    position: relative;
    width: 104px;
    height: 110px;
    display: grid;
    place-items: center;
    --animation-speed-multiplier: 0.5;
}
.bubbles-loader .loader-icon {
    font-size: 32px;
    color: var(--color-blue-700);
    z-index: 1;
    position: relative;
}
.bubbles-loader b {
    position: absolute;
    bottom: 2px;
    border-radius: 50%;
    background: rgba(29, 78, 216, 0.15);
    border: 1px solid rgba(29, 78, 216, 0.3);
    animation: rise calc(2.6s * var(--animation-speed-multiplier)) linear infinite;
}
.bubbles-loader b:nth-child(1){ width:11px; height:11px; left:14px; }
.bubbles-loader b:nth-child(2){ width:8px; height:8px; left:44px; animation-delay:calc(.65s * var(--animation-speed-multiplier)); }
.bubbles-loader b:nth-child(3){ width:14px; height:14px; left:72px; animation-delay:calc(1.3s * var(--animation-speed-multiplier)); }
.bubbles-loader b:nth-child(4){ width:7px; height:7px; left:32px; animation-delay:calc(1.95s * var(--animation-speed-multiplier)); }

@keyframes rise {
    0% { transform: translateY(0) scale(.55); opacity:0; }
    18% { opacity:1; }
    100% { transform: translateY(-86px) scale(1.12); opacity:0; }
}

@media (prefers-reduced-motion: reduce) {
    .bubbles-loader b {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* -- Custom Searchable Select Dropdown (Municípios) -- */
.custom-select-container {
    position: relative;
    width: 100%;
}
.custom-select-container .select-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border: 1px solid var(--color-gray-300);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    max-height: 180px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.custom-select-container .select-dropdown-list.hidden {
    display: none !important;
}
.custom-select-container .select-dropdown-item {
    padding: 8px 12px;
    font-size: var(--font-size-sm);
    color: var(--color-gray-700);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border-bottom: 1px solid var(--color-gray-100);
}
.custom-select-container .select-dropdown-item:last-child {
    border-bottom: none;
}
.custom-select-container .select-dropdown-item:hover,
.custom-select-container .select-dropdown-item.selected {
    background: var(--color-blue-500);
    color: var(--color-white);
}
.custom-select-container .select-dropdown-no-results {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--color-gray-400);
    text-align: center;
    background: var(--color-gray-50);
}

/* Responsividade de formulários em modais no mobile */
@media (max-width: 640px) {
    .modal-body div[style*="display:flex"][style*="flex-wrap:wrap"] > div[style*="flex"] {
        flex: 1 1 100% !important;
        width: 100% !important;
    }
}

/* ── Thin Native Scrollbars ── */
* {
    scrollbar-width: thin;
}

/* ── Efeito Abrir/Fechar para Seções com Switch ── */
.collapsible-section-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s ease-out;
    overflow: hidden;
}
.collapsible-section-wrapper.expanded {
    grid-template-rows: 1fr;
}
.collapsible-section-content {
    min-height: 0;
    transition: padding 0.25s ease-out, margin 0.25s ease-out, opacity 0.25s ease-out;
}
.collapsible-section-wrapper:not(.expanded) .collapsible-section-content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    opacity: 0;
}

/* Layout flexível de Foto, Número, Tipo, Coleta e Entrega nos modais de Comanda */
.comanda-header-row {
    display: flex;
    gap: var(--gap-base);
    align-items: end;
}
.comanda-header-row > .comanda-header-col-left {
    display: flex;
    gap: var(--gap-base);
    align-items: end;
    flex: 1 1 0;
    min-width: 0;
}
.comanda-header-row > .comanda-header-col-left > div:nth-child(1) {
    width: 45px;
    flex-shrink: 0;
}
.comanda-header-row > .comanda-header-col-left > div:nth-child(2) {
    flex: 1 1 0;
    min-width: 0;
}
.comanda-header-row > .comanda-header-col-left > div:nth-child(3) {
    flex: 1 1 0;
    min-width: 0;
}
.comanda-header-row > .comanda-header-col-right {
    display: flex;
    gap: var(--gap-base);
    align-items: end;
    flex: 1 1 0;
    min-width: 0;
}
.comanda-header-row > .comanda-header-col-right > div {
    flex: 1 1 0;
    min-width: 0;
}

@media (max-width: 640px) {
    .comanda-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: var(--gap-base);
    }
    .comanda-header-row > .comanda-header-col-left {
        width: 100%;
        gap: var(--gap-md);
    }
    .comanda-header-row > .comanda-header-col-left > div:nth-child(1) {
        width: 42px;
        flex-shrink: 0;
    }
    .comanda-header-row > .comanda-header-col-left > div:nth-child(2) {
        flex: 1 1 0;
        min-width: 0;
    }
    .comanda-header-row > .comanda-header-col-left > div:nth-child(3) {
        flex: 1 1 0;
        min-width: 0;
    }
    .comanda-header-row > .comanda-header-col-right {
        width: 100%;
        gap: var(--gap-md);
    }
}

/* Área de Assinatura Digital da Comanda */
.comanda-signature-box {
    border: 1.5px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    background: #fafafa;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
}

.signature-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 120px;
    background: var(--color-white);
    border: 1px dashed var(--color-gray-300);
    border-radius: var(--radius-md);
    overflow: hidden;
    touch-action: none;
}

/* ── Seletor / Dropdown de Peças Visíveis na Comanda ── */
.comanda-pecas-dropdown-wrap {
    position: relative;
    display: inline-block;
}

.comanda-pecas-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--gap-sm);
    padding: 4px 10px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-600);
    background: var(--color-gray-100);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
}

.comanda-pecas-dropdown-btn:hover {
    background: var(--color-gray-200);
    color: var(--color-gray-900);
    border-color: var(--color-gray-400);
}

.comanda-pecas-dropdown-btn.active {
    background: var(--color-blue-50);
    color: var(--color-blue-700);
    border-color: var(--color-blue-300);
}

.comanda-pecas-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    width: 280px;
    max-height: 340px;
    background: var(--color-white);
    border: 1.5px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInScale 0.15s ease-out;
}

.comanda-pecas-dropdown-header {
    padding: 8px 10px;
    background: var(--color-gray-50);
    border-bottom: 1px solid var(--color-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap-sm);
}

.comanda-pecas-dropdown-list {
    overflow-y: auto;
    max-height: 220px;
    padding: 4px 0;
}

.comanda-pecas-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    padding: 6px 12px;
    font-size: 12px;
    color: var(--color-gray-700);
    cursor: pointer;
    transition: background 0.1s ease;
    user-select: none;
}

.comanda-pecas-dropdown-item:hover {
    background: var(--color-gray-100);
    color: var(--color-gray-900);
}

.comanda-pecas-dropdown-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--color-blue-700);
    cursor: pointer;
    flex-shrink: 0;
}

.comanda-peca-oculta {
    display: none !important;
}

#nc-pecas tbody tr {
    transition: var(--transition-fast);
}

#nc-pecas tbody tr:hover {
    background: var(--color-gray-100) !important;
}

/* ── Modo Privacidade (Ocultar Valores Monetários) ── */
body.hide-monetary-values input[data-money],
body.hide-monetary-values .tbl-prc-col-especifico input,
body.hide-monetary-values .money-wrap input,
body.hide-monetary-values input[data-peca-id] {
    filter: blur(5px);
    user-select: none;
    -webkit-user-select: none;
}

body.hide-monetary-values input[data-money]:focus,
body.hide-monetary-values .tbl-prc-col-especifico input:focus,
body.hide-monetary-values .money-wrap input:focus,
body.hide-monetary-values input[data-peca-id]:focus {
    filter: none !important;
    user-select: auto !important;
    -webkit-user-select: auto !important;
}

body.hide-monetary-values input[data-money]::placeholder,
body.hide-monetary-values .tbl-prc-col-especifico input::placeholder,
body.hide-monetary-values input[data-peca-id]::placeholder {
    color: transparent !important;
    text-shadow: 0 0 6px rgba(156, 163, 175, 0.8);
}

body.hide-monetary-values input[data-money]:focus::placeholder,
body.hide-monetary-values .tbl-prc-col-especifico input:focus::placeholder,
body.hide-monetary-values input[data-peca-id]:focus::placeholder {
    color: var(--color-gray-400) !important;
    text-shadow: none !important;
}

body.hide-monetary-values .money-wrap .money-prefix {
    filter: blur(5px);
}

body.hide-monetary-values .money-wrap:focus-within .money-prefix {
    filter: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   BANNER / BARRA DE ATUALIZAÇÃO DE VERSÃO
   ══════════════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════════════
   SISTEMA MODULAR DE BANNERS / NOTIFICAÇÕES SUPERIORES
   ══════════════════════════════════════════════════════════════════════════ */

/* Container modular fixo no topo com empilhamento vertical automático */
.top-announcements-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.top-announcements-container > * {
    pointer-events: auto;
    width: 100%;
}

/* Quando qualquer banner estiver ativo, o app-shell e sidebar são deslocados usando a variável CSS dinâmica calculada */
body.has-top-announcements #app-shell {
    padding-top: var(--top-announcements-height, 44px) !important;
    height: 100dvh !important;
    box-sizing: border-box !important;
}

body.has-top-announcements #sidebar {
    top: var(--top-announcements-height, 44px) !important;
    height: calc(100dvh - var(--top-announcements-height, 44px)) !important;
}

body.has-top-announcements #main-wrapper {
    padding-top: 0 !important;
}

body.has-top-announcements #topbar {
    top: 0 !important;
}

/* Barra de Atualização */
.app-update-banner {
    width: 100%;
    background: var(--color-blue-800); /* Azul royal sólido marcante, sem degradê */
    color: var(--color-white);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    animation: bannerSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transition: var(--transition-slow);
}

.app-update-banner.app-update-closing {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.app-update-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 6px 16px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap-lg);
    box-sizing: border-box;
}

.app-update-left {
    display: flex;
    align-items: center;
    gap: var(--gap-base);
    min-width: 0;
}

.app-update-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--color-white) !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.app-update-text {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-white) !important;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-update-text strong {
    color: var(--color-white) !important;
    font-weight: var(--font-weight-bold);
    margin-right: 4px;
}

.app-update-tag {
    display: inline-block;
    padding: 1px 7px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-full);
    font-size: 10.5px;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.3px;
    color: var(--color-white) !important;
    margin-left: 6px;
}

.app-update-actions {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* Botão Atualizar com o mesmo estilo do botão fechar (X) */
.btn-app-update {
    display: inline-flex;
    align-items: center;
    gap: var(--gap-sm);
    padding: 0 10px;
    height: 26px;
    border-radius: var(--radius-md);
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white) !important;
    cursor: pointer;
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    transition: var(--transition-fast);
    flex-shrink: 0;
    white-space: nowrap;
}

.btn-app-update:hover {
    background: rgba(255, 255, 255, 0.35);
    color: var(--color-white) !important;
}

.btn-app-update:active {
    transform: translateY(0);
}

.btn-app-update i {
    color: var(--color-white) !important;
    font-size: var(--font-size-xs);
}

.btn-app-update-close {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white) !important;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.btn-app-update-close:hover {
    background: rgba(255, 255, 255, 0.35);
    color: var(--color-white) !important;
}

/* Barra de Notificação Offline / Sem Conexão */
.app-offline-banner {
    width: 100%;
    background: var(--color-red-700); /* Vermelho escuro sólido de alerta (sem degradê) */
    color: var(--color-white);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    animation: bannerSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transition: var(--transition-slow);
}

.app-offline-banner.app-update-closing {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.app-offline-banner .app-update-icon {
    background: rgba(255, 255, 255, 0.25);
}

.app-offline-banner .app-offline-pulse {
    animation: pulseOffline 1.8s infinite;
}

@keyframes pulseOffline {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.75; }
    100% { transform: scale(1); opacity: 1; }
}

.btn-app-offline-retry {
    display: inline-flex;
    align-items: center;
    gap: var(--gap-sm);
    padding: 0 10px;
    height: 26px;
    border-radius: var(--radius-md);
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white) !important;
    cursor: pointer;
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    transition: var(--transition-fast);
    flex-shrink: 0;
    white-space: nowrap;
}

.btn-app-offline-retry:hover {
    background: rgba(255, 255, 255, 0.35);
    color: var(--color-white) !important;
}

.btn-app-offline-retry:active {
    transform: translateY(0);
}

.btn-app-offline-retry i {
    color: var(--color-white) !important;
    font-size: var(--font-size-xs);
}

@keyframes bannerSlideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile: Barra de largura total com visual consistente e empilhamento compacto */
@media (max-width: 768px) {
    body.has-top-announcements #app-shell {
        padding-top: var(--top-announcements-height, 50px) !important;
    }

    body.has-top-announcements #sidebar {
        top: 0 !important;
        height: 100dvh !important;
    }

    body.has-top-announcements #main-wrapper {
        padding-top: 0 !important;
    }

    body.has-top-announcements #topbar {
        top: 0 !important;
    }

    .app-update-content {
        padding: 6px 10px !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: var(--gap-sm) !important;
        overflow-x: auto;
    }

    .app-update-left {
        gap: var(--gap-sm) !important;
        flex: 1 !important;
        min-width: 0 !important;
    }

    .app-update-text {
        font-size: var(--font-size-xs) !important;
        line-height: 1.25 !important;
        white-space: normal !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .app-update-tag {
        display: none !important;
    }

    .app-update-actions {
        gap: var(--gap-xs) !important;
    }

    .btn-app-update,
    .btn-app-offline-retry {
        padding: 0 8px !important;
        height: 24px !important;
        font-size: var(--font-size-xs) !important;
    }

    .btn-app-update-close {
        width: 24px !important;
        height: 24px !important;
        font-size: var(--font-size-xs) !important;
    }
}

/* ── Mobile: Configurações -> Aba Recebimento -> Integração com Bancos ── */
@media (max-width: 640px) {
    /* Header de Contas Bancárias */
    .cfg-contas-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: var(--gap-md) !important;
    }

    .cfg-contas-header button {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Cards da Lista de Contas Bancárias: desloca botões para a próxima linha */
    .cfg-conta-item-card {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: var(--gap-md) !important;
    }

    .cfg-conta-item-card > div:first-child {
        width: 100% !important;
    }

    .cfg-conta-item-actions {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: var(--gap-sm) !important;
        padding-top: 8px !important;
        border-top: 1px dashed var(--color-gray-200) !important;
    }

    /* Método de Pagamento Inicial Padrão: desloca select para a próxima linha */
    .cfg-metodo-padrao-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: var(--gap-md) !important;
    }

    .cfg-metodo-padrao-select-wrap {
        width: 100% !important;
    }
}





/* ══════════════════════════════════════════════════════════════
   MÓDULO: GESTÃO DE COLABORADORES & FOLHA DE PAGAMENTO
   ══════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════
   BARRA DE ABAS DESLIZANTE (SLIDING TAB INDICATOR)
   Padrão unificado para Controles Segmentados (.segmented-tabs-bar)
   ══════════════════════════════════════════════════════════════ */
.segmented-tabs-bar,
.colab-tabs-bar,
.fc-tabs-bar,
.cat-tabs-bar,
.rel-tabs-bar {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: var(--color-gray-100);
    padding: 3px;
    border-radius: var(--radius-md);
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: none;
    user-select: none;
}

.fc-tabs-bar {
    margin-bottom: 16px;
}

/* Indicador deslizante (o fundo branco que se move) */
.tab-sliding-glider,
.segmented-glider {
    position: absolute;
    top: 3px;
    left: 0;
    bottom: 3px;
    background: var(--color-white);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    pointer-events: none;
    transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1), width 0.24s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* Fallback seguro caso o glider ainda não tenha sido instanciado */
.colab-tab-btn.active:only-of-type,
.fc-view-tab-btn.active:only-of-type {
    background: var(--color-white) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.colab-tab-btn,
.fc-view-tab-btn,
.cat-tab-btn,
.rel-tab-btn {
    position: relative;
    z-index: 2;
    padding: 6px 14px;
    border: none;
    background: transparent !important;
    color: var(--color-gray-600);
    font-weight: var(--font-weight-semibold);
    font-size: 13px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition-fast);
    box-shadow: none !important;
}

.colab-tab-btn:hover,
.fc-view-tab-btn:hover,
.cat-tab-btn:hover,
.rel-tab-btn:hover {
    color: var(--color-gray-900);
}

.colab-tab-btn.active,
.fc-view-tab-btn.active,
.cat-tab-btn.active,
.rel-tab-btn.active {
    color: var(--color-gray-900) !important;
    background: transparent !important;
    box-shadow: none !important;
}

.colab-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--gap-lg);
    margin-bottom: 20px;
}

.colab-card-kpi {
    background: #fff;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 14px;
}

.colab-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}


/* ==========================================================================
   FullCalendar & Fluxo de Caixa Premium Styles (Design System Tailwind)
   ========================================================================== */

.fc-premium-theme {
    --fc-border-color: var(--color-gray-200);
    --fc-daygrid-dot-event-color: var(--color-blue-600);
    --fc-page-bg-color: #ffffff;
    --fc-neutral-bg-color: var(--color-gray-50);
    --fc-list-event-hover-bg-color: var(--color-gray-50);
    --fc-today-bg-color: rgba(59, 130, 246, 0.04);
    font-family: inherit;
    font-size: var(--font-size-sm);
}

.fc-premium-theme .fc-toolbar {
    margin-bottom: 16px !important;
    flex-wrap: wrap;
    gap: var(--gap-md);
}

.fc-premium-theme .fc-toolbar-title {
    font-size: 1.15rem !important;
    font-weight: var(--font-weight-bold) !important;
    color: var(--color-gray-900) !important;
    text-transform: capitalize;
}

.fc-premium-theme .fc-button {
    background-color: #ffffff !important;
    border: 1px solid var(--color-gray-300) !important;
    color: var(--color-gray-700) !important;
    font-weight: var(--font-weight-semibold) !important;
    font-size: var(--font-size-xs) !important;
    padding: 6px 12px !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: var(--transition-normal) !important;
    text-transform: capitalize !important;
}

.fc-premium-theme .fc-button:hover {
    background-color: var(--color-gray-50) !important;
    border-color: var(--color-gray-400) !important;
    color: var(--color-gray-900) !important;
}

.fc-premium-theme .fc-button-active,
.fc-premium-theme .fc-button-primary:not(:disabled).fc-button-active {
    background-color: var(--color-blue-50) !important;
    border-color: var(--color-blue-600) !important;
    color: var(--color-blue-700) !important;
    box-shadow: none !important;
}

.fc-premium-theme .fc-col-header-cell {
    background: var(--color-gray-50);
    padding: 10px 0;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-xs);
    color: var(--color-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-color: var(--color-gray-200) !important;
}

.fc-premium-theme .fc-daygrid-day-number {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-700);
    padding: 6px 8px !important;
}

.fc-premium-theme .fc-day-today .fc-daygrid-day-number {
    background-color: var(--color-blue-600);
    color: #ffffff !important;
    border-radius: var(--radius-full);
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 4px;
}

/* Event Cards Customizados */
.fc-premium-theme .fc-event {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    margin: 2px 4px !important;
    cursor: pointer;
}

.fc-event-card {
    border-radius: var(--radius-md);
    padding: 4px 8px;
    font-size: 11.5px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    user-select: none;
    border-left: 3px solid transparent;
}

.fc-event-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Semáforo de Status */
.fc-event-receita-recebido {
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
    border-left-color: #10b981 !important;
}

.fc-event-receita-pendente {
    background-color: #eff6ff !important;
    color: #1e40af !important;
    border-left-color: #3b82f6 !important;
}

.fc-event-receita-atrasado {
    background-color: #fef2f2 !important;
    color: #991b1b !important;
    border-left-color: #ef4444 !important;
}

.fc-event-despesa-pago {
    background-color: #f0fdf4 !important;
    color: #166534 !important;
    border-left-color: #22c55e !important;
}

.fc-event-despesa-pendente {
    background-color: #fff7ed !important;
    color: #9a3412 !important;
    border-left-color: #f97316 !important;
}

.fc-event-despesa-atrasado {
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
    border-left-color: #dc2626 !important;
}

.fc-event-card-title {
    font-weight: var(--font-weight-semibold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.fc-event-card-value {
    font-weight: var(--font-weight-bold);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Resumo de Saldo Diário na Célula */
.fc-day-summary-badge {
    margin: 2px 4px 4px 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    background: var(--color-gray-100);
    color: var(--color-gray-700);
}
.fc-day-summary-badge.positive {
    background: #ecfdf5;
    color: #065f46;
}
.fc-day-summary-badge.negative {
    background: #fef2f2;
    color: #991b1b;
}

/* Tabs de Alternância do Fluxo de Caixa (estilização centralizada em .segmented-tabs-bar) */

/* Espaçamento e Bordas Modernas nos Grupos de Botões do FullCalendar */
.fc-premium-theme .fc-button-group {
    display: inline-flex !important;
    gap: 6px !important;
}

.fc-premium-theme .fc-button-group > .fc-button {
    border-radius: var(--radius-md) !important;
    margin: 0 !important;
}

.fc-premium-theme .fc-toolbar-chunk {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Fundo Branco e Borda no Container do FullCalendar para Alinhar com os Cards */
#fc-calendar-box {
    background: #ffffff !important;
    border: 1px solid var(--color-gray-200) !important;
    border-radius: var(--radius-lg) !important;
    padding: 20px !important;
    box-shadow: var(--shadow-sm) !important;
}

/* Botões de Ação do Cabeçalho do Fluxo de Caixa */
.btn-fc-hdr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-sm);
    padding: 8px 16px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
    box-sizing: border-box;
}

.btn-fc-hdr.btn-secondary {
    background: var(--color-white);
    color: var(--color-gray-700);
    border: 1.5px solid var(--color-gray-200);
}
.btn-fc-hdr.btn-secondary:hover {
    background: var(--color-gray-50);
}

.btn-fc-hdr.btn-fc-receita {
    background: var(--color-green-600);
    color: var(--color-white);
    border: none;
}
.btn-fc-hdr.btn-fc-receita:hover {
    background: var(--color-green-700);
}

.btn-fc-hdr.btn-fc-despesa {
    background: var(--color-red-600);
    color: var(--color-white);
    border: none;
}
.btn-fc-hdr.btn-fc-despesa:hover {
    background: var(--color-red-700);
}

@media (max-width: 768px) {
    .btn-fc-hdr {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
        padding: 0 !important;
        gap: 0 !important;
    }
}


/* ── Fornecedores Columns ── */
.tbl-fornec-col-nome { width: auto !important; min-width: 220px !important; }
.tbl-fornec-col-doc { width: 140px !important; min-width: 140px !important; }
.tbl-fornec-col-contato { width: 160px !important; min-width: 160px !important; }
.tbl-fornec-col-pix { width: 170px !important; min-width: 170px !important; }
.tbl-fornec-col-status { width: 90px !important; min-width: 90px !important; text-align: center !important; }
.tbl-fornec-col-acoes { width: 90px !important; min-width: 90px !important; text-align: center !important; }

/* ── Colaboradores & Folha & Fluxo de Caixa Columns ── */
.tbl-colab-col-chk { width: 44px !important; min-width: 44px !important; text-align: center !important; }
.tbl-colab-col-nome { width: auto !important; min-width: 200px !important; }
.tbl-colab-col-cargo { width: 220px !important; min-width: 220px !important; }
.tbl-colab-col-salario { width: 130px !important; min-width: 130px !important; text-align: right !important; }
.tbl-colab-col-pix { width: 170px !important; min-width: 170px !important; }
.tbl-colab-col-status { width: 110px !important; min-width: 110px !important; text-align: center !important; }
.tbl-colab-col-acoes { width: 100px !important; min-width: 100px !important; text-align: center !important; }

.tbl-folhas-lista-ref { width: auto !important; min-width: 320px !important; }
.tbl-folhas-lista-comp { width: 150px !important; min-width: 150px !important; text-align: center !important; }
.tbl-folhas-lista-colabs { width: 140px !important; min-width: 140px !important; text-align: center !important; }
.tbl-folhas-lista-total { width: 140px !important; min-width: 140px !important; text-align: right !important; }
.tbl-folhas-lista-status { width: 120px !important; min-width: 120px !important; text-align: center !important; }
.tbl-folhas-lista-acoes { width: 175px !important; min-width: 175px !important; text-align: center !important; }

.tbl-folha-col-chk { width: 44px !important; min-width: 44px !important; text-align: center !important; }
.tbl-folha-col-nome { width: auto !important; min-width: 180px !important; }
.tbl-folha-col-salario { width: 130px !important; min-width: 130px !important; text-align: right !important; }
.tbl-folha-col-horas { width: 190px !important; min-width: 190px !important; text-align: center !important; }
.tbl-folha-col-proventos { width: 120px !important; min-width: 120px !important; text-align: right !important; }
.tbl-folha-col-inss { width: 120px !important; min-width: 120px !important; text-align: right !important; }
.tbl-folha-col-irrf { width: 110px !important; min-width: 110px !important; text-align: right !important; }
.tbl-folha-col-descontos { width: 120px !important; min-width: 120px !important; text-align: right !important; }
.tbl-folha-col-liquido { width: 130px !important; min-width: 130px !important; text-align: right !important; }
.tbl-folha-col-acoes { width: 110px !important; min-width: 110px !important; text-align: center !important; }

.tbl-fc-col-chk { width: 44px !important; min-width: 44px !important; text-align: center !important; }
.tbl-fc-col-tipo { width: 100px !important; min-width: 100px !important; text-align: center !important; }
.tbl-fc-col-data { width: 100px !important; min-width: 100px !important; text-align: center !important; }
.tbl-fc-col-desc { width: auto !important; min-width: 300px !important; }
.tbl-fc-col-cat { width: 160px !important; min-width: 160px !important; }
.tbl-fc-col-valor { width: 140px !important; min-width: 140px !important; text-align: right !important; }
.tbl-fc-col-status { width: 120px !important; min-width: 120px !important; text-align: center !important; }
.tbl-fc-col-acoes { width: 110px !important; min-width: 110px !important; text-align: center !important; }


/* ── Badges e Controles de Recorrência / Parcelamento no Fluxo de Caixa ── */
.badge-parcela {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: var(--radius);
    font-size: 10px;
    font-weight: 700;
    background: var(--color-blue-50);
    color: var(--color-blue-700);
    border: 1px solid var(--color-blue-200);
}

.badge-recorrente {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: var(--radius);
    font-size: 10px;
    font-weight: 700;
    background: #fdf2f8;
    color: #be185d;
    border: 1px solid #fbcfe8;
}

.fc-tipo-pill-group {
    display: flex;
    background: var(--color-gray-100);
    padding: 3px;
    border-radius: var(--radius-md);
    gap: 4px;
}

.fc-tipo-pill-btn {
    flex: 1;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-gray-600);
    border-radius: var(--radius);
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.fc-tipo-pill-btn:hover {
    color: var(--color-gray-900);
}

.fc-tipo-pill-btn.active {
    background: var(--color-white);
    color: var(--color-blue-700);
    box-shadow: var(--shadow-sm);
}

/* ── Cards de Informação Colapsáveis (Folhas, Orçamentos, Contratos) ── */
.info-flow-card {
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    font-size: 12px;
    color: #1e40af;
    line-height: 1.6;
    overflow: hidden;
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.info-flow-card:hover {
    border-color: #93c5fd;
}
.info-flow-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
    transition: background-color var(--transition-fast);
}
.info-flow-header:hover {
    background-color: rgba(219, 234, 254, 0.4);
}
.info-flow-title {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    font-weight: var(--font-weight-bold);
    color: #1d4ed8;
    font-size: 13px;
}
.info-flow-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #3b82f6;
}
.info-flow-toggle .info-flow-chevron {
    font-size: 12px;
    transition: transform var(--transition-normal);
}
.info-flow-card.collapsed .info-flow-chevron {
    transform: rotate(-90deg);
}
.info-flow-body-wrapper {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.25s ease-out;
    overflow: hidden;
}
.info-flow-card.collapsed .info-flow-body-wrapper {
    grid-template-rows: 0fr;
}
.info-flow-body-content {
    min-height: 0;
    padding: 0 14px 12px 14px;
    transition: opacity 0.2s ease-out;
}
.info-flow-card.collapsed .info-flow-body-content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
}

/* ==========================================================================
   Custom Dropdown de Seleção de Categorias e Sub-categorias Financeiras
   ========================================================================== */
.custom-cat-select-container {
    position: relative;
    width: 100%;
}

.custom-cat-select-trigger {
    width: 100%;
    height: 38px;
    background: var(--color-white);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    user-select: none;
}

.custom-cat-select-trigger:hover:not(.disabled) {
    border-color: var(--color-blue-400);
}

.custom-cat-select-trigger:focus-visible,
.custom-cat-select-trigger.active {
    border-color: var(--color-blue-600);
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.custom-cat-select-trigger.disabled {
    background: var(--color-gray-100);
    border-color: var(--color-gray-200);
    cursor: not-allowed;
    opacity: 0.75;
}

.custom-cat-select-display {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    min-width: 0;
    flex: 1;
}

.custom-cat-select-chevron {
    font-size: 11px;
    color: var(--color-gray-400);
    margin-left: 6px;
    transition: transform var(--transition-normal);
}

.custom-cat-select-trigger.active .custom-cat-select-chevron {
    transform: rotate(180deg);
}

.custom-cat-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    box-shadow: 0 14px 35px -4px rgba(0, 0, 0, 0.18), 0 8px 12px -6px rgba(0, 0, 0, 0.08);
    max-height: 250px;
    overflow-y: auto;
    z-index: 99999;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transform-origin: top center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s;
    pointer-events: none;
}

.custom-cat-select-dropdown.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
}

/* Quando abre para cima (perto do rodapé de modais com scroll) */
.custom-cat-select-dropdown.dropup {
    top: auto !important;
    bottom: calc(100% + 4px) !important;
    transform-origin: bottom center !important;
    transform: translateY(8px) scale(0.97);
}

.custom-cat-select-dropdown.dropup.show {
    transform: translateY(0) scale(1) !important;
}

.custom-cat-select-dropdown.hidden {
    display: none !important;
}

/* Transições animadas suaves nos dropdowns suspensos de Cor e Ícone */
.floating-picker-dropdown {
    transform-origin: top center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s;
    pointer-events: none;
}

.floating-picker-dropdown.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
}

.custom-cat-option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    color: var(--color-gray-700);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.custom-cat-option-item:hover {
    background: var(--color-blue-50);
    color: var(--color-blue-700);
}

.custom-cat-option-item.selected {
    background: var(--color-blue-100);
    color: var(--color-blue-800);
    font-weight: var(--font-weight-semibold);
}

.custom-cat-badge-icon {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11.5px;
    flex-shrink: 0;
}

/* Garantir que o submodal respeite a altura maxima e permita scroll no corpo */
.modal-overlay-sub .modal-box,
#modal-sub-ovl .modal-box,
#modal-box-sub {
    max-height: 90vh;
    overflow: hidden !important;
}

.modal-overlay-sub .modal-body,
#modal-sub-ovl .modal-body,
#modal-sub-body {
    overflow-y: auto !important;
    max-height: calc(90vh - 130px);
}

.modal-overlay-sub .modal-ftr,
#modal-sub-ovl .modal-ftr,
#modal-ftr-sub {
    position: relative;
    z-index: 10;
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
    flex-shrink: 0;
}

/* Responsividade Mobile: Grid de Seletores de Automação de Categorias */
@media (max-width: 640px) {
    .cat-auto-select-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}





/* Substitui a fonte embutida "fcicons" do FullCalendar (que gera warning de glyph bbox no Firefox) por Font Awesome 6 */
.fc .fc-icon {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased;
}
.fc .fc-icon-chevron-left::before { content: "\f053" !important; }
.fc .fc-icon-chevron-right::before { content: "\f054" !important; }
.fc .fc-icon-chevrons-left::before { content: "\f100" !important; }
.fc .fc-icon-chevrons-right::before { content: "\f101" !important; }
.fc .fc-icon-x::before { content: "\f00d" !important; }
.fc .fc-icon-plus-square::before { content: "\f0fe" !important; }
.fc .fc-icon-minus-square::before { content: "\f146" !important; }
