* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(145deg, #eef2f7 0%, #d9e0e8 100%);
    font-family: Roboto, sans-serif;
    line-height: 1.45;
    color: #1a2c3e;
    padding: 2rem 1rem;
}

.modern-container {
    max-width: 1280px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 2rem;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

/* Header */
.hero-header {
    background: linear-gradient(135deg, #c12b44 0%, #A30100 100%);
    padding: 1.8rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 3px solid #00b4d8;
}

.hero-header h2 {
    color: #ffffff;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.brand-badge {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(4px);
    padding: 0.5rem 1.2rem;
    border-radius: 60px;
    font-weight: 500;
    color: white;
    font-size: 0.85rem;
}

.brand-badge span {
    font-weight: 700;
    color: #ffc8a5;
}

/* Step Progress */
.step-progress {
    background: #fef8f9;
    padding: 1rem 2rem;
    border-bottom: 1px solid #f5dce1;
}

.step-progress-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.step-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    background: #f5dce1;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #6e6e6e;
    transition: all 0.3s;
    margin-bottom: 0.5rem;
}

.step-label {
    font-size: 0.75rem;
    color: #6e6e6e;
    font-weight: 500;
    display: block;
}

.step-item.active .step-number {
    background: #c12b44;
    color: white;
    box-shadow: 0 0 0 3px rgba(193, 43, 68, 0.3);
}

.step-item.active .step-label {
    color: #c12b44;
    font-weight: 700;
}

.step-item.completed .step-number {
    background: #28a745;
    color: white;
}

.step-item.completed .step-label {
    color: #28a745;
}

.step-connector {
    flex: 1;
    height: 2px;
    background: #f5dce1;
    margin: 0 0.5rem;
}

.step-connector.completed {
    background: #28a745;
}

/* Two Columns Layout */
.two-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.main-content {
    flex: 2;
    padding: 2rem;
    background: #fff;
}

.sidebar-modern {
    flex: 0.9;
    background: #fef8f9;
    padding: 2rem 1.8rem;
    border-left: 1px solid #f5dce1;
}

/* Typography */
h2 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    background: linear-gradient(120deg, #ffffff, #ffffff);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
    border-left: 5px solid #c12b44;
    padding-left: 1rem;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
    color: #c12b44;
    display: inline-block;
    border-bottom: 3px solid #c12b44;
    padding-bottom: 0.25rem;
}

/* Form Styles */
.form-modern {
    width: 100%;
}
.form-modern .field-group {
    flex: 1;
    min-width: 140px;
    margin-bottom: 1rem;
}
.form-modern input,
.form-modern select,
.form-modern textarea {
    font-family: Roboto, sans-serif;
    border: 1px solid #cfdfed;
    border-radius: 1rem;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    background: #fff;
    transition: 0.2s;
    width: 100%;
}

.form-modern input:focus,
.form-modern select:focus,
.form-modern textarea:focus {
    outline: none;
    border-color: #c12b44;
    box-shadow: 0 0 0 3px rgba(193, 43, 68, 0.2);
}

.form-modern input.required-error,
.form-modern select.required-error,
.form-modern textarea.required-error {
    border-color: #c12b44;
    background-color: #fef5f7;
    box-shadow: 0 0 0 1px rgba(193, 43, 68, 0.2);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-end;
}

.form-row .field-group {
    flex: 1;
    min-width: 140px;
    position: relative;
}

.label-modern {
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
    display: block;
    color: #6e6e6e;
}

.required-asterisk {
    color: #e63946;
    font-size: 0.9rem;
    margin-left: 0.2rem;
}

/* Error and Validation Messages */
.error-message {
    color: #e63946;
    font-size: 0.7rem;
    margin-top: 0.3rem;
    display: block;
    font-weight: 500;
}

.valid-message {
    color: #28a745;
    font-size: 0.7rem;
    margin-top: 0.3rem;
    display: block;
    font-weight: 500;
}

.warning-message {
    color: #856404;
    font-size: 0.7rem;
    margin-top: 0.3rem;
    display: block;
    background: #fff3cd;
    padding: 0.3rem 0.5rem;
    border-radius: 0.5rem;
}

/* Age Card */
.age-card {
    background: linear-gradient(135deg, #fef5f7 0%, #fdf0f2 100%);
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    border: 1px solid #f0ccd3;
}

.age-info {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.age-item {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.age-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #c12b44;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.age-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: #c12b44;
}

.age-actuarial {
    background: #c12b44;
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 3rem;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Price Card */
/* Price Card */
.precio-card {
    background: linear-gradient(135deg, #2a9d8f 0%, #21867a 100%);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    margin-top: 1rem;
    text-align: center;
}

.precio-card-error {
    background: linear-gradient(135deg, #e63946 0%, #b91c2c 100%);
}

.precio-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 0.5rem;
}

.precio-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    display: inline-block;
}

.precio-mes {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    display: inline-block;
    margin-left: 0.3rem;
}

.precio-loading {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
}

.precio-error {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Buttons */
.btn-next,
.btn-prev,
.btn-contratar {
    background: #c12b44;
    border: none;
    padding: 0.9rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 3rem;
    color: white;
    transition: 0.2s;
    cursor: pointer;
    margin-top: 0.5rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-next:hover,
.btn-prev:hover,
.btn-contratar:hover {
    background: #9e2338;
    transform: translateY(-2px);
}

.btn-next:disabled,
.btn-prev:disabled,
.btn-contratar:disabled {
    background: #e0a6b2;
    cursor: not-allowed;
    transform: none;
}

.btn-prev {
    background: #6c757d;
}

.btn-prev:hover {
    background: #5a6268;
}

.btn-contratar {
    background: #c12b44;
    width: 100%;
}

.btn-contratar:hover {
    background: #9e2338;
}

.button-group {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Alerts */
.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: #fef5f7;
    color: #c12b44;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem;
    border-left: 4px solid #c12b44;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: #cce5ff;
    color: #004085;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem;
    border-left: 4px solid #007bff;
}

/* Warning Text */
.warning-text {
    font-size: 0.7rem;
    line-height: 1.4;
    color: #c12b44;
    background: #fef5f7;
    padding: 0.8rem;
    border-radius: 1rem;
    border-left: 4px solid #c12b44;
    margin: 1rem 0;
}

/* Info Box */
.info-box-riesgo {
    background: #fef5f7;
    border-radius: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #c12b44;
    text-align: center;
}

.info-box {
    background: white;
    border-radius: 1.5rem;
    padding: 1.2rem;
    margin-bottom: 1.8rem;
    box-shadow: 0 6px 14px rgba(193, 43, 68, 0.05);
    border: 1px solid #f0ccd3;
}

.info-box h4 {
    color: #c12b44;
    margin-bottom: 1rem;
}

.contact-data {
    font-size: 0.85rem;
    background: #fef5f7;
    border-radius: 1rem;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

/* Checkbox Accept */
.checkbox-accept {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin: 1rem 0;
}

.checkbox-accept input {
    width: 20px;
    margin-top: 0.2rem;
    accent-color: #c12b44;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.loading-spinner {
    background: white;
    padding: 2rem;
    border-radius: 2rem;
    text-align: center;
}

.loading-spinner .spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
    margin-bottom: 1rem;
}

.resumen-precio {
    background: linear-gradient(135deg, #c12b44 0%, #9e2338 100%);
    border-radius: 1rem;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
    color: white;
}

.resumen-precio .label {
    font-size: 0.8rem;
    opacity: 0.9;
}

.resumen-precio .valor {
    font-size: 2rem;
    font-weight: 800;
}

footer {
    background: #f1f5f9;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.75rem;
    color: #6e6e6e;
    border-top: 1px solid #e2edf5;
}

/* Resumen Page */
.resumen-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 2rem;
    box-shadow: 0 25px 45px -12px rgba(193, 43, 68, 0.25);
    overflow: hidden;
}

.resumen-body {
    padding: 2rem 2.5rem;
}

.contratacion-exitosa {
    background: #fef5f7;
    color: #c12b44;
    padding: 1rem;
    border-radius: 1rem;
    text-align: center;
    margin-bottom: 2rem;
    border-left: 4px solid #c12b44;
}

.two-columns-resumen {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.info-section {
    flex: 1;
    background: #fef8f9;
    border-radius: 1.2rem;
    padding: 1.5rem;
    border: 1px solid #f0ccd3;
}

.info-section h3 {
    color: #c12b44;
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #c12b44;
    display: inline-block;
}

.info-row {
    display: flex;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f5dce1;
}

.info-label {
    width: 35%;
    font-weight: 600;
    color: #c12b44;
}

.info-value {
    width: 65%;
    color: #2d1a1f;
}

.precio-section {
    background: linear-gradient(135deg, #c12b44 0%, #9e2338 100%);
    border-radius: 1.2rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.precio-label {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.precio-valor {
    color: white;
    font-size: 3rem;
    font-weight: 800;
    margin: 0.5rem 0;
}

.precio-detalle {
    color: rgb(255, 255, 255);
    font-size: 0.85rem;
}

.valid-badge {
    display: inline-block;
    background: #2a9d8f;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    margin-left: 0.5rem;
}

/* Para el campo fecha_efecto específicamente */
#fecha_efecto {
    font-family: monospace;
    letter-spacing: 0.5px;
}

#fecha_efecto.required-error {
    border-color: var(--danger);
    background-color: #fff8f8;
}

#fecha_efecto:focus.required-error {
    box-shadow: 0 0 0 3px rgba(230,57,70,0.1);
}

.riesgo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(193, 43, 68, 0.1);
    margin-top: 1rem;
}

.riesgo-table thead th {
    background: linear-gradient(135deg, #c12b44, #8a1e31);
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #9e2338;
}

.riesgo-table tbody td {
    padding: 10px 8px;
    border: 1px solid #f0ccd3;
    text-align: center;
}

.riesgo-table tbody tr:nth-child(even) {
    background-color: #fef8f9;
}

.riesgo-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.riesgo-table tbody td:first-child {
    font-weight: 600;
}

.riesgo-table tbody td:last-child {
    background: #fef5f7;
    font-weight: 700;
    color: #c12b44;
}

.indemnizacion-value {
    font-weight: 700;
    font-size: 1rem;
    color: #c12b44;
}

.footer-resumen {
    background: #fef5f7;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.75rem;
    color: #c12b44;
    border-top: 1px solid #f0ccd3;
}

/* Responsive */
@media (max-width: 800px) {
    .hero-header {
        flex-direction: column;
        text-align: center;
    }

    .main-content,
    .sidebar-modern {
        flex: auto;
        width: 100%;
    }

    .sidebar-modern {
        border-left: none;
        border-top: 1px solid #f0ccd3;
    }

    .two-columns {
        flex-direction: column;
    }

    .two-columns-resumen {
        flex-direction: column;
        gap: 1rem;
    }

    .form-row .field-group {
        min-width: 100%;
    }

    .age-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .precio-value {
        font-size: 1.8rem;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .btn-next,
    .button-group .btn-prev {
        width: 100%;
        text-align: center;
    }

    .step-label {
        display: none;
    }

    .step-number {
        width: 40px;
        height: 40px;
        background: #e6edf4;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        color: #8a7d7d;
        transition: all 0.3s;
        margin-bottom: 0.5rem;
    }

    .step-connector {
        display: none;
    }

    .info-row {
        flex-direction: column;
    }

    .info-label,
    .info-value {
        width: 100%;
    }

    .info-label {
        margin-bottom: 0.25rem;
    }

    .riesgo-table {
        font-size: 0.7rem;
    }

    .riesgo-table thead th,
    .riesgo-table tbody td {
        padding: 6px 4px;
    }

    .resumen-body {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .hero-header,
    .button-group,
    footer,
    .btn-next,
    .btn-prev,
    .btn-contratar,
    .sidebar-modern,
    .step-progress {
        display: none;
    }

    body {
        background: white;
        padding: 0;
    }

    .modern-container,
    .resumen-container {
        box-shadow: none;
        border-radius: 0;
    }

    .alert-success {
        background: #d4edda !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .precio-section,
    .resumen-precio {
        background: #c12b44 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Utility Classes */
img {
    max-width: 100%;
    height: auto;
}

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

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

/* Estilos para el campo mismo_asegurado */
#mismo_asegurado.required-error {
    border-color: #e63946 !important;
    background-color: #fff8f8 !important;
}

#mismo_asegurado.valid-field {
    border-color: #2a9d8f !important;
    background-color: #f0fff8 !important;
}

.info-message-mismo-asegurado {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ============================================
   ESTILOS PARA PASO 2 - CAMPOS READONLY/DISABLED
   ============================================ */

/* Estilos para campos readonly y disabled en general */
input[readonly],
textarea[readonly],
input[disabled],
select[disabled] {
    background-color: #e9ecef !important;
    cursor: not-allowed !important;
    opacity: 0.85;
    border-color: #dee2e6 !important;
}

/* Estilo específico para inputs readonly */
input[readonly] {
    background-color: #f5f5f5;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

/* Estilo específico para select disabled */
select[disabled] {
    background-color: #f5f5f5;
    color: #6c757d;
    border: 1px solid #dee2e6;
    appearance: none;
    -webkit-appearance: none;
}

/* Estilo para textarea readonly */
textarea[readonly] {
    background-color: #f5f5f5;
    color: #6c757d;
    border: 1px solid #dee2e6;
    resize: none;
}

/* Mensaje de advertencia del paso 2 */
.paso2-warning {
    background: linear-gradient(135deg, #e8f4f8 0%, #d1ecf1 100%);
    border-left: 4px solid #17a2b8;
    padding: 1rem;
    border-radius: 1rem;
    margin: 1rem 0;
    font-size: 0.85rem;
    color: #0c5460;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.paso2-warning-icon {
    font-size: 1.25rem;
}

.paso2-warning strong {
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

/* Estilos para el contenedor de campos bloqueados */
.bloqueado-container {
    position: relative;
}

.bloqueado-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(233, 236, 239, 0.3);
    border-radius: 1rem;
    pointer-events: none;
}

/* Tooltip para campos bloqueados */
.readonly-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.readonly-tooltip:hover:after {
    content: "Campo bloqueado - Los datos se copian del tomador";
    position: absolute;
    background: #333;
    color: white;
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    top: -25px;
    left: 0;
    z-index: 100;
}

/* Estilos para campos readonly con efecto visual */
input[readonly]:focus,
select[disabled]:focus {
    outline: none;
    box-shadow: none;
    border-color: #dee2e6;
}

/* Indicador visual de campo bloqueado */
.field-group.readonly-field {
    position: relative;
}

.field-group.readonly-field::after {
    content: "🔒 Bloqueado";
    position: absolute;
    right: 10px;
    top: 32px;
    font-size: 0.65rem;
    color: #6c757d;
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    pointer-events: none;
}

/* ============================================
   ESTILOS PARA PASO 2 - VERSIÓN MINIMALISTA
   ============================================ */

/* Estilos para campos readonly y disabled */
input[readonly],
textarea[readonly],
input[disabled],
select[disabled] {
    background-color: #e9ecef !important;
    cursor: not-allowed !important;
    opacity: 0.85;
    border-color: #dee2e6 !important;
}

/* Mensaje de advertencia del paso 2 */
.paso2-warning {
    background: #e8f4f8;
    border-left: 4px solid #17a2b8;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    font-size: 0.85rem;
    color: #0c5460;
}

.paso2-warning strong {
    font-weight: 700;
}

/* Animación para el mensaje */
.paso2-warning {
    animation: fadeIn 0.3s ease-out;
}
