
/* Quitar flechas en Chrome, Safari, Edge */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

    /* ===== SISTEMA DE DISEÑO MODERNO NAVY + GOLD ===== */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    
    :root {
        --radius: 0.875rem;
        --background: oklch(0.99 0.005 90);
        --foreground: oklch(0.18 0.04 260);
        --card: oklch(1 0 0);
        --card-foreground: oklch(0.18 0.04 260);
        --navy: oklch(0.22 0.06 265);
        --navy-deep: oklch(0.14 0.05 265);
        --primary: oklch(0.22 0.06 265);
        --primary-foreground: oklch(0.98 0.005 90);
        --gold: oklch(0.82 0.16 85);
        --gold-foreground: oklch(0.18 0.04 260);
        --muted: oklch(0.96 0.01 250);
        --muted-foreground: oklch(0.45 0.03 260);
        --accent: oklch(0.82 0.16 85);
        --border: oklch(0.9 0.012 260);
        --input: oklch(0.9 0.012 260);
        --ring: oklch(0.82 0.16 85);
        --gradient-hero: linear-gradient(135deg, oklch(0.14 0.05 265) 0%, oklch(0.22 0.06 265) 55%, oklch(0.32 0.09 270) 100%);
        --gradient-gold: linear-gradient(135deg, oklch(0.88 0.14 88) 0%, oklch(0.78 0.17 75) 100%);
        --shadow-elegant: 0 25px 60px -25px color-mix(in oklab, var(--navy-deep) 45%, transparent);
        --shadow-gold: 0 20px 50px -20px color-mix(in oklab, var(--gold) 55%, transparent);
        --shadow-card: 0 10px 30px -15px color-mix(in oklab, var(--navy-deep) 25%, transparent);
        --font-display: 'Space Grotesk', system-ui, sans-serif;
        --font-sans: 'Inter', system-ui, sans-serif;
    }
    
    body {
        background-color: var(--background);
        color: var(--foreground);
        font-family: var(--font-sans);
        -webkit-font-smoothing: antialiased;
        padding-top: 72px;
    }
    
    h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; }
    
    /* ===== NAVEGACIÓN MODERNA ===== */
    nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 50;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
        padding: 0 2rem;
        height: 72px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .nav-logo { height: 48px; width: auto; display: block; }
    .menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--navy); }
    
    #menu { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
    #menu li a {
        display: block;
        padding: 0.5rem 1rem;
        color: #4a5568;
        font-weight: 500;
        text-decoration: none;
        border-radius: 9999px;
        transition: all 0.2s;
        font-size: 0.875rem;
    }
    #menu li a i { margin-right: 0.5rem; }
    #menu li a:hover { background: var(--muted); color: var(--foreground); }
    
    @media (max-width: 768px) {
        .menu-toggle { display: block; }
        nav { padding: 0 1rem; height: 64px; }
        body { padding-top: 64px; }
        #menu {
            position: fixed;
            top: 64px;
            right: -100%;
            width: 280px;
            height: calc(100vh - 64px);
            background: white;
            flex-direction: column;
            padding: 1rem 0;
            transition: right 0.3s ease;
            box-shadow: -5px 0 20px rgba(0,0,0,0.1);
            gap: 0;
        }
        #menu.active { right: 0; }
        #menu li a { padding: 1rem 1.5rem; border-radius: 0; }
    }
    
    /* ===== HERO ===== */
    .am-hero {
        background: var(--gradient-hero);
        padding: 3rem 0;
        text-align: center;
        margin-bottom: 2rem;
    }
    .am-hero-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        background: rgba(255,255,255,0.1);
        backdrop-filter: blur(10px);
        padding: 0.35rem 1rem;
        border-radius: 9999px;
        font-size: 0.7rem;
        font-weight: 500;
        color: rgba(255,255,255,0.8);
        margin-bottom: 1rem;
    }
    .am-hero-badge i { color: var(--gold); }
    .am-hero h1 {
        font-size: 2rem;
        color: white;
        margin-bottom: 0.5rem;
    }
    .am-hero p {
        color: rgba(255,255,255,0.8);
        max-width: 600px;
        margin: 0 auto;
    }
    
    /* ===== CONTENEDOR PRINCIPAL ===== */
    .am-wrap {
        max-width: 1280px;
        margin: 0 auto;
        padding: 0 1.5rem 2rem;
    }
    
    /* ===== TARJETAS ===== */
    .am-card {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 1rem;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        box-shadow: var(--shadow-card);
    }
    .am-section-title {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
        border-bottom: 2px solid var(--gold);
    }
    .am-section-title .icon {
        width: 40px;
        height: 40px;
        background: var(--muted);
        border-radius: 0.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--gold);
    }
    .am-section-title h2 {
        font-size: 1.25rem;
        margin: 0;
    }
    
    /* ===== FORMULARIO ===== */
    .am-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }
    .am-field label,
    .ci-wrap label {
        display: block;
        font-size: 0.75rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: var(--muted-foreground);
    }
    .am-field label i,
    .ci-wrap label i {
        color: var(--gold);
        margin-right: 0.25rem;
    }
    .am-field input {
        width: 100%;
        padding: 0.75rem 1rem;
        border: 1px solid var(--border);
        border-radius: 0.75rem;
        font-size: 0.875rem;
        font-family: var(--font-sans);
        transition: all 0.2s;
        background: var(--background);
    }
    .am-field input:focus {
        outline: none;
        border-color: var(--gold);
        box-shadow: 0 0 0 3px rgba(210,158,0,0.1);
    }
    
    /* Cuota inicial grupo */
    .ci-input-group {
        display: flex;
        gap: 0.5rem;
    }
    .ci-toggle {
        display: flex;
        background: var(--muted);
        border-radius: 0.75rem;
        padding: 0.25rem;
    }
    .ci-toggle button {
        background: transparent;
        border: none;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        cursor: pointer;
        font-weight: 600;
        transition: all 0.2s;
    }
    .ci-toggle button.active {
        background: var(--gradient-gold);
        color: var(--navy);
    }
    .ci-input-group input {
        flex: 1;
        padding: 0.75rem 1rem;
        border: 1px solid var(--border);
        border-radius: 0.75rem;
    }
    .ci-hint {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-top: 0.5rem;
        font-size: 0.65rem;
        color: var(--muted-foreground);
    }
    .ci-hint i { color: var(--gold); }
    
    /* Tasas */
    .am-rates {
        display: flex;
        gap: 1rem;
        margin-bottom: 1.5rem;
        flex-wrap: wrap;
    }
    .am-rate-pill {
        background: var(--muted);
        padding: 0.5rem 1rem;
        border-radius: 9999px;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.75rem;
    }
    .am-rate-pill i { color: var(--gold); }
    .rp-label { color: var(--muted-foreground); }
    .rp-value { font-weight: 600; }
    
    /* Botones */
    .am-btn-wrap { text-align: center; }
    .am-btn {
        background: var(--gradient-gold);
        color: var(--navy);
        border: none;
        padding: 0.85rem 2rem;
        border-radius: 9999px;
        font-weight: 600;
        font-size: 0.875rem;
        cursor: pointer;
        transition: all 0.2s;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }
    .am-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
    .am-btn:disabled { opacity: 0.6; cursor: not-allowed; }
    
    .am-export-row {
        display: flex;
        gap: 1rem;
        margin-bottom: 1.5rem;
        justify-content: flex-end;
    }
    .am-btn-sec {
        background: var(--muted);
        border: 1px solid var(--border);
        padding: 0.5rem 1.25rem;
        border-radius: 9999px;
        font-size: 0.75rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }
    .am-btn-sec.excel:hover { background: #10b981; color: white; border-color: #10b981; }
    .am-btn-sec.pdf:hover { background: #ef4444; color: white; border-color: #ef4444; }
    
    /* KPIs */
    .am-kpis {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    .am-kpi {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 1rem;
        padding: 1rem;
        text-align: center;
        box-shadow: var(--shadow-card);
    }
    .am-kpi.main {
        background: var(--gradient-gold);
        color: var(--navy);
        border: none;
    }
    .am-kpi.main .kpi-header .kpi-icon,
    .am-kpi.main .kpi-label,
    .am-kpi.main .kpi-sub { color: var(--navy); }
    .am-kpi.main .kpi-value { color: var(--navy); }
    
    .kpi-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    .kpi-icon { font-size: 1.25rem; }
    .kpi-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--muted-foreground); }
    .kpi-value {
        font-size: 1.5rem;
        font-weight: 700;
        font-family: var(--font-display);
        margin-bottom: 0.25rem;
    }
    .kpi-sub {
        font-size: 0.65rem;
        color: var(--muted-foreground);
    }
    
    /* Tabla */
    .am-table-wrap {
        overflow-x: auto;
    }
    .am-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.7rem;
    }
    .am-table th,
    .am-table td {
        padding: 0.75rem 0.5rem;
        text-align: right;
        border-bottom: 1px solid var(--border);
    }
    .am-table th:first-child,
    .am-table td:first-child {
        text-align: left;
        font-weight: 600;
    }
    .am-table th {
        background: var(--muted);
        font-weight: 600;
        color: var(--gold);
    }
    .row-initial { background: rgba(210,158,0,0.05); }
    
    /* Legal */
    .am-legal {
        text-align: center;
        font-size: 0.65rem;
        color: var(--muted-foreground);
        margin-top: 1rem;
        padding: 1rem;
        background: var(--muted);
        border-radius: 0.75rem;
    }
    
    /* Footer */
    footer {
        background: var(--gradient-hero);
        color: white;
        margin-top: 3rem;
        padding: 2rem 0;
        text-align: center;
    }
    footer p { color: rgba(255,255,255,0.7); }
    footer a {
        color: rgba(255,255,255,0.7);
        margin: 0 0.5rem;
        font-size: 1.25rem;
        transition: all 0.2s;
        display: inline-block;
        text-decoration: none;
    }
    footer a:hover { color: white; transform: translateY(-2px); }
    
    /* WhatsApp flotante */
    .whatsapp-float {
        position: fixed;
        bottom: 1.5rem;
        right: 1.5rem;
        background: #25D366;
        color: white;
        width: 3.5rem;
        height: 3.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 9999px;
        font-size: 1.75rem;
        box-shadow: 0 10px 25px -5px rgba(0,0,0,0.2);
        transition: transform 0.2s;
        z-index: 40;
        text-decoration: none;
    }
    .whatsapp-float:hover { transform: scale(1.1); }
    
    @media (max-width: 768px) {
        .am-grid { grid-template-columns: 1fr; }
        .am-kpis { grid-template-columns: 1fr; }
        .am-export-row { justify-content: center; }
    }
    /* Quitar flechas en Chrome, Safari, Edge */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
