/* ==========================================================================
   CONFIGURACIÓN PREMIUM ESTILO FINTECH
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f8fafc;
    color: #334155;
    line-height: 1.65;
    padding: 3rem 1rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

/* ENLACE VOLVER AL PORTAL */
.back-link {
    display: inline-block;
    font-size: 0.85rem;
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #312e81;
}

/* CABECERA */
header {
    margin-bottom: 3.5rem;
    text-align: left;
    border-left: 4px solid #10b981; /* Verde presupuesto */
    padding-left: 1.5rem;
}

header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
}

header p {
    color: #64748b;
    font-size: 1.05rem;
}

/* GRID PRINCIPAL */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .calculator-grid {
        grid-template-columns: 400px 1fr;
    }
}

/* PANELES */
section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01);
}

section h2 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

/* INPUTS Y FORMULARIOS */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.4rem;
}

.input-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1.15rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #0f172a;
    background-color: #ffffff;
    font-weight: 700;
    transition: all 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.input-group small {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.3rem;
}

.divider-form {
    height: 1px;
    background-color: #e2e8f0;
    margin: 2rem 0;
}

.slider-notice {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
}

/* GRUPOS DE SLIDERS PERSONALIZADOS */
.slider-group {
    margin-bottom: 1.75rem;
}

.slider-label-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
}

.slider-label-row label {
    flex-grow: 1;
}

.pct-value {
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
}

/* PUNTOS DE COLOR PARA LEYENDA */
.dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    margin-right: 8px;
}
.label-needs { background-color: #3b82f6; }
.label-wants { background-color: #f97316; }
.label-savings { background-color: #10b981; }

/* DISEÑO MODERNO DE LAS BARRAS DESLIZANTES */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Colores específicos por barra */
.accent-blue::-webkit-slider-thumb { background: #3b82f6; }
.accent-orange::-webkit-slider-thumb { background: #f97316; }
.accent-emerald::-webkit-slider-thumb { background: #10b981; }

/* RECUADROS Y TABLAS DE RESULTADOS */
.table-container {
    overflow-x: auto;
    margin-bottom: 2.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

th {
    padding: 0.75rem 1rem;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #f1f5f9;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #0f172a;
}

/* Colores sutiles a las filas para guiar la vista */
.row-needs td { border-left: 3px solid #3b82f6; }
.row-wants td { border-left: 3px solid #f97316; }
.row-savings td { border-left: 3px solid #10b981; }

td:not(:first-child) {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* CONTENEDOR GRÁFICO (DONUT) */
.chart-container {
    position: relative;
    height: 260px;
    width: 100%;
    margin-top: 1rem;
}

/* SECCIÓN SEO PERFECTO */
.seo-content {
    margin-top: 4.5rem;
    padding-top: 3.5rem;
    border-top: 1px solid #e2e8f0;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.seo-content h2 {
    font-size: 1.6rem;
    color: #0f172a;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    font-weight: 800;
}

.seo-content h3 {
    font-size: 1.2rem;
    color: #0f172a;
    margin-top: 2.25rem;
    margin-bottom: 0.85rem;
    font-weight: 700;
}

.seo-content p {
    color: #475569;
    font-size: 0.98rem;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.seo-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.75rem;
    color: #475569;
    font-size: 0.98rem;
}

.seo-content li {
    margin-bottom: 0.85rem;
}

.seo-content strong {
    color: #0f172a;
}

/* PIE DE PÁGINA */
footer {
    margin-top: 6rem;
    text-align: center;
    font-size: 0.8rem;
    color: #94a3b8;
    border-top: 1px solid #e2e8f0;
    padding-top: 2rem;
}

footer p {
    margin-bottom: 0.35rem;
}

/* Efecto hover suave para el botón de Buy Me a Coffee */
.support-section a:hover img, .privacy-box a:hover img {
  transform: scale(1.05);
  filter: brightness(1.05);
}