.prestamo-container {
    display: flex;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.prestamo-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.5rem 2rem;
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: hidden;
}

.prestamo-titulo {
    font-weight: 700;
    font-size: 1.4rem;
    color: #1e3a5f;
    margin-bottom: 1rem;
}

.prestamo-seccion {
    margin-bottom: 1rem;
}

.prestamo-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    display: block;
    margin-bottom: 0.25rem;
}

.prestamo-hint {
    color: #999;
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
    font-style: italic;
}

/* Range slider */
.prestamo-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
}

.prestamo-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2196F3;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.prestamo-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2196F3;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.prestamo-monto {
    font-size: 1.1rem;
    color: #555;
    margin: 0.25rem 0 0 0;
}

/* Select */
.prestamo-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #333;
    background: #fff;
    margin-top: 0.3rem;
    outline: none;
}

.prestamo-select:focus {
    border-color: #1e3a5f;
    box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.12);
}

/* Abono */
.prestamo-abono {
    font-weight: 700;
    font-size: 1.2rem;
    color: #5a3e2b;
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Checkbox amortización */
.amortizacion-toggle {
    margin-top: 1.2rem;
}

.prestamo-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    cursor: pointer;
}

.prestamo-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2196F3;
    cursor: pointer;
}

/* Panel amortización */
.amortizacion-panel {
    margin-top: 1rem;
    border-top: 1px solid #e0e0e0;
    padding-top: 1rem;
}

.amortizacion-titulo {
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.75rem;
}

.amortizacion-tabla-wrapper {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.amortizacion-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.amortizacion-tabla thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.amortizacion-tabla th {
    background: #1e3a5f;
    color: #fff;
    padding: 0.5rem 0.75rem;
    text-align: right;
    font-weight: 600;
}

.amortizacion-tabla td {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
    text-align: right;
}

.amortizacion-tabla th:nth-child(1),
.amortizacion-tabla td:nth-child(1) {
    text-align: center;
}

.amortizacion-tabla th:nth-child(2),
.amortizacion-tabla td:nth-child(2) {
    text-align: center;
}

.amortizacion-tabla tbody tr:nth-child(even) {
    background: #f8fafb;
}

.amortizacion-tabla tbody tr:hover {
    background: #e8f0f8;
}

/* Evitar zoom en iOS al hacer foco en inputs */
@media (max-width: 767.98px) {
    .prestamo-card select,
    .prestamo-card input[type="text"],
    .prestamo-card input[type="number"] {
        font-size: 16px !important;
    }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 575.98px) {
    .prestamo-card {
        padding: 1rem 0.75rem;
        border-radius: 8px;
        box-shadow: none;
        border: 1px solid #e8e8e8;
    }

    .prestamo-titulo {
        font-size: 1.2rem;
    }

    .prestamo-select {
        font-size: 16px;
    }

    .amortizacion-tabla {
        font-size: 0.82rem;
    }

    .amortizacion-tabla th,
    .amortizacion-tabla td {
        padding: 0.35rem 0.5rem;
    }
}
