/**
 * ╔══════════════════════════════════════════════════════════════════════════╗
 * ║          RURAL CAFÉ - ABA FINANCEIRO CLIENTE - DESIGN MODERNO            ║
 * ║          Sistema de Conta Corrente e Acertos Financeiros                ║
 * ║          Versão: 1.0                                                     ║
 * ╚══════════════════════════════════════════════════════════════════════════╝
 */

/* ========================================================================
   CONTAINER PRINCIPAL - ABA FINANCEIRO
   ======================================================================== */

.financeiro-cliente-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ========================================================================
   CABEÇALHO COM SELETOR E SALDO
   ======================================================================== */

.financeiro-header-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    color: white;
    position: relative;
    overflow: hidden;
}

.financeiro-header-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.financeiro-header-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.financeiro-cliente-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.financeiro-cliente-selector label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.financeiro-cliente-selector select {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    color: white;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.financeiro-cliente-selector select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.financeiro-cliente-selector select option {
    background: #764ba2;
    color: white;
}

/* Saldo do Cliente */
.financeiro-saldo-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.financeiro-saldo-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.financeiro-saldo-valor {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
}

.financeiro-saldo-icon {
    font-size: 2rem;
    opacity: 0.9;
}

.financeiro-saldo-descricao {
    font-size: 0.875rem;
    opacity: 0.8;
    text-align: right;
}

/* ========================================================================
   ABAS DE NAVEGAÇÃO
   ======================================================================== */

.financeiro-tabs {
    display: flex;
    gap: 1rem;
    background: white;
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.financeiro-tab {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.financeiro-tab i {
    font-size: 1.125rem;
}

.financeiro-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.financeiro-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

/* ========================================================================
   CARDS DE CONTEÚDO
   ======================================================================== */

.financeiro-content-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.financeiro-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.financeiro-content-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

/* ========================================================================
   FILTROS
   ======================================================================== */

.financeiro-filtros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
}

.financeiro-filtro-grupo {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.financeiro-filtro-grupo label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.financeiro-filtro-grupo select,
.financeiro-filtro-grupo input {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.financeiro-filtro-grupo select:focus,
.financeiro-filtro-grupo input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.financeiro-btn-filtrar {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.financeiro-btn-filtrar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* ========================================================================
   TABELAS
   ======================================================================== */

.financeiro-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.financeiro-table thead {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.financeiro-table thead th {
    padding: 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #667eea;
}

.financeiro-table thead th:first-child {
    border-top-left-radius: 12px;
}

.financeiro-table thead th:last-child {
    border-top-right-radius: 12px;
}

.financeiro-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.financeiro-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: scale(1.01);
}

.financeiro-table tbody td {
    padding: 1rem;
    font-size: 0.9375rem;
}

/* ========================================================================
   BADGES E STATUS
   ======================================================================== */

.financeiro-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.financeiro-badge-credito {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.25);
}

.financeiro-badge-debito {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(235, 51, 73, 0.25);
}

.financeiro-badge-rascunho {
    background: #e0e0e0;
    color: #666;
}

.financeiro-badge-confirmado {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(250, 112, 154, 0.25);
}

.financeiro-badge-pago {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.25);
}

.financeiro-badge-cancelado {
    background: #f44336;
    color: white;
}

/* ========================================================================
   VALORES (CRÉDITO E DÉBITO)
   ======================================================================== */

.financeiro-valor-credito {
    color: #11998e;
    font-weight: 700;
}

.financeiro-valor-debito {
    color: #eb3349;
    font-weight: 700;
}

.financeiro-valor-saldo {
    font-weight: 800;
    font-size: 1.125rem;
}

/* ========================================================================
   BOTÕES DE AÇÃO
   ======================================================================== */

.financeiro-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.financeiro-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.financeiro-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.financeiro-btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

.financeiro-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.4);
}

.financeiro-btn-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.financeiro-btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.financeiro-btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(235, 51, 73, 0.3);
}

.financeiro-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(235, 51, 73, 0.4);
}

/* ========================================================================
   ESTADOS DE LOADING E EMPTY
   ======================================================================== */

.financeiro-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #999;
}

.financeiro-loading i {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.financeiro-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #999;
}

.financeiro-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.financeiro-empty-message {
    font-size: 1.125rem;
    font-weight: 600;
    color: #666;
}

/* ========================================================================
   ALERTAS
   ======================================================================== */

.financeiro-alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.financeiro-alert i {
    font-size: 1.5rem;
}

.financeiro-alert-info {
    background: rgba(79, 172, 254, 0.1);
    border-left: 4px solid #4facfe;
    color: #0c5460;
}

.financeiro-alert-warning {
    background: rgba(250, 112, 154, 0.1);
    border-left: 4px solid #fa709a;
    color: #856404;
}

.financeiro-alert-danger {
    background: rgba(235, 51, 73, 0.1);
    border-left: 4px solid #eb3349;
    color: #721c24;
}

.financeiro-alert-success {
    background: rgba(17, 153, 142, 0.1);
    border-left: 4px solid #11998e;
    color: #155724;
}

/* ========================================================================
   RESPONSIVIDADE
   ======================================================================== */

@media (max-width: 768px) {
    .financeiro-header-content {
        grid-template-columns: 1fr;
    }

    .financeiro-saldo-display {
        align-items: flex-start;
    }

    .financeiro-saldo-descricao {
        text-align: left;
    }

    .financeiro-tabs {
        flex-direction: column;
    }

    .financeiro-filtros {
        grid-template-columns: 1fr;
    }

    .financeiro-table {
        font-size: 0.875rem;
    }

    .financeiro-table thead th,
    .financeiro-table tbody td {
        padding: 0.75rem 0.5rem;
    }
}
