:root {
    --red-dark: #791c16;
    --red-primary: #941e17;
    --red-secondary: #c52e2e;
    --red-accent: #ef4444;
    --primary-navy: #0d2e70;
    --primary-blue: #132e6c;
    --secondary-blue: #2563eb;
    --accent-blue: #3b82f6;
    --light-blue: #dbeafe;

    /* Nuevas variables para mejoras UX */
    --success-green: #16a34a;
    --success-bg: #f0fdf4;
    --success-border: #86efac;
    --warning-orange: #f59e0b;
    --warning-bg: #fffbeb;
    --info-blue: #3b82f6;
    --info-bg: #eff6ff;

    /* Gradientes */
    --gradient-navy: linear-gradient(135deg, #0c2340 0%, #1e3a5f 100%);
    --gradient-navy-light: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
    --gradient-success: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    --gradient-gold: linear-gradient(135deg, #c9a227 0%, #d4af37 100%);

    /* Sombras */
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow-navy: 0 0 20px rgba(13, 46, 112, 0.3);
    --shadow-glow-success: 0 0 15px rgba(22, 163, 74, 0.3);
}

.gradient-bg {
    background: #ffffff;
    position: relative;
    box-shadow: 0 7px 6px 6px rgba(0, 0, 0, 0.1);
}
.card-shadow {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
}
.step-active {
    background: linear-gradient(360deg, rgb(148, 30, 23) 9%, rgb(197, 46, 46) 84%);
    color: white;
    box-shadow: 0 4px 6px rgba(237, 238, 246, 0.3);
}
.step-completed {
    background: #0d2e70;
    color: white;
}
.step-pending {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    opacity: 0.5;
}
.step-line {
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    flex: 1;
    margin: 0 1rem;
}
.step-line.completed {
    background: #61b5f0;
}
.btn-primary {
    background: linear-gradient(45deg, var(--primary-navy), var(--primary-blue));
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(20, 55, 115, 0.4);
    background: linear-gradient(45deg, var(--primary-blue), var(--secondary-blue));
}
.btn-secondary {
    background: #6b7280;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background: #4b5563;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}
.form-control {
    width: 100%;
    padding: 10px 20px;
    border: 2px solid #e5e7eb;
    border-bottom: 4px solid #e5e7eb;
    border-radius: 22px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-navy);
    box-shadow: 0 0 0 3px rgba(20, 55, 115, 0.1);
}
.form-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-bottom: 4px solid #e5e7eb;
    border-radius: 22px;
    font-size: 16px;
    background: white;
    cursor: pointer;
}
.form-select:focus {
    outline: none;
    border-color: var(--primary-navy);
    box-shadow: 0 0 0 3px rgba(20, 55, 115, 0.1);
}
.required {
    color: #ef4444;
}
.error-message {
    color: #ef4444;
    font-size: 14px;
    margin-top: 0.25rem;
}
.radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}
.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}
.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
.file-upload-label {
    display: block;
    padding: 12px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    text-align: center;
    background: #f9fafb;
    transition: all 0.3s ease;
}
.file-upload:hover .file-upload-label {
    border-color: var(--primary-navy);
    background: var(--light-blue);
}
.file-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 8px;
    display: none;
}
.file-preview.show {
    display: block;
}
.file-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
}

.section-sub-title {
    font-size: 1.45rem;
    color: #79669e;
}
.section-description {
    font-size: 0.9rem;
    color: #f20808;
}

.line-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 1rem 0;
    opacity: 0.5;
}

/* Estilos para iconos del footer */
.footer-icon {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.footer-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-animation {
    animation: fadeIn 2s ease-in-out;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.service-card {
    position: relative;
    background: white;
    border: 1px solid rgba(229, 231, 235, 0.11);
    border-radius: 16px;
    padding: 3rem 3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 280px;
}

.service-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 20px rgba(30, 74, 140, 0.15);
    transform: translateY(-2px);
}

.service-card.selected {
    border-color: #113870;
    border-width: 3px;
    box-shadow: 0 12px 30px rgba(30, 74, 140, 0.25);
}

.checkmark-badge {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #143773, #2563eb);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(20, 55, 115, 0.4);
    border: 3px solid white;
}

.service-card.selected .checkmark-badge {
    display: flex;
}

.checkmark-icon {
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.service-icon {
    width: 90px;
    height: 90px;
    margin-bottom: 1.5rem;
    color: #1e4a8c;
}

.service-card.selected .service-icon {
    color: #143773;
}

.service-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #374151;
    text-align: center;
    margin: 0;
}

.service-card.selected .service-name {
    color: #1e4a8c;
}

.btn-next {
    background: linear-gradient(45deg, var(--primary-navy), var(--primary-blue));
    color: white;
    padding: 14px 48px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-next:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(20, 55, 115, 0.4);
    background: linear-gradient(45deg, var(--primary-blue), var(--secondary-blue));
}

.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto 3rem;
    margin-top: 2rem;
}

/* Responsive improvements for step indicators */
@media (max-width: 768px) {
    .step-indicator {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .step-line {
        margin: 0 0.5rem;
    }
    .flex.items-start > div > div:last-child {
        font-size: 12px;
        padding: 0 2px;
        max-width: 80px;
    }

    .footer-icon img {
        width: 2rem;
        height: 2rem;
    }
    .footer-icon-container {
        width: 3rem;
        height: 3rem;
    }
}

@media (max-width: 640px) {
    .flex.items-start > div > div:last-child {
        font-size: 11px;
        padding: 0 1px;
        max-width: 60px;
    }
    .section-sub-title {
        font-size: 1.15rem;
    }

    .section-description {
        font-size: 0.60rem;
    }

}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   MEJORAS UX/UI - Step1 y Step4
   ======================================== */

/* Animaciones */
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

@keyframes checkmark {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* Banner de servicio mejorado */
.service-banner {
    background: var(--gradient-navy);
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.service-banner::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05));
}

.service-banner .icon-container {
    width: 72px;
    height: 72px;
    background: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.service-banner .icon-container img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--gradient-success);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    animation: checkmark 0.4s ease-out;
    box-shadow: var(--shadow-glow-success);
}

/* Selectores de tipo de cita mejorados */
.appointment-type-card {
    position: relative;
    cursor: pointer;
    flex: 1;
    min-width: 160px;
}

.appointment-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.appointment-type-card-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    background: white;
    transition: all 0.3s ease;
    text-align: center;
}

.appointment-type-card-label:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.appointment-type-card input[type="radio"]:checked + .appointment-type-card-label {
    border-color: var(--primary-navy);
    background: linear-gradient(to bottom, #f0f7ff, white);
    box-shadow: 0 0 0 3px rgba(13, 46, 112, 0.1), var(--shadow-card);
}

.appointment-type-card-label .icon-wrapper {
    width: 56px;
    height: 56px;
    background: #f3f4f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.appointment-type-card input[type="radio"]:checked + .appointment-type-card-label .icon-wrapper {
    background: var(--gradient-navy);
}

.appointment-type-card-label .icon-wrapper svg {
    width: 28px;
    height: 28px;
    color: #6b7280;
    transition: color 0.3s ease;
}

.appointment-type-card input[type="radio"]:checked + .appointment-type-card-label .icon-wrapper svg {
    color: white;
}

.appointment-type-card-label .card-title {
    font-weight: 600;
    font-size: 1rem;
    color: #374151;
}

.appointment-type-card-label .card-description {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}

.appointment-type-card input[type="radio"]:checked + .appointment-type-card-label .card-title {
    color: var(--primary-navy);
}

/* Campos de formulario con validación visual */
.form-field-wrapper {
    position: relative;
}

.form-field-wrapper .validation-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: none;
}

.form-field-wrapper.is-valid .validation-icon.valid {
    display: block;
    color: var(--success-green);
    animation: checkmark 0.3s ease-out;
}

.form-field-wrapper.is-invalid .validation-icon.invalid {
    display: block;
    color: var(--red-accent);
}

.form-field-wrapper.is-valid .form-control {
    border-color: var(--success-green);
    background-color: var(--success-bg);
}

.form-field-wrapper.is-invalid .form-control {
    border-color: var(--red-accent);
    background-color: #fef2f2;
    animation: shake 0.4s ease-out;
}

/* Sección de grupo familiar mejorada */
.family-section {
    background: linear-gradient(to bottom, #f8fafc, white);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
}

.family-section-header {
    background: var(--gradient-navy-light);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.family-section-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.family-counter {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.family-section-body {
    padding: 1.5rem;
}

/* Cards de miembros del grupo */
.member-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    animation: slideInUp 0.4s ease-out;
}

.member-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-card);
}

.member-card.is-leader {
    border-color: var(--primary-navy);
    background: linear-gradient(to right, #f0f7ff, white);
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.member-avatar.adult {
    background: var(--gradient-navy);
    color: white;
}

.member-avatar.minor {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: white;
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.member-details {
    font-size: 0.875rem;
    color: #6b7280;
}

.member-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.member-badge.leader {
    background: #dbeafe;
    color: var(--primary-navy);
}

.member-badge.minor {
    background: #fef3c7;
    color: #92400e;
}

.member-badge.adult {
    background: #f3f4f6;
    color: #4b5563;
}

.member-actions .btn-remove {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: #fef2f2;
    color: #dc2626;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.member-actions .btn-remove:hover {
    background: #dc2626;
    color: white;
}

/* Stagger animation para miembros */
.member-card:nth-child(1) { animation-delay: 0ms; }
.member-card:nth-child(2) { animation-delay: 80ms; }
.member-card:nth-child(3) { animation-delay: 160ms; }
.member-card:nth-child(4) { animation-delay: 240ms; }
.member-card:nth-child(5) { animation-delay: 320ms; }
.member-card:nth-child(6) { animation-delay: 400ms; }

/* Info callout mejorado */
.info-callout {
    position: relative;
    background: linear-gradient(to right, var(--info-bg), white);
    border: 1px solid #bfdbfe;
    border-left: 4px solid var(--primary-blue);
    border-radius: 0 12px 12px 0;
    padding: 1.25rem 1.5rem;
    display: flex;
    gap: 1rem;
}

.info-callout-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-navy);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-callout-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.info-callout-content h4 {
    font-weight: 600;
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
}

.info-callout-content p {
    color: #4b5563;
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Botón primario mejorado */
.btn-primary-enhanced {
    background: var(--gradient-navy);
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
}

.btn-primary-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover), var(--shadow-glow-navy);
}

.btn-primary-enhanced:active {
    transform: translateY(0);
}

.btn-primary-enhanced svg {
    transition: transform 0.3s ease;
}

.btn-primary-enhanced:hover svg {
    transform: translateX(4px);
}

/* Botón de confirmar con pulse */
.btn-confirm {
    background: var(--gradient-success);
    border: none;
    padding: 16px 40px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover), var(--shadow-glow-success);
}

.btn-confirm:not(:disabled):focus {
    animation: pulse-glow 1.5s infinite;
}

.btn-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    animation: none;
}

/* Resumen de solicitud mejorado */
.summary-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid #e5e7eb;
}

.summary-card-header {
    background: var(--gradient-navy);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
}

.summary-card-header svg {
    width: 24px;
    height: 24px;
}

.summary-card-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.summary-card-body {
    padding: 1.5rem;
}

.summary-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item-icon {
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.summary-item-icon svg {
    width: 16px;
    height: 16px;
    color: var(--primary-navy);
}

.summary-item-label {
    font-size: 0.875rem;
    color: #6b7280;
    min-width: 120px;
}

.summary-item-value {
    font-weight: 600;
    color: #1f2937;
    flex: 1;
    text-align: right;
}

/* Desglose de pago mejorado */
.payment-breakdown {
    background: linear-gradient(to bottom, #f8fafc, white);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
}

.payment-breakdown-header {
    background: white;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.payment-breakdown-header svg {
    width: 24px;
    height: 24px;
    color: var(--primary-navy);
}

.payment-breakdown-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.payment-breakdown-body {
    padding: 1.5rem;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
}

.payment-row.total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--primary-navy);
    font-size: 1.125rem;
}

.payment-row.total .payment-label,
.payment-row.total .payment-value {
    font-weight: 700;
}

.payment-row.total .payment-value {
    color: var(--primary-navy);
    font-size: 1.375rem;
}

/* Términos y condiciones mejorados */
.terms-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
}

.terms-card-header {
    background: #f9fafb;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.terms-card-header svg {
    width: 20px;
    height: 20px;
    color: #6b7280;
}

.terms-card-header h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.terms-card-body {
    padding: 1.25rem 1.5rem;
}

.terms-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.terms-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
}

.terms-list li svg {
    width: 18px;
    height: 18px;
    color: var(--success-green);
    flex-shrink: 0;
    margin-top: 2px;
}

/* Checkbox mejorado */
.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-checkbox:hover {
    border-color: var(--primary-blue);
    background: white;
}

.custom-checkbox.is-checked {
    border-color: var(--success-green);
    background: var(--success-bg);
}

.custom-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--success-green);
}

.custom-checkbox-label {
    font-weight: 500;
    color: #374151;
}

.custom-checkbox-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Responsive para mejoras */
@media (max-width: 640px) {
    /* Cards de tipo de cita - Layout horizontal compacto en móvil */
    .appointment-type-card-label {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 0.875rem 1rem;
        gap: 0.875rem;
    }

    .appointment-type-card-label .icon-wrapper {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    .appointment-type-card-label .icon-wrapper svg {
        width: 22px;
        height: 22px;
    }

    .appointment-type-card-label .card-title {
        font-size: 0.9375rem;
    }

    .appointment-type-card-label .card-description {
        font-size: 0.75rem;
        margin-top: 0.125rem;
    }

    .member-card {
        flex-wrap: wrap;
    }

    .member-badge {
        margin-top: 0.5rem;
    }

    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .summary-item-value {
        text-align: left;
    }

    .btn-confirm {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   SECCIÓN: CUÁNTO PAGARÁ (payment-summary)
   ======================================== */

.payment-summary-card {
    background: white;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
                0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.payment-summary-header {
    background: var(--gradient-navy);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.payment-summary-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.payment-summary-icon svg {
    width: 26px;
    height: 26px;
    color: white;
}

.payment-summary-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0;
    letter-spacing: -0.01em;
}

.payment-summary-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0.25rem 0 0 0;
}

.payment-summary-body {
    padding: 1.5rem;
}

/* Card de cada persona */
.person-payment-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.person-payment-card:last-of-type {
    margin-bottom: 0;
}

.person-payment-card:hover {
    border-color: #cbd5e1;
}

.person-payment-card.is-primary {
    border-color: var(--primary-navy);
    border-width: 2px;
    background: linear-gradient(to bottom, #f0f7ff, #f8fafc);
}

.person-payment-header {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    border-bottom: 1px solid #e2e8f0;
    background: white;
}

.person-avatar {
    width: 42px;
    height: 42px;
    background: var(--gradient-navy);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.person-avatar.is-minor {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.person-info {
    flex: 1;
    min-width: 0;
}

.person-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9375rem;
    display: block;
}

.person-tags {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.person-tag {
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.person-tag.tag-leader {
    background: #dbeafe;
    color: var(--primary-navy);
}

.person-tag.tag-minor {
    background: #fef3c7;
    color: #92400e;
}

.person-tag.tag-relation {
    background: #f1f5f9;
    color: #475569;
}

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

.person-total-label {
    font-size: 0.75rem;
    color: #64748b;
    display: block;
}

.person-total-value {
    font-weight: 700;
    color: var(--primary-navy);
    font-size: 1rem;
}

/* Detalles del pago por persona */
.person-payment-details {
    padding: 0.875rem 1.25rem;
}

.payment-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.payment-line:not(:last-child) {
    border-bottom: 1px dashed #e2e8f0;
}

.payment-line-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: #475569;
    font-size: 0.875rem;
}

.payment-line-icon {
    width: 18px;
    height: 18px;
    color: #94a3b8;
}

.payment-line.is-subservice .payment-line-info {
    padding-left: 0.5rem;
    color: #64748b;
    font-size: 0.8125rem;
}

.payment-line.is-subservice .payment-line-icon {
    width: 16px;
    height: 16px;
    color: var(--success-green);
}

.payment-line-amount {
    font-weight: 600;
    color: #334155;
    font-size: 0.875rem;
}

.payment-line.is-subservice .payment-line-amount {
    font-size: 0.8125rem;
    color: #475569;
}

/* Nota de acompañante */
.companion-note {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    margin: 1rem 0;
    font-size: 0.875rem;
    color: #92400e;
}

.companion-note svg {
    width: 20px;
    height: 20px;
    color: #f59e0b;
    flex-shrink: 0;
}

/* Total final */
.payment-total-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 2px solid var(--primary-navy);
}

.payment-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-total-info .payment-total-label {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    display: block;
}

.payment-total-persons {
    font-size: 0.8125rem;
    color: #64748b;
}

.payment-total-amount {
    text-align: right;
}

.payment-total-amount .currency {
    font-size: 0.875rem;
    color: #64748b;
    margin-right: 0.25rem;
}

.payment-total-amount .amount {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-navy);
    letter-spacing: -0.02em;
}

/* Responsive mejorado para payment-summary */
@media (max-width: 640px) {
    /* === HEADER === */
    .payment-summary-header {
        padding: 0.875rem 1rem;
    }

    .payment-summary-icon {
        width: 36px;
        height: 36px;
    }

    .payment-summary-icon svg {
        width: 20px;
        height: 20px;
    }

    .payment-summary-title {
        font-size: 1rem;
    }

    .payment-summary-subtitle {
        font-size: 0.75rem;
    }

    /* === BODY === */
    .payment-summary-body {
        padding: 1rem;
    }

    /* === PERSON CARDS === */
    .person-payment-card {
        border-radius: 10px;
        margin-bottom: 0.75rem;
    }

    .person-payment-header {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .person-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9375rem;
        border-radius: 8px;
    }

    .person-name {
        font-size: 0.875rem;
        /* Truncar nombres largos */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 140px;
    }

    .person-tags {
        gap: 0.25rem;
    }

    .person-tag {
        font-size: 0.625rem;
        padding: 0.0625rem 0.375rem;
    }

    .person-total {
        width: 100%;
        text-align: left;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid #e2e8f0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* === PAYMENT DETAILS === */
    .person-payment-details {
        padding: 0.625rem 1rem;
    }

    .payment-line {
        padding: 0.375rem 0;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .payment-line-info {
        font-size: 0.8125rem;
        gap: 0.5rem;
        flex: 1;
        min-width: 0;
    }

    .payment-line-info span {
        /* Truncar nombres de servicios largos */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .payment-line-icon {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    .payment-line-amount {
        font-size: 0.8125rem;
        flex-shrink: 0;
    }

    .payment-line.is-subservice .payment-line-info {
        padding-left: 0.25rem;
        font-size: 0.75rem;
    }

    .payment-line.is-subservice .payment-line-icon {
        width: 14px;
        height: 14px;
    }

    .payment-line.is-subservice .payment-line-amount {
        font-size: 0.75rem;
    }

    /* === COMPANION NOTE === */
    .companion-note {
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
        gap: 0.5rem;
    }

    .companion-note svg {
        width: 18px;
        height: 18px;
    }

    /* === TOTAL SECTION === */
    .payment-total-section {
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .payment-total-row {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .payment-total-info .payment-total-label {
        font-size: 0.875rem;
    }

    .payment-total-persons {
        font-size: 0.75rem;
    }

    .payment-total-amount .currency {
        font-size: 0.75rem;
    }

    .payment-total-amount .amount {
        font-size: 1.375rem;
    }

    /* === VARIANTE COMPACT === */
    .payment-summary-compact {
        margin-bottom: 1rem;
    }

    .payment-summary-compact .p-4 {
        padding: 0.75rem !important;
    }

    .payment-summary-compact .text-sm {
        font-size: 0.8125rem;
    }

    .payment-summary-compact .text-xs {
        font-size: 0.6875rem;
    }

    .payment-summary-compact .text-lg {
        font-size: 1rem;
    }

    /* === VARIANTE MINIMAL === */
    .payment-summary-minimal {
        padding: 0.75rem;
    }

    .payment-summary-minimal .text-lg {
        font-size: 1rem;
    }
}

/* Extra small devices (menos de 380px) */
@media (max-width: 380px) {
    .payment-summary-header {
        padding: 0.75rem;
    }

    .payment-summary-body {
        padding: 0.75rem;
    }

    .person-payment-header {
        padding: 0.625rem 0.75rem;
    }

    .person-name {
        max-width: 110px;
    }

    .payment-total-amount .amount {
        font-size: 1.25rem;
    }

    .person-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
}
