/* ============================================
   COMPONENTES - DESIGN PROFISSIONAL
   ============================================ */

/* Container Principal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    margin-left: 240px;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* ============================================
   HEADER
   ============================================ */

.header {
    background: var(--bg-gradient);
    color: var(--white);
    padding: var(--spacing-lg) var(--spacing-xl);
}

.header h1 {
    font-size: var(--font-size-title);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.header-info {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.header-info-center {
    justify-content: center;
}

.header-input {
    padding: 10px 14px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-small);
    background: var(--white);
    color: var(--gray-700);
    min-width: 180px;
    transition: box-shadow var(--transition-fast);
}

.header-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

/* ============================================
   SIDEBAR / NAVEGACAO VERTICAL
   ============================================ */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: linear-gradient(180deg, #4F46E5 0%, #3730A3 100%);
    display: flex;
    flex-direction: column;
    z-index: 200;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-logo {
    padding: var(--spacing-lg) var(--spacing-md);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-weight: 700;
    font-size: var(--font-size-base);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.sidebar-logo .icon {
    width: 22px;
    height: 22px;
    stroke: var(--white);
    flex-shrink: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-sm) 0;
    flex: 1;
}

.nav-tab {
    padding: 12px var(--spacing-lg);
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    font-size: var(--font-size-base);
    font-weight: 500;
    transition: all var(--transition-fast);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.icon-lg {
    width: 24px;
    height: 24px;
}

.nav-tab:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    border-left-color: rgba(255, 255, 255, 0.3);
}

.nav-tab.active {
    color: var(--white);
    border-left-color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    font-weight: 600;
}

/* Toggle sidebar mobile */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 201;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-sm);
    width: 40px;
    height: 40px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-md);
}

/* Overlay mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
}

/* ============================================
   TABS
   ============================================ */

.tab-content {
    display: none;
    padding: var(--spacing-xl);
    background: var(--bg-surface);
}

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

/* ============================================
   SECTIONS
   ============================================ */

.section {
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-xs);
}

.sections-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.sections-grid-2 .section {
    margin-bottom: 0;
}

@media (min-width: 1100px) {
    .sections-grid-2 {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.section-title {
    background: var(--gray-800);
    color: var(--white);
    padding: var(--spacing-md) var(--spacing-lg);
    font-weight: 600;
    font-size: var(--font-size-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-subtitle {
    color: var(--gray-700);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-base);
    font-weight: 600;
}

.section-content {
    padding: var(--spacing-lg);
}

/* ============================================
   CAIXAS
   ============================================ */

.caixas-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: var(--spacing-lg);
}

.caixa-box {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 0;
    background: var(--white);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition-smooth), transform var(--transition-smooth);
}

.caixa-box:hover {
    border-color: var(--gray-200);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.caixa-box h3 {
    color: var(--white);
    background: var(--primary-color);
    margin: 0;
    padding: var(--spacing-md);
    text-align: center;
    font-size: var(--font-size-base);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.caixa-box .field-group:first-of-type {
    margin-top: var(--spacing-md);
}

.field-group {
    margin: 0 var(--spacing-md) var(--spacing-sm);
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
}

.field-group label {
    font-weight: 500;
    color: var(--gray-600);
    font-size: var(--font-size-small);
}

.field-group input {
    width: 100px;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    text-align: right;
    font-size: var(--font-size-small);
    transition: all var(--transition-fast);
    background: var(--white);
}

.field-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.field-text {
    text-align: left;
    width: 160px;
}

.field-hidden {
    display: none;
}

/* Campo em destaque (TOTAL e SISTEMA) */
.field-destaque {
    background: #fef9c3;
    border: 1px solid #fde047;
    margin: var(--spacing-sm) var(--spacing-md);
    padding: 10px 12px;
}

.field-destaque label {
    color: #854d0e;
    font-weight: 600;
}

.field-destaque .input-money {
    border-color: #facc15;
    background: var(--white);
}

.field-destaque .money-prefix {
    background: #fde047;
    color: #713f12;
    border-color: #facc15;
}

/* Campo calculado automaticamente */
.input-auto {
    background: var(--gray-100);
}

.input-auto input {
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: not-allowed;
}

.input-money {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--white);
    width: 130px;
    overflow: hidden;
}

.input-money:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.money-prefix {
    padding: 6px 8px;
    background: var(--gray-100);
    color: var(--gray-500);
    font-weight: 500;
    font-size: var(--font-size-small);
    border-right: 1px solid var(--border-color);
}

.money-suffix {
    padding: 6px 8px;
    background: var(--gray-100);
    color: var(--gray-500);
    font-weight: 500;
    font-size: var(--font-size-small);
    border-left: 1px solid var(--border-color);
}

.input-money input {
    width: 100%;
    border: none;
    padding: 6px 8px;
    text-align: right;
    font-size: var(--font-size-small);
    background: transparent;
}

.input-money input:focus {
    outline: none;
}

/* Remove setas do input number */
.input-money input::-webkit-outer-spin-button,
.input-money input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-money input[type=number] {
    -moz-appearance: textfield;
}

.total-box {
    background: var(--primary-color);
    color: var(--white);
    padding: var(--spacing-md);
    margin: var(--spacing-md);
    border-radius: var(--border-radius-sm);
    text-align: right;
    font-weight: 600;
    font-size: var(--font-size-base);
}

/* ============================================
   TABELAS
   ============================================ */

.table-container {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: var(--spacing-md);
}

.summary-item label {
    display: block;
    margin-bottom: 6px;
    color: var(--gray-700);
    font-weight: 600;
}

.summary-item .input-money {
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    background: var(--gray-50);
    color: var(--gray-700);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

tr:hover {
    background: var(--gray-50);
}

tr:last-child td {
    border-bottom: none;
}

td input,
td select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-small);
    background: var(--white);
    transition: all var(--transition-fast);
}

td input:focus,
td select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

td select {
    cursor: pointer;
}

/* Ajuste de colunas (Entradas/Saidas) */
#entradasTable th:nth-child(1),
#entradasTable td:nth-child(1),
#saidasTable th:nth-child(1),
#saidasTable td:nth-child(1) {
    width: 180px;
}

#entradasTable th:nth-child(2),
#entradasTable td:nth-child(2),
#saidasTable th:nth-child(2),
#saidasTable td:nth-child(2) {
    width: auto;
}

#entradasTable th:nth-child(3),
#entradasTable td:nth-child(3),
#saidasTable th:nth-child(3),
#saidasTable td:nth-child(3) {
    width: 130px;
}

.table-col-actions {
    width: 50px;
    text-align: center;
}

/* Botoes de linha */
.btn-add-saida {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-small);
    font-weight: 500;
    cursor: pointer;
    margin-top: var(--spacing-md);
    transition: all var(--transition-fast);
}

.btn-add-saida:hover {
    background: var(--primary-dark);
}

.btn-remove-saida {
    background: var(--error-color);
    color: var(--white);
    border: none;
    width: 26px;
    height: 26px;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-saida:hover {
    background: #b91c1c;
}

/* ============================================
   BOTOES
   ============================================ */

.btn-container {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-top: var(--spacing-xl);
    flex-wrap: wrap;
    padding-bottom: var(--spacing-md);
}

.btn {
    padding: 10px 20px;
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-small);
    font-weight: 600;
    transition: all var(--transition-smooth);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
    opacity: 0;
}

.btn:active::after {
    width: 300px;
    height: 300px;
    opacity: 0;
    transition: 0s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

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

.btn-save:hover {
    background: var(--success-dark);
}

.btn-export-excel {
    background: #16a34a;
}

.btn-export-excel:hover {
    background: #15803d;
}

.btn-export-pdf {
    background: var(--error-color);
}

.btn-export-pdf:hover {
    background: #b91c1c;
}

.btn-copy-resumo {
    background: #6366f1;
}

.btn-copy-resumo:hover {
    background: #4f46e5;
}

.btn-print {
    background: var(--secondary-color);
}

.btn-print:hover {
    background: var(--secondary-dark);
}

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

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

.btn-secondary {
    background: var(--gray-500);
}

.btn-secondary:hover {
    background: var(--gray-600);
}

/* ============================================
   MENSAGENS
   ============================================ */

.success-message {
    background: var(--success-color);
    color: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-sm);
    text-align: center;
    margin: var(--spacing-md);
    display: none;
    font-weight: 500;
}

.success-message.show {
    display: block;
    animation: fadeIn var(--transition-normal);
}

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

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: var(--z-index-modal);
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-overlay.active .modal-box {
    animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-box {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.modal-box h2 {
    color: var(--gray-800);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-large);
}

.modal-box p {
    color: var(--gray-500);
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-small);
}

.modal-input {
    width: 100%;
    padding: 12px;
    margin: var(--spacing-sm) 0;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-base);
}

.modal-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.modal-buttons {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.modal-buttons .btn {
    flex: 1;
    padding: 12px;
    justify-content: center;
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.dashboard-filter-row {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    align-items: center;
}

.dashboard-filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
}

.dashboard-filter-item label {
    font-size: var(--font-size-small);
    color: var(--gray-600);
    font-weight: 600;
}

.dashboard-filter-item select,
.dashboard-filter-item input[type="date"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-small);
    background: var(--white);
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition-smooth), transform var(--transition-smooth);
}

.stat-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.stat-card-primary {
    border-left: 4px solid var(--primary-color);
}

.stat-card-success {
    border-left: 4px solid var(--success-color);
}

.stat-card-warning {
    border-left: 4px solid var(--warning-color);
}

.stat-card-info {
    border-left: 4px solid #0ea5e9;
}

.stat-card-accent {
    border-left: 4px solid #7c3aed;
}

.stat-card h3 {
    font-size: var(--font-size-small);
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-sm);
}

.stat-card .value {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: var(--letter-spacing-tight);
}

.stat-subtitle {
    font-size: var(--font-size-small);
    color: var(--gray-500);
    margin-top: var(--spacing-xs);
}

.loja-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-sm);
    background: var(--white);
    transition: all var(--transition-smooth);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.loja-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.loja-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--gray-50);
    border-bottom: 1px solid var(--border-color);
}

.loja-card-header h3 {
    color: var(--gray-800);
    font-size: var(--font-size-base);
    font-weight: 600;
    margin: 0;
}

.loja-card-body {
    padding: var(--spacing-md);
}

.loja-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed var(--gray-200);
}

.loja-info-row:last-child {
    border-bottom: none;
}

.loja-info-label {
    font-size: var(--font-size-small);
    color: var(--gray-500);
}

.loja-info-value {
    font-size: var(--font-size-small);
    color: var(--gray-800);
    font-weight: 500;
}

.loja-pendente {
    color: var(--warning-color);
}

.loja-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-small);
    color: var(--gray-500);
}

/* Grid de lojas */
.lojas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: var(--spacing-md);
}

.status-badge {
    padding: 4px 12px;
    border-radius: var(--border-radius-full);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-ok {
    background: var(--status-ok-bg);
    color: var(--status-ok-text);
}

.status-pending {
    background: var(--status-pending-bg);
    color: var(--status-pending-text);
}

.status-alert {
    background: var(--status-alert-bg);
    color: var(--status-alert-text);
}

/* ============================================
   UTILITARIOS
   ============================================ */

.page-title {
    color: var(--gray-800);
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    letter-spacing: var(--letter-spacing-tight);
}

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

.is-hidden {
    display: none !important;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

/* ============================================
   PAGINA DE CONFERENCIA
   ============================================ */

.hidden {
    display: none !important;
}

.icon-xl {
    width: 48px;
    height: 48px;
}

/* Estado vazio */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    color: var(--gray-400);
    min-height: 300px;
}

.empty-state p {
    margin-top: var(--spacing-md);
    font-size: var(--font-size-base);
}

/* Status do caixa */
.status-box {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    margin-bottom: var(--spacing-lg);
}

.status-box.status-ok {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 2px solid #22c55e;
}

.status-box.status-divergencia {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
}

.status-box.status-pendente {
    background: linear-gradient(135deg, #fefce8 0%, #fef08a 100%);
    border: 2px solid #eab308;
}

.status-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.status-ok .status-icon {
    color: #22c55e;
}

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

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

.status-info {
    flex: 1;
}

.status-label {
    display: block;
    font-size: var(--font-size-small);
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    display: block;
    font-size: var(--font-size-xlarge);
    font-weight: 700;
    color: var(--gray-800);
}

.status-diferenca {
    text-align: right;
}

/* Grid de informacoes */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.info-item {
    padding: var(--spacing-md);
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
}

.info-item label {
    display: block;
    font-size: var(--font-size-small);
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-item span {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--gray-800);
}

/* Caixas na conferencia */
.caixas-conferencia {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: var(--spacing-lg);
}

.caixa-conferencia {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.caixa-header {
    background: var(--primary-color);
    color: var(--white);
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.caixa-titulo {
    font-size: var(--font-size-base);
    font-weight: 600;
    text-transform: uppercase;
    margin: 0;
    color: var(--white);
}

/* Status individual do caixa */
.caixa-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-small);
    font-weight: 600;
}

.caixa-status .icon {
    width: 16px;
    height: 16px;
}

.caixa-status.status-ok {
    background: #dcfce7;
    color: #166534;
}

.caixa-status.status-sobra {
    background: #fef3c7;
    color: #92400e;
}

.caixa-status.status-falta {
    background: #fee2e2;
    color: #991b1b;
}

.caixa-status .status-valor {
    font-weight: 700;
}

.caixa-campos {
    padding: var(--spacing-md);
}

.campo-conferencia {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 4px;
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
}

.campo-conferencia.destaque {
    background: #fef9c3;
    border: 1px solid #fde047;
}

.campo-conferencia.positivo {
    background: #dcfce7;
}

.campo-conferencia.negativo {
    background: #fef2f2;
}

.campo-label {
    font-size: var(--font-size-small);
    color: var(--gray-600);
    font-weight: 500;
}

.campo-valor {
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--gray-800);
}

.campo-conferencia.positivo .campo-valor {
    color: #16a34a;
}

.campo-conferencia.negativo .campo-valor {
    color: #dc2626;
}

/* Campo editavel na conferencia */
.campo-conferencia.campo-editavel {
    background: #e0f2fe;
    border: 1px solid #0ea5e9;
}

.input-sistema {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--white);
    width: 120px;
    overflow: hidden;
}

.input-sistema .money-prefix {
    padding: 4px 6px;
    background: var(--gray-100);
    color: var(--gray-500);
    font-weight: 500;
    font-size: var(--font-size-small);
    border-right: 1px solid var(--border-color);
}

.input-sistema input {
    width: 100%;
    border: none;
    padding: 4px 6px;
    text-align: right;
    font-size: var(--font-size-small);
    font-weight: 600;
    background: transparent;
}

.input-sistema input:focus {
    outline: none;
}

.input-sistema:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

/* Tabela vazia */
.empty-table {
    text-align: center;
    color: var(--gray-400);
    font-style: italic;
    padding: var(--spacing-lg) !important;
}

/* Resumo conferencia */
.summary-grid-conferencia {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-md);
}

.summary-item-conf {
    padding: var(--spacing-md);
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
    text-align: center;
}

.summary-item-conf.destaque {
    background: var(--primary-color);
    color: var(--white);
}

.summary-item-conf label {
    display: block;
    font-size: var(--font-size-small);
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.summary-item-conf.destaque label {
    color: rgba(255, 255, 255, 0.8);
}

.summary-item-conf .valor {
    font-size: var(--font-size-large);
    font-weight: 700;
    color: var(--gray-800);
}

.summary-item-conf.destaque .valor {
    color: var(--white);
}

.summary-item-conf .valor.positivo {
    color: #16a34a;
}

.summary-item-conf .valor.negativo {
    color: #dc2626;
}

/* Textarea de observacoes */
.textarea-obs {
    width: 100%;
    min-height: 100px;
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-base);
    font-family: inherit;
    resize: vertical;
    margin-bottom: var(--spacing-md);
}

.textarea-obs:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

/* Acoes da conferencia */
.conferencia-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.btn-success {
    background: #22c55e;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-danger {
    background: #ef4444;
}

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

/* ============================================
   VERIFICACAO DE CAIXA
   ============================================ */

.verificacao-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

@media (max-width: 768px) {
    .verificacao-grid {
        grid-template-columns: 1fr;
    }
}

.verificacao-coluna {
    background: var(--gray-50);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md);
}

.verificacao-titulo {
    font-size: var(--font-size-small);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid currentColor;
}

.verificacao-titulo.positivo {
    color: #16a34a;
}

.verificacao-titulo.negativo {
    color: #dc2626;
}

.verificacao-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: var(--font-size-small);
    border-bottom: 1px solid var(--border-color);
}

.verificacao-item:last-of-type {
    border-bottom: none;
}

.verificacao-item.campo-editavel-conf {
    background: #e0f2fe;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    margin: 4px 0;
    border: 1px solid #0ea5e9;
}

.verificacao-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm);
    margin-top: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-weight: 700;
}

.verificacao-subtotal.positivo {
    background: #dcfce7;
    color: #166534;
}

.verificacao-subtotal.negativo {
    background: #fee2e2;
    color: #991b1b;
}

.verificacao-resultado {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

@media (max-width: 768px) {
    .verificacao-resultado {
        grid-template-columns: 1fr;
    }
}

.resultado-item {
    background: var(--gray-100);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-lg);
    text-align: center;
}

.resultado-item.destaque {
    background: var(--primary-color);
    color: var(--white);
}

.resultado-item.destaque.bateu {
    background: #22c55e;
}

.resultado-item.destaque.divergencia {
    background: #ef4444;
}

.resultado-label {
    display: block;
    font-size: var(--font-size-small);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    opacity: 0.8;
}

.resultado-valor {
    display: block;
    font-size: var(--font-size-xlarge);
    font-weight: 700;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: var(--z-index-toast);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--success-color);
    min-width: 300px;
    max-width: 420px;
    pointer-events: auto;
    animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.toast.toast-removing {
    animation: slideOutRight 0.3s ease-in forwards;
}

.toast-success { border-left-color: var(--success-color); }
.toast-error { border-left-color: var(--error-color); }
.toast-warning { border-left-color: var(--warning-color); }
.toast-info { border-left-color: var(--primary-color); }

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-success .toast-icon { color: var(--success-color); }
.toast-error .toast-icon { color: var(--error-color); }
.toast-warning .toast-icon { color: var(--warning-color); }
.toast-info .toast-icon { color: var(--primary-color); }

.toast-content { flex: 1; }

.toast-title {
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--gray-800);
}

.toast-message {
    font-size: var(--font-size-small);
    color: var(--gray-500);
    margin-top: 2px;
}

.toast-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--gray-400);
    border-radius: var(--border-radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
    font-size: 14px;
    line-height: 1;
}

.toast-close:hover {
    color: var(--gray-600);
    background: var(--gray-100);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 4px;
    right: 0;
    height: 3px;
    border-radius: 0 0 var(--border-radius-lg) 0;
}

.toast-success .toast-progress { background: var(--success-color); }
.toast-error .toast-progress { background: var(--error-color); }
.toast-warning .toast-progress { background: var(--warning-color); }
.toast-info .toast-progress { background: var(--primary-color); }

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ============================================
   DEBITO FUNCIONARIO - LISTA DINAMICA
   ============================================ */

.debito-fun-lista {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.debito-fun-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.debito-fun-item .debito-fun-nome {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-small);
    font-family: inherit;
}

.debito-fun-item .input-money {
    width: 120px;
    min-width: 120px;
}

.btn-add-debito-fun {
    background: none;
    color: var(--primary-color);
    border: 1px dashed var(--primary-color);
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 4px;
    transition: all var(--transition-fast);
}

.btn-add-debito-fun:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ============================================
   NOTIFICACOES - MODAL
   ============================================ */

.modal-notificacoes {
    max-width: 520px;
    width: 90%;
}

.modal-notificacoes h2 {
    color: var(--error-color);
    margin-bottom: 16px;
}

.notificacoes-lista {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.notificacao-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 14px;
    background: var(--bg-light, #f9fafb);
}

.notificacao-reprovacao {
    border-left: 4px solid var(--error-color);
}

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

.notificacao-header strong {
    color: var(--error-color);
    font-size: 14px;
}

.notificacao-hora {
    font-size: 12px;
    color: var(--text-muted, #6b7280);
}

.notificacao-corpo p {
    margin: 4px 0;
    font-size: 13px;
    line-height: 1.5;
}

.notificacao-corpo p strong {
    color: var(--text-color, #1f2937);
}

/* ============================================
   BANNER FECHAMENTO APROVADO
   ============================================ */

.banner-aprovado {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    border-left: 4px solid var(--success-color);
    color: #065f46;
    padding: 12px 18px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
}
