/* ===================================
   FINANÇAS FAMILIAR - MODO NOTURNO
   =================================== */

:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --secondary: #a78bfa;
    --success: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
    --info: #22d3ee;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --shadow: 0 10px 40px rgba(0,0,0,0.4);
    --shadow-hover: 0 20px 60px rgba(0,0,0,0.5);
    --radius: 20px;
    --radius-sm: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 18px;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e293b 100%);
}

.login-box {
    background: var(--bg-card);
    padding: 50px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    text-align: center;
    max-width: 450px;
    width: 100%;
    animation: slideUp 0.6s ease;
    border: 1px solid var(--border);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.brasao-login {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 25px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    border: 4px solid var(--primary);
}

.login-box h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.login-box p {
    color: var(--text-secondary);
    margin-bottom: 35px;
    font-size: 1.1rem;
    line-height: 1.5;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px;
    background: var(--bg-hover);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
}

.btn-google:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(96, 165, 250, 0.3);
    transform: translateY(-2px);
    background: var(--bg-card);
}

/* Layout App */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 25px;
}

/* Header */
.header {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid var(--border);
}

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

.brasao-header {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 4px 15px rgba(96, 165, 250, 0.3);
}

.header-info h2 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.header-info p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 1.1rem;
}

.user-avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--success);
    box-shadow: 0 4px 15px rgba(52, 211, 153, 0.3);
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-1);
}

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

.card.receita::before { background: var(--gradient-4); }
.card.despesa::before { background: var(--gradient-2); }
.card.saldo::before { background: var(--gradient-3); }

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

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: var(--bg-hover);
}

.card.receita .card-icon { background: rgba(52, 211, 153, 0.15); }
.card.despesa .card-icon { background: rgba(248, 113, 113, 0.15); }
.card.saldo .card-icon { background: rgba(34, 211, 238, 0.15); }

.card-label {
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.card-value {
    font-size: 2.4rem;
    font-weight: 700;
    margin-top: 10px;
}

.card.receita .card-value { color: var(--success); }
.card.despesa .card-value { color: var(--danger); }
.card.saldo .card-value { color: var(--info); }

/* Cartões de Crédito */
.cartoes-section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.cartoes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.cartao-credito {
    background: var(--gradient-1);
    border-radius: var(--radius);
    padding: 30px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: 1.1rem;
}

.cartao-credito::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.cartao-credito.bpi-now { background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%); }
.cartao-credito.bpi-classic { background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%); }
.cartao-credito.conta-corrente { background: linear-gradient(135deg, #059669 0%, #047857 100%); }

.cartao-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.cartao-nome {
    font-size: 1.3rem;
    font-weight: 700;
}

.cartao-tipo {
    font-size: 0.95rem;
    opacity: 0.95;
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

.cartao-limite {
    position: relative;
    z-index: 1;
}

.cartao-limite-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 500;
}

.cartao-limite-valor {
    font-size: 2.2rem;
    font-weight: 700;
}

.cartao-progress {
    margin-top: 20px;
    height: 10px;
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.cartao-progress-bar {
    height: 100%;
    background: white;
    border-radius: 10px;
    transition: width 0.6s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.cartao-disponivel {
    margin-top: 15px;
    font-size: 1.05rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    font-weight: 700;
}

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

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

.btn-danger {
    background: var(--gradient-2);
    color: white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.btn-floating {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    font-size: 2rem;
    box-shadow: 0 10px 40px rgba(96, 165, 250, 0.4);
    z-index: 100;
}

/* Transações */
.transacoes-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.transacao-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
}

.transacao-item:hover {
    background: var(--bg-hover);
}

.transacao-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 20px;
    flex-shrink: 0;
    background: var(--bg-hover);
}

.transacao-item.receita .transacao-icon { background: rgba(52, 211, 153, 0.15); }
.transacao-item.despesa .transacao-icon { background: rgba(248, 113, 113, 0.15); }

.transacao-info {
    flex: 1;
}

.transacao-titulo {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 1.15rem;
}

.transacao-detalhes {
    font-size: 1rem;
    color: var(--text-secondary);
}

.transacao-valor {
    font-weight: 700;
    font-size: 1.3rem;
}

.transacao-item.receita .transacao-valor { color: var(--success); }
.transacao-item.despesa .transacao-valor { color: var(--danger); }

/* Menu Mobile */
.menu-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 2px;
    box-shadow: 0 -5px 30px rgba(0,0,0,0.4);
    z-index: 99;
    border-top: 1px solid var(--border);
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 2px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    transition: all 0.3s;
    border-radius: 10px;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 25%;
}

.menu-item.active {
    color: var(--primary);
    background: rgba(96, 165, 250, 0.15);
}

.menu-item span {
    font-size: 1.2rem;
    line-height: 1;
}

/* Responsivo */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .app-container {
        padding: 15px;
        padding-bottom: 100px;
    }
    
    .header {
        padding: 20px;
    }
    
    .brasao-header {
        width: 50px;
        height: 50px;
    }
    
    .header-info h2 {
        font-size: 1.4rem;
    }
    
    .card-value {
        font-size: 2rem;
    }
    
    .cartao-limite-valor {
        font-size: 1.8rem;
    }
    
    .transacao-titulo {
        font-size: 1.1rem;
    }
    
    .transacao-valor {
        font-size: 1.2rem;
    }
}

/* Animações */
@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 40px rgba(96, 165, 250, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 15px 50px rgba(96, 165, 250, 0.6); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Utilitários */
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }
.text-gray { color: var(--text-secondary); }

.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }