/* ===== RESET E VARIÁVEIS ===== */
:root {
    --grafite-900: #0A0C0F;
    --grafite-800: #14181C;
    --grafite-700: #1E2429;
    --grafite-600: #2A2F35;
    --grafite-500: #3A424A;
    --grafite-400: #9AA3AD;
    --grafite-300: #BCC3CD;
    --grafite-200: #D8DEE6;
    --grafite-100: #E8E9EA;
    
    --rosa-500: #FF3366;
    --rosa-400: #FF6699;
    --rosa-300: #FF99CC;
    --rosa-200: #FFCCFF;
    --rosa-100: #FFF0F5;
    
    --success: #28a745;
    --success-dark: #1e7e34;
    --danger: #dc3545;
    --danger-dark: #bd2130;
    --warning: #ffc107;
    --info: #17a2b8;
    
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--grafite-900);
    color: var(--grafite-100);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* ===== HEADER ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--grafite-700);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 50px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--grafite-100);
    background: linear-gradient(135deg, var(--rosa-500), var(--rosa-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== USER AREA ===== */
.user-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-email {
    color: var(--grafite-300);
    font-size: 0.95rem;
}

/* ===== AUTH CARDS ===== */
.auth-container {
    max-width: 450px;
    margin: 2rem auto;
}

.auth-card {
    background: var(--grafite-800);
    border: 1px solid var(--grafite-700);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    display: none;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rosa-500), var(--rosa-400));
}

.auth-card.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.auth-card h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--grafite-100);
}

.auth-card h2 i {
    color: var(--rosa-500);
    margin-right: 0.5rem;
}

.auth-subtitle {
    color: var(--grafite-400);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--grafite-400);
}

.auth-link a {
    color: var(--rosa-500);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-link a:hover {
    color: var(--rosa-400);
    text-decoration: underline;
}

/* ===== MESSAGES ===== */
.message {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message.error {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid var(--danger);
    color: #ff8a92;
}

.message.success {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid var(--success);
    color: #98e0a8;
}

.message i {
    font-size: 1.1rem;
}

/* ===== TABS NAVIGATION ===== */
.tabs-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--grafite-800);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--grafite-700);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--grafite-400);
    padding: 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn i {
    font-size: 1.2rem;
}

.tab-btn:hover {
    background: var(--grafite-700);
    color: var(--grafite-200);
}

.tab-btn.active {
    background: var(--rosa-500);
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

/* ===== CARDS ===== */
.card {
    background: var(--grafite-800);
    border: 1px solid var(--grafite-700);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--grafite-700);
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--grafite-100);
}

.card-header h3 i {
    color: var(--rosa-500);
    margin-right: 0.5rem;
}

.card-badge {
    background: var(--grafite-700);
    color: var(--grafite-300);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.card-total {
    text-align: right;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--grafite-700);
    font-weight: 600;
    color: var(--rosa-500);
    font-size: 1.2rem;
}

/* ===== RESUMO CARD ===== */
.resumo-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.resumo-item {
    background: var(--grafite-800);
    border: 1px solid var(--grafite-700);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.resumo-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.resumo-label {
    display: block;
    color: var(--grafite-400);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.resumo-valor {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--grafite-100);
}

.resumo-valor.positivo {
    color: var(--success);
}

.resumo-valor.negativo {
    color: var(--danger);
}

/* ===== FORMULÁRIOS ===== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--grafite-400);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group label i {
    margin-right: 0.5rem;
    color: var(--rosa-500);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--grafite-700);
    border: 2px solid var(--grafite-600);
    border-radius: var(--radius);
    color: var(--grafite-100);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--rosa-500);
    box-shadow: 0 0 0 3px rgba(255, 51, 102, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-inline {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 1fr auto; /* ← aumentei 1fr para 1.5fr */
    gap: 0.5rem;
    align-items: end;
}

/* ===== BOTÕES ===== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn i {
    font-size: 1rem;
}

.btn-primary {
    background: var(--rosa-500);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.3);
}

.btn-primary:hover {
    background: var(--rosa-400);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 51, 102, 0.4);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: var(--success-dark);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--rosa-500);
    color: var(--rosa-500);
}

.btn-outline:hover {
    background: var(--rosa-500);
    color: white;
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* ===== TABELAS ===== */
.table-responsive {
    overflow-x: auto;
    margin: 1rem 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 1rem;
    background: var(--grafite-700);
    color: var(--grafite-300);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--grafite-600);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--grafite-700);
    color: var(--grafite-200);
}

.table tbody tr:hover {
    background: rgba(255, 51, 102, 0.05);
}

.table-compact th,
.table-compact td {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

/* ===== GRIDS ===== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* ===== SIMULADOR ===== */
.simulador-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.resultado-card {
    background: linear-gradient(135deg, var(--grafite-700), var(--grafite-800));
    border: 1px solid var(--grafite-600);
    border-radius: var(--radius);
    padding: 2rem;
    margin-top: 1.5rem;
    text-align: center;
    border-left: 4px solid var(--success);
}

.resultado-label {
    color: var(--grafite-400);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.resultado-valor {
    font-size: 3rem;
    font-weight: 800;
    color: var(--success);
    margin-bottom: 0.5rem;
}

.resultado-detalhe {
    color: var(--grafite-400);
    font-size: 0.95rem;
}

/* ===== FILTROS ===== */
.filtros-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filtros-acoes {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

/* ===== GRÁFICOS ===== */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    margin: 1rem 0;
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVO ===== */
@media (max-width: 1024px) {
    .resumo-card {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filtros-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .form-inline {
        grid-template-columns: 1fr;
    }
    
    .tabs-nav {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 calc(50% - 0.25rem);
    }
    
    .resumo-card {
        grid-template-columns: 1fr;
    }
    
    .filtros-grid {
        grid-template-columns: 1fr;
    }
    
    .filtros-acoes {
        flex-wrap: wrap;
    }
    
    .filtros-acoes .btn {
        flex: 1 1 calc(50% - 0.5rem);
    }
    
    .simulador-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .logo-container {
        flex-direction: column;
    }
    
    .user-area {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-outline {
        width: 100%;
    }
    
    .filtros-acoes .btn {
        flex: 1 1 100%;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .resultado-valor {
        font-size: 2rem;
    }
}

/* ===== UTILITÁRIOS ===== */
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-rosa { color: var(--rosa-500); }

.bg-success { background: var(--success); }
.bg-danger { background: var(--danger); }
.bg-rosa { background: var(--rosa-500); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }