/* =========================================
   1. VARIABLES Y ESTILOS GLOBALES
   ========================================= */
:root {
    --primary: #1a2b3c; 
    --accent: #3498db;
    --bg-light: #f4f7f6;
    --white: #ffffff;
}

body { 
    font-family: 'Inter', sans-serif; margin: 0; padding: 0; 
    background-color: var(--white); color: var(--primary); 
    overflow-x: hidden; display: flex; flex-direction: column; min-height: 100vh; text-align: center;
}

/* =========================================
   2. NAVBAR & LOGO (GLOBAL)
   ========================================= */
.navbar { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 20px 50px; background: var(--white); border-bottom: 1px solid #f1f5f9; 
    position: relative; z-index: 1000; width: 100%; box-sizing: border-box;
}

.navbar-legal { 
    background-color: var(--primary); 
    border-bottom: 3px solid var(--accent); 
    /* Truco matemático para alinear el logo y el botón con la caja de 860px */
    padding-left: max(24px, calc(50vw - 430px)) !important;
    padding-right: max(24px, calc(50vw - 430px)) !important;
}

.logo { font-size: 24px; font-weight: 800; text-decoration: none; color: var(--primary); letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
.logo.text-white { color: var(--white) !important; }


.nav-links { display: flex; align-items: center; gap: 30px; transition: 0.3s ease-in-out; }
.nav-links a { text-decoration: none; color: var(--primary); font-weight: 600; font-size: 15px; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }
.back-link { color: #a0aec0 !important; font-weight: 400 !important; }
.back-link:hover { color: var(--white) !important; }

/* Legal navbar — white links on dark background */
.navbar-legal .nav-links a { color: #ffffff !important; }
.navbar-legal .nav-links a:hover { color: #3498db !important; }
.navbar-legal .nav-links .back-link { color: #a0aec0 !important; }

.btn-header-action { padding: 10px 24px; border-radius: 6px; transition: 0.3s; color: var(--white) !important; font-weight: 700; text-decoration: none; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.btn-header-action:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,0,0,0.15); }

/* P2P VPN nav button — yellow cyberpunk style matching VPN Launch button */
a.btn-vpn-nav,
a.btn-vpn-nav:visited {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 9px 20px !important;
    background: #fcee0a !important;
    color: #0a0a0d !important;
    font-weight: 800 !important;
    font-size: 12px !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    border: 1px solid #fcee0a !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: background 0.15s, border-color 0.15s !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    -webkit-clip-path: polygon(7px 0%, 100% 0%, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0% 100%, 0% 7px);
    clip-path: polygon(7px 0%, 100% 0%, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0% 100%, 0% 7px);
}
a.btn-vpn-nav:hover,
a.btn-vpn-nav:focus {
    background: #fff200 !important;
    border-color: #fff200 !important;
    color: #000 !important;
    transform: none !important;
}
a.btn-vpn-nav .btn-vpn-arrow {
    display: inline-block;
    transition: transform 0.15s;
}
a.btn-vpn-nav:hover .btn-vpn-arrow {
    transform: translateX(3px);
}

.menu-toggle { display: none; flex-direction: column; cursor: pointer; gap: 5px; background: transparent !important; border: none; padding: 5px; width: 36px; height: 36px; justify-content: center; }
.menu-toggle .bar { 
    width: 26px; 
    height: 3px; 
    background-color: #1a2b3c !important;
    border-radius: 10px; 
    transition: all 0.3s ease-in-out; 
    display: block;
}
.navbar-legal .menu-toggle .bar { background-color: #ffffff !important; }

/* =========================================
   3. SECCION HERO (PAGINA INDEX)
   ========================================= */
.hero { margin-top: 60px; padding: 0 20px; position: relative; z-index: 2; flex: 1; }

.badge { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #ebf8ff; color: var(--accent); padding: 6px 15px; border-radius: 20px; font-size: 13px; font-weight: 700; margin-bottom: 20px; letter-spacing: 1px; text-transform: uppercase; border: 1px solid #bee3f8; }
.mini-ai { width: 24px; height: 24px; display: flex; justify-content: center; align-items: center; }
.mini-ai img { width: 100%; height: auto; animation: floatMini 3s ease-in-out infinite; filter: drop-shadow(0 2px 4px rgba(52, 152, 219, 0.5)); }

.hero h1 { font-size: 52px; font-weight: 800; color: var(--primary); margin-bottom: 20px; line-height: 1.1; letter-spacing: -1px; }
.hero h1 span { background: linear-gradient(135deg, var(--accent) 0%, #8e44ad 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 18px; color: #4a5568; max-width: 650px; margin: 0 auto 40px; line-height: 1.6; }

.btn-start { background: var(--primary); color: var(--white); padding: 16px 35px; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 16px; display: inline-block; transition: 0.3s; box-shadow: 0 10px 20px rgba(26, 43, 60, 0.2); position: relative; z-index: 10; }
.btn-start:hover { background: var(--accent); transform: translateY(-3px); box-shadow: 0 15px 25px rgba(52, 152, 219, 0.3); color: var(--white); }

/* =========================================
   PARTICULAS lloviendo
   ========================================= */

/* Particulas (Waterfall) */
.waterfall-container { width: 150px; height: 350px; margin: 40px auto 0; position: relative; overflow: hidden; opacity: 0.5; z-index: 1; }
.drop { position: absolute; width: 2px; background: linear-gradient(to bottom, transparent, var(--accent)); animation: fall linear infinite; opacity: 0; border-radius: 2px; }

@keyframes fall { 0% { top: -20px; opacity: 0; } 10% { opacity: 0.8; } 90% { opacity: 0.8; } 100% { top: 350px; opacity: 0; } }
@keyframes floatMini { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }


/* =========================================
   5. PLANS & CHECKOUT (SUBSCRIPTION)
   ========================================= */
.pricing-hero { text-align: center; padding: 50px 20px 30px; }
.pricing-hero h1 { color: var(--primary); font-size: 36px; margin-bottom: 15px; font-weight: 800; letter-spacing: -1px; }
.pricing-hero p { color: #718096; font-size: 18px; max-width: 600px; margin: 0 auto; line-height: 1.6; }

.checkout-container { 
    display: flex; 
    flex-direction: row; /* Fuerza a que esten lado a lado en PC */
    max-width: 1000px; 
    margin: 0 auto 80px; 
    background: var(--white); 
    border-radius: 12px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.05); 
    overflow: hidden; 
    border: 1px solid #e2e8f0; 
}
.plan-details { flex: 1; padding: 50px; background: var(--primary); color: var(--white); position: relative;}
.plan-details h2 { margin-top: 0; font-size: 24px; color: var(--white); }

.price-tag { font-size: 56px; font-weight: 800; margin: 20px 0 5px; color: var(--accent); }
.price-tag span { font-size: 18px; font-weight: 400; color: #a0aec0; }
.tax-note { color: #a0aec0; font-size: 13px; margin-bottom: 30px; display: block;}

.feature-list { list-style: none; padding: 0; margin: 30px 0 0 0; }
.feature-list li { margin-bottom: 15px; display: flex; align-items: center; gap: 10px; font-size: 15px; color: #e2e8f0; }
.feature-list li svg { color: var(--accent); flex-shrink: 0; }

.payment-section { flex: 1; padding: 40px 50px; background: var(--white); display: flex; flex-direction: column; justify-content: center; }
.payment-section h3 { margin-top: 0; color: var(--primary); font-size: 20px; margin-bottom: 20px; }

.btn-trial { background: #27ae60; color: var(--white); border: none; padding: 16px; width: 100%; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; transition: 0.3s; margin-bottom: 25px; box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2); border: 2px solid #27ae60;}
.btn-trial:hover { background: #219653; transform: translateY(-2px); }
.btn-trial span { display: block; font-size: 11px; font-weight: 400; opacity: 0.9; margin-top: 3px;}

.btn-stripe, .btn-paypal, .btn-crypto { border: none; padding: 14px; width: 100%; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 10px; transition: 0.3s; margin-bottom: 15px; }
.btn-stripe { background: #635bff; color: var(--white); } .btn-stripe:hover { background: #554eed; transform: translateY(-2px); }
.btn-paypal { background: #ffc439; color: #000; } .btn-paypal:hover { background: #f4b829; transform: translateY(-2px); }
.btn-crypto { background: var(--primary); color: var(--white); border: 1px solid #2d3748;} .btn-crypto:hover { background: #2d3748; transform: translateY(-2px); }

.crypto-badge { background: #f39c12; color: var(--white); font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: bold; margin-left: auto;}

/* Lineas divisorias responsivas (Fijadas y Color CRM) */
.divider { 
    display: flex; 
    align-items: center; 
    justify-content: center;
    text-align: center; 
    margin: 25px 0; 
    color: #a0aec0; 
    font-size: 12px; 
    text-transform: uppercase; 
    font-weight: 800;
    letter-spacing: 0.5px;
    width: 100%;
}
.divider::before, 
.divider::after { 
    content: ""; 
    flex: 1; 
    height: 1px; 
    background-color: #3498db; /* Azul exacto de Xomexy CRM */
}
.divider::before { margin-right: 15px; }
.divider::after { margin-left: 15px; }

/* Aviso de seguridad sutil y elegante */
.secure-badge { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
    margin-top: 25px; 
    color: #a0aec0; /* Color gris claro para no distraer */
    font-size: 11px; /* Letra pequeña y fina */
    font-weight: 500;
}

/* Candadito pequeño */
.secure-badge svg {
    width: 12px !important;
    height: 12px !important;
    stroke-width: 2.5; 
}

/* =========================================
   7. SUPPORT & FAQ PAGE (Clean Doc Style)
   ========================================= */
.support-page { 
    background-color: #F8F8F8; 
    text-align: left; 
    flex: 1;
}

.support-container { 
    max-width: 800px; 
    margin: 0 auto; 
    padding: 24px; 
}

/* El encabezado */
.support-header-box { 
    border-left: 4px solid var(--accent); 
    padding-left: 32px; 
    margin-bottom: 50px; 
}
.support-eyebrow { 
    font-family: monospace, sans-serif; 
    font-size: 13px; 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    color: var(--accent); 
    margin-bottom: 12px; 
    display: block; 
    font-weight: 600;
}
.support-title { 
    font-size: 42px; 
    font-weight: 800; 
    color: var(--primary); 
    margin: 0 0 16px 0; 
    line-height: 1.2; 
    letter-spacing: -1px; 
}
.support-desc { 
    font-size: 18px; 
    color: #4a5568; 
    line-height: 1.6; 
    margin: 0; 
}

/* Lista de preguntas */
.faq-list {
    margin-bottom: 50px; 
}
.faq-item-clean { 
    margin-bottom: 30px; 
    border-bottom: 1px solid #e5e7eb; 
    padding-bottom: 25px; 
}
.faq-item-clean:last-child { 
    border-bottom: none; 
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-q-clean { 
    display: flex; 
    align-items: center; 
    cursor: pointer; 
    user-select: none; 
}

.faq-text { 
    font-size: 20px; 
    font-weight: 700; 
    color: var(--primary); 
    flex: 1; 
}
.faq-toggle { 
    font-size: 26px; 
    color: #a0aec0; 
    transition: transform 0.3s, color 0.3s; 
    font-weight: 300; 
    margin-left: 16px;
}

/* Respuesta desplegable (MODO TERMINAL OSCURO) */
.faq-a-clean { 
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.5s ease, opacity 0.5s ease, margin-top 0.5s ease, padding 0.5s ease; 
    opacity: 0; 
    background-color: #1e1e1e; 
    color: #e2e8f0; 
    border-radius: 8px;
    padding: 0 24px; 
    line-height: 1.7; 
    font-size: 15px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.3);
}

/* Estado Activo */
.faq-item-clean.active .faq-a-clean { 
    max-height: 1500px; 
    opacity: 1; 
    margin-top: 20px; 
    padding: 24px; 
}
.faq-item-clean.active .faq-toggle { 
    transform: rotate(45deg); 
    color: #e53e3e; 
}

/* ESTILOS DE CÓDIGO Y ALERTAS (Reforzados)
   ========================================= */
.doc-prose p { margin-bottom: 16px; margin-top: 0;}

.doc-code-block { 
    background-color: #1e1e1e !important; 
    border-radius: 8px; 
    position: relative; 
    overflow: hidden; 
    margin: 24px 0; 
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.2); 
    display: block !important;
}
.doc-code-label { 
    position: absolute; 
    top: 0; 
    right: 0; 
    background-color: #3a3a3a !important; 
    color: #ccc !important; 
    padding: 6px 12px !important; 
    font-size: 12px !important; 
    font-family: monospace !important; 
    border-bottom-left-radius: 8px; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    font-weight: 600; 
    z-index: 2;
}
.doc-code-block pre { 
    margin: 0 !important; 
    padding: 40px 20px 20px 20px !important; 
    overflow-x: auto; 
    color: #e2e8f0 !important; 
    font-family: monospace !important; 
    font-size: 14px !important; 
    line-height: 1.6; 
    background: transparent !important;
}
.doc-code-block code {
    color: #e2e8f0 !important;
    font-family: monospace !important;
}

.doc-alert { 
    background-color: #fef2f2 !important; 
    border-left: 4px solid #ef4444 !important; 
    padding: 20px !important; 
    border-radius: 0 8px 8px 0 !important; 
    margin: 24px 0 !important; 
    display: block !important;
}
.doc-alert-title { 
    color: #991b1b !important; 
    font-weight: 700 !important; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    margin-bottom: 8px !important; 
    font-size: 15px !important;
}
.doc-alert-title svg {
    color: #ef4444 !important;
}
.doc-alert p { 
    color: #b91c1c !important; 
    font-size: 14px !important; 
    margin: 0 !important; 
}

/* Caja inferior de ayuda */
.support-footer-cta { 
    padding: 40px; 
    background: var(--white); 
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.03); 
    border: 1px solid #f1f5f9; 
    text-align: center; 
    margin-bottom: 40px; 
}
.support-footer-cta h3 { font-size: 24px; color: var(--primary); margin: 0 0 12px 0; font-weight: 800; }
.support-footer-cta p { color: #64748b; margin: 0; font-size: 15px; }

/* =========================================
   8. LEGAL PAGES (Terms, Privacy, Refunds)
   ========================================= */
   
.legal-page { 
    background-color: #f8fafc; 
    color: #1e293b; 
    line-height: 1.7;
    text-align: left !important;
}
.legal-container { 
    max-width: 860px; 
    margin: 48px auto; 
    padding: 0 24px 0px; 
}
.doc-header { 
    background: #fff; 
    border-radius: 16px; 
    padding: 48px; 
    margin-bottom: 32px; 
    box-shadow: 0 2px 12px rgba(0,0,0,0.06); 
    text-align: center !important;
}
.doc-header h1 { 
    font-size: 32px; 
    font-weight: 800; 
    color: #0f172a; 
    margin: 0 0 10px 0;
}
.doc-meta { 
    color: #64748b; 
    font-size: 14px; 
    margin-top: 12px; 
}
.legal-section { 
    background: #fff; 
    border-radius: 16px; 
    padding: 40px 48px; 
    margin-bottom: 20px; 
    box-shadow: 0 2px 12px rgba(0,0,0,0.06); 
}
.legal-section h2 { 
    font-size: 20px; 
    font-weight: 700; 
    color: #0f172a; 
    margin: 0 0 16px 0; 
    padding-bottom: 12px; 
    border-bottom: 2px solid #f1f5f9; 
}
.legal-section p { 
    margin-bottom: 14px; 
    color: #334155; 
    font-size: 15px; 
}
.legal-section ul { 
    margin: 12px 0 16px 20px; 
}
.legal-section li { 
    margin-bottom: 8px; 
    color: #334155; 
    font-size: 15px; 
}
.legal-section a { 
    color: #e94560; 
    text-decoration: none;
}
.legal-section a:hover {
    text-decoration: underline;
}
.legal-sectiontab {
    text-align: center;
}

/* =========================================
   9. GLOBAL FOOTERS (Main & Legal)
   ========================================= */

/* --- Footer Principal (2 Líneas Centradas) --- */
.footer-main { 
    text-align: center; 
    padding: 40px 20px; 
    color: #999; 
    font-size: 14px; 
    background: var(--white); 
    border-top: 1px solid #eee; 
    margin-top: auto; 
}
.footer-main p { margin: 0; }
.footer-main .footer-links { margin-top: 15px; font-size: 13px; }
.footer-main .footer-links a { 
    color: #718096; 
    text-decoration: none; 
    margin: 0 10px; 
    transition: 0.2s; 
}
.footer-main .footer-links a:hover { color: var(--accent); }

/* --- Footer Legal (1 Línea, estilo Documentación) --- */
.footer-doc { 
    text-align: center; 
    padding: 32px; 
    color: #64748b; 
    font-size: 13px; 
    background-color: var(--white);
    border-top: 1px solid #f1f5f9;
    width: 100%;
    box-sizing: border-box;
}
.footer-doc p { margin: 0; }
.footer-doc a { 
    color: #e94560; 
    text-decoration: none;
    margin: 0 5px;
    font-weight: 500;
}
.footer-doc a:hover { text-decoration: underline; }

/* =========================================
   10. ABOUT PAGE (Mixed Identity Style)
   ========================================= */
.about-header { 
    background: var(--primary); color: var(--white); padding: 100px 20px; 
    text-align: center; position: relative; overflow: hidden;
}
.about-header-content { position: relative; z-index: 1; }
.about-header h1 { font-size: 48px; margin: 0 0 20px 0; font-weight: 800; letter-spacing: -1px; }
.about-header p { font-size: 18px; max-width: 700px; margin: 0 auto; color: #cbd5e0; line-height: 1.6; }

.about-header::before { 
    content: ''; position: absolute; top: -50%; left: 50%; transform: translateX(-50%); 
    width: 600px; height: 600px; 
    background: radial-gradient(circle, rgba(52, 152, 219, 0.2) 0%, rgba(26, 43, 60, 0) 70%); 
    border-radius: 50%; z-index: 0;
}

.about-container { max-width: 1200px; margin: -40px auto 80px; padding: 0 20px; position: relative; z-index: 2;}
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }

.about-card { 
    background: var(--white); padding: 40px; border-radius: 16px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.05); transition: 0.3s; border: 1px solid #f1f5f9; text-align: left;
}
.about-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.about-card-icon { 
    font-size: 40px; margin-bottom: 20px; display: inline-block; 
    background: #ebf8ff; width: 80px; height: 80px; line-height: 80px; 
    text-align: center; border-radius: 20px; 
}
.about-card h3 { font-size: 22px; color: var(--primary); margin: 0 0 15px 0; font-weight: 800; letter-spacing: -0.5px;}
.about-card p { color: #718096; line-height: 1.6; margin: 0; font-size: 15px;}

/* Tarjeta Premium (OpenClaw Highlight) - CORREGIDO PARA CENTRAR */
.about-card-premium { 
    background: linear-gradient(135deg, #1a2b3c 0%, #0f172a 100%); 
    color: white; 
    border: none; 
    grid-column: 1 / -1; /* Mantiene la tarjeta a todo lo ancho de la cuadrícula */
    text-align: center; /* Asegura que el ícono y el texto se alineen al centro */
}
.about-card-premium h3 { color: white; }
.about-card-premium p { color: #94a3b8; }

/* Estilo del ícono dentro de la tarjeta premium */
.about-card-premium .about-card-icon { 
    background: rgba(255,255,255,0.1); 
    border: 1px solid rgba(255,255,255,0.2); 
    display: inline-block; /* Importante para que respete el text-align center */
    margin-left: auto; /* Truco para centrar elementos inline-block */
    margin-right: auto;
}

.about-mission { 
    background: #f8fafc; padding: 80px 20px; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; 
    margin-top: 50px; text-align: left;
}
.mission-content { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.mission-text h2 { font-size: 32px; color: var(--primary); margin-bottom: 20px; letter-spacing: -1px;}
.mission-text p { color: #64748b; font-size: 17px; line-height: 1.8; }

.infra-stats { display: flex; gap: 40px; margin-top: 40px; }
.stat-item b { display: block; font-size: 28px; color: var(--accent); }
.stat-item span { font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; font-weight: 700;}

/* TERMINAL NEGRO CON LETRAS VERDES */
.code-terminal { 
    background: #000000; 
    border-radius: 15px; 
    padding: 35px; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.3); 
    text-align: left; 
    border: 1px solid #333;
}
.code-terminal code { 
    color: #00ff00; /* Verde neón de programación */
    font-family: 'Courier New', Courier, monospace; 
    line-height: 1.7; 
    font-size: 14px; 
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}
.c-comment { color: #555; }
.c-keyword { color: #00ff00; font-weight: bold; }
.c-string { color: #00cc00; }
.c-important { color: #e94560; display: block; margin-top: 10px; font-weight: 800; }

/* =========================================
   11. LOGIN, REGISTER & FORGOT PAGE
   ========================================= */
/* LOGIN */
/* =========================================
   LOGIN, REGISTER & FORGOT PAGE
   ========================================= */
.login-page-body {
    background-color: #f4f7f6;
}

.login-page-wrapper { 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    min-height: 80vh; 
    padding: 40px 20px; 
    box-sizing: border-box;
}

.login-card { 
    background: var(--white); 
    padding: 40px; 
    border-radius: 16px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.05); 
    width: 100%; 
    max-width: 400px; 
    box-sizing: border-box;
    text-align: center;
    border-top: 5px solid var(--primary);
}

.login-card h2 { 
    color: var(--primary); 
    margin: 0 0 25px 0; 
    font-size: 28px; 
    font-weight: 800; 
    letter-spacing: -0.5px;
}
.login-card h2 span { color: var(--accent); }

.input-group { margin-bottom: 20px; text-align: left; }
.input-group input { 
    width: 100%; 
    padding: 14px; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    box-sizing: border-box; 
    font-size: 15px;
    font-family: 'Inter', sans-serif;
}
.input-group input:focus { 
    border-color: var(--accent); 
    outline: none; 
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1); 
}

.submit-btn { 
    width: 100%; 
    padding: 14px; 
    background: var(--primary); 
    color: white; 
    border: none; 
    border-radius: 8px; 
    font-weight: 700; 
    font-size: 16px; 
    cursor: pointer; 
    transition: 0.3s; 
}
.submit-btn:hover { 
    background: var(--accent); 
    transform: translateY(-2px); 
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.login-alert { padding: 12px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; text-align: left; }
.alert-error { background: #fff5f5; color: #e53e3e; border: 1px solid #fed7d7; }
.alert-success { background: #e6fffa; color: #27ae60; border: 1px solid #9ae6b4; font-weight: 600; }

.login-links { margin-top: 25px; display: flex; flex-direction: column; gap: 12px; }
.login-links a { color: #718096; text-decoration: none; font-size: 14px; font-weight: 600; transition: color 0.2s; }
.login-links a:hover { color: var(--primary); text-decoration: underline; }










/* =========================================
   DASHBOARD STYLES (Admin Panel)
   ========================================= */
.dashboard-body {
    display: flex;
    min-height: 100vh;
    background-color: #f0f2f5;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.sidebar {
    width: 260px;
    background-color: var(--primary);
    color: white;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-logo {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}
.sidebar-logo span { color: var(--accent); }

.nav-menu { list-style: none; padding: 0; margin: 0; }
.nav-menu li a { display: block; padding: 15px 25px; color: #a0aec0; text-decoration: none; font-weight: 500; transition: all 0.3s ease; }
.nav-menu li a:hover, .nav-menu li a.active { background-color: rgba(255, 255, 255, 0.1); color: white; border-left: 4px solid var(--accent); }
.nav-menu li a.logout { color: #e53e3e; margin-top: 20px; }

.main-content { flex: 1; padding: 40px; overflow-y: auto; }
.dash-header { margin-bottom: 30px; }
.dash-header h1 { margin: 0 0 5px 0; color: var(--primary); font-size: 28px; }
.dash-header p { margin: 0; color: #666; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 40px; }
.stat-card { background: white; padding: 25px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); border-left: 5px solid var(--accent); }
.stat-card h3 { margin: 0 0 10px 0; font-size: 14px; color: #718096; text-transform: uppercase; letter-spacing: 1px; }
.stat-card .number { font-size: 32px; font-weight: bold; color: var(--primary); }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 2px solid #e2e8f0; padding-bottom: 10px; }
.section-header h2 { margin: 0; font-size: 20px; color: var(--primary); }
.btn-primary { background-color: var(--accent); color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; font-weight: 600; }







/* =========================================
   4. RESPONSIVE MASTER (MOBILE & TABLET)
   ========================================= */
@media (max-width: 768px) {
    
    /* NAVBAR Y HAMBURGUESA GLOBAL */
    .navbar { padding: 15px 20px; }
    
    .menu-toggle { 
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 36px !important;
        height: 36px !important;
        gap: 5px !important;
    }
    
    /* Color de barras dinámico: Blanco en legal, Oscuro en normal */
    .menu-toggle .bar { background-color: #1a2b3c; }
    .navbar-legal .menu-toggle .bar { background-color: #1a2b3c; }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 20px 0;
        border-bottom: 2px solid var(--accent);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 999;
        box-sizing: border-box;
    }

    /* Legal pages get dark dropdown to match their dark navbar */
    .navbar-legal .nav-links {
        background: #1a2b3c !important;
        border-bottom: 2px solid #3498db !important;
    }

    .navbar-legal .nav-links a { color: #ffffff !important; }
    .navbar-legal .nav-links a:hover { color: #3498db !important; }
    .navbar-legal .nav-links .back-link { color: #a0aec0 !important; }

    .nav-links.active { display: flex; animation: slideDown 0.3s ease-out forwards; }
    .nav-links a { margin: 10px 0; width: 100%; text-align: center; }

    /* INDEX */
    .hero { margin-top: 40px; }
    .hero h1 { font-size: 38px; }
    .hero p { font-size: 16px; padding: 0 15px; }

    /* ABOUT (Sección 1% y Misión) */
    .mission-content { grid-template-columns: 1fr !important; text-align: center; gap: 40px; } 
    .infra-stats { justify-content: center; flex-wrap: wrap; } 
    .about-header h1 { font-size: 36px; }
    .about-card-premium { grid-column: auto; flex-direction: column; text-align: center; }

    /* PLANS & CHECKOUT */
    .checkout-container { flex-direction: column !important; margin: 0 20px 60px; width: auto; }
    .plan-details, .payment-section { padding: 30px 20px; }
    .pricing-hero h1 { font-size: 28px; }
    .price-tag { font-size: 48px; }

    /* SUPPORT */
    .support-header-box { padding-left: 20px; border-left-width: 4px; }
    .support-title { font-size: 32px; }
    .faq-text { font-size: 18px; }

    /* LEGAL PAGES (Privacy, Terms) */
    .legal-container { margin: 24px auto; padding: 0 16px 40px; }
    .doc-header, .legal-section { padding: 30px 24px; }
}

/* RESPONSIVE PEQUEÑO (Login) */
@media (max-width: 480px) {
    .login-card { padding: 30px 20px; }
    .login-card h2 { font-size: 24px; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* =========================================
   MOBILE RESPONSIVE - CRM DASHBOARD & PAGES
   Full mobile optimization for all CRM pages
   ========================================= */

/* ── Sidebar mobile toggle button ── */
#sidebar-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 2000;
    background: #1a2b3c;
    color: white;
    border: none;
    border-radius: 8px;
    width: 42px;
    height: 42px;
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ── Sidebar overlay for mobile ── */
#sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
}

@media (max-width: 768px) {

    /* ── Sidebar ── */
    #sidebar-toggle {
        display: flex !important;
    }

    .sidebar {
        position: fixed !important;
        top: 0; left: -280px;
        height: 100vh;
        width: 260px !important;
        z-index: 1600;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .sidebar.open {
        left: 0 !important;
    }

    #sidebar-overlay.open {
        display: block !important;
    }

    /* ── Main content — full width on mobile ── */
    .main-content {
        margin-left: 0 !important;
        padding: 60px 12px 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* ── Dashboard header buttons ── */
    .section-header,
    .dash-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .dash-header .btn-group,
    .dash-header > div,
    .page-header > div {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        width: 100% !important;
    }

    /* ── Buttons ── */
    .btn, .btn-primary, .btn-success, .btn-danger, .btn-outline,
    button[style*="padding:11px"] {
        font-size: 13px !important;
        padding: 9px 14px !important;
    }

    /* ── Stats cards ── */
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .stat-card {
        padding: 15px !important;
    }

    .stat-card .number {
        font-size: 24px !important;
    }

    /* ── Contact table — horizontal scroll ── */
    .table-responsive,
    table,
    .contacts-table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        display: block !important;
        width: 100% !important;
    }

    /* ── Dashboard contact list ── */
    .table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Hide less important columns on mobile */
    table:not(.priv-table) th:nth-child(3),
    table:not(.priv-table) td:nth-child(3),
    table:not(.priv-table) th:nth-child(5),
    table:not(.priv-table) td:nth-child(5) {
        display: none !important;
    }

    /* ── Metrics page cards ── */
    .metric-card {
        width: 200px !important;
    }

    .chart-panel {
        padding: 15px !important;
        margin: 0 !important;
    }

    /* ── Forms (edit contact, add contact) ── */
    .form-grid,
    .form-row {
        grid-template-columns: 1fr !important;
    }

    input[type=text],
    input[type=email],
    input[type=password],
    input[type=tel],
    input[type=number],
    textarea,
    select {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* ── Login card ── */
    .login-page-wrapper {
        padding: 20px 16px !important;
    }

    .login-card {
        padding: 30px 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* ── Email hub cards ── */
    .accounts-grid {
        grid-template-columns: 1fr !important;
    }

    /* ── Power dialer ── */
    .dialer-grid,
    .queue-cards {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* ── Modals ── */
    .modal-content,
    #contactActionModal .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        padding: 20px 16px !important;
        margin: 10px !important;
    }

    /* ── Compose email modal ── */
    #composeModal > div {
        width: 98% !important;
        max-width: 98% !important;
    }

    /* ── OpenClaw chat widget ── */
    #oc-win {
        width: 95% !important;
        right: 2.5% !important;
        bottom: 100px !important;
        height: 65vh !important;
        max-height: 500px !important;
    }

    #oc-bubble {
        width: 70px !important;
        height: 70px !important;
        bottom: 15px !important;
        right: 15px !important;
    }

    /* ── Page header with download button ── */
    .page-header,
    div[style*="justify-content:space-between"] {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    /* ── Tab navigation ── */
    .tab-nav,
    .tabs {
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* ── Calendar ── */
    .fc-toolbar {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .fc-toolbar-title {
        font-size: 16px !important;
    }

    /* ── Edit contact page ── */
    .edit-contact-wrapper,
    .edit-form-container {
        padding: 15px !important;
        margin: 10px !important;
    }

    /* ── Save button full width on mobile ── */
    .btn-save,
    button[type=submit] {
        width: 100% !important;
        padding: 14px !important;
        font-size: 16px !important;
    }

    /* ── Scraped leads table ── */
    .scraped-table {
        font-size: 12px !important;
    }

    /* ── Settings page ── */
    .settings-grid {
        grid-template-columns: 1fr !important;
    }

    /* ── Import CSV ── */
    .import-box {
        padding: 20px 15px !important;
    }

    /* ── Dashboard filter tabs ── */
    .filter-tabs {
        display: flex !important;
        overflow-x: auto !important;
        gap: 6px !important;
        padding-bottom: 8px !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 480px) {
    /* Extra small phones */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .hero h1 {
        font-size: 30px !important;
    }

    .main-content {
        padding: 55px 10px 20px !important;
    }

    /* Hide address/company columns on very small screens */
    table:not(.priv-table) th:nth-child(2),
    table:not(.priv-table) td:nth-child(2) {
        display: none !important;
    }
}