:root {
    /* --- TEMA UBER BLACK & GOLD --- */
    --bg-color: #000000;
    --card-color: #121212;

    /* Botões Padrão: Branco com texto preto (Contraste Máximo) */
    --primary: #FFFFFF;
    --primary-text: #000000;

    /* Cor do Dinheiro/Sucesso/Destaque: Ouro */
    --success: #D4AF37;
    --accent: #D4AF37;

    /* Vermelho (Gastos e Alertas) */
    --danger: #ff453a;

    /* Textos e Bordas */
    --text: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: #333333;
}

/* --- RESET & BASE --- */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    /* Remove flash azul no mobile */
}

body {
    background-color: var(--bg-color);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 90px;
    /* Espaço para menu inferior se houver */
}

/* --- CARDS E ESTRUTURA --- */
.profit-card,
.card,
.settings-card,
.login-card,
.feature-card,
.status-card {
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Skeleton Loading Shimmer */
.skeleton {
    background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* --- TIPOGRAFIA & VALORES --- */
.profit-value {
    font-size: 3rem;
    font-weight: 900;
    color: var(--success);
    /* Ouro */
    margin: 10px 0;
    letter-spacing: -2px;
}

.text-receita {
    color: var(--success) !important;
}

.text-despesa {
    color: var(--danger) !important;
}

/* --- BARRAS DE PROGRESSO --- */
.meta-container {
    margin: 20px 0;
}

.meta-bar-bg,
.progress-track {
    background: #333;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.meta-bar-fill,
.progress-fill {
    background: var(--success);
    height: 100%;
    border-radius: 5px;
}

/* --- GRID DE AÇÕES (LAYOUT PRINCIPAL) --- */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 50% / 50% */
    gap: 15px;
    margin-top: 20px;
}

/* Botão "Nova Corrida" (Ocupa largura total) */
.btn-main {
    grid-column: span 2;
    background: var(--primary);
    color: var(--primary-text);
    font-weight: 900;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
}

/* Botões Menores (Abastecer/Despesa) */
.btn-secondary {
    background: #1e1e1e;
    border: 1px solid #333;
    color: white;
    height: 90px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    gap: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: 0.2s;
}

.btn-secondary:active {
    background-color: #333;
}

.btn-secondary i {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 5px;
}


/* --- FORMULÁRIOS E INPUTS --- */
.dark-input,
.input-mes-ano,
.valor-input {
    background: #111;
    border: 1px solid #333;
    color: white;
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    width: 100%;
}

.dark-input:focus {
    border-color: var(--primary);
}

.minimal-input {
    padding-left: 45px !important;
}

/* --- BOTÕES DE SISTEMA (LOGIN/SALVAR) --- */
.btn-login,
.btn-cta,
.fab-save,
.btn-confirm {
    background: var(--primary);
    color: var(--primary-text);
    font-weight: 800;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    padding: 15px;
    width: 100%;
    cursor: pointer;
    box-shadow: none;
}

.btn-login:hover,
.btn-cta:hover {
    opacity: 0.9;
}

.btn-receita {
    background: var(--success) !important;
    color: #000 !important;
}


/* --- SISTEMA DE TURNO (SHIFT) --- */

.status-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: bold;
    letter-spacing: 1px;
}

/* Botão de Notificação no Header */
.btn-icon-header {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    transition: 0.2s;
}

.btn-icon-header:hover {
    background: #252525;
}

.badge-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-color);
}

/* Botão INICIAR (Dourado) */
.btn-shift-start {
    background: var(--success);
    /* Ajustado para OURO */
    color: #000;
    width: 100%;
    padding: 18px;
    border-radius: 12px;
    border: none;
    font-weight: 900;
    font-size: 1.1rem;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
    animation: pulseGold 2s infinite;
}

/* Botão ENCERRAR (Outline Vermelho) */
.btn-shift-end {
    background: #1a1a1a;
    color: var(--danger);
    border: 2px solid var(--danger);
    width: 100%;
    padding: 18px;
    border-radius: 12px;
    font-weight: 900;
    font-size: 1.1rem;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.2s;
}

.btn-shift-end:active {
    background: var(--danger);
    color: white;
}

/* Animação */
@keyframes pulseGold {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(212, 175, 55, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

/* === BOTTOM NAVIGATION BAR (PREMIUM) === */
.bottom-nav {
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    z-index: 900;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 175, 55, 0.05);
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    gap: 2px;
    padding: 8px 16px;
    border-radius: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.bottom-nav a i {
    font-size: 1.15rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav a:active {
    transform: scale(0.88);
}

/* Active Tab */
.bottom-nav a.nav-active {
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.08);
}

.bottom-nav a.nav-active i {
    transform: translateY(-1px);
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
}

/* Pill indicator under active item */
.bottom-nav a.nav-active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    width: 16px;
    height: 3px;
    border-radius: 3px;
    background: #D4AF37;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

/* === PRO LOCK OVERLAY === */
.pro-locked-wrapper {
    position: relative;
    overflow: hidden;
}

.pro-locked-wrapper .pro-locked-content {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
    opacity: 0.5;
}

.pro-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
    padding: 30px;
    text-align: center;
}

.pro-lock-icon {
    font-size: 3rem;
    color: #D4AF37;
    margin-bottom: 16px;
    animation: lockPulse 2s infinite;
}

@keyframes lockPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.pro-lock-title {
    font-size: 1.2rem;
    font-weight: 900;
    color: white;
    margin-bottom: 8px;
}

.pro-lock-desc {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 20px;
    max-width: 280px;
}

.btn-pro-unlock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #D4AF37, #AA8A2E);
    color: #000;
    font-weight: 900;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 32px;
    border-radius: 12px;
    border: none;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.btn-pro-unlock:active {
    transform: scale(0.96);
}

/* === SPARKLINE MINI CHART === */
.sparkline-card {
    background: #121212;
    border: 1px solid #222;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}

.sparkline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.sparkline-title {
    font-size: 0.75rem;
    color: #888;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sparkline-value {
    font-size: 0.85rem;
    font-weight: 900;
    color: #D4AF37;
}