/* ============================================
   METAINVEST - CSS FINAL E COMPLETO
   Inclui: Landing Page + Calculator + Dashboard
   ============================================ */

   :root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #10b981;
    --dark: #1f2937;
    --gray: #6b7280;
    --light-gray: #f3f4f6;
    --white: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER & NAV
   ============================================ */

header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary, .btn-secondary, .btn-outline {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--dark);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    width: 100%;
}

/* ============================================
   HERO SECTION (Landing Page)
   ============================================ */

.hero {
    padding: 5rem 0;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.small-text {
    font-size: 0.9rem;
    margin-top: 1rem;
    opacity: 0.8;
}

/* ============================================
   SECTIONS (Landing Page)
   ============================================ */

.benefits, .how-it-works, .pricing, .faq {
    padding: 5rem 0;
}

.benefits h2, .how-it-works h2, .pricing h2, .faq h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.benefit-card {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.benefit-card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.benefit-card p {
    color: var(--gray);
}

/* How It Works */
.how-it-works {
    background: var(--light-gray);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background: var(--secondary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.price span {
    font-size: 1rem;
    color: var(--gray);
}

.features {
    list-style: none;
    margin-bottom: 2rem;
}

.features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--light-gray);
}

/* FAQ */
.faq {
    background: var(--light-gray);
}

.faq-item {
    background: var(--white);
    padding: 2rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.faq-item h3 {
    margin-bottom: 0.5rem;
}

.faq-item p {
    color: var(--gray);
}

/* ============================================
   INPUT GROUPS - DEFINITIVO
   ============================================ */

.input-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.input-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    transition: border-color 0.3s;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
}

.input-prefix,
.input-suffix {
    padding: 0 1rem;
    color: var(--gray);
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

.input-wrapper input {
    flex: 1;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
    outline: none;
    min-width: 0;
}

.input-wrapper input[type="number"]::-webkit-inner-spin-button,
.input-wrapper input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-wrapper input[type="number"] {
    -moz-appearance: textfield;
}

.input-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--gray);
    font-size: 0.85rem;
}

/* ============================================
   CALCULATOR PAGE
   ============================================ */

.calculator-page {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

.calculator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.calculator-form, .calculator-results {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

/* Results */
.result-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.result-card.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    text-align: center;
    padding: 2rem;
}

.result-value {
    font-size: 3rem;
    font-weight: 700;
    margin: 1rem 0;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-value-small {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.chart-container {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.pro-features-cta {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: var(--dark);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.pro-features-cta h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.pro-features-cta ul {
    list-style: none;
    margin: 1.5rem 0;
    text-align: left;
}

.pro-features-cta li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.pro-features-cta li:before {
    content: "✓";
    position: absolute;
    left: 0;
    font-weight: 700;
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-page {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
    background: var(--light-gray);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.dashboard-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.plan-badge {
    background: var(--light-gray);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.plan-badge.pro-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: var(--dark);
}

.plan-label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    gap: 1rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.info-card-icon {
    font-size: 2.5rem;
}

.info-card-content {
    flex: 1;
}

.info-card h3 {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.info-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

/* Scenarios Section */
.scenarios-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
}

.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Scenario Card */
.scenario-card {
    background: var(--light-gray);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.scenario-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.scenario-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.scenario-card h3 {
    font-size: 1.1rem;
}

.delete-scenario-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.6;
}

.delete-scenario-btn:hover {
    opacity: 1;
}

.scenario-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.stat-label {
    color: var(--gray);
}

.stat-value {
    font-weight: 600;
}

.stat-value.highlight {
    color: var(--primary);
    font-size: 1.1rem;
}

/* Account Section */
.account-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.account-info {
    display: grid;
    gap: 1rem;
}

.account-field {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
}

.account-field label {
    font-weight: 600;
    min-width: 150px;
    color: var(--gray);
}

.account-field span {
    color: var(--dark);
}

/* Comparison Section */
.comparison-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.comparison-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.comparison-checkbox {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--light-gray);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.comparison-checkbox:hover {
    border-color: var(--primary);
}

.comparison-checkbox.selected {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

/* Auth Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.auth-modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
}

.auth-tabs {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    border-bottom: 2px solid var(--border);
}

.auth-tab {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: var(--gray);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

footer p {
    margin: 0.5rem 0;
    opacity: 0.8;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .calculator-layout {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid,
    .steps,
    .pricing-grid,
    .info-cards,
    .scenarios-grid,
    .comparison-selector {
        grid-template-columns: 1fr;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .input-wrapper input {
        font-size: 16px !important;
    }
    
    .chart-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .chart-container canvas {
        min-height: 250px !important;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-header .btn-primary {
        width: 100%;
    }
    
    .account-field {
        flex-direction: column;
    }
    
    .account-field label {
        min-width: auto;
    }

    /* Header mobile simplificado */
    .logo {
        font-size: 1.25rem;
    }
    
    /* Esconder emoji no mobile */
    .logo::before {
        content: "";
    }
    
    /* Esconder links de navegação no mobile */
    .nav-links a[href="#como-funciona"],
    .nav-links a[href="#precos"] {
        display: none;
    }
    
    /* Container alinhado */
    .container {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    /* Hero alinhado */
    .hero .container {
        padding: 0 1.5rem;
    }
    
    /* Calculator page alinhado */
    .calculator-page .container {
        padding: 0 1rem;
    }

}

@media (max-width: 375px) {
    .hero h1 {
        font-size: 1.4rem;
    }
    
    .input-wrapper input {
        font-size: 14px !important;
    }
}
/* ============================================
   MODAL - VERSÃO CORRETA E DEFINITIVA
   ============================================ */

   .modal {
    display: none; /* OCULTO POR PADRÃO */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex !important;
}

.modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    position: relative;
    margin: auto;
}

.modal-content h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.modal-content p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-actions button {
    padding: 0.75rem 1.5rem;
}

/* Mobile */
@media (max-width: 768px) {
    .modal-content {
        max-width: 90%;
        padding: 1.5rem;
    }
    
    .modal-actions {
        flex-direction: column-reverse;
    }
    
    .modal-actions button {
        width: 100%;
    }
}

/* ============================================
   UPGRADE BANNER - USUÁRIOS FREE
   ============================================ */

   .upgrade-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.upgrade-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.upgrade-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.upgrade-features {
    list-style: none;
    margin: 1.5rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
}

.upgrade-features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upgrade-features li::before {
    content: "✅";
    font-size: 1.1rem;
}

/* Locked State para cenários */
.locked-state {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--light-gray);
    border-radius: 8px;
    border: 2px dashed var(--border);
}

.lock-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.locked-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.locked-state p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

/* Mobile */
@media (max-width: 768px) {
    .upgrade-banner {
        padding: 1.5rem;
    }
    
    .upgrade-content h2 {
        font-size: 1.3rem;
    }
    
    .upgrade-features {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .locked-state {
        padding: 2rem 1rem;
    }
    
    .lock-icon {
        font-size: 3rem;
    }
}