/* ===== RESET & VARIABLES ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #25D366;
    --primary-dark: #128C7E;
    --primary-light: #DCF8C6;
    --secondary: #075E54;
    --dark: #111827;
    --gray-900: #1F2937;
    --gray-700: #374151;
    --gray-500: #6B7280;
    --gray-300: #D1D5DB;
    --gray-100: #F3F4F6;
    --gray-50: #F9FAFB;
    --white: #FFFFFF;
    --danger: #EF4444;
    --success: #10B981;
    --warning: #F59E0B;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--gray-900);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== BOTONES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-outline { background: transparent; color: var(--dark); border-color: var(--gray-300); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--dark); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-block { width: 100%; }

/* ===== HEADER ===== */
.main-header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-100);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
}
.logo-icon {
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}
.main-nav a:not(.btn) {
    color: var(--gray-700);
    font-weight: 500;
    transition: color 0.2s;
}
.main-nav a:not(.btn):hover { color: var(--primary); }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; }
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark);
    margin: 5px 0;
    transition: 0.3s;
}

/* ===== HERO ===== */
.hero {
    padding: 80px 0 100px;
    background: linear-gradient(180deg, #F0FDF4 0%, #FFFFFF 100%);
    overflow: hidden;
}
.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
}
.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}
.hero-title {
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 18px;
    color: var(--gray-700);
    margin-bottom: 32px;
    max-width: 560px;
}
.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.hero-note {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 32px;
}
.hero-features {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.hero-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 14px;
}

/* Chat Mockup */
.chat-mockup {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-width: 400px;
    margin-left: auto;
    border: 1px solid var(--gray-100);
}
.chat-header-mock {
    background: var(--secondary);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.chat-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.chat-info strong { display: block; font-size: 15px; }
.chat-info .online { font-size: 12px; color: var(--primary-light); }
.chat-body {
    background: #ECE5DD;
    padding: 20px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    position: relative;
}
.msg p { margin-bottom: 4px; }
.msg .time { font-size: 11px; color: var(--gray-500); text-align: right; }
.msg-user { background: #DCF8C6; align-self: flex-end; border-bottom-right-radius: 2px; }
.msg-bot { background: white; align-self: flex-start; border-bottom-left-radius: 2px; }

/* ===== SECCIONES ===== */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}
.section-header h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}
.section-subtitle {
    font-size: 18px;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== WHY SECTION ===== */
.why-section { background: var(--gray-50); }
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.why-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.why-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.why-icon { font-size: 48px; margin-bottom: 16px; }
.why-card h3 { font-size: 20px; margin-bottom: 12px; }
.why-card p { color: var(--gray-500); }

/* ===== FEATURES ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.feature-card {
    padding: 32px;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius);
    transition: all 0.3s;
    background: white;
}
.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}
.feature-card h3 { font-size: 19px; margin-bottom: 10px; }
.feature-card p { color: var(--gray-500); font-size: 15px; }

/* ===== COMPARATIVA ===== */
.compare-section { background: var(--gray-50); }
.table-responsive { overflow-x: auto; }
.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.compare-table th, .compare-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}
.compare-table th {
    background: var(--gray-50);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.compare-table th.highlight, .compare-table td.highlight {
    background: linear-gradient(180deg, #F0FDF4, #DCF8C6);
    color: var(--primary-dark);
    font-weight: 600;
}

/* ===== PRECIOS ===== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}
.pricing-card {
    background: white;
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    position: relative;
    transition: all 0.3s;
}
.pricing-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.pricing-card.popular {
    border-color: var(--primary);
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}
.popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
}
.pricing-card h3 { font-size: 24px; margin-bottom: 8px; }
.pricing-desc { color: var(--gray-500); margin-bottom: 24px; }
.pricing-price { margin-bottom: 32px; }
.price { font-size: 48px; font-weight: 800; color: var(--dark); }
.period { color: var(--gray-500); font-size: 16px; }
.pricing-features {
    list-style: none;
    margin-bottom: 32px;
}
.pricing-features li {
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}

/* ===== FAQ ===== */
.faq-section { background: var(--gray-50); }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: white;
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--gray-100);
}
.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
}
.faq-icon {
    font-size: 24px;
    color: var(--primary);
    transition: transform 0.3s;
}
.faq-item.active .faq-icon { transform: rotate(45deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-answer p {
    padding: 0 24px 20px;
    color: var(--gray-700);
}
.faq-item.active .faq-answer { max-height: 300px; }

/* ===== CTA FINAL ===== */
.cta-final { background: linear-gradient(135deg, var(--secondary), var(--primary-dark)); color: white; }
.cta-box {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}
.cta-box h2 { font-size: 38px; margin-bottom: 16px; color: white; }
.cta-box p { font-size: 18px; margin-bottom: 32px; opacity: 0.9; }
.cta-box .btn-primary { background: white; color: var(--primary-dark); }
.cta-box .btn-primary:hover { background: var(--primary-light); }

/* ===== AUTH ===== */
.auth-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    padding: 40px 0;
    background: var(--gray-50);
}
.auth-card {
    max-width: 440px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-header .logo-icon { font-size: 48px; display: block; margin-bottom: 16px; }
.auth-header h1 { font-size: 28px; margin-bottom: 8px; }
.auth-header p { color: var(--gray-500); }

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--gray-700);
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}
.link { color: var(--primary); font-weight: 500; }
.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--gray-500);
    font-size: 14px;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
}
.alert-error { background: #FEE2E2; color: #991B1B; }
.alert-success { background: #D1FAE5; color: #065F46; }

/* ===== CONTACTO ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}
.contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}
.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
.contact-item h4 { margin-bottom: 4px; }
.contact-item p { color: var(--gray-500); }

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 99;
    transition: transform 0.3s;
}
.whatsapp-float:hover { transform: scale(1.1); }
.wa-icon { font-size: 30px; }

/* ===== FOOTER ===== */
.main-footer {
    background: var(--gray-900);
    color: white;
    padding: 60px 0 20px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    font-size: 15px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
    color: var(--gray-300);
    font-size: 14px;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--primary); }
.footer-desc {
    color: var(--gray-300);
    margin-top: 16px;
    font-size: 14px;
    max-width: 300px;
}
.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--gray-700);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray-500);
    font-size: 14px;
}
.social-links { display: flex; gap: 16px; }
.social-links a { font-size: 20px; }

/* ===== ADMIN PANEL ===== */
.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 80px);
}
.admin-sidebar {
    background: var(--gray-900);
    color: white;
    padding: 24px 0;
}
.sidebar-header {
    padding: 0 24px 24px;
    border-bottom: 1px solid var(--gray-700);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
}
.sidebar-nav { padding: 16px 0; }
.sidebar-nav a {
    display: block;
    padding: 12px 24px;
    color: var(--gray-300);
    transition: all 0.2s;
    font-size: 15px;
}
.sidebar-nav a:hover { background: var(--gray-700); color: white; }
.sidebar-nav a.active {
    background: var(--primary);
    color: white;
    border-left: 3px solid white;
}
.admin-main {
    background: var(--gray-50);
    padding: 32px;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}
.admin-header h1 { font-size: 28px; }
.admin-user { display: flex; align-items: center; gap: 12px; }
.avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}
.stat-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}
.stat-label { display: block; color: var(--gray-500); font-size: 13px; }
.stat-value { display: block; font-size: 28px; font-weight: 800; margin: 4px 0; }
.stat-change { font-size: 12px; font-weight: 600; }
.stat-change.positive { color: var(--success); }

.admin-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.admin-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.admin-card h3 { margin-bottom: 20px; font-size: 18px; }

.conversation-item, .activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}
.conv-avatar {
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.conv-info { flex: 1; }
.conv-info strong { display: block; font-size: 14px; }
.conv-info span { color: var(--gray-500); font-size: 13px; }
.conv-time { color: var(--gray-500); font-size: 12px; }

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.activity-dot.success { background: var(--success); }
.activity-dot.info { background: #3B82F6; }
.activity-dot.warning { background: var(--warning); }
.activity-item strong { display: block; font-size: 14px; }
.activity-item small { color: var(--gray-500); font-size: 12px; }

.settings-form { max-width: 800px; }
.settings-form .admin-card { margin-bottom: 24px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--gray-300);
    border-radius: 26px;
    transition: 0.3s;
}
.slider:before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider:before { transform: translateX(24px); }

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .hero-container { grid-template-columns: 1fr; }
    .hero-visual { order: -1; }
    .chat-mockup { margin: 0 auto; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .admin-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        transition: transform 0.3s;
    }
    .main-nav.active { transform: translateY(0); }
    .menu-toggle { display: block; }
    .section { padding: 60px 0; }
    .hero { padding: 40px 0 60px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
    .pricing-card.popular { transform: none; }
}