/* ======================================== */
/* == ESTILOS GLOBAIS E VARIÃ VEIS        == */
/* ======================================== */

:root {
    /* Mantendo suas cores base, mas ajustando o fundo */
    --primary-red: #db0038;
    --primary-red-dark: #b8002e;
    --bg-body: #f3f4f6;
    /* Cinza mais azulado e moderno */
    --card-white: #ffffff;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border-subtle: #e5e7eb;

    --success-green: #db0038;
    /* Verde Esmeralda (CorreÃ§Ã£o da barra) */
    --warning-red: #ff000d;
    /* Vermelho Alerta */
    --info-blue: #3b82f6;
    /* Azul Info */

    /* Sombras Suaves (Elevation) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
}

/* Chrome, Safari, Edge, Opera: Remove setas do input number */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox: Remove setas do input number */
input[type=number] {
    -moz-appearance: textfield;
}

.hidden {
    display: none !important;
}

body {
    background-color: var(--bg-body);
    font-family: 'Inter', system-ui, sans-serif;
    /* System-ui garante performance */
    color: var(--text-dark);
    display: block;
    min-height: 100vh;
    position: relative;
}

/* Overlay de Carregamento Inicial / Bloqueio *//* Comprovante térmico — pedaço de papel rasgado */
.receipt-preview-hint {
    background: #faf9f0;
    position: relative;
    margin: 0;
    padding: 0 50px;
}

/* Borda rasgada superior (dentes de serra) */
.receipt-tear-top {
    width: 100%;
    height: 10px;
    background: white;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='10'%3E%3Cpath d='M0 0 L5 10 L10 0 L15 10 L20 0 Z' fill='white'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='10'%3E%3Cpath d='M0 0 L5 10 L10 0 L15 10 L20 0 Z' fill='white'/%3E%3C/svg%3E");
    -webkit-mask-size: 20px 10px;
    mask-size: 20px 10px;
    -webkit-mask-repeat: repeat-x;
    mask-repeat: repeat-x;
}

/* Borda rasgada inferior (dentes de serra invertidos) */
.receipt-tear-bottom {
    width: 100%;
    height: 10px;
    background: white;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='10'%3E%3Cpath d='M0 10 L5 0 L10 10 L15 0 L20 10 Z' fill='white'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='10'%3E%3Cpath d='M0 10 L5 0 L10 10 L15 0 L20 10 Z' fill='white'/%3E%3C/svg%3E");
    -webkit-mask-size: 20px 10px;
    mask-size: 20px 10px;
    -webkit-mask-repeat: repeat-x;
    mask-repeat: repeat-x;
}

.receipt-preview-inner {
    font-family: 'Courier New', Courier, monospace;
    font-size: 9pt;
    color: #000;
    max-width: 300px;
    margin: 0 auto;
    padding: 2px 10px 4px;
}

.rph-header {
    text-align: center;
}

.rph-header h3 {
    margin: 0;
    font-size: 11pt;
}

.rph-header p {
    margin: 2px 0;
    font-size: 9pt;
}

.rph-divider {
    border-bottom: 1px dashed #555;
    margin: 5px 0;
}

.rph-meta {
    text-align: center;
    font-size: 9pt;
    margin: 5px 0;
}

.rph-meta p {
    margin: 0;
}

/* Círculo de destaque ao redor do ID */
.rph-id-circled {
    display: inline-block;
    border: 2px solid var(--primary-red);
    border-radius: 50px;
    padding: 0px 6px;
    font-weight: bold;
    color: #000;
}
/* ======================================== */
/* == ANIMAÃ‡Ã•ES                          == */
/* ======================================== */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes flash {
    0% {
        background-color: rgba(219, 0, 56, 0.1);
    }

    100% {
        background-color: transparent;
    }
}

.new-item-flash {
    animation: flash 0.5s ease-out;
}

@keyframes pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.pop-animation {
    animation: pop 0.3s ease-out;
}

@keyframes bx-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.bx-spin {
    animation: bx-spin 1s linear infinite;
}

/* Modal de Seleção de Etiqueta */
.label-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.toolbar-products {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.toolbar-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    position: relative;
}

.toolbar-buttons .btn {
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.toolbar-buttons .btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.label-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background-color: var(--card-white);
    border: 2px solid var(--border-subtle);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.label-option:hover {
    border-color: var(--primary-red);
    background-color: rgba(219, 0, 56, 0.05);
}

.label-icon {
    width: 48px;
    height: 48px;
    background-color: var(--bg-body);
    color: var(--primary-red);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.5rem;
}

.label-info strong {
    display: block;
    font-size: 1rem;
    color: var(--text-dark);
}

.label-info p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 2px;
}

/* Seletor de Cores */
.color-selector-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-subtle);
}

.section-subtitle {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.color-swatches {
    display: flex;
    gap: 12px;
}

.swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--swatch-color);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px var(--border-subtle);
    transition: all 0.2s ease;
}

.swatch:hover {
    transform: scale(1.1);
}

.swatch.active {
    box-shadow: 0 0 0 2px var(--primary-red);
    transform: scale(1.1);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ======================================== */
/* == ESTILOS DE ATALHO / ACESSIBILIDADE == */
/* ======================================== */

.shortcut-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 8px;
    padding-left: 4px;
    transition: opacity 0.2s ease;
}

.nav-focus {
    outline: 2px solid var(--info-blue) !important;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.3) !important;
    border-radius: 8px;
}

.discount-nav-hint {
    display: none;
    font-size: 0.85rem;
    color: var(--info-blue);
    font-weight: 500;
    margin-top: 8px;
    text-align: center;
}

/* ======================================== */
/* == ESTILOS DE DESCONTO E PAGAMENTO    == */
/* ======================================== */
.summary-row-interactive {
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 8px;
    padding: 8px 0;
    margin: -8px 0;
}

.summary-row-interactive:hover {
    background-color: var(--bg-light);
}

.summary-row .value.editable {
    color: var(--primary-red);
    font-weight: 600;
    text-decoration: underline dashed 1px;
    text-underline-offset: 4px;
}



#perc-btn-container {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    opacity: 1;
    max-height: 50px;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

#perc-btn-container.hidden {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    pointer-events: none;
    flex: 0;
    width: 0;
    padding: 0;
    margin: 0;
}

.perc-btn {
    flex-grow: 1;
    padding: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: var(--card-white);
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.perc-btn:hover {
    background-color: var(--primary-red-dark);
    border-color: var(--primary-red);
    color: white;
}

.btn-remove-discount {
    background: none;
    border: none;
    color: var(--warning-red);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px;
    width: 100%;
    justify-content: center;
    border: 1px dashed transparent;
}

.btn-remove-discount:hover {
    text-decoration: underline;
}

.btn-remove-discount.nav-focus {
    border: 1px dashed var(--info-blue);
    background-color: var(--card-white);
}

.effective-discount-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
    margin-top: 12px;
    min-height: 1.2em;
}

.effective-discount-display i {
    color: var(--text-light);
}

/* ======================================== */
/* == TOOLTIPS                           == */
/* ======================================== */

.tooltip {
    position: relative;
    display: block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: max-content;
    max-width: 220px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 10;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
    font-size: 0.85rem;
    font-weight: 500;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ======================================== */
/* == HEADER E NAVBAR                    == */
/* ======================================== */

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.header-logo-brand {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.header-brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: 0.5px;
    font-family: 'Inter', system-ui, sans-serif;
}

.header-brand-sub {
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    font-family: 'Inter', system-ui, sans-serif;
    align-self: flex-end;
    margin-bottom: 3px;
}

/* --- Header Profile Box --- */
.header-profile-minimal {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 0;
}

.profile-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.cnpj-hover-info {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: #1e293b;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-md);
    z-index: 1000;
}

.cnpj-hover-info::before {
    content: '';
    position: absolute;
    top: -4px;
    right: 12px;
    width: 8px;
    height: 8px;
    background: #1e293b;
    transform: rotate(45deg);
}

.profile-icon-wrapper:hover .cnpj-hover-info {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s;
}

.profile-icon-circle:hover {
    color: var(--primary-red);
}

.profile-icon-circle i {
    font-size: 1.5rem;
}

.profile-text-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: right;
}

.profile-label-main {
    font-size: 0.85rem;
    color: var(--text-dark);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-label-sub {
    font-size: 0.7rem;
    color: var(--text-light);
    font-weight: 600;
}

#header-close-caixa-btn {
    width: auto;
    padding: 10px 16px;
    font-size: 0.9rem;
    margin-top: 0;
}

.navbar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 18px;
    position: relative;
}

.navbar-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 12px 0;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    position: relative;
    transition: color 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.navbar-item:hover {
    color: var(--text-dark);
}

.navbar-item.active {
    color: var(--primary-red);
}

.navbar-highlight {
    position: absolute;
    bottom: -1px;
    height: 3px;
    background-color: var(--primary-red);
    transition: left 0.3s ease, width 0.3s ease;
    border-radius: 2px;
}

/* Container do Menu */
.navbar-more-container {
    position: relative;
    display: inline-block;
}

/* O Dropdown - Estado Inicial */
.more-menu-modal {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 280px;
    background-color: var(--card-white);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    z-index: 2000;

    /* Substitua display: none por isso para permitir animaÃ§Ãµes */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease-in-out;
    pointer-events: none;
    /* Impede cliques enquanto invisÃ­vel */
}

/* Classe de AtivaÃ§Ã£o (O que o JS vai alternar) */
.more-menu-modal.show {
    display: block !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Títulos e Subtítulos do Menu de Gerenciamento */
.more-menu-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-dark);
    padding: 8px 12px 2px 12px;
    letter-spacing: -0.2px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.more-menu-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    padding: 8px 12px 2px 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Itens do Menu */
.more-menu-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    gap: 12px;
}

.more-menu-item:hover {
    background-color: var(--bg-body);
}

/* Ãcones dos Itens */
.item-icon-box {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: var(--text-light);
    font-size: 1.25rem;
    transition: 0.2s;
}

.more-menu-item:hover .item-icon-box {
    background-color: transparent;
    color: var(--text-light);
    box-shadow: none;
}

/* Textos */
.item-content {
    display: flex;
    flex-direction: column;
}

.item-content strong {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.2;
}

.item-content span {
    font-size: 0.75rem;
}

/* Divisor */
.menu-divider {
    height: 1px;
    background-color: var(--border-subtle);
    margin: 6px 8px;
}

/* Submenu do Menu de Gerenciamento */
.more-menu-item.has-submenu {
    position: relative;
}

.submenu-arrow {
    margin-left: auto;
    font-size: 1rem;
    color: var(--text-light);
    transition: transform 0.2s ease, color 0.2s ease;
}

.more-menu-item.has-submenu:hover .submenu-arrow {
    transform: translateX(2px);
    color: var(--primary-red);
}

.submenu-modal {
    position: absolute;
    left: calc(100% + 8px);
    top: 0;
    width: 160px;
    background-color: var(--card-white);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-8px);
    transition: all 0.2s ease-in-out;
    pointer-events: none;
    z-index: 2100;
}

/* Pseudo-elemento ponte para estender a hitbox diagonalmente e fechar o gap de 8px */
.submenu-modal::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    width: 20px;
    height: calc(100% + 30px);
    background: transparent;
    z-index: -1;
}

.more-menu-item.has-submenu:hover .submenu-modal {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.submenu-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-dark);
}

.submenu-item:hover {
    background-color: var(--bg-body);
    color: var(--text-dark);
}

.submenu-item strong {
    font-size: 0.85rem;
    font-weight: 600;
}

/* EstilizaÃ§Ã£o PRO */
.more-menu-item.is-pro {
    position: relative;
    background-color: rgba(219, 0, 56, 0.03);
    /* Vermelho primÃ¡rio com baixa opacidade */
}

.title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pro-icon {
    background-color: #ffebeb;
    /* Amarelo muito suave */
    color: var(--primary-red);
}

.pro-tag {
    background-color: var(--primary-red);
    color: var(--border-subtle);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
}

.more-menu-item.is-pro:hover .pro-icon {
    color: #f59e0b;
    background-color: #fff;
}

.title-page {
    display: flex;
}

.pro-badge-main {
    height: 1rem;
    margin-left: 1rem;
    margin-top: 0.5rem;
}


/* --- Navbar Right Actions --- */
.navbar-right-container {
    height: 100%;
}



.menu-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: var(--primary-red);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 99px;
    box-shadow: 0 2px 4px rgba(219, 0, 56, 0.3);
}

/* --- Parked Sales List --- */
.parked-sale-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background-color 0.2s ease;
}

.parked-sale-item:last-child {
    border-bottom: none;
}

.parked-sale-item:hover {
    background-color: #f9fafb;
}

.parked-info {
    flex-grow: 1;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.parked-info strong {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.parked-info span {
    font-size: 0.75rem;
    color: var(--text-light);
}

.btn-delete-sale {
    background: none;
    border: none;
    color: #ef4444;
    /* Red for danger */
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-sale:hover {
    background-color: #fee2e2;
}

/* Ajuste no container do Menu Vendas para permitir scroll se houver muitas */
#sales-menu-modal {
    max-height: 400px;
    overflow-y: auto;
}

.sale-details-modern {
    border-radius: 16px !important;
    overflow: hidden;
}

/* Card Principal de Valor */
.summary-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.summary-item small {
    display: block;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

.summary-item h2 {
    font-size: 2.2rem;
    /* Valor bem grande */
    color: #0f172a;
    margin: 0;
}

/* Badge de Pagamento */
.modern-badge {
    background: #000;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Grid de InformaÃ§Ãµes */
.info-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.info-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
}

.info-box i {
    font-size: 1.5rem;
    color: var(--primary-color);
    background: #eff6ff;
    padding: 8px;
    border-radius: 8px;
}

.info-box small {
    display: block;
    color: #94a3b8;
    font-size: 0.7rem;
}

.info-box strong {
    font-size: 0.95rem;
    color: #1e293b;
}

/* SeÃ§Ã£o de Itens */
.section-title {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modern-items-list {
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.receipt-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1rem;
}

.receipt-item-row:last-child {
    border-bottom: none;
}

.receipt-item-row span {
    color: #334155;
    font-weight: 500;
}

.receipt-item-row strong {
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Footer Ajustado */
.footer-horizontal {
    display: flex;
    gap: 12px;
    padding: 20px !important;
}

.footer-horizontal .btn {
    flex: 1;
    height: 50px;
    font-weight: 700;
}

/* Overlay de Carregamento */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    /* Azul escuro profundo */
    backdrop-filter: blur(8px);
    display: none;
    /* Escondido por padrÃ£o */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

/* --- Detail Info Card --- */
.detail-info-row {
    display: flex;
    gap: 8px;
    /* Slightly tighter gap for 4 items */
    margin-bottom: 20px;
}

.detail-info-card {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 4px;
    /* Reduced side padding */
    text-align: center;
    min-width: 0;
    /* Allows text truncation if absolutely needed */
}

.detail-info-card span.label {
    display: block;
    font-size: 0.7rem;
    /* Slightly smaller label */
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-info-card span.value {
    display: block;
    font-size: 0.95rem;
    /* Adjusted for space */
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-info-card span.value.danger {
    color: #ef4444;
}


/* --- Improved QR Code Container --- */
.qr-modern-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    display: none;
    /* Controlled by JS */
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    position: relative;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}


/* ======================================== */
/* == RADIO BUTTON & ANIMATION           == */
/* ======================================== */
.btn-radio {
    background-color: #000000;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.btn-radio:hover {
    background-color: #262626;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.sound-wave-icon {
    display: flex;
    align-items: flex-end;
    height: 16px;
    gap: 3px;
}

.sound-wave-bar {
    width: 3px;
    background-color: #fff;
    border-radius: 4px;
    animation: wave-anim 1.2s ease-in-out infinite;
}

.sound-wave-bar:nth-child(1) {
    animation-delay: 0.0s;
    height: 40%;
}

.sound-wave-bar:nth-child(2) {
    animation-delay: 0.1s;
    height: 100%;
}

.sound-wave-bar:nth-child(3) {
    animation-delay: 0.2s;
    height: 60%;
}

.sound-wave-bar:nth-child(4) {
    animation-delay: 0.3s;
    height: 80%;
}

@keyframes wave-anim {

    0%,
    100% {
        height: 40%;
    }

    50% {
        height: 100%;
    }
}

.qr-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.25rem;
    transition: color 0.2s;
}

.qr-close-btn:hover {
    color: #ef4444;
}

.qr-link-box {
    background: #eff6ff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #2563eb;
    word-break: break-all;
    text-align: center;
    cursor: pointer;
    border: 1px dashed #bfdbfe;
    transition: all 0.2s;
}

.qr-link-box:hover {
    background: #dbeafe;
    border-color: #3b82f6;
}

.loader-card {
    background: white;
    padding: 40px;
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}


.fiscal-animation-box {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background: #eff6ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#loader-main-icon {
    font-size: 50px;
    color: var(--primary-color);
    z-index: 2;
}

.scan-bar {
    position: absolute;
    width: 80%;
    height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    top: 50%;
    animation: scanAnimation 2s infinite ease-in-out;
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    text-align: left;
}

.step-row {
    font-size: 0.75rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.step-row.active {
    color: var(--primary-color);
}

.step-row.done {
    color: #10b981;
}

.step-row.done i {
    color: #10b981;
    content: '\eb7a';
    /* Troca para check icon se desejar via JS */
}

@keyframes scanAnimation {

    0%,
    100% {
        top: 20%;
        opacity: 0;
    }

    50% {
        top: 80%;
        opacity: 1;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

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

#emission-loader-overlay.active {
    display: flex !important;
    animation: fadeInScale 0.2s ease-out forwards;
}

/* ConteÃºdo adicional da pÃ¡gina de produtos*/

/* --- Toolbar de Produtos --- */
.toolbar-products {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

/* --- Filtros em CÃ¡psula --- */
.filter-capsules {
    display: flex;
    background-color: #f1f5f9;
    padding: 4px;
    border-radius: 50px;
    /* Borda bem arredondada */
    gap: 4px;
}

.filter-cap {
    border: none;
    background: transparent;
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.filter-cap:hover {
    color: var(--text-dark);
}

.filter-cap.active {
    background-color: #ffffff;
    color: var(--primary-red);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.badge-count {
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.filter-cap.active .badge-count {
    background: #ffe5e9;
    /* Fundo suave vermelho */
    color: var(--primary-red);
}

/* --- Container e Dropdown de Filtro Reutilizável --- */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.filter-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 210px;
    background-color: var(--card-white);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    padding: 6px;
    flex-direction: column;
    gap: 4px;
}

.filter-dropdown .filter-cap {
    width: 100%;
    border: none;
    background: transparent;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-align: left;
}

.filter-dropdown .filter-cap i {
    font-size: 1.1rem;
    color: var(--text-light);
    transition: color 0.2s ease;
}

.filter-dropdown .filter-cap:hover {
    background-color: var(--bg-body);
    color: var(--text-dark);
}

.filter-dropdown .filter-cap:hover i {
    color: var(--text-dark);
}

.filter-dropdown .filter-cap.active {
    background-color: #f1f5f9;
    color: var(--text-dark);
    font-weight: 700;
    box-shadow: none;
}

.filter-dropdown .filter-cap.active i {
    color: var(--text-dark);
}

.filter-dropdown .filter-cap .badge-count {
    margin-left: auto;
    background-color: var(--bg-body);
    color: var(--text-light);
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.filter-dropdown .filter-cap.active .badge-count {
    background-color: #e2e8f0;
    color: var(--text-dark);
}

/* --- Tabela de Produtos Otimizada --- */
.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table th {
    text-align: left;
    padding: 15px 12px;
    font-size: 1.1rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-subtle);
    background-color: #f9fafb;
}

.products-table td {
    padding: 18px 12px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.products-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.products-table tbody tr:hover {
    background-color: var(--bg-hover, #f8f9fa);
}

/* Estilo para a cÃ©lula da nota com barra lateral */
.note-cell-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 0 !important;
}

.status-indicator-bar {
    width: 8px;
    height: 45px;
    border-radius: 0 4px 4px 0;
}

/* Cores dos Status */
.bar-approved {
    background-color: #10b981;
}

/* Verde escuro */
.bar-partial {
    background-color: #86efac;
}

/* Verde claro (Itens ignorados) */
.bar-rejected {
    background-color: #ef4444;
}

/* Vermelho */
.bar-cancelled {
    background-color: #f59e0b;
}

/* Amarelo */

.note-number {
    font-size: 1.3rem;
    /* Tamanho grande para leitura rÃ¡pida */
    font-weight: 700;
    color: var(--text-dark);
}



/* Status Fiscal Badge */
.fiscal-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.fiscal-status.ok {
    background-color: #def7ec;
    color: #03543f;
}

.fiscal-status.pending {
    background-color: #fdf6b2;
    color: #723b13;
}

/* SeÃ§Ãµes do Modal */
.section-title {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-primary {
    color: var(--primary-red) !important;
}




/* Layout do Modal de EdiÃ§Ã£o */
.product-edit-layout {
    display: flex;
    gap: 24px;
}

.edit-col-left {
    width: 140px;
    flex-shrink: 0;
    text-align: center;
}

.edit-col-right {
    flex: 1;
}

/* Upload de Imagem (Estilo Perfil) */
.image-upload-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.product-img-preview {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    /* Levemente arredondado, mas quadrado */
    background-color: #f3f4f6;
    border: 2px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #9ca3af;
    font-size: 2rem;
    position: relative;
}

.product-img-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sm-input {
    font-size: 0.75rem;
    padding: 6px;
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    width: 100%;
    text-align: center;
}

.bg-locked {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

/* Card de PrecificaÃ§Ã£o (Markup/Margem) */
.pricing-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.profit-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #cbd5e1;
    font-size: 0.85rem;
}

.stat-item .lbl {
    color: var(--text-light);
    margin-right: 4px;
}

.stat-item .val {
    font-weight: 700;
    color: var(--text-dark);
}

.text-success {
    color: #16a34a !important;
}

/* Autocomplete da Marca */
.relative-container {
    position: relative;
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
    max-height: 150px;
    overflow-y: auto;
    display: none;
    /* JS controla isso */
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.suggestion-unit-sigla {
    font-weight: 600;
    color: var(--text-dark);
}

.suggestion-unit-desc {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-left: 8px;
}

.suggestion-new {
    color: var(--primary-red);
    font-weight: 600;
}

/* Nova SeÃ§Ã£o Fiscal (Clean) */
.fiscal-section-clean {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
    /* Fundo branco limpo */
    position: relative;
    margin-top: 24px;
}

.fiscal-header {
    position: absolute;
    top: -10px;
    left: 12px;
    background: #fff;
    padding: 0 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    /* Cinza azulado profissional */
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- CORREÃ‡ÃƒO DO ÃCONE DE PESQUISA --- */
.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon input {
    padding-right: 36px !important;
    /* EspaÃ§o para o Ã­cone nÃ£o ficar sobre o texto */
    width: 100%;
}

.input-with-icon i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 12px;
    /* Posicionado DENTRO da barra, Ã  direita */
    font-size: 1.2rem;
    color: var(--text-light);
    pointer-events: none;
    /* Permite clicar no input atravÃ©s do Ã­cone */
}

/* --- LÃ“GICA DE MAXIMIZAR JANELA --- */
.transition-all {
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Classe aplicada via JS quando expandir */
/* .modal-content.modal-expanded foi removido por simplificação arquitetônica (usar .modal-full) */

.modal-header .header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.window-control-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--text-light);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.window-control-btn:hover {
    background-color: #f3f4f6;
    color: var(--text-dark);
}

/* --- INPUT DE CÃ“DIGO COM DESBLOQUEIO --- */
.input-group-lock {
    display: flex;
    align-items: stretch;
    position: relative;
}

.input-group-lock input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-group-lock input:disabled {
    background-color: #f9fafb;
    color: #6b7280;
    opacity: 1;
    /* Garante legibilidade */
}

.btn-unlock {
    border: 1px solid #ddd;
    border-left: none;
    background-color: #f3f4f6;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    padding: 0 10px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
}

.btn-unlock:hover {
    background-color: #e5e7eb;
    color: var(--primary-red);
}

.btn-unlock.unlocked {
    background-color: white;
    color: var(--success-green);
    border-color: var(--success-green);
    border-left: 1px solid var(--success-green);
    /* Fecha a borda */
}

/* --- CORREÃ‡ÃƒO DO MODAL DE EDIÃ‡ÃƒO (FormulÃ¡rio FlexÃ­vel) --- */

/* 1. Garante que o Modal Content controle o tamanho total */
.modal-content {
    max-height: 90vh;
    /* Limite de altura da tela */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Impede que o formulÃ¡rio vaze para fora */
}

/* ReforÃ§o para garantir que o formulÃ¡rio ocupe o espaÃ§o exato */
#edit-product-form {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
    min-height: 0;
}

/* 3. O corpo rola dentro do formulÃ¡rio */
#edit-product-form .modal-body {
    overflow-y: auto;
    /* Habilita o scroll vertical aqui */
    flex-grow: 1;
    /* Ocupa o espaÃ§o entre o topo e o rodapÃ© */
    padding-right: 8px;
    /* Evita que a barra de rolagem cubra conteÃºdo */
}

/* 4. Garante que o rodapÃ© fique fixo no fundo do form */
#edit-product-form .modal-footer {
    flex-shrink: 0;
    /* NÃ£o encolhe */
}

/* Ajuste Responsivo para telas pequenas (Mantido do anterior) */
@media (max-width: 768px) {
    .product-edit-layout {
        flex-direction: column;
        gap: 16px;
    }

    .edit-col-left {
        width: 100%;
        display: flex;
        justify-content: center;
        border-bottom: 1px dashed #e5e7eb;
        padding-bottom: 16px;
    }

    .edit-col-right {
        width: 100%;
    }
}

/* --- Thumbnail de Produto na Tabela --- */
.product-cell-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-thumb-sm {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: contain;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

/* Lógica de Barra de Imagens extras */
.product-img-container-list {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    padding: 3px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.product-thumbs-bar {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-thumb-xs {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    background: white;
}


/* Fallback para quando nÃ£o tiver imagem (Ã­cone) */
.product-thumb-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background-color: #f3f4f6;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 1px solid #e5e7eb;
}

.brand-tag {
    font-size: 0.7rem;
    background-color: #eef2ff;
    color: #4f46e5;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 2px;
    display: inline-block;
}

.category-tag {
    font-size: 0.7rem;
    background-color: #f1f5f9;
    color: #475569;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 2px;
    display: inline-block;
    border: 1px solid #e2e8f0;
}

.badge-alert-sm {
    font-size: 0.65rem;
    background-color: #fff7ed;
    color: #c2410c;
    border: 1px solid #fdba74;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 2px;
    display: inline-block;
}

.badge-danger-sm {
    font-size: 0.65rem;
    background-color: #fdf2f2;
    color: #9b1c1c;
    border: 1px solid #f8b4b4;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 2px;
    display: inline-block;
}

.product-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-red);
}

#select-all-products {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-red);
}

/* ======================================== */
/* == CONTEÃšDO PRINCIPAL (PDV)           == */
/* ======================================== */

.main-content {
    width: 100%;
    height: 100%;
    padding: 18px;
    overflow-y: auto;
    display: none;
    /* ComeÃ§a oculto */
}

.page-content {
    animation: slideInUp 0.5s ease-out;
}

.page-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.pdv-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    min-height: calc(100vh - 200px - 60px);
}

.pdv-main {
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
}

.card {
    background-color: var(--card-white);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    padding: 24px;
}

.scan-search-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.barcode-qty-wrapper {
    flex-shrink: 0;
    width: 65px;
}

.barcode-qty-wrapper .qty-input {
    width: 100%;
    padding: 18px 8px;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    border-radius: 12px;
    border: 1px solid #ddd;
    background-color: var(--card-white);
    color: var(--text-dark);
    transition: all 0.2s ease;
    -moz-appearance: textfield; /* Firefox */
}

/* Chrome, Safari, Edge, Opera */
.barcode-qty-wrapper .qty-input::-webkit-outer-spin-button,
.barcode-qty-wrapper .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.barcode-qty-wrapper .qty-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(219, 0, 56, 0.2);
}

.barcode-scanner {
    position: relative;
}

.barcode-scanner i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.barcode-scanner input {
    width: 100%;
    padding: 18px 18px 18px 50px;
    font-size: 1rem;
    border-radius: 12px;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
}

.barcode-scanner input:disabled {
    background-color: #f9f9f9;
    cursor: wait;
}

.barcode-scanner input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(219, 0, 56, 0.2);
}

.item-list-container {
    flex-grow: 1;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background-color: var(--card-white);
    padding: 0;
}

/* --- ESTADO VAZIO COM LOGO (Branded) --- */

/* Ajuste no container pai para garantir altura */
.item-list-container.empty {
    min-height: 400px;
    /* Garante espaÃ§o para a logo aparecer */
    display: flex;
    flex-direction: column;
}

/* O container principal (mantido do seu cÃ³digo) */
.empty-state {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px;
    background-color: #fff;
    /* Garante fundo branco limpo */
    border-radius: 16px;
}

/* O wrapper interno que segura a logo e textos */
.empty-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0.8;
    width: 100%;
    max-width: 300px;
}

/* Logo Marca D'água */
.empty-store-logo {
    max-width: 140px;
    height: auto;
    margin-bottom: 20px;
    filter: none;
    opacity: 1;
    transition: all 0.4s ease;
}

/* Ãcone de fallback (se imagem falhar) */
#fallback-icon {
    font-size: 4rem;
    color: #e2e8f0;
    margin-bottom: 15px;
}

/* TÃ­tulos */
.empty-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.empty-subtitle {
    font-size: 0.85rem;
    color: #cbd5e1;
    font-weight: 500;
}

/* AnimaÃ§Ã£o do Scanner Vermelho */
.scanner-line-anim {
    width: 0%;
    height: 3px;
    background: var(--primary-red);
    /* Usa sua cor vermelha */
    margin-top: 25px;
    box-shadow: 0 0 15px rgba(219, 0, 56, 0.4);
    border-radius: 2px;
    animation: scan-idle 3s infinite ease-in-out;
}

@keyframes scan-idle {
    0% {
        width: 0%;
        opacity: 0;
    }

    20% {
        width: 10%;
        opacity: 0.8;
    }

    50% {
        width: 100%;
        opacity: 0;
    }

    /* Expande atÃ© sumir */
    100% {
        width: 0%;
        opacity: 0;
    }
}

.item-list-table {
    width: 100%;
    border-collapse: collapse;
}

.item-list-table th,
.item-list-table td {
    padding: 16px 12px;
    text-align: left;
    vertical-align: middle;
}

.item-list-table th.text-center,
.item-list-table td.text-center {
    text-align: center;
}

.item-list-table th.text-right,
.item-list-table td.text-right {
    text-align: right;
}

.item-list-table thead {
    border-bottom: 1px solid var(--border-color);
    background-color: #fdfdfd;
}

.item-list-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 600;
}

.item-list-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.item-list-table tbody tr:last-child {
    border-bottom: none;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    flex-shrink: 0;
}

.product-details .name {
    font-weight: 600;
    color: var(--text-dark);
}

.product-details .barcode {
    font-size: 0.85rem;
    color: var(--text-light);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background-color: #eee;
}

.qty-display {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.item-price {
    font-weight: 500;
}

.item-total {
    font-weight: 600;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    color: var(--warning-red);
    background-color: #FFEBEE;
}

.pdv-summary .card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pdv-summary-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.divider-dashed {
    border-bottom: 1px dashed #e5e7eb;
    margin: 15px 0;
}

/* SeÃ§Ã£o Cliente */
.client-summary-box {
    background: #fdfdfd;
    border: none;
    border-radius: 12px;
    padding: 12px 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.client-summary-box:hover {
    background: #f8fafc;
}

.btn-danger-soft {
    color: var(--warning-red);
    border-color: #fee2e2;
    /* Vermelho muito claro */
    background: #fff;
}

.btn-danger-soft:hover {
    background-color: var(--warning-red);
    color: white;
    border-color: var(--warning-red);
    box-shadow: 0 2px 5px rgba(229, 57, 53, 0.3);
}

/* Quando um cliente real Ã© selecionado, muda a cor da borda */
.client-summary-box.active-client {
    background: transparent;
    border: none;
    box-shadow: none;
}

.client-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.client-info-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-icon-avatar {
    width: 32px;
    height: 32px;
    background: transparent;
    color: #64748b;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
}

.active-client .client-icon-avatar {
    background: transparent;
    color: var(--primary-red);
    box-shadow: none;
}

.active-client .client-label {
    display: none;
}

.client-text-data {
    display: flex;
    flex-direction: column;
}

.client-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
}

.client-text-data strong {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.2;
}

.btn-icon-small {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;

    flex-shrink: 0;
    /* Impede o botÃ£o de ser esmagado pelo texto do cliente */
    display: flex;
    /* Garante que o Ã­cone possa ser centralizado */
    align-items: center;
    /* Centraliza verticalmente */
    justify-content: center;
    /* Centraliza horizontalmente */
    padding: 0;
    /* Remove padding extra que possa atrapalhar */
}

.btn-icon-small:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

/* Lista de AÃ§Ãµes (Menu) */
.summary-actions-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* EspaÃ§amento uniforme entre os itens */
    margin: 15px 0;
    flex-grow: 1;
    /* Ocupa espaÃ§o disponÃ­vel */
}

.action-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid transparent;
}

.action-item:hover {
    background-color: #f8fafc;
    border-color: #f1f5f9;
}

.action-item .icon-box {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 8px;
    margin-right: 12px;
}

.action-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.action-label {
    font-size: 0.75rem;
    color: #94a3b8;
}

.action-value {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.action-value.highlight {
    color: var(--primary-red);
}

.arrow-indicator {
    color: #cbd5e1;
}

/* Popovers Ajustados */
.discount-popover {
    background: #fff;
    border: none;
    margin-top: 0;
    margin-bottom: 0;
    border-radius: 20px;
    box-shadow: none;
    overflow: hidden;
    max-height: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

.discount-popover.active {
    max-height: 500px;
    padding: 10px;
    background: #f8fafc;
    overflow: visible !important;
}

.popover-inner {
    padding: 10px;
}

/* Novo Contêiner de Desconto Integrado (Estilo Sublinhado) */
.discount-container-modern {
    display: flex;
    align-items: center;
    border: none;
    border-bottom: 2px solid #334155;
    background: transparent;
    padding: 2px 0;
    height: 40px;
    width: 100%;
    transition: border-color 0.2s;
}

.discount-container-modern:focus-within {
    border-bottom: 2px solid var(--primary-red);
}

.discount-container-modern input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    padding: 6px;
    outline: none;
    width: 100%;
}

.discount-type-toggles {
    display: flex;
    gap: 2px;
    background: #f1f5f9;
    padding: 2px;
    border-radius: 6px;
}

.discount-type-btn {
    border: none;
    background: transparent;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.discount-type-btn.active {
    background: var(--primary-red);
    color: #ffffff;
}



.pdv-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    color: #cbd5e1;
    border-radius: 8px;
    font-size: 1.5rem;
}

.pdv-img-placeholder i {
    font-size: 2rem;
    opacity: 0.8;
}

.cart-item-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
}

/* Grupo de Seleção de Colaboradores */
.seller-select-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.seller-select-group .select-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.seller-select-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-dropdown {
    position: relative;
    width: 100%;
}

.custom-dropdown-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    user-select: none;
}

.custom-dropdown-trigger:hover {
    border-color: #94a3b8;
}

.custom-dropdown.active .custom-dropdown-trigger {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(219, 0, 56, 0.08);
}

.custom-dropdown-trigger i {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
    color: #64748b;
}

.custom-dropdown.active .custom-dropdown-trigger i {
    transform: rotate(180deg);
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}

.custom-dropdown.active .custom-dropdown-menu {
    display: block;
}

.custom-dropdown-item {
    padding: 10px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.custom-dropdown-item:hover {
    background-color: #f1f5f9;
}

.custom-dropdown-item.selected {
    background-color: var(--primary-red);
    color: #ffffff;
}



/* Footer e Totais */
.effective-display-row {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#discount-effective-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: #1e293b;
    text-transform: uppercase;
}

.btn-remove-link {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-remove-link:hover {
    background: #f1f5f9;
    color: #db0038;
}

/* Footer e Totais */
.summary-footer {
    margin-top: auto;
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
}

.total-display {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 10px;
}

.total-display .label {
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
}

.total-display .value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-red);
    line-height: 1;
}

.tax-mini-card {
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: right;
    margin-bottom: 15px;
    cursor: pointer;
}

.action-buttons {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
}

.btn-lg {
    padding: 14px;
    font-size: 1.1rem;
}

/* Nova classe para destacar a falta de pagamento */
.border-pulse {
    border: 2px solid var(--warning-red) !important;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(97, 239, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(68, 239, 134, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(131, 239, 68, 0);
    }
}

/* --- Estilo para o Display de Troco --- */
.change-display-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    /* EspaÃ§o antes dos tributos */
    margin-top: 5px;
}

.change-label {
    font-size: 0.85rem;
    color: var(--text-dark);
    font-weight: 600;
}

.pdv-summary-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #fff;
    border-radius: 20px;
    height: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.divider-dashed {
    border-bottom: 1px dashed #e5e7eb;
    margin: 15px 0;
}

.client-summary-box {
    background: #fdfdfd;
    border: none;
    border-radius: 12px;
    padding: 12px 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.client-summary-box:hover {
    background: #f8fafc;
}

.summary-controls-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.summary-controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.control-btn {
    background: #f8fafc;
    border: none;
    border-radius: 12px;
    padding: 12px 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 85px;
}

.control-btn:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.control-btn .c-icon {
    font-size: 1.6rem;
    color: #64748b;
    margin-bottom: 6px;
}

.control-btn .c-label {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
}

.control-btn .c-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 2px;
}

/* Indicador de Seleção para Botões Interativos */
.control-btn.clickable-select {
    padding-bottom: 24px; /* Abre espaço para o indicador e wrapper */
}

.control-btn .select-indicator {
    position: absolute;
    bottom: 4px;
    font-size: 0.9rem;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.control-btn.clickable-select:hover .select-indicator {
    color: var(--primary-red);
    transform: translateY(1px);
}

.control-btn .c-value-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    margin-top: 3px;
    width: 100%;
}

.control-btn .c-val-line {
    font-size: 0.65rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 90%;
    line-height: 1.2;
}

.control-btn .c-val-line b {
    color: #94a3b8;
    font-weight: 600;
}

.control-btn .c-val-line span {
    font-weight: 700;
    color: var(--text-dark);
}

/* Popover de Vendedor e Operador Unificados */
.seller-operator-popover {
    min-width: 260px;
    padding: 12px 14px;
}

.popover-section-title {
    font-size: 0.68rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    margin: 4px 0 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.popover-section-title i {
    font-size: 0.85rem;
    color: var(--primary-red);
}

.popover-section-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 10px 0 8px 0;
}

/* Botões do seletor da Grid */
.seller-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    max-height: 120px;
    overflow-y: auto;
    padding: 2px;
}

.perc-btn.seller-btn, .perc-btn.operator-btn {
    padding: 6px 3px;
    font-size: 0.72rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
    color: var(--text-dark);
}

.perc-btn.seller-btn:hover, .perc-btn.operator-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* Destaque ativo para operador e vendedor selecionados */
.perc-btn.operator-btn.active, .perc-btn.seller-btn.active {
    background: var(--primary-red) !important;
    color: white !important;
    border-color: var(--primary-red) !important;
}

.control-btn.selected-val .c-label {
    color: var(--text-dark);
    font-size: 0.85rem;
    font-weight: 700;
}

.control-btn.selected-val .c-value {
    display: none;
}

.receipt-calculation-box {
    padding-top: 15px;
}

.spacer-auto {
    flex-grow: 1;
}

/* ÃREA DO RECIBO (CÃ¡lculos) */
.receipt-calculation-box {
    background: #fff;
    /* border-top: 2px dashed #f1f5f9; */
    padding-top: 15px;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.calc-label {
    font-size: 0.9rem;
    color: #64748b;
}

.calc-val {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.calc-row.total-row {
    margin-top: 10px;
    align-items: flex-end;
}

.calc-row.total-row .calc-label {
    font-size: 2rem;
    font-weight: 700;
    color: #000;
}

.calc-val-lg {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
    letter-spacing: -1px;
}

/* [MODERNIZADO] Badge Fiscal Robusto */
.tax-mini-text {
    background: #f1f5f9;
    /* Fundo suave combinando com o tema */
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.tax-mini-text:hover {
    background: #fff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
}

.tax-mini-text i {
    font-size: 1.1rem;
    color: var(--info-blue);
}

.tax-mini-text span {
    color: var(--text-dark);
    font-weight: 700;
}

/* BOTÃ•ES FINAIS */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: 20px;
}

.btn-secondary-icon {
    width: 50px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #f1f5f9;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    transition: 0.2s;
}

.btn-secondary-icon:hover {
    background: #fee2e2;
    color: var(--warning-red);
}

.btn-lg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
    border-radius: 14px;
}

/* --- NOVA TABELA DE PRODUTOS --- */

.item-list-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    /* Arredonda cantos da tabela */
    margin-top: 0;
}

.item-list-table {
    width: 100%;
    border-collapse: collapse;
}

.item-list-table thead th {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 15px 10px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.item-list-table tbody tr {
    transition: background 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.item-list-table tbody tr:hover {
    background-color: #f8fafc;
}

.item-list-table td {
    padding: 12px 10px;
    vertical-align: middle;
}

/* --- 1. NOVA CÃPSULA DE DESCONTO (Harmonia com Quantidade) --- */
.discount-capsule {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    /* Mesmo raio da qtd */
    height: 32px;
    /* Mesma altura da qtd */
    width: 70px;
    /* Largura fixa */
    overflow: hidden;
    transition: all 0.2s;
    position: relative;
}

.discount-capsule:focus-within {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(219, 0, 56, 0.1);
}

.discount-input-embedded {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    text-align: right;
    /* NÃºmero alinhado Ã  direita */
    padding-right: 2px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    outline: none;
    -moz-appearance: textfield;
    /* Remove setinhas no Firefox */
}

/* Remove setinhas no Chrome/Safari */
.discount-input-embedded::-webkit-outer-spin-button,
.discount-input-embedded::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.iner {
    background: #7f1d1d;
    /* Fundo vermelho escuro */
    border-color: #ef4444;
}

.discount-symbol {
    font-size: 0.8rem;
    color: #94a3b8;
    padding-right: 8px;
    /* EspaÃ§o na direita */
    padding-left: 2px;
    font-weight: 500;
    user-select: none;
}




/* 1. CÃ©lula do Produto */
.product-cell-modern {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-left: 10px;
}

.prod-icon-box {
    width: 42px;
    height: 42px;
    background: #e2e8f0;
    color: #64748b;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.prod-info-box {
    display: flex;
    flex-direction: column;
}

.prod-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.2;
}

.prod-barcode {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* 2. Controle de Quantidade (CÃ¡psula) */
.qty-capsule {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    height: 32px;
}

.qty-btn {
    width: 30px;
    height: 100%;
    background: #f8fafc;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1rem;
    display: grid;
    place-items: center;
    transition: 0.2s;
}

.qty-btn:hover {
    background: #e2e8f0;
    color: var(--text-dark);
}

.qty-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

/* 3. Input de Desconto (Estilo Tag) */
.discount-tag-input {
    width: 60px;
    padding: 4px 0;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #64748b;
    background: #fff;
    transition: all 0.2s;
}

.discount-tag-input:focus {
    border-color: var(--primary-red);
    color: var(--primary-red);
    outline: none;
    background: #fff5f5;
    font-weight: 700;
}

/* PreÃ§o UnitÃ¡rio (Discreto) */
.unit-price-display {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Total (Destaque) */
.total-price-display {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1rem;
}

/* BotÃ£o Lixeira */
.btn-trash-item {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    transition: 0.2s;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
}

.btn-trash-item:hover {
    background: #fee2e2;
    color: var(--warning-red);
}

/* --- ESTADO VAZIO (BRANDED) --- */
.empty-state-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    /* Altura mÃ­nima para ocupar a Ã¡rea da tabela */
    background: #fff;
    border-radius: 16px;
    margin-top: 15px;
    border: 2px dashed #e2e8f0;
    /* Borda tracejada indica "Ã¡rea de drop/leitura" */
}

.empty-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.8;
    position: relative;
    width: 100%;
    max-width: 300px;
}

/* Estilo da Logo "Marca D'água" */
.empty-store-logo {
    max-width: 140px;
    /* Tamanho controlado */
    height: auto;
    margin-bottom: 15px;
    filter: none;
    opacity: 1;
    transition: all 0.3s;
}

.empty-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.empty-subtitle {
    font-size: 0.85rem;
    color: #cbd5e1;
}

/* AnimaÃ§Ã£o: Linha de Scanner (Opcional, mas muito legal) */
.scanner-line-anim {
    width: 0%;
    height: 2px;
    background: var(--primary-red);
    margin-top: 20px;
    box-shadow: 0 0 10px var(--primary-red);
    animation: scan-idle 3s infinite ease-in-out;
    opacity: 0.5;
}

@keyframes scan-idle {
    0% {
        width: 0%;
        opacity: 0;
    }

    50% {
        width: 60%;
        opacity: 1;
    }

    100% {
        width: 0%;
        opacity: 0;
    }
}

/* --- LOGO E NOME DO SISTEMA (Canto Inferior Esquerdo) --- */
.system-brand-fixed {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    background: transparent;
    font-family: 'Inter', sans-serif;
}

.brand-session-info {
    display: flex;
    align-items: center;
}

.keyboard-shortcuts {
    display: flex;
    gap: 16px;
    align-items: center;
}

.shortcut-item {
    display: flex;
    align-items: center;
    color: #64748b;
}

.shortcut-key {
    border: 1px solid var(--primary-red);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--primary-red);
    background-color: rgba(219, 0, 56, 0.05);
    margin-right: 6px;
    text-transform: uppercase;
}
.system-brand-fixed .session-timer-counter {
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    padding: 2px 6px;
    transition: color 0.18s ease, background 0.18s ease;
    user-select: none;
}
.system-brand-fixed .session-timer-counter:hover {
    color: #e11d48;
    background: rgba(225, 29, 72, 0.08);
}

/* Wrapper relativo para ancorar o popover */
.session-timer-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Popover flutuante */
.session-logout-popover {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 12px 16px;
    white-space: nowrap;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.session-logout-popover:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
/* Seta decorativa */
.session-logout-popover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #e2e8f0;
}
.session-logout-popover::before {
    content: '';
    position: absolute;
    top: calc(100% - 1px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #fff;
    z-index: 1;
}

.session-logout-msg {
    font-size: 0.8rem;
    color: #475569;
    font-weight: 600;
    margin: 0 0 10px;
    text-align: center;
}

.session-logout-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.session-logout-cancel,
.session-logout-confirm {
    border: none;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}
.session-logout-cancel:hover,
.session-logout-confirm:hover {
    opacity: 0.85;
    transform: scale(0.97);
}
.session-logout-cancel {
    background: #f1f5f9;
    color: #64748b;
}
.session-logout-confirm {
    background: #e11d48;
    color: #fff;
}

.pdv-summary h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    margin-bottom: 16px;
}

.summary-row .label {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-row .value {
    font-weight: 500;
}

.summary-total {
    border-top: 1px dashed var(--border-color);
    padding-top: 24px;
    margin-top: auto;
}

.summary-total .label {
    font-size: 1.2rem;
    font-weight: 600;
}

.summary-total .value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-red);
    transition: transform 0.2s ease;
}

.btn {
    font-family: 'Inter', sans-serif;
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    background-color: #ccc;
    color: #888;
    cursor: not-allowed;
}

.btn-primary:disabled {
    background-color: #f0a0b8;
    color: #fff;
}

.btn-secondary:disabled {
    background-color: #eee;
    color: #aaa;
    border-color: #ddd;
}

.btn-primary {
    background-color: var(--primary-red);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-red-dark);
}

.btn-secondary {
    background-color: var(--card-white);
    color: var(--text-dark);
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: var(--bg-light);
}

.btn-danger {
    background-color: var(--primary-red);
    color: white;
}

.btn-danger:hover {
    background-color: #c90000;
}

.btn-success {
    background-color: var(--success-green);
    color: white;
}

.btn-success:hover {
    background-color: #1e7e34;
}


/* ======================================== */
/* == MODAIS                             == */
/* ======================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay.full-screen {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden; /* Fix double scrollbar */
}

.modal-content {
    background-color: var(--card-white);
    border-radius: 16px;
    padding: 0;
    width: 100%;
    max-width: 550px;
    /* Define a altura mÃ¡xima como 90% da altura da tela */
    max-height: 90vh;
    /* Cria um layout flexÃ­vel para manter cabeÃ§alho e rodapÃ© fixos */
    display: flex;
    flex-direction: column;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: scale(0.95) translateY(10px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-overlay.full-screen .modal-content {
    max-width: 100vw;
    max-height: 100vh;
    height: 100vh;
    width: 100vw;
    border-radius: 0;
    transform: none;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    /* Impede que o cabeÃ§alho encolha */
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.close-modal-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 4px;
    line-height: 1;
}

.modal-body {
    padding: 24px;
    /* Permite scroll vertical apenas nesta Ã¡rea */
    overflow-y: auto;
    overflow-x: hidden;
    /* Faz o corpo ocupar todo o espaÃ§o disponÃ­vel */
    flex-grow: 1;
}

.modal-overlay.full-screen .modal-body {
    padding: 0;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

.modal-body p {
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    border-radius: 8px;
    border: 1px solid #ddd;
    resize: vertical;
}

/* Label Wizard Studio - Split Layout */
.label-wizard-container {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f8fafc;
}

.label-wizard-left {
    flex: 0 0 380px;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: #ffffff;
    gap: 20px;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.02);
    z-index: 2;
    overflow-y: auto;
}

.label-wizard-left .section-subtitle {
    font-size: 0.7rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 4px;
}

.label-wizard-right {
    flex: 1;
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 32px;
    overflow-y: auto;
    position: relative;
    gap: 16px;
}

.label-preview-scroll {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

#label-preview-container {
    background: white;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    transform-origin: top center;
    transition: transform 0.2s ease-out, opacity 0.3s ease-out;
}

/* Page sheets in preview */
.preview-page {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
    border-radius: 4px;
    transition: transform 0.2s ease-out;
}

/* Floating Zoom Controller */
.label-preview-zoom-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    z-index: 100;
    margin-bottom: 8px;
    user-select: none;
}

.label-preview-zoom-control .zoom-btn {
    background: transparent;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.1rem;
}

.label-preview-zoom-control .zoom-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.label-preview-zoom-control span {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    min-width: 45px;
    text-align: center;
}

/* Resizer em Hover */
.resizable-preview-item {
    position: relative;
}

.label-hover-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(6px);
    border: 1px solid #cbd5e1;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease-in-out;
    z-index: 1000;
    width: max-content;
}

.resizable-preview-item:hover .label-hover-controls {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.label-control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.label-control-row span {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #64748b;
    min-width: 35px;
    letter-spacing: 0.5px;
}

.label-control-btn-group {
    display: flex;
    gap: 4px;
}

.label-control-btn-group button {
    background: #f1f5f9;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    color: #334155;
    transition: all 0.15s;
}

.label-control-btn-group button:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Loading Brain Animation */
.preview-loading-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 10;
}

.giant-brain-svg {
    width: 250px;
    height: 250px;
}

.giant-brain-svg .core-aura {
    animation: brainPulse 2s ease-in-out infinite;
}

@keyframes brainPulse {
    0% { r: 10; opacity: 0.1; }
    50% { r: 18; opacity: 0.4; }
    100% { r: 10; opacity: 0.1; }
}

.loading-msg {
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.label-wizard-list {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.label-wizard-item {
    background: #ffffff;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid #f1f5f9;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.label-wizard-item:hover {
    border-color: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.06);
}

.label-item-info {
    flex: 1;
    overflow: hidden;
}

.label-item-info strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.85rem;
    color: #1e293b;
    font-weight: 700;
}

.label-item-info small {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
}

.label-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 12px;
}

.label-item-qty input {
    width: 50px;
    text-align: center;
    padding: 8px;
    border: 1px solid #f1f5f9;
    background: #f8fafc;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.9rem;
    color: #334155;
    transition: all 0.2s;
}

.label-item-qty input:focus {
    background: #ffffff;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(219, 0, 56, 0.1);
    outline: none;
}

.btn-wizard-print {
    height: 44px;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 0;
    transition: all 0.2s;
}

.btn-wizard-print:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(219, 0, 56, 0.2);
}


.form-group input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-group input[type="number"] {
    -moz-appearance: textfield;
}

.form-group input:disabled,
.form-group textarea:disabled,
.form-group select:disabled {
    background-color: #f5f5f5;
    color: #aaa;
    cursor: not-allowed;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(219, 0, 56, 0.2);
}

.modal-footer {
    padding: 20px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid var(--border-color);
    background-color: #f9f9f9;
    /* Impede que o rodapÃ© encolha */
    flex-shrink: 0;
}

/* Modal de Pagamento */
.payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.payment-option {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-option:hover,
.payment-option.selected,
.payment-option.nav-focus {
    border-color: var(--primary-red);
    background-color: rgba(219, 0, 56, 0.05);
    color: var(--primary-red);
}

.payment-option span {
    font-weight: 600;
}

/* Pagamento Dividido */
.split-payment-area {
    margin-top: 24px;
    border-top: 1px dashed var(--border-color);
    padding-top: 24px;
}

.split-payment-area h4 {
    font-weight: 600;
    margin-bottom: 16px;
}

.split-payment-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 12px;
    align-items: end;
}

.split-payment-remaining {
    text-align: right;
    font-weight: 600;
    color: var(--primary-red);
    margin-top: 8px;
}

/* Modal Recibo / ConfirmaÃ§Ã£o / Alerta */
.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 24px auto;
}

.modal-icon.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-green);
}

.modal-icon.danger {
    background-color: rgba(229, 57, 53, 0.1);
    color: var(--warning-red);
}

.modal-icon.info {
    background-color: rgba(25, 118, 210, 0.1);
    color: var(--info-blue);
}

.modal-icon.neutral {
    background-color: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

.modal-body.centered {
    text-align: center;
}

/* Modal Adicionar Cliente / Fechar Caixa (Multi-Step) */
.multi-step-form .form-step {
    display: none;
}

.multi-step-form .form-step.active {
    display: block;
    animation: slideInUp 0.3s ease-out;
}

.modal-progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    margin-bottom: 24px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-red);
    transition: width 0.3s ease;
}

.modal-footer-multi-step {
    justify-content: space-between;
}

.input-error {
    border-color: var(--warning-red) !important;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.2) !important;
}

/* Modais de Caixa */
.caixa-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.caixa-options .btn {
    margin-top: 0;
}

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

/* Toggle Switch UI */
.toggle-switch-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary-red);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary-red);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.toggle-switch-group label {
    margin-bottom: 0;
    font-weight: normal;
    color: var(--text-light);
    cursor: pointer;
}

/* Slider mais fino para múltiplos pagamentos */
.toggle-switch.switch-thin {
    width: 38px;
    height: 18px;
}

.slider-thin {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e2e8f0;
    transition: .3s;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
}

.slider-thin:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

input:checked + .slider-thin {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
}

input:checked + .slider-thin:before {
    transform: translateX(20px);
}

.payment-option.multi-active {
    position: relative;
    border-color: var(--primary-red);
}

.payment-option.multi-active::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 20%;
    width: 60%;
    height: 3px;
    background-color: var(--primary-red);
    border-radius: 2px;
}

/* ======================================== */
/* == PÃGINAS ADICIONAIS                 == */
/* ======================================== */

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: var(--bg-light);
    font-size: 0.9rem;
    color: var(--text-light);
}

.data-table td {
    font-weight: 500;
    vertical-align: middle;
}

.data-table td:first-child {
    font-weight: 600;
    color: var(--text-dark);
}

.data-table .currency {
    text-align: right;
}

.data-table .actions {
    text-align: center;
}

.data-table .actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 4px;
}

.data-table .actions button:hover {
    color: var(--primary-red);
}

/* --- CORREÃ‡ÃƒO DO CABEÃ‡ALHO E BOTÃƒO GIGANTE --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Isso impede que o botÃ£o estique verticalmente */
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

/* ForÃ§a o botÃ£o a ter apenas o tamanho do texto */
.page-header .btn-auto {
    width: fit-content !important;
    padding: 10px 24px;
    margin: 0;
}

/* --- 2. NOVOS EMBLEMAS (BADGES) COM TOOLTIP (Pedidos 2 e 5) --- */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 12px;
    border-radius: 50px;
    /* Arredondado estilo pÃ­lula */
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    cursor: help;
    position: relative;
    gap: 6px;
    transition: transform 0.2s;
}

.status-badge:hover {
    transform: scale(1.05);
}

.status-badge i {
    font-size: 1.1rem;
}

/* Cores dos Emblemas */
.badge-atrasado {
    background-color: #db0038;
    /* Vermelho suave */
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.badge-alerta {
    background-color: #db3e00;
    /* Laranja */
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.badge-em-dia {
    background-color: #10b981;
    /* Verde Esmeralda */
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.badge-quitado {
    background-color: #6366f1;
    /* Indigo */
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

/* --- TOOLTIP (Caixa que aparece ao passar o mouse) --- */
.status-badge::after {
    content: attr(data-tooltip);
    /* Pega o texto do atributo HTML */
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.status-badge:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Seta do Tooltip */
.status-badge::before {
    content: "";
    position: absolute;
    bottom: 115%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
}

.status-badge:hover::before {
    opacity: 1;
    visibility: visible;
}


#cliente-pay-modal .modal-footer .btn-success {
    background-color: var(--success-green) !important;
    color: white !important;
    border: none;
}

#cliente-pay-modal .modal-footer .btn-success:hover {
    background-color: #1e7e34 !important;
}

#cliente-pay-modal .modal-footer .btn-secondary {
    background-color: #e5e7eb !important;
    /* Cinza claro */
    color: var(--text-dark) !important;
    border: 1px solid #d1d5db;
}

#cliente-pay-modal .modal-footer .btn-secondary:hover {
    background-color: #d1d5db !important;
}

/* --- MELHORIA NA TABELA E BOTÕES DE AÇÃO --- */
.clients-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.client-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
    margin-top: 10px;
}

.client-group-header:hover {
    background: #f1f5f9;
}

.client-group-header h3 {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-grow: 1;
}

.client-group-header i.expand-icon {
    font-size: 1.2rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.client-group-header.expanded i.expand-icon {
    transform: rotate(90deg);
}

.client-group-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s;
}

.client-group-content.hidden {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.client-card-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #eef2f6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.client-card-row:hover {
    transform: scale(1.01);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: #d1d5db;
    z-index: 2;
}

.client-initial-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    border: 1px solid #e2e8f0;
}

.client-name-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.client-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-name-row strong {
    font-size: 1.05rem;
    color: #1e293b;
    font-weight: 600;
}

.client-status-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.status-icon-blue {
    color: #3b82f6;
}

.status-icon-yellow {
    color: #eab308;
}

.status-icon-red {
    color: #ef4444;
}

/* Badges com Efeito de Vidro (Glassmorphism) */
.status-badge-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 1.15rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.status-badge-glass:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.status-glass-blue {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.2);
}

.status-glass-yellow {
    background: rgba(234, 179, 8, 0.12);
    color: #eab308;
    border-color: rgba(234, 179, 8, 0.2);
}

.status-glass-red {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.client-value-section {
    text-align: right;
    padding: 0 20px;
    min-width: 120px;
}

.client-value-label {
    display: block;
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
}

.client-value-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.client-actions-section {
    display: flex;
    gap: 10px;
}

.btn-action-premium {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.2s;
    background: #f8fafc;
    color: #64748b;
}

.btn-action-premium:hover {
    transform: translateY(-2px);
}

.btn-action-view:hover {
    background: #eff6ff;
    color: #3b82f6;
}

.btn-action-pay:hover {
    background: #f0fdf4;
    color: #16a34a;
}


.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-info {
    max-width: 70%;
}

.setting-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.setting-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Reutilizando a classe toggle-switch para configuraÃ§Ãµes */

/* ======================================== */
/* == ESTILOS DO RELÃ“GIO                 == */
/* ======================================== */

.pn-hr {
    display: flex;
    align-items: center;
    gap: 10px;
}

.loading1 {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--success-green);
    box-shadow: 0 0 10px var(--success-green);
    /* Brilho extra */
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(40, 167, 69, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Pedido 7: Privacidade (Olho) */
.toggle-privacy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 1.1rem;
    padding: 4px;
    transition: color 0.2s;
    margin-left: 8px;
    vertical-align: middle;
}

.toggle-privacy-btn:hover {
    color: var(--text-dark);
}

.blur-value {
    filter: blur(5px);
    user-select: none;
    /* Impede selecionar o texto escondido */
    opacity: 0.6;
    transition: filter 0.3s;
}

/* Ajustes gerais do Modal Novo */
.separator {
    border: 0;
    border-top: 1px dashed #eee;
}

.my-16 {
    margin-top: 16px;
    margin-bottom: 16px;
}

.mb-16 {
    margin-bottom: 16px;
}

.text-dark {
    color: var(--text-dark);
}

.horario {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

/* ======================================== */
/* == RESPONSIVIDADE                     == */
/* ======================================== */

@media (max-width: 1024px) {
    .pdv-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .pdv-main {
        height: auto;
    }

    .pdv-summary .card {
        height: auto;
    }

    .main-content {
        padding: 18px;
    }



    .pn {
        padding: 8px 16px;
    }

    .horario {
        font-size: 0.9rem;
    }

    .modal-content {
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    body {
        display: block;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        padding: 18px;
        height: auto;
        min-height: 100vh;
        width: 100%;
    }

    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .app-header h1 {
        font-size: 1.5rem;
    }

    #header-close-caixa-btn {
        width: 100%;
    }

    .pdv-layout {
        min-height: auto;
        gap: 16px;
    }

    .modal-content {
        max-width: 95%;
        padding: 0;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }

    .payment-options {
        grid-template-columns: 1fr;
    }

    .navbar {
        gap: 16px;
        margin-bottom: 16px;
        overflow-x: auto;
    }

    .navbar-item {
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .pn {
        justify-content: center;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .page-header .btn {
        width: 100%;
    }

    .data-table {
        font-size: 0.9rem;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }

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

    .split-payment-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .toggle-switch-group {
        flex-direction: row-reverse;
        justify-content: flex-end;
    }
}


/* Estilos Detalhes do Cliente */
.client-profile-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.client-avatar {
    width: 50px;
    height: 50px;
    background-color: #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.client-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-box {
    background-color: var(--bg-light);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.stat-value {
    font-weight: 700;
    font-size: 1.1rem;
}

.stat-value.danger {
    color: var(--warning-red);
}

.info-box {
    background-color: var(--bg-light);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.info-box p {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* Estilos da Barra de Limite */
.limit-container {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.limit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.btn-edit-limit {
    background: none;
    border: none;
    color: var(--info-blue);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    transition: color 0.2s;
}

.btn-edit-limit:hover {
    color: var(--primary-red);
}

.progress-track {
    width: 100%;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-red);
    width: 0%;
    transition: width 0.5s ease, background-color 0.3s ease;
}

/* Se estiver perto do limite ou estourado */
.progress-fill.warning {
    background-color: #ff9800;
}

.progress-fill.danger {
    background-color: var(--warning-red);
}

.limit-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
}

/* --- Modal de SeleÃ§Ã£o de Cliente --- */
.search-box-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.search-icon-input {
    position: relative;
    flex-grow: 1;
}

.search-icon-input i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.2rem;
}

.search-icon-input input {
    padding-left: 40px;
    /* EspaÃ§o para o Ã­cone */
    width: 100%;
}

.client-results-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: none;
    /* Oculto inicialmente */
}


.client-result-item:last-child {
    border-bottom: none;
}

/* --- CartÃ£o do Cliente no Resumo (Sidebar) --- */
.summary-client-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    display: none;
    /* Oculto por padrÃ£o */
    animation: slideInUp 0.3s ease;
}

.summary-client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.summary-client-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-change-client {
    font-size: 0.75rem;
    padding: 4px 8px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    color: var(--info-blue);
}

.btn-change-client:hover {
    border-color: var(--info-blue);
}

.summary-limit-bar {
    height: 6px;
    background-color: #ddd;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.summary-limit-fill {
    height: 100%;
    background-color: var(--success-green);
    width: 0%;
    transition: width 0.5s;
}

.summary-limit-fill.danger {
    background-color: var(--warning-red);
}

.summary-limit-text {
    font-size: 0.75rem;
    color: var(--text-light);
    display: flex;
    justify-content: space-between;
}

/* Estilos do HistÃ³rico do Cliente */
.history-section {
    margin-top: 20px;
    border-top: 1px dashed var(--border-color);
    padding-top: 16px;
}

.history-section h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-list-container {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.history-table th {
    background: var(--bg-light);
    padding: 8px;
    text-align: left;
    position: sticky;
    top: 0;
    border-bottom: 1px solid #ddd;
    color: var(--text-light);
}

.history-table td {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.history-type-tag {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.type-compra {
    background: rgba(219, 0, 56, 0.1);
    color: var(--primary-red);
}

.type-pagamento {
    background: rgba(40, 167, 69, 0.1);
    color: green;
}

.btn-link-receipt {
    color: var(--info-blue);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.btn-link-receipt:hover {
    text-decoration: underline;
}

/* Efeito Hover para os cartÃµes de impressÃ£o */
#btn-print-thermal:hover,
#btn-print-a4:hover {
    border-color: var(--primary-red) !important;
    background-color: #fff0f3;
}


/* Os estilos da barra de pesquisa de clientes foram unificados com o padrão de produtos (barcode-scanner) */
/* --- Dropdown de Resultados (Genérico) --- */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 8px;
}

.search-result-item {
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    user-select: none;
    border-left: 4px solid transparent;
}

.search-result-item:hover,
.search-result-item.selected {
    background: #f8fafc;
    border-left-color: var(--primary-red);
    padding-left: 24px;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item strong {
    font-size: 0.9rem;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.search-result-item span {
    font-size: 0.85rem;
    font-weight: 700;
}


/* --- Estilos da PÃ¡gina de Pedidos --- */

/* Abas de Filtro */
.orders-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.order-tab {
    background: var(--card-white);
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-tab.active {
    background: var(--text-dark);
    color: #fff;
    border-color: var(--text-dark);
}

.order-tab .badge {
    background: var(--primary-red);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Grid de Pedidos */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    /* Responsivo */
    gap: 20px;
}

/* Card do Pedido Individual */
.order-card {
    background: var(--card-white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: #ddd;
}

/* CabeÃ§alho do Card */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 12px;
}

.order-id {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.order-time {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Status Tag */
.order-status {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.status-pendente {
    background: #fff3cd;
    color: #856404;
}

/* Amarelo */
.status-aprovado {
    background: #d4edda;
    color: #155724;
}

/* Verde */
.status-cancelado {
    background: #f8d7da;
    color: #721c24;
}

/* Vermelho */

/* InformaÃ§Ãµes do Cliente */
.order-client {
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-avatar-small {
    width: 36px;
    height: 36px;
    background: var(--bg-light);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--text-light);
}

.client-info h4 {
    font-size: 0.95rem;
    margin: 0;
    color: var(--text-dark);
}

.client-info p {
    font-size: 0.8rem;
    margin: 0;
    color: var(--text-light);
}

/* Resumo de Itens */
.order-items-summary {
    background: var(--bg-light);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-dark);
    max-height: 80px;
    overflow: hidden;
    /* Corta se for muito longo */
    position: relative;
}

/* RodapÃ© do Card */
.order-footer {
    margin-top: auto;
    /* Empurra para baixo */
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-red);
}

.order-actions {
    display: flex;
    gap: 8px;
}

.btn-icon-action {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.2s;
    color: var(--text-light);
}

.btn-icon-action:hover {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

.btn-main-action {
    background: var(--text-dark);
    color: white;
    border: none;
    padding: 0 16px;
    height: 36px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-main-action:hover {
    background: black;
}

/* --- Estilo da NotificaÃ§Ã£o na Navbar --- */
.navbar-item {
    position: relative;
    /* NecessÃ¡rio para posicionar a bolinha */
}

.nav-badge {
    position: absolute;
    top: -5px;
    right: -12px;
    background-color: var(--primary-red);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-light);
    /* Borda branca para destacar */
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-badge.active {
    opacity: 1;
    transform: scale(1);
}

/* Ajuste na responsividade para a bolinha nÃ£o sumir */
@media (max-width: 768px) {
    .nav-badge {
        top: 0;
        right: 0;
    }
}

/* ======================================== */
/* == ANIMAÃ‡ÃƒO DE NOTIFICAÃ‡ÃƒO (PEDIDOS)  == */
/* ======================================== */

@keyframes nav-notify-pulse {
    0% {
        color: var(--text-light);
        transform: scale(1);
    }

    50% {
        color: var(--primary-red);
        transform: scale(1.15);
        /* Aumenta um pouco */
        text-shadow: 0 0 8px rgba(219, 0, 56, 0.3);
        /* Brilho suave */
    }

    100% {
        color: var(--text-light);
        transform: scale(1);
    }
}

.navbar-item.notify-active {
    animation: nav-notify-pulse 1s ease-in-out infinite;
    /* Pisca a cada 1s */
    font-weight: 700 !important;
    /* Deixa negrito */
}

/* --- Estilos do Modal de Detalhes de Pedido --- */

/* Barra de Progresso Visual */
.order-progress-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    position: relative;
    padding: 0 10px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 2;
    /* Fica acima da linha */
    opacity: 0.5;
    transition: all 0.3s;
}

.step-item.active {
    opacity: 1;
}

.step-item.active .step-icon {
    background-color: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(219, 0, 56, 0.3);
}

.step-item.completed .step-icon {
    background-color: var(--success-green);
    border-color: var(--success-green);
    color: white;
}

.step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid #ddd;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    color: #999;
    transition: all 0.3s;
}

.step-item span {
    font-size: 0.75rem;
    font-weight: 600;
}

.step-line {
    flex-grow: 1;
    height: 2px;
    background-color: #eee;
    margin: 0 -5px;
    /* Conecta os bolinhas */
    margin-bottom: 20px;
    /* Alinha com o Ã­cone */
    z-index: 1;
}

/* Lista de Itens dentro do Modal */
.order-items-scroll {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.modal-order-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.modal-order-item:last-child {
    border-bottom: none;
}

.modal-item-qty {
    font-weight: 700;
    color: var(--primary-red);
    margin-right: 8px;
}

/* --- Estilos Atualizados do Modal de Pedidos (Varejo) --- */

/* Lista de Itens com ConferÃªncia */
.modal-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Centraliza verticalmente */
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.item-info-text {
    flex-grow: 1;
}

/* Estado: Item Esgotado */
.modal-order-item.item-unavailable {
    background-color: #fff5f5;
    color: #ccc;
    text-decoration: line-through;
}

.modal-order-item.item-unavailable .modal-item-qty {
    color: #ccc;
    /* Tira o vermelho da quantidade */
}

/* BotÃµes de AÃ§Ã£o do Item (Estoque) */
.item-stock-actions {
    display: flex;
    gap: 8px;
}

.btn-stock-check {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: white;
    color: #ddd;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-stock-check:hover {
    background-color: #f0f0f0;
}

/* BotÃ£o Confirmar (Verde) */
.btn-stock-check.confirmed {
    background-color: var(--success-green);
    border-color: var(--success-green);
    color: white;
}

/* BotÃ£o Esgotado (Vermelho) */
.btn-stock-check.missing {
    background-color: white;
    border-color: var(--warning-red);
    color: var(--warning-red);
}

.btn-stock-check.missing.active {
    background-color: var(--warning-red);
    color: white;
}

/* BotÃ£o Fechar Gigante */
.btn-close-modal-lg {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 10px;
    background-color: #f1f1f1;
    color: var(--text-dark);
    border: 1px solid #ddd;
}

.btn-close-modal-lg:hover {
    background-color: #e0e0e0;
}



/* --- Resumo Financeiro no Modal --- */
.financial-breakdown {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
    font-size: 0.95rem;
}

.financial-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-light);
}

.financial-row.danger {
    color: var(--warning-red);
}

.financial-row.final {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 12px;
    border-top: 1px solid #eee;
    padding-top: 12px;
}

/* BotÃ£o desativado visualmente */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* --- NavegaÃ§Ã£o na Timeline (Interativa) --- */
.step-item {
    cursor: pointer;
    /* Mostra a mÃ£ozinha */
    position: relative;
    transition: transform 0.2s ease;
}

.step-item:hover {
    transform: translateY(-3px);
    /* Leve pulo ao passar o mouse */
}

.step-item:hover .step-icon {
    border-color: var(--primary-red);
    color: var(--primary-red);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

/* Quando estiver ativo ou completado, mantÃ©m as cores originais no hover */
.step-item.active:hover .step-icon,
.step-item.completed:hover .step-icon {
    transform: none;
    /* Remove efeito extra se jÃ¡ estiver ativo */
}

/* --- Bloqueio de NavegaÃ§Ã£o na Timeline --- */
.step-item.locked {
    cursor: not-allowed;
    /* Mostra o sÃ­mbolo de bloqueio */
    opacity: 0.6;
    /* Deixa um pouco mais apagado */
    pointer-events: none;
    /* (Opcional) Impede o clique via CSS tambÃ©m */
}

.step-item.locked:hover {
    transform: none;
    /* Remove a animaÃ§Ã£o de pulo */
}

.step-item.locked .step-icon {
    border-color: #ddd;
    /* MantÃ©m cinza */
    color: #999;
}

.print-option-card {
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.print-option-card:hover {
    border-color: var(--primary-red);
    background-color: #fff5f5;
}

/* =========================================
   ESTILOS DE IMPRESSÃƒO A4 (CORRIGIDO)
   ========================================= */
.print-only {
    display: none;
}

@media print {

    /* RESET */
    body>* {
        display: none !important;
    }

    /* CORREÃ‡Ã‡O: Removemos o asterisco (*) para nÃ£o forÃ§ar block em tudo */
    #print-area {
        display: block !important;
        visibility: visible !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    /* Garante que os filhos visÃ­veis fiquem visÃ­veis, mas respeitando o display original (flex, table, etc) */
    #print-area * {
        visibility: visible !important;
    }

    @page {
        margin: 0;
        size: A4;
    }

    /* CONTAINER */
    .invoice-container {
        padding: 30px 40px;
        max-width: 210mm;
        margin: 0 auto;
    }

    /* HEADER (Logo + Texto) */
    .invoice-header {
        display: flex !important;
        justify-content: space-between;
        align-items: flex-start;
        /* Alinha topo */
        margin-bottom: 20px;
    }

    .brand-section {
        display: flex !important;
        align-items: center;
        /* Centraliza logo verticalmente com o texto */
        gap: 15px;
        /* EspaÃ§o entre logo e texto */
    }

    /* CONTROLE DA LOGO */
    #print-logo-img {
        display: block !important;
        max-height: 60px;
        /* Limite de altura */
        width: auto;
        object-fit: contain;
    }

    .brand-text h1 {
        font-size: 18px;
        /* Reduzi um pouco para nÃ£o quebrar */
        font-weight: 800;
        text-transform: uppercase;
        margin: 0;
        line-height: 1.2;
    }

    .brand-subtitle {
        font-size: 11px;
        color: #333;
        font-weight: 600;
        margin-top: 4px;
    }

    .doc-title {
        font-size: 14px;
        font-weight: 700;
        text-align: right;
        margin: 0 0 10px 0;
        color: #333;
    }

    .meta-grid {
        display: flex !important;
        gap: 20px;
        justify-content: flex-end;
    }

    .meta-item {
        display: flex !important;
        align-items: center;
        gap: 8px;
    }

    .meta-item i {
        font-size: 18px;
        color: #333;
    }

    .meta-item div {
        display: flex !important;
        flex-direction: column;
    }

    .meta-item .label {
        font-size: 8px;
        font-weight: 700;
        color: #666;
    }

    .meta-item .value {
        font-size: 12px;
        font-weight: 600;
    }

    .divider-thick {
        border: 0;
        border-bottom: 2px solid #000;
        margin: 0 0 20px 0;
    }

    /* SEÃ‡Ã•ES E TABELA */
    .section-title {
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        color: #000;
        margin-bottom: 8px;
        display: flex !important;
        align-items: center;
        gap: 5px;
        border-bottom: 1px solid #ccc;
        padding-bottom: 4px;
    }

    .client-card {
        border: 1px solid #ddd;
        border-radius: 6px;
        padding: 10px;
        background-color: #f9f9f9 !important;
        -webkit-print-color-adjust: exact;
        margin-bottom: 20px;
    }

    .client-row.main {
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 5px;
        text-transform: uppercase;
    }

    .client-row.details {
        display: flex !important;
        gap: 20px;
        font-size: 11px;
        color: #444;
    }

    .premium-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 25px;
        font-size: 11px;
    }

    .premium-table th {
        text-align: left;
        padding: 6px 4px;
        border-bottom: 2px solid #000;
        font-weight: 700;
        text-transform: uppercase;
    }

    .premium-table td {
        padding: 6px 4px;
        border-bottom: 1px solid #eee;
    }

    .text-center {
        text-align: center;
    }

    .text-right {
        text-align: right;
    }

    /* TOTAIS */
    .totals-section {
        display: flex !important;
        justify-content: space-between;
        margin-bottom: 30px;
    }

    .payment-info {
        width: 55%;
    }

    .payment-method-text {
        font-size: 12px;
        font-weight: 600;
        margin-top: 5px;
    }

    .totals-box {
        width: 40%;
    }

    .t-row {
        display: flex !important;
        justify-content: space-between;
        margin-bottom: 5px;
        font-size: 11px;
    }

    .t-row.grand-total {
        font-size: 16px;
        font-weight: 800;
        border-top: 2px solid #000;
        padding-top: 10px;
        margin-top: 10px;
    }

    /* Parcelas */
    .installments-strip {
        display: flex !important;
        flex-wrap: wrap;
        gap: 5px;
    }

    .inst-badge {
        border: 1px solid #000;
        border-radius: 4px;
        padding: 3px 6px;
        font-size: 9px;
        text-align: center;
        min-width: 60px;
    }

    .inst-badge b {
        display: block;
        margin-bottom: 2px;
    }

    /* FOOTER */
    .invoice-footer {
        margin-top: auto;
    }

    .legal-text {
        font-size: 9px;
        color: #555;
        text-align: justify;
        margin-bottom: 30px;
        line-height: 1.4;
        border-top: 1px solid #eee;
        padding-top: 10px;
    }

    .signature-area {
        text-align: center;
        width: 60%;
        margin: 0 auto 10px auto;
    }

    .signature-area .line {
        border-bottom: 1px solid #000;
        margin-bottom: 5px;
    }

    .sig-name {
        font-weight: 700;
        font-size: 11px;
        text-transform: uppercase;
    }

    .system-tag {
        text-align: center;
        font-size: 8px;
        color: #999;
    }
}

/* Modal de AutenticaÃ§Ã£o (Senha) - Deve ser o mais alto de todos */
#modal-admin-auth {
    z-index: 99999 !important;
}

/* Modal de RenegociaÃ§Ã£o - Deve ficar acima da Ficha do Cliente */
#modal-renegociar {
    z-index: 99998 !important;
}

/* Opcional: Garante que o backdrop (fundo escuro) funcione bem */
#modal-admin-auth .modal-content,
#modal-renegociar .modal-content {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    /* Sombra mais forte para destacar */
}

/* Cores para os novos status de renegociaÃ§Ã£o */
.history-type-tag.type-reneg-baixa {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.history-type-tag.type-reneg-nova {
    background-color: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

/* Garante que o valor da parcela (dÃ­vida) seja visÃ­vel como negativo/alerta */
.history-type-tag.type-reneg-nova {
    font-weight: bold;
}

/* --- UI Moderna para Input de Desconto --- */

/* O Container (A caixinha) */
.discount-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    /* Borda cinza suave */
    border-radius: 6px;
    /* Bordas arredondadas modernas */
    padding: 4px 8px;
    width: 75px;
    /* Largura fixa para alinhamento */
    margin: 0 auto;
    /* Centraliza na cÃ©lula da tabela */
    transition: all 0.2s ease;
    cursor: text;
    /* Indica que Ã© editÃ¡vel */
}

/* Efeito de Foco Moderno (Focus-Within) */
/* Quando clica no input dentro, a div pai muda de cor */
.discount-wrapper:focus-within {
    border-color: var(--primary-color, #4a90e2);
    /* Usa sua cor principal ou azul padrÃ£o */
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
    /* Brilho suave externo */
}

/* O Input (NÃºmero) */
.discount-input {
    width: 100%;
    border: none;
    outline: none;
    /* Remove a borda azul padrÃ£o do browser */
    background: transparent;
    text-align: right;
    /* NÃºmeros alinhados Ã  direita perto do % */
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    /* Cor de texto escura suave */
    padding: 0;
    margin: 0;
}

/* O SÃ­mbolo (%) */
.discount-symbol {
    color: #a0aec0;
    /* Cinza mais claro para nÃ£o brigar com o nÃºmero */
    font-size: 12px;
    font-weight: 500;
    margin-left: 2px;
    user-select: none;
    /* Impede seleÃ§Ã£o acidental */
}

/* Remove as setinhas feias (spinners) do input number */
.discount-input::-webkit-outer-spin-button,
.discount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.discount-input {
    -moz-appearance: textfield;
    /* Para Firefox */
}

/* Estado de Hover (opcional) */
.discount-wrapper:hover {
    border-color: #cbd5e0;
}



.modal-content.modal-md {
    max-width: 600px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-content.modal-lg {
    max-width: 850px;
    width: 95%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Ajuste de Header para Modais MD */
.modal-content.modal-md .modal-header {
    background-color: #ffffff;
    padding: 24px 32px;
    border-bottom: 1px solid #f3f4f6;
}

.modal-content.modal-md .modal-header h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    letter-spacing: -0.025em;
}

/* Corpo com mais respiro */
.modal-content.modal-md .modal-body {
    padding: 32px;
    background-color: #ffffff;
}

/* RodapÃ© mais limpo */
.modal-content.modal-md .modal-footer {
    padding: 24px 32px;
    background-color: #fff;
    /* Removemos o cinza para ficar mais clean */
    border-top: 1px solid #f3f4f6;
    gap: 16px;
}

.print-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
}

.print-option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    border: 2px solid #f3f4f6;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    position: relative;
    overflow: hidden;
}

.print-option-card:hover {
    border-color: var(--primary-red);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(219, 0, 56, 0.1);
}

.print-icon {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 16px;
    transition: color 0.3s;
}

.print-option-card:hover .print-icon {
    color: var(--primary-red);
}

.print-option-card h4 {
    margin: 0 0 6px 0;
    font-size: 1rem;
    font-weight: 700;
}

/* --- UI EspecÃ­fica: Inputs Modernos (Busca e FormulÃ¡rios) --- */
.search-row-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    /* EspaÃ§o entre input e botÃ£o */
    width: 100%;
}

.input-modern-wrapper {
    flex-grow: 1;
    /* Ocupa todo o espaÃ§o disponÃ­vel */
    display: flex;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0 12px;
    height: 50px;
    /* Altura fixa para alinhar com o botÃ£o */
    transition: all 0.2s;
}

.input-modern-wrapper:focus-within {
    border-color: var(--primary-red);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(219, 0, 56, 0.1);
}

.input-modern-icon {
    padding: 0 16px;
    color: #9ca3af;
    font-size: 1.2rem;
}

.input-modern {
    border: none;
    background: transparent;
    width: 100%;
    height: 100%;
    font-size: 1rem;
    color: var(--text-dark);
    outline: none;
    padding-left: 8px;
}

.btn-square-add {
    width: 50px;
    /* Largura fixa igual Ã  altura */
    height: 50px;
    /* Altura fixa */
    border-radius: 12px;
    background-color: var(--primary-red);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    /* Impede que o botÃ£o encolha */
    font-size: 1.5rem;
    /* Tamanho do Ã­cone + */
}

.btn-square-add:hover {
    background-color: var(--primary-red-dark);
    transform: translateY(-2px);
}

/* Lista de Resultados de Cliente */
.client-results-modern {
    margin-top: 16px;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* .client-result-item consolidated below to prevent conflicts */

/* --- UI: Steps do Fechamento de Caixa --- */
.step-progress-container {
    background-color: #f3f4f6;
    height: 6px;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.step-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-red) 0%, #ff4d7d 100%);
    border-radius: 10px;
    transition: width 0.4s ease;
}


/* --- CorreÃ§Ã£o Modal CrediÃ¡rio Flow --- */

/* Centralizar conteÃºdo do corpo */
.modal-body.centered-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.qr-step-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: slideInUp 0.3s ease;
}

.step-instruction {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.step-subtext {
    color: var(--text-light);
    margin-bottom: 24px;
}

/* ForÃ§a o botÃ£o a ter cor e fundo corretos */
#btn-force-print,
#btn-finish-crediario-final {
    background-color: var(--primary-red) !important;
    /* ForÃ§a cor de fundo */
    color: #ffffff !important;
    /* ForÃ§a cor do texto */
    border: none;
    padding: 14px 24px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(219, 0, 56, 0.2);
    margin-top: 10px;
}

#btn-force-print:hover,
#btn-finish-crediario-final:hover {
    background-color: #b8002e !important;
    transform: translateY(-2px);
}

.btn-success-flow {
    background-color: var(--success-green) !important;
}

/* --- Estilo do QR Code Restaurado --- */
.qr-code-box {
    background: #fff;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: inline-block;
    margin-top: 8px;
}

.qr-code-box img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    display: block;
}


/* Card de Impostos no PDV */
.tax-transparency-card {
    margin-top: 15px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tax-transparency-card:hover {
    background: #f1f5f9;
    border-color: #64748b;
}

.tax-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 5px;
}

.tax-amount-main {
    font-size: 1.4rem;
    font-weight: 800;
    color: #334155;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.tax-amount-main .currency {
    font-size: 0.9rem;
    color: #94a3b8;
}

.tax-legal-hint {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-top: 4px;
}

/* Tabela de Impostos no Modal */
.tax-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.tax-table th {
    text-align: left;
    font-size: 0.8rem;
    color: #64748b;
    padding: 10px;
    border-bottom: 2px solid #f1f5f9;
}

.tax-table td {
    padding: 12px 10px;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.tax-footer-info {
    margin-top: 20px;
    padding: 10px;
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #92400e;
}

/* AnimaÃ§Ã£o de entrada dos nÃºmeros */
.counter {
    font-variant-numeric: tabular-nums;
}

.fiscal-body-vertical {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fiscal-section {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    background: #fff;
}

.section-label {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    color: #4b5563;
}

.fiscal-row-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.fiscal-stat-item {
    display: flex;
    flex-direction: column;
}

.fiscal-stat-item .lbl {
    font-size: 0.7rem;
    color: #6b7280;
}

.fiscal-stat-item .val {
    font-size: 1rem;
    font-weight: 700;
}

/* ======================================== */
/* == SEÃ‡ÃƒO DE PAGAMENTO EM DINHEIRO     == */
/* ======================================== */

.payment-method-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    animation: slideInUp 0.3s ease-out;
}

.payment-method-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-method-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 18px;
    background: var(--primary-red);
    border-radius: 2px;
}

.money-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.money-input-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.money-input-field {
    width: 100%;
    height: 60px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0 16px;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.money-input-field:focus {
    border-color: var(--primary-red);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(219, 0, 56, 0.1);
    outline: none;
}

.money-input-field::placeholder {
    color: #cbd5e1;
}

.change-display-box {
    background: #f0fdf4;
    /* Verde bem claro */
    border: 1px dashed #bbf7d0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.change-label {
    font-size: 0.9rem;
    color: #166534;
    font-weight: 600;
    text-transform: uppercase;
}

.change-value-highlight {
    font-size: 1.8rem;
    font-weight: 800;
    color: #15803d;
    /* Verde escuro */
    letter-spacing: -0.5px;
}

.payment-actions-row {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-payment-confirm {
    flex: 1;
    height: 50px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(219, 0, 56, 0.2);
}

.btn-payment-confirm:hover {
    background: var(--primary-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(219, 0, 56, 0.3);
}

.btn-payment-back {
    padding: 0 20px;
    height: 50px;
    font-weight: 600;
    color: var(--text-light);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-payment-back:hover {
    background: #f8fafc;
    color: var(--text-dark);
    border-color: #cbd5e1;
}


/* --- Client Details Dropdown & Action Button (Added by Antigravity) --- */
.btn-icon-soft {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #64748b;
    /* var(--text-light) fallback */
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-soft:hover {
    background-color: #f1f5f9;
    color: #1e293b;
    /* var(--text-dark) fallback */
}

.client-options-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    /* var(--border-color) */
    padding: 8px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.client-options-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background-color: #f8fafc;
    color: var(--brand-color, #db0038);
}

.dropdown-item i {
    font-size: 1.1rem;
    color: #64748b;
}

.dropdown-item:hover i {
    color: var(--brand-color, #db0038);
}

.dropdown-item.restricted:hover {
    color: #1e293b;
    /* Keep text dark/black */
}

.dropdown-item.restricted:hover i {
    color: #1e293b;
    /* Keep icon dark/black */
}


/* --- Admin Auth Modal (Refined) --- */
.modal-auth-content {
    max-width: 320px !important;
    text-align: center;
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background: white;
    display: flex;
    flex-direction: column;
}

.auth-header {
    justify-content: center;
    border: none;
    padding: 0;
    margin-bottom: 20px;
    background: transparent;
}

.auth-icon-wrapper {
    width: 64px;
    height: 64px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.1);
}

.auth-title {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 700;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 24px;
}

.auth-input {
    text-align: center;
    font-size: 1.1rem;
    letter-spacing: 2px;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 10px;
    padding: 12px;
    width: 100%;
    transition: all 0.2s;
    outline: none;
}

.auth-input:focus {
    background: #fff;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(219, 0, 56, 0.1);
}

.auth-error {
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: none;
    animation: shake 0.4s ease-in-out;
}

.auth-actions {
    display: flex;
    gap: 12px;
}

.btn-auth-cancel {
    flex: 1;
    background: #f3f4f6;
    color: #374151;
    border: none;
    font-weight: 600;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-auth-cancel:hover {
    background: #e5e7eb;
}

.btn-auth-confirm {
    flex: 1;
    background: var(--primary-red);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 4px 6px -1px rgba(219, 0, 56, 0.2);
}

.btn-auth-confirm:hover {
    background: var(--primary-red-dark);
    box-shadow: 0 6px 12px -1px rgba(219, 0, 56, 0.3);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Classes de tamanho de janela cheia adaptada (liquid glass sutil) */
.modal-content.modal-full {
    width: calc(100% - 24px) !important;
    height: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    max-height: calc(100% - 24px) !important;
    margin: 12px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-content.modal-full .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* --- ESTILIZAÇÃO DO NOVO LAYOUT DO MODAL DE PRODUTOS --- */

/* Abas */
.modal-tabs {
    display: flex;
    gap: 24px;
    padding: 0 24px;
    background-color: var(--card-white);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s ease;
    border-radius: 2px 2px 0 0;
}

.tab-btn:hover {
    color: var(--text-dark);
}

.tab-btn.active {
    color: var(--text-dark);
    border-bottom-color: var(--primary-red);
    font-weight: 600;
}

/* Conteúdo de Abas */
.tab-content {
    display: none;
}

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

/* Grid e Rows flexíveis para o formulário */
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-row .form-group {
    margin-bottom: 0;
}

.flex-1 { flex: 1; min-width: 0; }
.flex-1-5 { flex: 1.5; min-width: 0; }
.flex-2 { flex: 2; min-width: 0; }
.flex-3 { flex: 3; min-width: 0; }

/* Aba Geral Layout */
.edit-tab-layout {
    display: flex;
    gap: 24px;
}

.edit-img-section {
    width: 190px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.edit-img-section .product-img-preview {
    width: 190px;
    height: 170px;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-light);
    background-color: #f9fafb;
    overflow: hidden;
    position: relative;
}

.edit-img-section .product-img-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edit-img-section .sm-input-group label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 4px;
    display: block;
}

.edit-img-section .sm-input {
    font-size: 0.8rem;
    padding: 6px 8px;
}

.edit-fields-section {
    flex-grow: 1;
    padding-left: 20px;
    padding-right: 20px;
}

.edit-tab-layout .edit-fields-section {
    padding-left: 0;
}

/* Painel de Precificação Refinado */
.pricing-card-refined {
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
}

.profit-stats-refined {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    border-top: 1px dashed var(--border-color);
    padding-top: 16px;
}

.stat-card {
    flex: 1;
    background-color: var(--card-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-card .lbl {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .val {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Utilitários Extras */
.mt-15 { margin-top: 15px; }
.flex-end { justify-content: flex-end; }
.gap-10 { gap: 10px; }

/* Botão Primário Escuro/Neutro */
.btn-primary-dark {
    background-color: #111827;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-primary-dark:hover {
    background-color: #1f2937;
}



/* --- ESTILOS DO CARROSSEL DE IMAGENS --- */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    color: var(--text-dark);
    font-size: 1.1rem;
}

.carousel-btn:hover {
    background-color: #ffffff;
}

.carousel-btn.prev-btn {
    left: 8px;
}

.carousel-btn.next-btn {
    right: 8px;
}

.carousel-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(17, 24, 39, 0.75);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
    pointer-events: none;
}

.product-img-preview:hover .carousel-btn.visible,
.product-img-preview:hover .carousel-indicator.visible {
    opacity: 1;
}

/* --- ESTILOS DO CÓDIGO DE BARRAS COMPACTADO NA ESQUERDA --- */
.code-input-compact {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.code-input-compact input {
    flex-grow: 1;
    font-size: 1rem !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    color: var(--text-dark) !important;
    background-color: #ffffff !important;
    padding: 12px 14px !important;
    border-radius: 8px 0 0 8px !important;
    border: 1px solid #ddd !important;
    border-right: none !important;
    box-shadow: none !important;
}

.code-input-compact input:disabled {
    background-color: #f5f5f5 !important;
    color: #666 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

.code-input-compact .btn-unlock {
    background-color: #f3f4f6;
    border: 1px solid #ddd !important;
    border-left: none !important;
    padding: 0 16px !important;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    border-radius: 0;
}

.code-input-compact .btn-unlock:hover {
    background-color: #e5e7eb;
    color: var(--text-dark);
}

.code-input-compact .btn-unlock:disabled {
    background-color: #f9fafb !important;
    color: #ccc !important;
    cursor: not-allowed !important;
}

.code-input-compact #btn-unlock-code {
    border-radius: 0 8px 8px 0 !important;
}

.code-input-compact .btn-unlock.unlocked {
    background-color: #fff;
    color: var(--text-dark);
    border-color: #ddd !important;
}



/* Dica de onde encontrar o ID no comprovante */
.receipt-id-hint {
    margin-top: 10px;
}

.receipt-id-hint-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.receipt-id-hint-img {
    width: 100%;
    max-width: 100%;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    display: block;
}

/* Estilo do botão de Salvar no rodapé do Modal de Produtos */
#edit-product-form .modal-footer .btn {
    width: auto;
    min-width: 140px;
    padding: 10px 24px;
    font-size: 0.95rem;
    border-radius: 8px;
    margin-top: 0;
}

.barcode-preview-container {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 4px;
    display: none; /* Controlado dinamicamente via JS */
    align-items: center;
    justify-content: center;
    min-height: 50px;
    overflow: hidden;
    margin-bottom: 8px;
}

.barcode-preview-container svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ======================================== */
/* == BACKGROUND NOTIFICATION SIDEBAR    == */
/* ======================================== */

.notification-sidebar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    background-color: var(--card-white);
    border-left: 5px solid var(--info-blue);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 16px;
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-sidebar.active {
    transform: translateX(0);
}

.notif-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
}

.notif-header i {
    font-size: 1.5rem;
    color: var(--info-blue);
}

.notif-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.notif-status {
    font-size: 0.85rem;
    color: var(--text-light);
}

.progress-bar-track {
    width: 100%;
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background-color: var(--info-blue);
    transition: width 0.3s ease;
}

/* Estados de Sucesso/Erro */
.notification-sidebar.success {
    border-left-color: var(--success-green);
}

.notification-sidebar.success .notif-header i {
    color: var(--success-green);
}

.notification-sidebar.success .progress-bar-fill {
    background-color: var(--success-green);
}

.notification-sidebar.error {
    border-left-color: var(--warning-red);
}

.notification-sidebar.error .notif-header i {
    color: var(--warning-red);
}

.notification-sidebar.error .progress-bar-fill {
    background-color: var(--warning-red);
}


/* ======================================== */
/* == MODERN NOTIFICATION TOAST          == */
/* ======================================== */

.notification-sidebar {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: auto;
    min-width: 320px;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 16px 20px;
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 16px;
}

.notification-sidebar.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Icon Wrapper */
.notif-icon-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Spinner SVG */
.spinner-svg {
    animation: rotate 2s linear infinite;
    width: 100%;
    height: 100%;
}

.spinner-svg .path {
    stroke: var(--primary-red);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

/* Success/Error Icons */
.success-icon,
.error-icon {
    position: absolute;
    font-size: 2.2rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-icon {
    color: #10b981;
}

/* Emerald 500 */
.error-icon {
    color: #ef4444;
}

/* Red 500 */

/* States */
.notification-sidebar.success .spinner-svg {
    opacity: 0;
}

.notification-sidebar.success .success-icon {
    opacity: 1;
    transform: scale(1);
}

.notification-sidebar.error .spinner-svg {
    opacity: 0;
}

.notification-sidebar.error .error-icon {
    opacity: 1;
    transform: scale(1);
}

/* Content Text */
.notif-content {
    display: flex;
    flex-direction: column;
}

#notif-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

#notif-status {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
    font-weight: 500;
}

/* Animations */
@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}




/* ======================================== */
/* == PROMO BANNER FIXED (QUEIMÃO PREMIUM)== */
/* ======================================== */
.promo-banner-fixed {
    position: fixed;
    top: 0;
    right: 300px;
    /* Moved further to the right */
    background: radial-gradient(circle at top, #db0038, #7b001d);
    color: white;
    padding: 12px 25px 18px 25px;
    border-radius: 0 0 20px 20px;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    line-height: 1;
    pointer-events: none;
    transform-origin: top center;
    animation: luxuryEntrance 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    border: 2px solid #DAA520;
    border-top: none;
}

@keyframes luxuryEntrance {
    0% {
        transform: translateY(-110%) scale(0.95);
        opacity: 0;
    }

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

.promo-mask-icon {
    font-size: 1.6rem;
    color: #FFD700;
    margin-bottom: 5px;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
    animation: maskFloat 4s ease-in-out infinite alternate;
}

@keyframes maskFloat {
    from {
        transform: translateY(0) rotate(-5deg);
    }

    to {
        transform: translateY(-3px) rotate(5deg);
    }
}

/* Confetti Burst - Luxury Broad Cycle (30s) */
.confetti {
    position: absolute;
    width: 5px;
    height: 10px;
    border-radius: 1px;
    opacity: 0;
    z-index: -1;
    animation: luxuryConfetti 30s linear infinite;
}

@keyframes luxuryConfetti {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    0.5% {
        opacity: 1;
    }

    5% {
        transform: translate(var(--tx), var(--ty)) rotate(var(--tr));
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

.confetti-1 {
    --tx: -200px;
    --ty: 250px;
    --tr: 1440deg;
    background: #FFD700;
    animation-delay: 1s;
}

.confetti-2 {
    --tx: 200px;
    --ty: 250px;
    --tr: -1440deg;
    background: #ffffff;
    animation-delay: 1.1s;
}

.confetti-3 {
    --tx: -150px;
    --ty: 350px;
    --tr: 720deg;
    background: #FFA500;
    animation-delay: 1.2s;
}

.confetti-4 {
    --tx: 180px;
    --ty: 350px;
    --tr: -720deg;
    background: #FFD700;
    animation-delay: 1.3s;
}

.confetti-5 {
    --tx: -280px;
    --ty: 150px;
    --tr: 1080deg;
    background: #ffffff;
    animation-delay: 1.4s;
}

.confetti-6 {
    --tx: 280px;
    --ty: 150px;
    --tr: -1080deg;
    background: #DAA520;
    animation-delay: 1.5s;
}

.confetti-7 {
    --tx: -80px;
    --ty: 400px;
    --tr: 360deg;
    background: #FFD700;
    animation-delay: 1.6s;
}

.confetti-8 {
    --tx: 80px;
    --ty: 400px;
    --tr: -360deg;
    background: #ffffff;
    animation-delay: 1.7s;
}

.promo-text-small {
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 1px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #FFD700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.promo-text-large {
    font-size: 2.2rem;
    font-weight: 950;
    margin: 3px 0;
    letter-spacing: -1.5px;
    text-shadow: 2px 4px 0px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    background: linear-gradient(to bottom, #fff, #f3f4f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.promo-text-sub {
    font-size: 0.95rem;
    margin-top: 8px;
    font-weight: 900;
    background: #DAA520;
    color: #450a0a;
    padding: 5px 15px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: perspective(100px) rotateX(10deg);
}

@media (max-width: 768px) {
    .promo-banner-fixed {
        transform: scale(0.5);
        right: 5px;
        transform-origin: top right;
    }
}

/* ======================================== */
/* == FESTA PROMO MODAL STYLES == */
/* ======================================== */
#modal-festa-promo .modal-header {
    background: #db0038;
    color: white;
}

#modal-festa-promo .modal-content {
    border: 2px solid #db0038;
}

.festa-img-wrapper {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#festa-discount-perc {
    text-align: center;
    font-size: 1.2rem;
    color: #db0038;
}

#btn-save-festa-promo:hover {
    background: #b3002e !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(219, 0, 56, 0.3);
}

.product-info-card {
    transition: all 0.3s ease;
}

#festa-barcode-input:focus {
    border-color: #db0038;
    box-shadow: 0 0 0 3px rgba(219, 0, 56, 0.2);
}

#festa-loader i {
    color: #db0038 !important;
}

.carnaval-tag-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.carnaval-tag {
    background: #db0038;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.carnaval-value {
    color: #db0038;
    font-size: 0.85rem;
    font-weight: 800;
    padding-left: 4px;
}

/* ======================================== */
/* == NOVO MODAL DE PAGAMENTO (MINIMALIST) == */
/* ======================================== */

.modal-modern-payment {
    border-radius: 24px !important;
    overflow: hidden !important;
    padding: 0 !important;
    width: min(600px, 95vw) !important;
    max-width: none !important;
    height: auto !important;
    max-height: 90vh !important;
    display: flex;
    flex-direction: column;
    /* Wider modal */
    background: #fff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.header-minimal {
    border-bottom: none !important;
    padding: 24px 24px 10px 24px !important;
    justify-content: space-between !important;
    background: transparent !important;
}

.header-minimal h3 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #111;
    margin: 0;
}

.modal-body-custom {
    padding: 0 0 24px 0;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    /* For sliding overlays */
}

/* --- Hero Section --- */
.payment-hero {
    text-align: center;
    padding: 10px 0 30px 0;
}

.hero-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #6b7280;
    font-weight: 700;
    margin-bottom: 5px;
}

.hero-value {
    font-size: 3.5rem;
    font-weight: 800;
    color: #111;
    letter-spacing: -2px;
    line-height: 1;
    margin: 0;
}

/* --- Content Wrapper & Grid --- */
.payment-content-wrapper {
    padding: 0 24px;
    position: relative;
}



/* Split Toggle */
.split-trigger-row {
    text-align: center;
    margin-top: 10px;
}

.btn-text-action {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s;
    border: 1px dashed transparent;
}

.btn-text-action:hover {
    background: #f3f4f6;
    color: #111;
    border-color: #d1d5db;
}

/* Feedback Box */
.modern-feedback {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.feedback-icon {
    color: #2563eb;
    font-size: 1.5rem;
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}

#crediario-limit-text {
    display: block;
    font-weight: 700;
    color: #1e3a8a;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.status-subtext {
    display: block;
    font-size: 0.8rem;
    color: #3b82f6;
    margin-bottom: 6px;
}

/* --- Overlays (Cash & Crediário) --- */
.cash-overlay,
.crediario-overlay {
    /* Changed from absolute to relative/block so modal expands */
    position: relative;
    width: 100%;
    /* height: 100%; Removed to allow auto height */
    background: #fff;
    padding: 0 24px 24px 24px;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

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

.cash-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-top: 5px;
}

.cash-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
}

.btn-icon-only {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4b5563;
    transition: all 0.2s;
    font-size: 1.2rem;
}

.btn-icon-only:hover {
    background: #f3f4f6;
    color: #111;
    border-color: #d1d5db;
}

/* Cash Inputs */
.input-hero-wrapper {
    position: relative;
    margin-top: 8px;
}

.currency-symbol {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 600;
    color: #9ca3af;
}

.input-hero-cash {
    width: 100%;
    font-size: 2.5rem;
    font-weight: 800;
    padding: 16px 16px 16px 50px;
    /* Space for symbol */
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    color: #111;
    outline: none;
    transition: border-color 0.2s;
    background: #f9fafb;
}

.input-hero-cash:focus {
    border-color: #db0038;
    background: #fff;
}

.change-info-box {
    margin-top: 24px;
    background: #f0fdf4;
    border: 1px dashed #86efac;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.change-info-box .lbl {
    font-size: 1rem;
    font-weight: 600;
    color: #166534;
    text-transform: uppercase;
}

.change-info-box .val {
    font-size: 2rem;
    font-weight: 800;
    color: #16a34a;
}

.btn-hero-confirm {
    margin-top: 30px;
    width: 100%;
    background: #db0038;
    color: white;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 18px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(219, 0, 56, 0.3);
    transition: transform 0.2s;
}

.btn-hero-confirm:hover {
    transform: translateY(-2px);
    background: #b91c1c;
}

/* Crediario/Client Auth */
/* Crediario/Client Auth - Enhanced */
.client-auth-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.auth-avatar {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #64748b;
    font-size: 1.5rem;
}

.auth-info strong {
    display: block;
    font-size: 1.05rem;
    color: #0f172a;
    font-weight: 700;
}

.auth-info button {
    background: #f1f5f9;
    border: none;
    padding: 4px 12px;
    color: #64748b;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 6px;
    transition: all 0.2s;
}

.auth-info button:hover {
    background: #e2e8f0;
    color: var(--text-dark);
}

.installments-box label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.modern-select {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: 2px solid #f1f5f9;
    font-size: 1rem;
    color: #1e293b;
    background: #f8fafc;
    margin-top: 5px;
    outline: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.modern-select:focus {
    border-color: var(--primary-red);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(219, 0, 56, 0.05);
}

.preview-box {
    margin: 20px 0;
    text-align: center;
    background: linear-gradient(135deg, #fff1f2 0%, #fff 100%);
    color: var(--primary-red);
    font-weight: 800;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #fee2e2;
    font-size: 1.25rem;
    box-shadow: 0 10px 20px rgba(219, 0, 56, 0.04);
}

/* Badges de Cadastro para o Resumo */
.pdv-client-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.data-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
}

.data-badge.warning {
    background: #fef2f2;
    color: var(--primary-red);
    border: 1px solid #fee2e2;
}

.data-badge.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #dcfce7;
}

.data-badge i {
    font-size: 0.8rem;
}

/* Modern Split Area */
.modern-split {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    margin-top: 20px;
}

.sub-title {
    font-size: 0.9rem;
    margin: 0 0 12px 0;
    color: #4b5563;
    font-weight: 700;
}

.split-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.split-col {
    flex: 1;
}

.split-col label {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 600;
}

.split-select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    margin-bottom: 6px;
    outline: none;
}

.split-input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-weight: 600;
    color: #111;
    outline: none;
}

.split-input:focus {
    border-color: #db0038;
}

.split-icon {
    color: #9ca3af;
    padding-top: 20px;
    font-size: 1.2rem;
}

.split-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.split-payment-remaining {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1f2937;
}

.btn-confirm-split {
    padding: 10px 18px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}


/* Dropdown Badge Style - Redesigned as Tag */
.dropdown-badge-container {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 8px;
}

.dropdown-badge-label {
    font-size: 0.65rem;
    color: #6b7280;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    color: #374151;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-badge:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
    color: #111;
}

.dropdown-badge i {
    font-size: 1rem;
    color: #9ca3af;
}

/* ======================================== */
/* == LISTA DE PRODUTOS COM SCROLL       == */
/* ======================================== */
.item-list-container {
    overflow-y: auto;
    /* Ativa a rolagem interna */
    overflow-x: hidden;
    display: block;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-red) #f1f5f9;
    padding-right: 4px;
    /* Espaço para não cobrir conteúdo */
}

/* Scrollbar Customizada */
.item-list-container::-webkit-scrollbar {
    width: 8px;
}

.item-list-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.item-list-container::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
    border: 2px solid #f1f5f9;
    /* Cria efeito de espaçamento */
}

.item-list-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-red);
}

/* ======================================== */
/* == TOKEN INPUT & AUTH MODAL STYLES    == */
/* ======================================== */

.modal-content.modal-sm.text-center {
    padding: 35px 25px !important;
    text-align: center;
}

.token-input-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
}

.token-digit {
    width: 48px;
    height: 56px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: #f9fafb;
    /* Cinza bem claro */
    transition: all 0.2s cubic-bezier(0.19, 1, 0.22, 1);
    color: var(--text-dark);
}

.token-digit:focus {
    border-color: var(--text-dark);
    /* Borda preta */
    background: #fff;
    outline: none;
    transform: translateY(-4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.token-digit.error {
    border-color: var(--primary-red);
    color: var(--primary-red);
    background: #fff5f5;
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Auth Error Message */
.auth-error-message {
    color: var(--primary-red);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 8px;
    display: none;
    /* Hidden by default */
}

/* Custom Black Button */
.btn-black {
    background-color: #111827;
    /* Preto quase puro */
    color: #fff;
    border: none;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    /* Garante largura para texto 'Verificando...' */
    justify-content: center;
}

.btn-black:hover {
    background-color: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-black:disabled {
    background-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading State (Pode usar um spinner ou bolinhas) */
.btn-black.loading {
    cursor: wait;
    opacity: 0.9;
}

/* --- PASSWORD BOXES (PDV STYLE) --- */
.password-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 24px auto;
    width: fit-content;
}

.auth-box {
    width: 50px;
    height: 60px;
    background: #f3f4f6;
    /* Gray 100 */
    border: 2px solid #e5e7eb;
    /* Gray 200 */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 600;
    color: #374151;
    /* Gray 700 */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    outline: none;
    padding: 0;
}

.auth-box:focus {
    border-color: #111827;
    /* Gray 900 */
    background: #fff;
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
}

.auth-box.filled {
    background: #fff;
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.auth-box::placeholder {
    color: #d1d5db;
    /* Gray 300 */
    opacity: 1;
}

/* Icone de Olho */
.password-toggle-icon-pdv {
    position: absolute;
    right: -40px;
    cursor: pointer;
    font-size: 1.4rem;
    color: #9ca3af;
    transition: color 0.2s;
    padding: 5px;
}

.password-toggle-icon-pdv:hover {
    color: #4b5563;
}

/* ======================================== */
/* == HEADER ICON BUTTONS                 == */
/* ======================================== */
.btn-header-icon {
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: transparent;
    color: var(--text-dark);
    transition: background-color 0.2s ease;
    position: relative;
    /* For tooltip positioning */
}

.btn-header-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.btn-header-icon i {
    font-size: 1.5rem;
    margin: 0;
}

/* --- TOOLTIP PERSONALIZADO (Based on manager.html) --- */
.btn-header-icon[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 110%;
    /* Below the button */
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e293b;
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    animation: fadeInTooltip 0.2s forwards;
    pointer-events: none;
    z-index: 1001;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-weight: 500;
}

.btn-header-icon[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    top: 90%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #1e293b transparent;
    opacity: 0;
    animation: fadeInTooltip 0.2s forwards;
    z-index: 1001;
}

@keyframes fadeInTooltip {
    to {
        opacity: 1;
        margin-top: 5px;
    }
}

/* --- ESTILOS DO MODAL DE SAÍDA (Based on manager.html) --- */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    margin-top: 15px;
}

.custom-select {
    position: relative;
}

.custom-select .selected {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: var(--text-muted);
}

.custom-select .options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    z-index: 2005;
    padding: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-top: 5px;
    max-height: 200px;
    overflow-y: auto;
}

.custom-select.active .options {
    display: block;
}

.custom-select .options div {
    padding: 12px;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.custom-select .options div:hover {
    background: #f1f5f9;
}

.modal-saida-input,
.modal-saida-select {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    margin-top: 8px;
    outline: none;
    background: #f8fafc;
    color: var(--text-dark);
}

.modal-saida-input:focus,
.modal-saida-select:focus {
    border-color: var(--primary-red);
    background: white;
}

.btn-submit-saida {
    width: 100%;
    padding: 16px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    margin-top: 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}


/* Estilos para o formulário rápido de cliente */
.form-group-sm {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group-sm label {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

.input-sm {
    padding: 6px 8px;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-dark);
    background: #fff;
    width: 100%;
}

.input-sm:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(219, 0, 56, 0.1);
}

/* Animação do Formulário de Cliente */
#quick-client-register-area {
    /* Estado Inicial: Escondido */
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    margin-top: 0 !important;
    /* Força sobre o inline */
    padding-top: 0 !important;
    border-top: 0px solid transparent;
    /* Remove borda inicialmente */

    /* Transição suave */
    transition:
        max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.4s ease-out,
        margin 0.3s ease,
        padding 0.3s ease,
        border 0.3s ease;
}

#quick-client-register-area.expanded {
    max-height: 500px;
    /* Valor seguro e grande o suficiente */
    opacity: 1;
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px dashed #e5e7eb;
}

/* Stagger Animation para os campos */
#quick-client-register-area.expanded .form-group-sm,
#quick-client-register-area.expanded .form-row-sm {
    opacity: 0;
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#quick-client-register-area.expanded .form-group-sm:nth-child(1) {
    animation-delay: 0.1s;
}

#quick-client-register-area.expanded .form-row-sm {
    animation-delay: 0.2s;
}

#quick-client-register-area.expanded .form-group-sm:last-child {
    animation-delay: 0.3s;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

/* Efeito de Digitação Ativa */
.typing-active {
    transition: color 0.3s ease;
    animation: textPulse 0.3s ease-in-out;
}

@keyframes textPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}


/* Garantia de Layout Fixo para Nome do Cliente */
#summary-client-name-text {
    display: inline-block;
    max-width: 220px;
    /* Largura segura para não empurrar elementos */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

/* ======================================== */
/* == NOVOS ESTILOS DE PDV (Cart Table) == */
/* ======================================== */

/* Resultados da Pesquisa Rápida (Barcode) */
.barcode-scanner {
    position: relative;
    /* Container relativo para o absoluto */
    z-index: 900;
}

.barcode-search-results {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    position: absolute;
    width: 100%;
    z-index: 999;
    top: 100%;
    left: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.barcode-search-results.expanded {
    max-height: 60vh;
    /* Permite muitos itens com scroll */
    opacity: 1;
    overflow-y: auto;
    border-top: 1px solid #e5e7eb;
    margin-top: 4px;
}

.search-result-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f3f4f6;
    /* Hover cinza claro */
}

.result-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    display: flex;
    /* Para centralizar ícone */
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 1.5rem;
}

.result-info {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-code {
    font-family: monospace;
    color: #111;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.result-price {
    font-weight: 700;
    color: #111;
    font-size: 0.9rem;
}

/* Estilos Modernos para Célula de Produto */
.product-cell-modern {
    display: flex;
    align-items: center;
    gap: 12px;
}

.prod-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

.prod-info-box {
    display: flex;
    flex-direction: column;
}

.prod-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.2;
    margin-bottom: 2px;
}

.prod-barcode {
    font-size: 0.75rem;
    color: #9ca3af;
    font-family: monospace;
}

/* Cápsula de Quantidade (Agora com Input) */
.qty-capsule {
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 2px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.qty-btn:hover {
    background: #e2e8f0;
    color: var(--text-dark);
}

.qty-input-embedded {
    width: 40px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.95rem;
    padding: 0;
    -moz-appearance: textfield;
    /* Remove setas Firefox */
}

.qty-input-embedded::-webkit-outer-spin-button,
.qty-input-embedded::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input-embedded:focus {
    outline: none;
    color: var(--primary-red);
}

/* Cápsula de Desconto (Estilo Moderno) */
.discount-capsule-modern {
    display: inline-flex;
    align-items: center;
    /* background: #fff; */
    /* border: 1px solid #e2e8f0; */
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.qty-btn-xs {
    width: 24px;
    height: 24px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn-xs:hover {
    border-color: #cbd5e1;
    color: var(--text-dark);
    background: #f8fafc;
}

.relative-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 55px;
    /* Tamanho fixo */
}

.discount-input-embedded {
    width: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 600;
    color: #64748b;
    font-size: 0.9rem;
    padding-right: 14px;
    /* Espaço para o % */
}

.discount-input-embedded:focus {
    outline: none;
    color: var(--primary-red);
    border-bottom: 2px solid var(--primary-red);
    /* Indicador de foco */
}

.discount-symbol {
    position: absolute;
    right: 2px;
    font-size: 0.75rem;
    color: #9ca3af;
    pointer-events: none;
}

/* Ajustes de Preço */
.unit-price-display {
    font-weight: 500;
    color: var(--text-dark);
}

.total-price-display {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1rem;
}

/* ======================================== */
/* == OFFLINE & SYNC INDICATORS          == */
/* ======================================== */

/* Barra Superior Offline */
.offline-bar {
    background-color: #f59e0b;
    /* Amber-500 */
    color: white;
    text-align: center;
    padding: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.3s ease;
}

.offline-bar.hidden {
    transform: translateY(-100%);
}

/* Badge de Sincronização */
.sync-badge {
    position: fixed;
    bottom: 80px;
    /* Acima do footer */
    right: 20px;
    background-color: var(--info-blue);
    color: white;
    padding: 10px 16px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 9990;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sync-badge.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* ======================================== */
/* == MODAL SHORTCUT SYSTEM (SPECIFIC)   == */
/* ======================================== */

/* Grid container for modal options */
.modal-body-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 10px 0 45px 0;
    /* Extra bottom padding for shortcut tooltips */
}

/* Base styles for buttons with shortcuts - leveraging global .control-btn */
.control-btn.shortcut-trigger {
    border: none !important;
}

.control-btn.shortcut-trigger:hover {
    border: none !important;
    background-color: #f1f5f9 !important;
    transform: none !important;
    /* Disable habitual lift animation */
}

/* Progress bar animation line */
.control-btn.shortcut-trigger::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-red);
    z-index: 5;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.control-btn.shortcut-trigger:hover::before {
    width: 100%;
}


.control-btn.shortcut-trigger .control-icon-wrapper {
    font-size: 1.6rem;
    color: #64748b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn.shortcut-trigger:hover .control-icon-wrapper {
    color: #000;
}

.control-btn.shortcut-trigger h4 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Payment option active state when using control-btn */
.payment-option.control-btn.active {
    background-color: #fff1f2 !important;
}

.payment-option.control-btn.active .control-icon-wrapper {
    color: #db0038;
}

.payment-option.control-btn.active h4 {
    color: #991b1b;
}

.payment-option.control-btn.active::before {
    width: 100%;
}

/* Shortcut Badge - High visibility by default */
.shortcut-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #000;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Individual card padding class */
.control-btn.py-lg {
    padding-top: 35px !important;
    padding-bottom: 35px !important;
}

/* Hover Shortcut Info Tooltip */
.control-btn[data-shortcut-info]:hover::after {
    content: attr(data-shortcut-info);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    opacity: 0;
    animation: fadeInShortcut 0.2s forwards;
}

@keyframes fadeInShortcut {
    to {
        opacity: 1;
        bottom: -30px;
    }
}

/* Refined Close Button for Modals */
.modal-header .close-modal-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000 !important;
    font-size: 1.5rem !important;
    background: transparent;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-header .close-modal-btn:hover {
    background: #f1f5f9;
}


/* Styles for reused SVG icons via symbol/use */
.shortcut-icon {
    width: 32px;
    height: 32px;
    display: block;
}

/* ======================================== */
/* == MODERN LOADER (NOTIFICATION)       == */
/* ======================================== */

.notif-processing {
    flex-direction: row !important;
    align-items: center !important;
    padding: 10px 20px !important;
    min-width: auto !important;
    gap: 15px !important;
}

#notif-title {
    font-weight: 600;
    font-size: 1rem;
    color: #111;
}

.loader-notif {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-block;
    border-top: 3px solid var(--primary-red);
    border-right: 3px solid transparent;
    box-sizing: border-box;
    animation: loaderRotation 1s linear infinite;
}

@keyframes loaderRotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
/* ======================================== */
/* == REUSABLE MODAL SEARCH COMPONENT   == */
/* ======================================== */

.modal-search-group {
    position: relative;
    display: flex;
    align-items: center;
    padding: 18px 0;
    margin-bottom: 30px;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid #e2e8f0 !important;
    transition: border-bottom-color 0.3s ease;
}

.modal-search-group:focus-within {
    border-bottom-color: var(--primary-red) !important;
}

.modal-search-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 1.3rem !important;
    font-weight: 600;
    color: #1a1a1a !important;
    padding: 10px 0 10px 48px !important; /* Space for large icon */
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none !important;
}

.modal-search-icon {
    position: absolute;
    left: 0;
    color: #94a3b8;
    font-size: 1.8rem !important; /* Prominent icon */
    pointer-events: none;
    transition: all 0.3s ease;
}

.modal-search-group:focus-within .modal-search-icon {
    color: var(--primary-red);
    transform: scale(1.1);
}

.modal-search-input::placeholder {
    color: #cbd5e1;
    font-weight: 400;
    font-size: 1.1rem;
}

/* ======================================== */
/* == CLIENT SEARCH RESULTS ENHANCEMENTS == */
/* ======================================== */

.client-result-item {
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid #f1f5f9;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    user-select: none;
    background: #fff;
}

.client-result-item:hover, 
.client-result-item.selected {
    background-color: #f8fafc;
    border-left-color: var(--primary-red);
    padding-left: 28px; /* Smooth slide effect */
}

.client-result-item strong {
    color: #1e293b;
    font-size: 1.05rem;
    font-weight: 600;
}

.client-result-item:last-child {
    border-bottom: none;
}

.status-badge-glass.sm {
    height: 24px !important;
    padding: 0 10px !important;
    font-size: 0.7rem !important;
    border-radius: 6px !important;
}

.status-badge-glass.sm i {
    font-size: 0.9rem !important;
}

/* Fix for autocomplete positioning */
.modal-search-group {
    overflow: visible !important;
}

/* ======================================== */
/* == PREMIUM AUTH & QR CODE MODAL UI    == */
/* ======================================== */

.modal-auth-premium {
    width: 900px !important;
    max-width: 95vw !important;
    background: #fff !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1) !important;
    padding: 0 !important;
    overflow: hidden;
    animation: authFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-container-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    padding: 60px 80px;
    gap: 40px;
    background: #fff;
    min-height: 400px;
}

.auth-main-title {
    font-size: 2.2rem;
    font-weight: 300;
    color: #41525d;
    margin-bottom: 40px;
}

.auth-steps-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
}

.auth-step-item {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 1.1rem;
    color: #3b4a54;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #d1d7db;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #667781;
    flex-shrink: 0;
}

.auth-footer-options {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #f0f2f5;
}

.auth-keep-logged {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #667781;
}

.auth-link-alt {
    color: #008069;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.auth-link-alt:hover { text-decoration: underline; }

/* QR Code Section */
.auth-qrcode-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qrcode-wrapper {
    position: relative;
    padding: 15px;
    background: #fff;
    border: 1px solid #f0f2f5;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.qrcode-logo-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.qrcode-logo-center img { width: 35px; height: auto; }

.qrcode-session-code {
    margin-top: 20px;
    font-family: monospace;
    font-size: 1.1rem;
    color: #8696a0;
    letter-spacing: 1px;
}

/* Banner Download */
.auth-banner-download {
    background: #fdfdfd;
    border-top: 1px solid #f0f2f5;
    padding: 25px 80px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.banner-icon { font-size: 2.2rem; color: #54656f; }
.banner-text { flex: 1; }
.banner-text strong { display: block; color: #3b4a54; font-size: 1rem; }
.banner-text span { font-size: 0.9rem; color: #667781; }

.btn-banner-download {
    background: #00a884;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-banner-download:hover { background: #008f6f; }

.auth-user-badge-obsolete {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.auth-user-badge-obsolete i { font-size: 3rem; color: #3b82f6; }
.user-welcome { font-size: 0.8rem; color: #94a3b8; display: block; }
.user-info strong { font-size: 1.2rem; color: #1e293b; }

/* Overlay Validation */
.auth-overlay-msg {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 10;
}

.auth-overlay-msg.active { display: flex; }

.spinner-auth {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #00a884;
    border-radius: 50%;
    animation: spinAuth 1s linear infinite;
}

@keyframes spinAuth { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ======================================== */
/* == NFC CARD VISUAL & ANIMATIONS       == */
/* ======================================== */

.card-nfc-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.card-icon-main {
    font-size: 5rem;
    color: #667781;
    background: #f0f2f5;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.visual-status-text {
    font-size: 0.95rem;
    color: #8696a0;
    font-weight: 500;
}

.nfc-waves {
    position: absolute;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.nfc-waves span {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #00a884;
    opacity: 0;
    animation: nfcWave 3s linear infinite;
}

.nfc-waves span:nth-child(2) { animation-delay: 1s; }
.nfc-waves span:nth-child(3) { animation-delay: 2s; }

@keyframes nfcWave {
    0% { transform: scale(0.6); opacity: 0; }
    50% { opacity: 0.3; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* Auth Visual Area Container */
.auth-visual-area {
    width: 340px;
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #fff;
    border-radius: 12px;
}
/* ======================================== */
/* == CLASSES UTILITÁRIAS DE LAYOUT      == */
/* ======================================== */
.flex-align-center { display: flex; align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.relative { position: relative; }
.flex-grow-1 { flex-grow: 1; }
.margin-0 { margin: 0; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.mt-25 { margin-top: 25px; }
.d-none-imp { display: none !important; }
.cursor-pointer { cursor: pointer; }
.font-1-1 { font-size: 1.1rem; }
.font-0-9 { font-size: 0.9rem; }
.color-dark { color: #111; }

/* Skeletons de largura fixa */
.w-70 { width: 70px; }
.w-80 { width: 80px; }
.w-40 { width: 40px; }
.w-60 { width: 60px; }
/* Status Badge Glass (Usado na lista e agora no modal) */
.status-badge-glass {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 14px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.status-glass-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* --- PAGINA DE OFERTAS (QUEIMÃO) - LAYOUT COMPACTO --- */

/* Topbar */
.queimao-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 16px;
}

.queimao-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.queimao-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Configuração em linha única */
.queimao-config-inline {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 14px 18px;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid #f1f5f9;
    margin-bottom: 14px;
}

.queimao-config-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.queimao-config-field label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.queimao-config-field .select-modern,
.queimao-config-field .date-minimal {
    width: 100%;
    height: 38px;
    font-size: 0.85rem;
    background: white !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px;
    padding: 0 12px;
    font-weight: 600;
    color: #334155;
}

/* Área de Ferramentas: Abas e Navbar Local */
.queimao-tools-tabs-nav {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.queimao-tools-navbar {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.queimao-tools-nav-btn {
    border: none;
    background: transparent;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.queimao-tools-nav-btn:hover {
    color: #1e293b;
}

.queimao-tools-nav-btn.active {
    color: #db0038;
    border-bottom-color: #db0038;
}

/* Conteúdos das Abas */
.queimao-tool-content {
    width: 100%;
}

.queimao-tool-scanner {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.25s;
}

.queimao-tool-scanner:focus-within {
    background: white;
    border-color: #db0038;
    box-shadow: 0 4px 12px rgba(219, 0, 56, 0.08);
}

.queimao-tool-scanner i {
    font-size: 1.4rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.queimao-tool-scanner input {
    width: 100%;
    border: none !important;
    background: transparent !important;
    font-size: 0.92rem;
    font-weight: 600;
    color: #334155;
    outline: none;
}

.queimao-tool-scanner input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.queimao-tool-scanner:focus-within i {
    color: #db0038;
}

.queimao-tool-category {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.queimao-tool-category .select-modern {
    height: 40px;
    font-size: 0.85rem;
    flex: 1;
    background: white !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px;
    padding: 0 12px;
}

.queimao-discount-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100px;
}

.queimao-discount-input-wrap input {
    width: 100%;
    height: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px;
    padding: 0 28px 0 8px;
    background: white !important;
}

.queimao-discount-suffix {
    position: absolute;
    right: 8px;
    font-size: 0.65rem;
    font-weight: 850;
    color: #ef4444;
    letter-spacing: 0.03em;
}

.btn-queimao-apply {
    height: 40px;
    padding: 0 20px;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 10px;
    background: var(--primary-red);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-queimao-apply:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(219, 0, 56, 0.25);
}

/* Seção de Produtos (protagonista) */
.queimao-products-section {
    background: white;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    overflow: hidden;
}

.queimao-products-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.queimao-products-header h4 {
    font-size: 0.9rem;
    color: #334155;
}

.queimao-list-wrapper {
    min-height: 200px;
}

/* Empty state mais compacto */
.empty-state-modern {
    text-align: center;
    padding: 50px 20px;
    color: #94a3b8;
}

.empty-state-modern i {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.25;
}

.empty-state-modern p {
    max-width: 280px;
    margin: 0 auto;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Banner de Evento Ativo / Vazio */
.queimao-event-banner-empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.queimao-event-banner-active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #fff1f2;
    border: 1px solid #ffe4e6;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(225, 29, 72, 0.05);
    transition: all 0.3s;
}

.queimao-banner-empty-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.queimao-banner-empty-content i {
    font-size: 2.2rem;
    color: #94a3b8;
}

.queimao-banner-empty-content h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    color: #475569;
}

.queimao-banner-empty-content p {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
}

.queimao-banner-active-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.queimao-banner-active-content i {
    font-size: 2.2rem;
    color: #db0038;
}

.queimao-banner-active-content h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    color: #1e293b;
}

.queimao-banner-active-content p {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.queimao-banner-actions {
    display: flex;
    gap: 10px;
}

/* Abas do Modal de Eventos */
.queimao-modal-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.queimao-modal-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.queimao-modal-tab-btn.active {
    background: white;
    color: #db0038;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* --- CLASSES COMPARTILHADAS DO QUEIMÃO --- */
.icon-box-hot {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.25);
}

.select-modern {
    background: white !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 600;
    cursor: pointer;
    height: 38px;
    color: #334155 !important;
}

.count-badge-modern {
    background: #334155;
    color: white;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}

.queimao-status-badge {
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-active { background: #dcfce7; color: #15803d; }
.status-scheduled { background: #eff6ff; color: #1d4ed8; }
.status-expired { background: #fee2e2; color: #b91c1c; }

.queimao-item-card {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.15s;
}

.queimao-item-card:hover {
    background: #f8fafc;
}

.queimao-prod-thumb {
    width: 50px;
    height: 50px;
    background: #f1f5f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #cbd5e1;
}

.queimao-item-info strong {
    font-size: 0.9rem;
    color: #1e293b;
    display: block;
    margin-bottom: 3px;
}

.price-badge-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-tag-original {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 0.8rem;
}

.price-tag-offer {
    color: var(--primary-red);
    font-weight: 800;
    font-size: 1rem;
    background: #fff1f2;
    padding: 3px 8px;
    border-radius: 6px;
}

.price-input-container-premium {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 16px;
    border: 2px solid #e2e8f0;
}

.currency-symbol {
    font-size: 1.5rem;
    font-weight: 800;
    color: #64748b;
}

.price-big-input {
    background: transparent !important;
    border: none !important;
    font-size: 2.5rem !important;
    font-weight: 800;
    color: var(--text-dark);
    width: 200px;
    outline: none;
    text-align: left;
}

.icon-circle-warning {
    width: 70px;
    height: 70px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2rem;
}

.metrics-grid-queimao {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    background: #f1f5f9;
    padding: 12px;
    border-radius: 12px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.btn-icon-only {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    transition: all 0.2s;
}

.btn-icon-only:hover {
    background: #f1f5f9;
    color: var(--text-dark);
}

.price-input-container-premium {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 20px;
    border: 2px solid #e2e8f0;
}

.currency-symbol {
    font-size: 1.5rem;
    font-weight: 800;
    color: #64748b;
}

.price-big-input {
    background: transparent !important;
    border: none !important;
    font-size: 2.5rem !important;
    font-weight: 800;
    color: var(--text-dark);
    width: 200px;
    outline: none;
    text-align: left;
}

.icon-circle-warning {
    width: 80px;
    height: 80px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2.5rem;
}

.metrics-grid-queimao {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    background: #f1f5f9;
    padding: 15px;
    border-radius: 16px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-item label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.metric-item span {
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* ======================================== */
/* == MODELO A4 QUEIMÃO (ETIQUETAS)       == */
/* ======================================== */

.queimao-a4-label {
    width: 210mm;
    height: 297mm;
    background: #db0038;
    padding: 12mm;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

.queimao-a4-card {
    background: white;
    width: 100%;
    height: 100%;
    border-radius: 60px;
    padding: 10mm;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    box-sizing: border-box;
}

.queimao-a4-product-name {
    font-size: 3.2rem;
    font-weight: 900;
    text-align: center;
    color: #000000;
    text-transform: uppercase;
    line-height: 0.95;
    margin-top: 15mm;
    margin-bottom: 8mm;
    width: 100%;
    letter-spacing: -1.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 1.9em;
}

.queimao-a4-barcode-container {
    background: #f1f5f9;
    border-radius: 100px;
    padding: 6mm 20mm;
    margin-bottom: 12mm;
    display: flex;
    align-items: center;
    justify-content: center;
}

.queimao-a4-barcode-container canvas,
.queimao-a4-barcode-container svg {
    height: 18mm !important;
    width: auto !important;
}

.queimao-a4-normal-price {
    font-size: 1.8rem;
    color: #64748b;
    margin-bottom: 10mm;
    display: flex;
    align-items: center;
    gap: 5mm;
    width: 100%;
    justify-content: center;
    font-weight: 500;
}

.queimao-a4-strike {
    text-decoration: line-through;
    text-decoration-color: #db0038;
    text-decoration-thickness: 3px;
    font-weight: 800;
    font-size: 2.8rem;
    color: black;
}

.queimao-a4-offer-banner {
    background: #000000;
    width: calc(100% + 20mm);
    margin: 0 -10mm -10mm -10mm;
    border-radius: 100px 100px 0 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10mm;
    max-height: 150mm;
}

.queimao-a4-offer-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 4mm;
}

.queimao-a4-offer-title {
    color: white;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.queimao-a4-offer-badge-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.queimao-a4-offer-badge {
    background: #db0038;
    color: white;
    font-weight: 800;
    padding: 4px 15px;
    border-radius: 6px;
    text-transform: uppercase;
    font-size: 1.4rem;
}

.queimao-a4-flame {
    font-size: 2rem;
}

.queimao-a4-offer-price {
    color: white;
    font-size: 6.5rem;
    font-weight: 950;
    line-height: 1;
    margin-bottom: 3mm;
    letter-spacing: -3px;
    white-space: nowrap;
}

.queimao-a4-footer {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
}





/* --- ESTILOS PARA FILTRO DE DUPLICATAS --- */
.duplicate-group-header td {
    padding: 0 !important;
}
.duplicate-header-content {
    background: rgba(139, 92, 246, 0.08);
    color: #8b5cf6;
    font-weight: 700;
    padding: 12px 18px;
    border-left: 4px solid #8b5cf6;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}
.duplicate-header-content i {
    font-size: 1.2rem;
}
.duplicate-header-content small {
    font-weight: 400;
    opacity: 0.7;
    margin-left: auto;
    font-size: 0.75rem;
}

/* --- ESTILOS PARA RESULTADOS DE BUSCA (GABARITO) --- */
.search-result-item .result-item-wrapper {
    pointer-events: none;
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.search-result-item .result-name {
    font-weight: 600;
}

.search-result-item .result-meta {
    position: relative;
}

/* --- ESTILOS PARA RESULTADOS DE BUSCA (GABARITO) --- */
.search-result-item .result-item-wrapper {
    pointer-events: none;
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.search-result-item .result-name {
    font-weight: 600;
}

.search-result-item .result-meta {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-result-item .result-price {
    margin-left: auto;
    font-weight: 700;
}

/* Regras adicionadas para o A4 Otimizado */
@media print {
    .invoice-container.optimized-a4 {
        min-height: 285mm;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .invoice-container.optimized-a4 .invoice-footer {
        margin-top: auto;
    }

    .client-card.no-bg {
        background-color: transparent !important;
        border: 1px solid #000 !important;
    }

    .premium-table.center-cols td {
        text-align: center;
    }

    .premium-table.center-cols td:nth-child(2) {
        text-align: left !important;
    }
}

/* --- CONFIGURACOES DE IMPRESSAO AUTOMATICA DA VIA DO CAIXA (SoC) --- */
.setting-row-hidden {
    display: none !important;
}

.setting-row-input-group {
    width: 250px;
    margin-bottom: 0;
}

.setting-row-input-api {
    width: 400px;
    margin-bottom: 0;
}

/* Elementos para geracao de impressao termica silenciosa de 80mm */
.thermal-print-wrapper {
    position: fixed;
    left: 0;
    top: 0;
    width: 300px !important;
    height: 1px !important;
    overflow: hidden !important;
    z-index: -9999 !important;
    pointer-events: none !important;
    opacity: 0.99 !important;
}

.thermal-print-content {
    width: 270px !important;
    max-width: 270px !important;
    margin: 0 !important;
    padding: 10px 6px !important;
    box-sizing: border-box !important;
    font-family: 'Courier New', monospace !important;
    font-size: 9pt !important;
}

/* Isolamento estrito de cores contra vazamento visual do tema escuro do PDV */
.thermal-print-content,
.thermal-print-content * {
    color: #000 !important;
    background-color: transparent !important;
    font-family: 'Courier New', monospace !important;
}

.thermal-print-content {
    background-color: #fff !important;
}

/* ======================================== */
/* == SISTEMA DE TROCO INTELIGENTE POR MOEDAS == */
/* ======================================== */
.cash-financial-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
}

.cash-summary-item {
    display: flex;
    flex-direction: column;
}

.cash-summary-item span.lbl {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cash-summary-item span.val {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
    margin-top: 2px;
}

/* Estado disabled para o botão de confirmação de dinheiro */
.btn-hero-confirm.disabled,
.btn-hero-confirm:disabled {
    background: #cbd5e1 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

.code-agent-avatar {
    width: 32px;
    height: 32px;
    background: #db0038;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
    box-shadow: 0 4px 6px -1px rgba(219, 0, 56, 0.2);
}

#smart-change-container {
    margin-top: 24px;
    border-top: 1px dashed #e2e8f0;
    padding-top: 20px;
}

.smart-change-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.smart-change-header-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smart-change-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.smart-change-btn {
    background: #f8fafc;
    border: none;
    border-radius: 14px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    outline: none;
}

.smart-change-btn:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.smart-change-btn:focus {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.smart-change-btn .btn-key {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #000;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.smart-change-btn .coin-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e293b;
}

.smart-change-btn .discount-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #10b981;
    margin-top: 4px;
    text-transform: uppercase;
}

/* Custom class to hide calculation elements when cash register is closed */
.pdv-summary-card.caixa-fechado .receipt-calculation-box {
    display: none !important;
}

.pdv-summary-card.caixa-fechado #cancel-sale-btn {
    display: none !important;
}

.pdv-summary-card.caixa-fechado .action-buttons {
    grid-template-columns: 1fr !important;
}

/* Estilos de Abertura de Caixa (open-caixa-modal) */
.auth-user-badge-simple {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 0;
    margin-bottom: 12px;
    border-bottom: 1px dashed #e2e8f0;
}

.auth-user-badge-simple .auth-badge-icon {
    font-size: 1.2rem;
    color: #000;
}

.auth-user-badge-simple .caixa-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 700;
}

.auth-user-badge-simple .badge-divider {
    color: #cbd5e1;
    font-weight: 300;
}

.auth-user-badge-simple #validated-user-name {
    font-size: 0.85rem;
    color: #1e293b;
    font-weight: 700;
}

.auth-user-badge-simple .arrow-indicator-icon {
    margin-left: auto;
    font-size: 1.2rem;
    color: #94a3b8;
}

.fundo-troco-subtitle {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-align: left;
}

.cedulas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0;
    background: transparent !important;
    margin-bottom: 20px;
    border: none !important;
    overflow: hidden !important;
}

.cedula-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.cedula-item:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.04);
}

.cedula-label {
    font-weight: 800;
    color: #1e293b;
    font-size: 0.95rem;
}

.cedula-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cedula-controls input.qtd-cedula-open,
.cedula-controls input#open-caixa-moedas-valor {
    width: 45px;
    padding: 6px 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    background: #f8fafc;
    -moz-appearance: textfield;
}

.cedula-controls input.qtd-cedula-open::-webkit-outer-spin-button,
.cedula-controls input.qtd-cedula-open::-webkit-inner-spin-button,
.cedula-controls input#open-caixa-moedas-valor::-webkit-outer-spin-button,
.cedula-controls input#open-caixa-moedas-valor::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cedula-controls .qty-btn {
    width: 26px;
    height: 26px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    color: #475569;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cedula-controls .qty-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
}

.open-caixa-total-container {
    margin-top: 20px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    background: #f1f5f9;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.open-caixa-total-container #open-caixa-total-dinheiro {
    color: #1e293b !important;
    font-weight: 800;
    margin-left: 6px;
}

#open-caixa-step-form .modal-body {
    padding: 0px 24px 0px 24px;
}

#open-caixa-modal {
    background-color: #f0f2f5;
}

/* Skeleton Loading para Listas e Tabelas */
.skeleton-row td {
    padding: 16px 12px !important;
}

.skeleton-block {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite linear;
    border-radius: 6px;
    height: 16px;
}

.skeleton-block.image-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 8px;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Animação do Pix Dinâmico de Sucesso (Gota fluida que sobe/desce com física elástica) */
.pix-success-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 20px auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.large-sphere {
    position: relative;
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: transparent;
}

.fluid-drop {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
    
    /* Movimento seguindo o traçado de um arroba (@) */
    offset-path: path("M 40,40 C 45,30 55,30 55,40 C 55,50 35,50 35,40 C 35,25 65,25 65,40 C 65,60 25,60 25,40 C 25,15 75,15 75,40 C 75,50 65,55 58,52");
    animation: move-along-at 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.success-icon {
    font-size: 3rem;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Conclusão da animação (.done) */
.pix-success-wrapper.done .large-sphere {
    background: #10b981;
    border-color: #10b981;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.pix-success-wrapper.done .fluid-drop {
    animation: none;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.pix-success-wrapper.done .success-icon {
    opacity: 1;
    transform: scale(1);
}

/* Animação do traçado de @ */
@keyframes move-along-at {
    0% {
        offset-distance: 0%;
    }
    100% {
        offset-distance: 100%;
    }
}

/* ======================================== */
/* == HISTÓRICO - TELA DE PESQUISA       == */
/* ======================================== */
#historico-page .search-block {
    flex: 1;
    max-width: 600px;
}

.history-empty-icon {
    font-size: 3rem;
    color: var(--text-light);
    opacity: 0.5;
}

/* ======================================== */
/* == MODAIS - MELHORIAS DE UI/UX        == */
/* ======================================== */

/* Classes Utilitárias do Modal Fiscal */
/* Classes Utilitárias do Modal Fiscal */
.text-danger-val {
    color: var(--primary-red);
    font-weight: 700;
}

/* ======================================== */
/* == MODAL FISCAL - DESIGN MINIMALISTA  == */
/* ======================================== */

.fiscal-section-card {
    background: #f9f9f9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    text-align: left;
}

.card-grid-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.grid-col {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: center;
}

.grid-col:first-child {
    text-align: left;
}

.grid-col:last-child {
    text-align: right;
}

.grid-divider-vertical {
    width: 1px;
    height: 36px;
    background-color: var(--border-color);
    margin: 0 16px;
}

.col-lbl {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 4px;
    font-weight: 500;
}

.col-val {
    font-size: 1.05rem;
    font-weight: 700;
}

.col-val.text-dark-val {
    color: var(--text-dark);
}

.section-label-modern {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fiscal-items-header-modern {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    margin-bottom: 6px;
}

.fiscal-scroll-list-modern {
    max-height: 140px;
    overflow-y: auto;
    font-size: 0.85rem;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
}

.apt-item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.85rem;
    text-align: left;
}

.apt-item-row:last-child {
    border-bottom: none;
}

.ncm-tag {
    display: block;
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 2px;
}

/* Custom Scrollbar para a lista fiscal */
.fiscal-scroll-list-modern::-webkit-scrollbar {
    width: 5px;
}
.fiscal-scroll-list-modern::-webkit-scrollbar-track {
    background: transparent;
}
.fiscal-scroll-list-modern::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.fiscal-scroll-list-modern::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Resumo de Totais Fiscais */
.fiscal-summary-receipt {
    background: #f9f9f9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.receipt-lbl {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.receipt-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
}

.receipt-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 2px 0;
}

/* Classe geral .btn-key no canto superior direito */
.btn-key {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #000;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    z-index: 10;
}

/* Estilo de foco e navegação via teclado para os botões de controle de PIX */
.control-btn.shortcut-trigger:focus-visible {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
    background-color: #f1f5f9 !important;
}

.control-btn.shortcut-trigger:focus-visible::before {
    width: 100%;
}

/* Badge NFC-e minimalista no cabeçalho */
.nfce-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
}

.nfce-badge-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* Resumo de Recebimento em lista vertical (Estilo Banco Inter) */
.fiscal-vertical-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fiscal-vertical-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
}

.fiscal-vertical-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.lbl-vertical {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.val-vertical {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

/* Definição de verde com efeito de vidro */
.status-glass-green {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Adaptação das badges de vidro com texto no modal fiscal */
#modal-confirm-fiscal .status-badge-glass {
    width: auto;
    height: auto;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 6px;
    display: inline-flex;
    align-items: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-transform: none;
    box-shadow: none;
}

#modal-confirm-fiscal .status-badge-glass i {
    font-size: 0.95rem;
}

/* Texto de Isenção de Responsabilidade (Disclaimer) */
.fiscal-disclaimer-text {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.4;
    margin: 12px 0;
    font-style: italic;
    text-align: left;
}

/* --- ABA DE ESTOQUE E MOVIMENTAÇÃO --- */
.stock-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.stock-card-panel {
    background-color: var(--card-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stock-card-panel h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.stock-stores-table,
.stock-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.stock-stores-table th,
.stock-history-table th {
    font-weight: 600;
    color: var(--text-light);
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1.5px solid var(--border-color);
    background-color: #f9fafb;
}

.stock-stores-table td,
.stock-history-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
}

.stock-stores-table tr:hover,
.stock-history-table tr:hover {
    background-color: #f9fafb;
}

.text-right {
    text-align: right !important;
}

/* Badges de Estoque */
.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-success {
    background-color: #def7ec;
    color: #03543f;
}

.badge-danger {
    background-color: #fde8e8;
    color: #9b1c1c;
}

.text-center {
    text-align: center !important;
}

/* --- MODAL BUSCAR COMPROVANTE --- */
#search-receipt-modal #btn-search-sale {
    width: auto;
    margin-top: 0;
    padding: 12px 20px;
    border-radius: 0 8px 8px 0 !important;
}

#search-receipt-modal #history-search-result {
    margin-top: 20px;
}

#search-receipt-modal #history-table {
    font-size: 0.9rem;
}

#search-receipt-modal #history-empty-state {
    margin-top: 20px;
}

/* --- BOTÃO GERADOR DE DESCRIÇÃO COM IA --- */
.label-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    width: 100%;
}

.btn-ai-generate {
    background: linear-gradient(135deg, #7c3aed, #db0038) !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.2) !important;
    width: auto !important;
    margin-top: 0 !important;
    text-transform: none !important;
}

.btn-ai-generate:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.4) !important;
}

.btn-ai-generate:active {
    transform: translateY(0) !important;
}

.btn-ai-generate:disabled {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Painel do Validador Fiscal (NCM e CEST) Flutuante */
.ncm-validator-container {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 450px;
    z-index: 1000;
    box-sizing: border-box;
    max-height: 350px;
    overflow-y: auto;
}

.ncm-validator-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.validator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color, #f0f0f0);
    padding-bottom: 8px;
}

.validator-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark, #333);
}

.validator-title i {
    color: var(--primary-red, #dc3545);
}

.validator-spinner-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.validator-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(220, 53, 69, 0.2);
    border-top: 2px solid var(--primary-red, #dc3545);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-text {
    font-size: 11px;
    color: var(--text-muted, #777);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.validator-body {
    font-size: 13px;
    line-height: 1.5;
}

.validator-section {
    margin-bottom: 12px;
}

.validator-section:last-child {
    margin-bottom: 0;
}

.validator-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #888);
    margin-bottom: 4px;
    font-weight: 600;
}

.validator-text-val {
    color: var(--text-dark, #333);
    font-weight: 500;
}

.validator-text-val.invalid {
    color: var(--primary-red, #dc3545);
}

.cest-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.cest-suggestion-chip {
    background-color: var(--bg-hover, #f8f9fa);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
    color: var(--text-dark, #333);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    max-width: 100%;
}

.cest-suggestion-chip:hover {
    border-color: var(--primary-red, #dc3545);
    background-color: var(--bg-card);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.1);
}

.cest-suggestion-chip .chip-code {
    font-weight: bold;
    color: var(--primary-red, #dc3545);
}

.cest-suggestion-chip .chip-desc {
    font-size: 10px;
    color: var(--text-muted, #777);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.no-cest-alert {
    color: var(--text-muted, #888);
    font-style: italic;
    font-size: 12px;
}

/* Linha do Dashboard (Lado a Lado) */
.products-dashboard-row {
    display: flex;
    gap: 12px;
    margin-top: 16px; /* Margem superior entre a barra de busca e o dashboard */
    margin-bottom: 16px;
    width: 100%;
    align-items: stretch;
}

/* Dashboard de Categorias Dinâmicas */
.categories-dashboard-container {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    width: 100%;
    flex: 1;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    width: 100%;
}


.category-dashboard-card {
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 10px 14px;
    height: 76px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.category-dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    filter: brightness(0.97);
}

.category-card-main {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    position: relative;
}

.category-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.category-card-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex-grow: 1;
}

.category-card-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.category-dashboard-card.category-featured .category-card-name {
    font-size: 0.88rem;
}

.category-card-qty {
    font-size: 0.68rem;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.category-dashboard-card .badge-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.6);
    padding: 2px 6px;
    border-radius: 6px;
    position: absolute;
    top: 0;
    right: 0;
}

/* Suporte a barra de progresso interna do card de Estoque Geral */
.category-dashboard-card .progress-bar-wrapper {
    width: 100%;
    height: 3px;
    background: var(--border-subtle);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 8px;
}

.category-dashboard-card .progress-bar-fill {
    height: 100%;
    background: var(--primary-red);
    width: 0%;
    border-radius: 99px;
    transition: width 0.4s ease;
}

/* Responsividade para telas menores */
@media (max-width: 1024px) {
    .products-dashboard-row {
        flex-direction: column; /* Empilha no tablet */
        gap: 16px;
    }
    .categories-dashboard-container {
        flex: 0 0 100%;
        width: 100%;
    }
    #products-progress-container {
        flex: 0 0 100% !important;
        width: 100% !important;
        height: 72px;
    }
    .category-dashboard-card {
        grid-column: span 6; /* 2 por linha em tablets */
        height: 68px;
    }
    .category-dashboard-card.category-featured {
        grid-column: span 6; /* mantém 2 por linha */
    }
}

@media (max-width: 768px) {
    .category-dashboard-card,
    .category-dashboard-card.category-featured {
        grid-column: span 12; /* 1 por linha no smartphone */
    }
}

/* Seção de Componentes do Kit (Modal de Edição de Produtos) */
#edit-kit-section {
    background: var(--bg-body);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 14px;
    margin-top: 15px;
}

.kit-list-container {
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
}

.kit-component-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    background: var(--card-white);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    margin-top: 8px;
}

.kit-component-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kit-component-qty-control {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.kit-component-qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-body);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.kit-component-qty-btn:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.kit-component-qty-input {
    width: 42px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 2px;
}

.kit-component-remove-btn {
    color: #ef4444;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.kit-component-remove-btn:hover {
    color: #b91c1c;
}

/* Copiar Código de Barras ao passar o mouse */
.product-barcode-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.copy-barcode-btn {
    background: transparent;
    border: none;
    padding: 2px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-light);
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.copy-barcode-btn:hover {
    color: var(--primary-red);
}

.product-barcode-container:hover .copy-barcode-btn {
    opacity: 1;
}

/* ==========================================================================
   Estilos Migrados do index.html (Evitar tags <style> inline)
   ========================================================================== */

/* Banner de Atualização (Top Bar) */
#system-update-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    background: #db0038;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    font-family: 'Inter', sans-serif;
}

#system-update-banner.visible {
    transform: translateY(0);
}

.update-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.update-banner-icon {
    font-size: 1.4rem;
    animation: spin-slow 3s linear infinite;
}

.update-banner-text {
    font-size: 1rem;
    font-weight: 500;
}

.update-banner-text strong {
    font-weight: 700;
    text-transform: uppercase;
}

.btn-update-banner {
    background: white;
    color: #db0038;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-update-banner:hover {
    background: #111;
    color: white;
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Meta de Cadastro - Versão Inferior */
.registration-goal-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 12px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.goal-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.goal-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.goal-stats {
    font-size: 0.85rem;
    color: #1e293b;
    font-weight: 600;
}

.goal-stats strong {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary-red);
}

.goal-progress-track {
    height: 8px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

.goal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    width: 0%;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.goal-footer-msg {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-top: 6px;
    text-align: center;
}

/* Loader customizado */
.loader {
    width: 48px;
    height: 48px;
    background: var(--primary-red);
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg) scale(0.2);
        border-radius: 10%;
    }

    50% {
        transform: rotate(180deg) scale(1.5);
        border-radius: 50%;
    }

    100% {
        transform: rotate(360deg) scale(0.2);
        border-radius: 10%;
    }
}

#custom-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#loading-overlay {
    display: none !important;
}

.loader-text {
    margin-top: 24px;
    color: #000;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    opacity: 0;
    animation: appearUp 0.8s ease-out forwards;
}

@keyframes appearUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Indicador de Etapas do Fechamento de Caixa --- */
.close-caixa-steps {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 24px;
    padding: 0;
    border-bottom: 1px solid #e2e8f0;
}

.close-caixa-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 14px;
    position: relative;
    cursor: default;
    color: #94a3b8; /* Cor padrão inativo (cinza) */
    transition: all 0.3s ease;
    flex: 1;
}

.close-caixa-step-icon {
    font-size: 1.3rem;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    color: inherit;
    transition: all 0.3s ease;
}

.close-caixa-step-icon svg {
    width: 20px;
    height: 20px;
    color: inherit;
    stroke: currentColor;
    transition: all 0.3s ease;
}

.close-caixa-step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: inherit;
    transition: all 0.3s ease;
}

/* Estado Ativo: Texto e ícone preto com barrinha em baixo */
.close-caixa-step-item.active {
    color: #000000; /* Preto puro */
}

.close-caixa-step-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px; /* Alinhada na borda inferior do close-caixa-steps */
    left: 50%;
    transform: translateX(-50%);
    width: 60px; /* Barrinha centralizada sob o texto */
    height: 3px;
    background-color: #ef4444; /* Barrinha vermelha indicadora */
    border-radius: 3px 3px 0 0;
}

/* Estado Concluído: Mantém o cinza neutro padrão dos inativos */
.close-caixa-step-item.completed {
    color: #94a3b8;
}

/* Teclas de atalho físicas */
.shortcut-key {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    box-shadow: 0 2px 0 #cbd5e1;
    color: #334155;
    display: inline-block;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    padding: 3px 6px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Estilos para os inputs minimalistas do fechamento de caixa */
#close-caixa-modal input[type="number"],
#close-caixa-modal input[type="text"],
#close-caixa-modal input:not([type]) {
    border: none !important;
    border-bottom: 2px solid #cbd5e1 !important;
    border-radius: 0 !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease-in-out !important;
}

#close-caixa-modal input[type="number"]:focus,
#close-caixa-modal input[type="text"]:focus,
#close-caixa-modal input:focus {
    border-bottom-color: #ef4444 !important;
}

/* Ocultar os botões de ação do rodapé para manter apenas os atalhos em formato texto */
#close-caixa-prev-btn,
#close-caixa-next-btn,
#close-caixa-save-btn {
    display: none !important;
}

/* Modal de Ticket Digital de Fechamento */
#fechamento-ticket-modal {
    display: none;
    align-items: center;
    justify-content: center;
    background: #f1f5f9 !important; /* Cor sólida cinza claro */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10006;
}
#fechamento-ticket-modal.active {
    display: flex;
}

.ticket-container {
    background: #ffffff;
    border-radius: 20px;
    width: 370px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12); /* Sombra mais sutil no fundo cinza claro */
    position: relative;
    font-family: 'Outfit', 'Inter', sans-serif;
    padding-bottom: 15px;
    animation: ticketSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ticketSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.93);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Recortes Laterais do Ticket */
.ticket-container::before,
.ticket-container::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: #f1f5f9 !important; /* Mesma cor sólida cinza claro do fundo */
    border-radius: 50%;
    top: 145px; /* Alinhado com a linha pontilhada */
    z-index: 10;
}
.ticket-container::before {
    left: -12px;
}
.ticket-container::after {
    right: -12px;
}

/* Serrilhado na base do ticket */
.ticket-serrilhado-base {
    height: 12px;
    width: 100%;
    background-image: radial-gradient(circle, #f1f5f9 6px, #ffffff 6.5px); /* Preenche recorte com cinza sólido */
    background-size: 16px 12px;
    background-repeat: repeat-x;
    transform: rotate(180deg);
    position: absolute;
    bottom: -12px;
    left: 0;
    filter: drop-shadow(0 8px 6px rgba(0,0,0,0.06));
}

/* Ajuste de layout de tela cheia para a página de produtos e controle de scroll */
#produtos-page {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#produtos-page .card {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

#produtos-table-container.products-list-wrapper {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    max-height: none !important;
}

/* Paginação de Produtos */
.products-pagination-container {
    width: 100%;
    margin-top: 10px;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
}

.pagination-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.pagination-dot:hover {
    background-color: #94a3b8;
    transform: scale(1.2);
}

.pagination-dot.active {
    background-color: var(--primary-red);
    width: 16px;
    border-radius: 4px;
}

/* Animação Skeleton Shimmer */
.skeleton-shimmer {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s infinite linear;
}

@keyframes skeleton-pulse {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-row td {
    padding: 16px 12px !important;
    border-bottom: 1px solid #f1f5f9;
}

.skeleton-circle {
    display: block;
}

.skeleton-line {
    display: block;
}


/* --- Novo Seletor de Parcelas (Crediário) --- */
.installments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    max-height: 280px;
    overflow-y: auto;
}

.installment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f8fafc;
    border: 2px solid #f1f5f9;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: #1e293b;
}

.installment-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.installment-item.active {
    background: #fff1f2;
    border-color: var(--primary-red);
    color: #991b1b;
}

.interest-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 99px;
    text-transform: uppercase;
}

.interest-badge.free {
    background: #dcfce7;
    color: #15803d;
}

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

/* ==========================================================================
   NOVA ELETRO: ANIMAÇÕES, BRANDING E SELETORES CUSTOMIZADOS
   ========================================================================== */

/* --- ANIMAÇÃO DE ADIÇÃO AO CARRINHO --- */
@keyframes cartPulseRed {
    0% {
        background-color: rgba(220, 38, 38, 0.25);
    }
    100% {
        background-color: transparent;
    }
}
.cart-fallback-animation {
    animation: cartPulseRed 0.6s ease-in-out;
}

/* --- ESTILO DE ITEM REMOVIDO NO CARRINHO --- */
.item-removed-visual {
    opacity: 0.55;
    background-color: #f8fafc !important;
}
.item-removed-visual td {
    text-decoration: line-through;
    color: #94a3b8;
}
.item-removed-visual .btn-trash-item,
.item-removed-visual .prod-icon-box {
    text-decoration: none !important;
}

/* --- BRANDING SIMPLIFICADO --- */
.system-brand-fixed-simple {
    position: fixed;
    bottom: 12px;
    left: 20px;
    z-index: 999;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    pointer-events: none;
    letter-spacing: 0.5px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* --- SELETORES CUSTOMIZADOS (VENDEDOR E OPERADOR COM DIV E LI) --- */
.custom-selector-container {
    margin-bottom: 15px;
}
.custom-selector-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.custom-selector-label i {
    color: var(--primary-red);
}
.custom-select-box {
    position: relative;
    width: 100%;
}
.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.2s ease;
}
.custom-select-trigger:hover {
    border-color: var(--primary-red);
    background: #fff1f2;
}
.custom-select-box.active .custom-select-trigger {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(219, 0, 56, 0.15);
}
.custom-select-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    max-height: 150px;
    overflow-y: auto;
    z-index: 1000;
    padding: 6px;
    margin: 0;
    list-style: none;
    display: none;
}
.custom-select-box.active .custom-select-options {
    display: block;
}
.custom-select-options li {
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dark);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.custom-select-options li:hover {
    background: #fff1f2;
    color: var(--primary-red);
}
.custom-select-options li.selected {
    background: var(--primary-red);
    color: #ffffff;
    font-weight: 700;
}

/* --- FICHA DO CLIENTE (DUAS COLUNAS COM ABAS INTERNAS) --- */
.client-modal-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    height: 100%;
    min-height: 480px;
}
.client-profile-sidebar {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.client-avatar-container {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 5px;
}
.client-initial-avatar {
    width: 64px;
    height: 64px;
    border-radius: 8px; /* Quadrado com cantos levemente arredondados */
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.4rem;
    border: 1px solid #cbd5e1;
    box-shadow: none;
}
.client-identity-container {
    margin-bottom: 8px;
}
.client-name-container {
    display: inline;
    line-height: 1.6;
}
.client-name {
    display: inline;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    vertical-align: middle;
}
.client-badge-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
    margin-left: 6px;
}
.client-badge-container {
    display: inline-flex;
    align-items: center;
}
.client-contact-info-minimal {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto; /* Fixa no rodape */
}
.client-contact-info-minimal p {
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.client-contact-info-minimal i {
    color: #94a3b8;
    font-size: 1.1rem;
}
.sidebar-divider {
    border: 0;
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

/* Coluna Direita (Conteudo e Abas) */
.client-details-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}
.client-tab-body {
    flex: 1;
    background: #ffffff;
    border-radius: 8px;
    padding: 10px 0;
    overflow-y: auto;
}
.client-tab-content {
    display: none;
}
.client-tab-content.active {
    display: block;
}

/* Dropdown de Mais Acoes Extras */
.client-actions-dropdown-container {
    position: relative;
    display: inline-block;
}
.client-actions-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 6px;
    list-style: none;
    margin: 4px 0 0 0;
    min-width: 180px;
    z-index: 1000;
}
.client-actions-dropdown-menu.active {
    display: block;
}
.client-actions-dropdown-menu li {
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s ease;
}
.client-actions-dropdown-menu li:hover {
    background: #f1f5f9;
}
.client-actions-dropdown-menu li i {
    font-size: 1.1rem;
    color: #64748b;
}

/* Badges de Status do Cliente (Com texto) */
.client-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.client-badge.status-red {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.client-badge.status-yellow {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.client-badge.status-blue {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

/* Badge de Perda de Relacionamento */
.badge-perda-relacionamento {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(148, 163, 184, 0.15);
    color: #475569;
    border: 1px solid rgba(148, 163, 184, 0.3);
    letter-spacing: 0.3px;
}

/* Painel Financeiro Minimalista da Sidebar */
.client-sidebar-financial-panel {
    display: flex;
    flex-direction: column;
    margin: 16px 0 0 0;
}

.sidebar-balance-highlight {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
}

.sidebar-balance-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sidebar-balance-value {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
}

.sidebar-fin-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-fin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
}

.sidebar-fin-label {
    color: #64748b;
    font-weight: 500;
}

.sidebar-fin-value {
    color: var(--text-dark);
    font-weight: 700;
}
.sidebar-fin-value.highlighted {
    color: #d97706;
}

/* Card de Limite na Sidebar (Minimalista) */
.sidebar-limit-card {
    padding: 8px 0;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-limit-info {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    justify-content: space-between;
}

.progress-track {
    height: 6px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
    position: relative;
}
.progress-fill {
    height: 100%;
    background: var(--primary-red);
    width: 0%;
    transition: width 0.3s ease;
}

.sidebar-limit-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #64748b;
}

/* --- Padronização da Tabela de Carteira de Clientes --- */
.client-table-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0 auto;
    border: 1px solid #cbd5e1;
    text-transform: uppercase;
}

.status-badge-glass {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.status-badge-glass.no-limit {
    background: rgba(148, 163, 184, 0.15);
    color: #475569;
}
.status-badge-glass.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}
.status-badge-glass.ok {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
}

.client-table-col-avatar {
    padding-left: 10px !important;
    vertical-align: middle !important;
    text-align: center !important;
    width: 48px;
}
.client-table-col-code {
    vertical-align: middle !important;
    color: #64748b !important;
    font-family: monospace !important;
    width: 80px;
}
.client-table-col-name {
    vertical-align: middle !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
}
.client-table-col-due {
    vertical-align: middle !important;
    color: #64748b !important;
    width: 130px;
}
.client-table-col-status {
    text-align: center !important;
    vertical-align: middle !important;
    width: 80px;
}
.client-table-col-actions {
    text-align: center !important;
    vertical-align: middle !important;
    padding-right: 15px !important;
    width: 120px;
}
.client-table-action-btn {
    padding: 6px 10px !important;
    font-size: 1.1rem !important;
    min-width: auto !important;
    border-radius: 8px !important;
}
.client-table-action-btn.pay-btn {
    background: #10b981 !important;
    border-color: #10b981 !important;
}
