/* ══════════════════════════════════════════════════════════════
   ── ESTILOS DO MÓDULO CAIXA ─────────────────────────────────────
   ══════════════════════════════════════════════════════════════ */

.caixa-table-container {
    /* Removido overflow-x: auto para evitar barra de rolagem */
}

.caixa-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    table-layout: fixed;
}

.caixa-table-header {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.caixa-table th {
    padding: 12px 8px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    border: none;
    /* Removido white-space: nowrap para permitir quebra */
    word-break: break-word;
    vertical-align: top;
}

/* Larguras específicas para cada coluna */
.caixa-table th:nth-child(1),
.caixa-table td:nth-child(1) { width: 15%; } /* Código */

.caixa-table th:nth-child(2),
.caixa-table td:nth-child(2) { width: 12%; } /* Status */

.caixa-table th:nth-child(3),
.caixa-table td:nth-child(3) { width: 15%; } /* Apostador */

.caixa-table th:nth-child(4),
.caixa-table td:nth-child(4) { width: 15%; } /* Valor Apostado */

.caixa-table th:nth-child(5),
.caixa-table td:nth-child(5) { width: 13%; } /* Comissão */

.caixa-table th:nth-child(6),
.caixa-table td:nth-child(6) { width: 13%; } /* Prêmio */

.caixa-table th:nth-child(7),
.caixa-table td:nth-child(7) { width: 15%; }  /* Data */

.caixa-table td {
    padding: 12px 8px;
    font-size: 12px;
    border: none;
    word-break: break-word;
    vertical-align: top;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.caixa-table-row {
    cursor: pointer;
    transition: all 0.2s ease;
}

.caixa-table-row:hover {
    opacity: 0.8;
}

/* ── Cores por Status ────────────────────────────────────────── */
.status-aguardando {
    background: rgba(92, 107, 192, 0.50);
    border: 1px solid rgba(92, 107, 192, 0.3);
}

.status-ganhou {
    background: rgba(102, 187, 106, 0.50);
    border: 1px solid rgba(102, 187, 106, 0.3);
}

.status-perdeu {
    background: rgba(239, 83, 80, 0.50);
    border: 1px solid rgba(239, 83, 80, 0.3);
}

.status-cancelado {
    background: rgba(171, 71, 188, 0.50);
    border: 1px solid rgba(171, 71, 188, 0.3);
}

.status-conferencia {
    background: rgba(255, 167, 38, 0.50);
    border: 1px solid rgba(255, 167, 38, 0.3);
}

.status-default {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Estilos de Texto ────────────────────────────────────────── */
.codigo-celula {
    color: #4fd1c7;
    font-weight: 600;
    font-size: 13px;
    word-break: break-word;
    vertical-align: top;
    line-height: 1.3;
}

/* ══════════════════════════════════════════════════════════════
   ── ESTILOS MOVIDOS DO PRE-APP.CSS ──────────────────────────────
   ══════════════════════════════════════════════════════════════ */

/* Estilos para o módulo de caixa */
.caixa-container {
    padding: 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
    max-width: 100vw;
}

.caixa-header {
    text-align: center;
    margin-bottom: 10px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.caixa-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.caixa-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 500;
}

.caixa-stats {
    display: block;
    margin-bottom: 10px;
}

/* ── Resumo Cards - Nova Estrutura ──────────────────────────── */
.caixa-resumo {
    display: block;
    margin-bottom: 10px;
}

.resumo-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.resumo-section-title {
    font-weight: 700;
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 15px;
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.resumo-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 5px;
}

.resumo-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.resumo-card {
    text-align: center;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.resumo-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.resumo-value {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #ffffff;
}

.resumo-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.caixa-list {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.caixa-list-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 12px;
}

.caixa-list-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.caixa-list-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.caixa-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.caixa-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.caixa-id {
    font-size: 16px;
    font-weight: 600;
    color: #4fd1c7;
}

.caixa-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
}

.caixa-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.caixa-apostador {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.caixa-valores {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.caixa-valor {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.caixa-comissao {
    font-size: 14px;
    font-weight: 600;
    color: #4fd1c7;
}

.caixa-data {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.caixa-table-row:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-1px);
}

/* Estilos para valores monetários */
.valor-monetario {
    color: #4fd1c7;
    font-weight: 500;
}

.simbolo-real {
    color: inherit;
}

/* Controle de visibilidade do status */
.status-celula .status-sigla {
    display: none;
}

.status-celula .status-completo {
    display: inline;
}

/* Responsivo para caixa */
@media (max-width: 768px) {
    .caixa-container {
        padding: 4px;
        overflow-x: hidden;
    }
    
    .caixa-list {
        padding: 2px;        
    }
 
    .caixa-table td {
        padding: 4px 2px;
    }

    .caixa-header {
        margin-bottom: 10px;
        padding: 5px 20px;
    }
    
    .caixa-title {
        font-size: 24px;
        margin-bottom: 5px;
    }
    
    .caixa-subtitle {
        font-size: 13px;
    }
    
    .caixa-stats {
        margin-bottom: 10px;
    }
    
    .caixa-resumo {
        margin-bottom: 10px;
    }
    
    .resumo-section {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .resumo-section-title {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .resumo-row-2, .resumo-row-3 {
        gap: 10px;
    }
    
    .resumo-card {
        padding: 10px 6px;
    }
    
    .resumo-value {
        font-size: 14px;
    }
    
    .resumo-label {
        font-size: 10px;
    }
    
   
    .resumo-value {
        font-size: 16px;
        margin-bottom: 3px;
    }
    
    .resumo-label {
        font-size: 11px;
    }
    
    /* Cabeçalho da tabela mantido visível em Mobile */
    
    .caixa-table-row {
        /* Manter estrutura de tabela normal */
    }
    
    /* Ajustes de responsividade para mobile */
    .caixa-table th,
    .caixa-table td {
        padding: 8px 4px;
        font-size: 11px;
    }
    
    /* Ocultar símbolo R$ em telas pequenas para economizar espaço */
    .valor-monetario .simbolo-real {
        display: none;
    }
    


    /* Trocar status completo por sigla em telas pequenas */
    .status-celula .status-completo {
        display: none;
    }   
    .status-celula .status-sigla {
        display: inline;
    }
}

/* Para telas muito pequenas - ajustes adicionais */
@media (max-width: 480px) {
    .caixa-table th,
    .caixa-table td {
        padding: 6px 3px;
        font-size: 10px;
    }
    
    .codigo-celula {
        font-size: 11px;
    }
    
    /* Garantir que R$ não apareça em telas muito pequenas */
    .valor-monetario .simbolo-real {
        display: none !important;
    }
    
    /* Garantir que apenas siglas apareçam em telas muito pequenas */
    .status-celula .status-completo {
        display: none !important;
    }    
    .status-celula .status-sigla {
        display: inline !important;
    }
}

/* ── Estilos dos Filtros ──────────────────────────────────────── */
.caixa-filtros-container {
    display: grid;
    grid-template-columns: 2fr 2fr 2fr;
    gap: 15px;
    align-items: center;
    margin-top: 8px;
    width: 100%;
}

.caixa-filtro-periodo-container,
.caixa-filtro-apostador-container {
    position: relative;
    width: 100%;
}

.caixa-filtro-input {
    background: #243b73;
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 8px;
    padding: 9px 12px 9px 38px;
    color: #ffffff;
    font-size: 12px;
    outline: none;
    width: 100%;
    text-align: left;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
    height: 36px;
    box-sizing: border-box;
}

.caixa-filtro-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    text-align: left;
}

.caixa-filtro-input:focus {
    border-color: rgba(102, 126, 234, 0.8);
    background: #2e4d8f;
}

.filtro-periodo-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: rgba(255,255,255,0.7);
    pointer-events: none;
    z-index: 1;
}

.filtros-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

.caixa-btn {
    background: linear-gradient(135deg, #2d5aa0, #1e3c72);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 9px 18px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    box-sizing: border-box;
    white-space: nowrap;
    min-width: 90px;
}

.caixa-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.caixa-btn.btn-limpar {
    background: linear-gradient(135deg, #1a2d5a, #0f1832);
}

.caixa-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-filtrar:hover {
    background: linear-gradient(135deg, #3666c7, #2448a0);
}

.btn-limpar:hover {
    background: linear-gradient(135deg, #243b73, #152447);
}

/* Garantir que o texto dos botões seja sempre visível */
.btn-text {
    display: inline !important;
}

/* ── Layout Responsivo dos Filtros ────────────────────────────────────── */
@media (max-width: 768px) {
    .caixa-filtros-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .caixa-filtro-input {
        font-size: 11px;
        padding: 9px 10px 9px 32px;
    }
    
    .filtros-actions {
        justify-content: center;
        gap: 15px;
        width: 100%;
    }    
}

@media (max-width: 480px) {
    .filtros-actions {
        gap: 12px;
    }
    
}