/* =====================================
   RYDER HUMANO - Estilo "Trader Pro Soft"
   Versión 5.5 | Colores Pro + Formas Suaves + Full Móvil
   ===================================== */

:root {
    /* --- MISMOS COLORES QUE TE GUSTARON (V5) --- */
    --bg-main: #0a0a0a;
    /* Negro fondo */
    --bg-secondary: #171717;
    /* Gris panel */
    --card-surface: #262626;
    /* Gris tarjetas */
    --card-border: #404040;
    /* Bordes sutiles */

    --invest-green: #22c55e;
    /* Verde Ganancia */
    --invest-hover: #16a34a;
    --premium-gold: #fbbf24;
    /* Dorado */

    --text-white: #ffffff;
    --text-gray: #a3a3a3;

    /* --- NUEVO: VARIABLES DE REDONDEO (Para eliminar los cuadros) --- */
    --radius-panel: 24px;
    /* Curva amplia para el panel principal */
    --radius-card: 16px;
    /* Curva media para tarjetas internas */
    --radius-input: 12px;
    /* Curva suave para inputs */
    --radius-pill: 50px;
    /* Redondo total para botones */
}

/* Reset básico para asegurar responsive */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-white);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 20px 0;
    /* Un poco de aire arriba y abajo */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Centrar verticalmente si hay espacio */
    min-height: 100vh;
    padding-bottom: 5vh;
    /* Evita que el teclado tape todo en móvil */

    /* --- EL FONDO QUE TE GUSTÓ (V5) --- */
    background-image:
        radial-gradient(var(--card-border) 1px, transparent 1px),
        radial-gradient(var(--card-border) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.9);
    /* Vignette oscura */
}

/* Panel Principal - RESPONSIVE Y REDONDEADO */
.glass-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    /* Curvas suaves, ya no es un cuadrado */
    border-radius: var(--radius-panel);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 10;

    /* AJUSTE MÓVIL CRÍTICO */
    width: 95%;
    /* Ocupa casi todo el ancho en celular */
    max-width: 480px;
    /* Ancho máximo en Desktop */
    margin: 0 auto;
    overflow: hidden;
}

/* Version Tablet/Desktop más amplia si es necesario */
@media (min-width: 768px) {
    .glass-panel {
        width: 80%;
        max-width: 600px;
        /* Un poco más ancho en tablets/PC para respirar */
        padding: 2.5rem !important;
        /* Más padding interno */
    }
}

/* Línea de decoración superior */
.glass-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--invest-green), var(--premium-gold));
}

/* Tarjetas de Estadísticas - Ahora son burbujas suaves */
.stat-card {
    background: var(--card-surface);
    /* Borde redondeado completo */
    border-radius: var(--radius-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Borde muy sutil */
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Centrado para móvil se ve mejor */
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--invest-green);
    /* Se ilumina el borde al tocar */
}

.stat-value {
    font-size: 1.6rem;
    /* Un poco más grande para leer fácil en celular */
    font-weight: 700;
    color: var(--text-white);
    font-family: monospace;
    /* Mantenemos la fuente técnica */
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Inputs - Suaves y Modernos */
.input-field {
    background: #050505;
    /* Fondo casi negro */
    border: 1px solid var(--card-border);
    color: var(--text-white);
    padding: 1rem 1.25rem;
    /* Padding cómodo para dedos */
    border-radius: var(--radius-input);
    /* Curva suave */
    font-size: 1rem;
    /* Tamaño letra legible (16px evita zoom en iPhone) */
    width: 100%;
    /* Asegura que llene el espacio */
    transition: all 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: var(--invest-green);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
    /* Glow verde suave */
}

/* Botones - FORMA DE PASTILLA (PILL) */
.btn-primary,
.btn-invest {
    background-color: var(--invest-green);
    color: #000;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-pill);
    padding: 1rem 1rem;
    /* Padding lateral menor en móvil para texto largo */
    border: none;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 0.95rem;
    /* Ajuste para evitar quiebres de línea */
}

.btn-primary:hover,
.btn-invest:hover {
    background-color: var(--invest-hover);
    transform: scale(1.02);
    /* Efecto de crecimiento suave */
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Indicadores de Pasos - CÍRCULOS PERFECTOS */
.step-indicator {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 50%;
    /* Círculo */
    transition: all 0.3s;
    font-size: 1rem;
}

.step-active {
    background: var(--invest-green);
    color: black;
    border: none;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.step-inactive {
    background: rgba(255, 255, 255, 0.05);
    color: var(--card-border);
    border: 1px solid var(--card-border);
}

.step-completed {
    background: var(--invest-green);
    color: black;
}

/* Caja de Resumen - Bordes redondeados */
.investment-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--card-border);
    border-radius: var(--radius-card);
    /* Coherencia visual */
    padding: 1rem;
}

/* Checkbox - Círculo */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    background-color: transparent;
    border: 2px solid var(--card-border);
    width: 1.5rem;
    /* Grande para dedo */
    height: 1.5rem;
    border-radius: 50%;
    /* Redondo */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    /* Evita que se aplaste si hay mucho texto */
}

input[type="checkbox"]:checked {
    background-color: var(--invest-green);
    border-color: var(--invest-green);
}

input[type="checkbox"]:checked::after {
    content: '✓';
    color: black;
    font-weight: bold;
    font-size: 1rem;
}

/* Utilidades de Texto y Animación */
.text-highlight,
.gradient-blue {
    color: var(--premium-gold) !important;
}

.gradient-emerald {
    color: var(--invest-green) !important;
}

.animate-slide-up {
    animation: fadeInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* MEDIA QUERIES - Ajustes finos */
@media (max-width: 380px) {
    .stat-value {
        font-size: 1.3rem;
    }

    .glass-panel {
        width: 100%;
        /* Full width en móviles muy pequeños */
        border-radius: 0 0 var(--radius-panel) var(--radius-panel);
        /* Arriba plano si toca el borde (opcional, pero limpio) */
        border-top: none;
        border-left: none;
        border-right: none;
    }

    .btn-primary {
        padding: 0.9rem;
        font-size: 0.9rem;
    }
}

/* Stats Container Grid System */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Horizontal en todos los tamaños */
    gap: 0.5rem;
    /* Menos espacio en móvil */
}

@media (min-width: 640px) {
    .stats-grid {
        gap: 1rem;
    }
}

/* Ajustes específicos para móviles pequeños */
@media (max-width: 640px) {
    .stat-card {
        padding: 0.75rem 0.25rem;
        /* Más compacto */
    }

    .stat-value {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    .trust-badge {
        margin-bottom: 1rem !important;
    }

    h1 {
        font-size: 2.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    #header-section p {
        margin-bottom: 1.5rem !important;
        font-size: 1rem !important;
    }

    #header-section .flex.justify-center.flex-wrap.gap-4 {
        gap: 0.5rem !important;
    }
}

/* --- ESTILOS DE IMPRESIÓN (FACTURA PROFESIONAL) --- */
@media print {

    /* Ocultar todo lo normal, mostrar solo factura */
    body>* {
        display: none !important;
    }

    #printable-invoice {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        background: white;
        color: black;
        font-family: 'Times New Roman', serif;
        /* Look oficial */
        padding: 40px;
    }

    /* Reset de estilos oscuros para impresión */
    body {
        background: white !important;
        box-shadow: none !important;
    }

    .invoice-container {
        max-width: 800px;
        margin: 0 auto;
        border: 1px solid #ddd;
        padding: 40px;
    }

    .invoice-header {
        display: flex;
        justify-content: space-between;
        border-bottom: 2px solid #000;
        padding-bottom: 20px;
        margin-bottom: 30px;
    }

    .company-name {
        font-size: 24px;
        font-weight: bold;
        margin: 0;
        text-transform: uppercase;
    }

    .invoice-meta {
        text-align: right;
    }

    .client-details {
        margin-bottom: 30px;
        line-height: 1.6;
    }

    .invoice-items {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 40px;
    }

    .invoice-items th {
        border-bottom: 2px solid #000;
        text-align: left;
        padding: 10px 0;
    }

    .invoice-items td {
        border-bottom: 1px solid #eee;
        padding: 10px 0;
    }

    .text-right {
        text-align: right;
    }

    .font-bold {
        font-weight: bold;
    }

    .invoice-footer {
        margin-top: 60px;
        text-align: center;
        font-size: 12px;
        color: #555;
    }

    .signature-box {
        margin-top: 50px;
        margin-bottom: 20px;
        display: inline-block;
    }

    .signature-line {
        border-top: 1px solid #000;
        width: 200px;
        margin: 0 auto 5px auto;
    }
}