/* Loading Spinner Styles */
.loading-spinner-large {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color, #667eea);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color, #667eea);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

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

.payment-loading {
    text-align: center;
    padding: 3rem;
}

.payment-loading p {
    color: #6b7280;
    margin-top: 1rem;
}

.payment-result {
    text-align: center;
    padding: 2rem;
}

.payment-result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.payment-error-message {
    color: var(--error-color, #dc3545);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.payment-error-message a {
    color: var(--primary-color);
    text-decoration: underline;
}

.form-group input.error {
    border-color: var(--error-color, #dc3545);
}

/* Registration Flow Styles */

.registration-flow {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: linear-gradient(135deg, #eef3fa 0%, #dde6f2 100%);
    padding: 70px clamp(16px, 4vw, 40px) 16px;
    overflow: visible;
}

.registration-flow .progress-container {
    flex-shrink: 0;
    margin-bottom: 12px;
    align-self: stretch;
}

.registration-flow .step-content {
    flex: 1;
    min-height: 0;
    display: none;
    flex-direction: column;
    overflow: visible;
    align-self: stretch;
}

.registration-flow .step-content.active {
    display: flex;
}

.registration-flow .step-content .step-header {
    flex-shrink: 0;
    margin-bottom: 12px;
}

.registration-flow .step-content .step-actions {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 12px;
}

/* Step 1: no inner scroll; page scrolls */
#step1.step-content.active {
    overflow: visible;
}

#step1 .step-header h1 {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    margin-bottom: 0;
}

#step1 .service-selection {
    flex: 1;
    min-height: 0;
    display: flex;
    gap: clamp(16px, 2.5vw, 32px);
    margin-bottom: 12px;
    align-items: stretch;
    justify-content: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

#step1 .service-card {
    flex: 1;
    min-width: 0;
    max-width: 420px;
    padding: clamp(20px, 3vw, 32px);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
}

#step1 .service-selection .service-card:only-child {
    max-width: 520px;
}

#step1 .service-icon {
    width: clamp(48px, 10vw, 64px);
    height: clamp(48px, 10vw, 64px);
    margin: 0 auto clamp(8px, 1.5vw, 16px);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

#step1 .service-card h3 {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    margin-bottom: clamp(4px, 1vw, 10px);
}

#step1 .service-description {
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    margin-bottom: clamp(8px, 1.5vw, 16px);
    line-height: 1.4;
}

#step1 .service-features {
    flex: 1;
    margin-bottom: clamp(8px, 1.5vw, 16px);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(4px, 1vw, 8px) clamp(12px, 2vw, 20px);
    text-align: left;
    align-content: start;
}

#step1 .feature-item {
    padding: clamp(3px, 0.5vw, 6px) 0;
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
}

#step1 .service-checkbox {
    padding: clamp(8px, 1.5vw, 12px);
    margin-top: auto;
}

#step1 .service-select-text {
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.plan-degloss .feature-row {
    padding: clamp(4px, 1vw, 8px) 0;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
}

/* Progress Bar - full width, clean stepper UI */
.progress-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: white;
    padding: 16px clamp(12px, 3vw, 24px);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: visible;
    position: relative;
}

/* Thin top progress bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 20%;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    overflow: visible;
    gap: 0;
    width: 100%;
}

/* No full track: only segments between two steps (no line before 1 or after 6) */

.step-indicator {
    flex: 1;
    min-width: 0;
    max-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    overflow: visible;
}

/* One segment per step: the line BETWEEN this step and the next (steps 1–5 only; step 6 has none).
   Segment 1–2 is drawn by step 1, segment 2–3 by step 2, etc. Grey by default; blue when that step is completed. */
.step-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: calc(50% + 20px);
    width: 150%; /* reach to next step; next circle covers overlap so line doesn’t show inside it */
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
    pointer-events: none;
    box-sizing: content-box;
}

.step-indicator:last-child::before {
    display: none; /* no segment after step 6 */
}

.step-indicator.completed::before {
    background: var(--primary-color); /* e.g. on step 2, step 1 is completed → segment 1–2 turns blue */
}

.step-indicator.active::before {
    background: var(--gray-200); /* segment before active step is also blue (we’ve passed it) */
}

.step-actions .btn-primary,
.step-actions .btn-large {
    min-width: 180px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border: 3px solid var(--gray-200);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.step-indicator.active .step-number {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(12, 50, 135, 0.1);
}

.step-indicator.completed .step-number {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

/* No checkmark on completed steps – green circle only */
.step-indicator.completed .step-number::after {
    content: none;
    display: none;
}

.step-label {
    font-size: 0.8rem;
    color: var(--gray-600);
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-top: 4px;
}

.step-indicator.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Step Content - full width of flow area */
.step-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
    background: white;
    padding: clamp(20px, 3vw, 40px);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    display: none;
    animation: fadeInSlide 0.4s ease;
}

.step-content.active {
    display: block;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 20px;
}

.step-header h1 {
    font-size: var(--font-size-4xl);
    color: var(--gray-900);
    margin-bottom: 10px;
}

.step-header p {
    font-size: var(--font-size-lg);
    color: var(--gray-600);
}

/* Service Selection */
.service-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.service-card {
    background: white;
    border: 3px solid var(--gray-200);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.service-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(12, 50, 135, 0.05) 0%, rgba(12, 50, 135, 0.02) 100%);
    box-shadow: 0 0 0 4px rgba(12, 50, 135, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
}

.service-card h3 {
    font-size: var(--font-size-2xl);
    color: var(--gray-900);
    margin-bottom: 15px;
}

.service-description {
    color: var(--gray-600);
    margin-bottom: 25px;
    line-height: 1.6;
}

.service-features {
    text-align: left;
    margin-bottom: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: var(--gray-700);
}

.feature-item i {
    color: var(--success-color);
    font-size: 1.1rem;
}

/* Hidden checkbox when only one service (e.g. Expediente) – no UI, just keeps form state */
.service-checkbox-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.service-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    padding: 15px;
    background: var(--gray-50);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.service-card.selected .service-checkbox {
    background: var(--primary-color);
    color: white;
}

.service-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark-large {
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-400);
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.service-card.selected .checkmark-large {
    background: white;
    border-color: white;
}

.service-card.selected .checkmark-large::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-color);
    font-weight: bold;
    font-size: 16px;
}

.service-select-text {
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--gray-700);
}

.service-card.selected .service-select-text {
    color: white;
}

/* Plan Selection (Step 2: Elige tus Planes) */
#step2 .step-header {
    text-align: center;
}

#step2 .step-header h1 {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    margin-bottom: 4px;
}

#step2 .step-header p {
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.plan-section {
    width: 100%;
    margin-bottom: clamp(24px, 4vw, 50px);
}

.plan-section:last-of-type {
    margin-bottom: 0;
}

.section-title-plan {
    font-size: clamp(1rem, 2.5vw, var(--font-size-2xl));
    color: var(--gray-900);
    margin-bottom: clamp(16px, 3vw, 30px);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title-plan i {
    color: var(--primary-color);
    flex-shrink: 0;
}

.plans-grid-register {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: clamp(16px, 3vw, 30px);
    margin-bottom: clamp(20px, 4vw, 40px);
    width: 100%;
}

.plan-section .plans-grid-register:last-child {
    margin-bottom: 0;
}

.plan-card-register {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: clamp(12px, 2.5vw, 20px);
    padding: clamp(16px, 3vw, 30px);
    transition: all 0.3s ease;
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.plan-card-register:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.plan-card-register.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(12, 50, 135, 0.05) 0%, rgba(12, 50, 135, 0.02) 100%);
    box-shadow: 0 0 0 4px rgba(12, 50, 135, 0.1);
}

.plan-card-register.featured {
    border-color: var(--primary-color);
}

@media (min-width: 769px) {
    .plan-card-register.featured {
        transform: scale(1.03);
    }
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 5px clamp(12px, 2vw, 20px);
    border-radius: 20px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    white-space: nowrap;
}

.plan-header-register {
    text-align: center;
    margin-bottom: clamp(16px, 2.5vw, 25px);
    padding-bottom: clamp(16px, 2.5vw, 25px);
    border-bottom: 2px solid var(--gray-100);
}

.plan-header-register h3 {
    font-size: clamp(1.1rem, 2.5vw, var(--font-size-2xl));
    color: var(--gray-900);
    margin-bottom: clamp(8px, 1.5vw, 15px);
}

.plan-price-register {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.plan-price-register .currency {
    font-size: clamp(1rem, 2vw, var(--font-size-xl));
    color: var(--gray-600);
}

.plan-price-register .amount {
    font-size: clamp(1.5rem, 4vw, var(--font-size-4xl));
    font-weight: 700;
    color: var(--primary-color);
}

.plan-price-register .period {
    font-size: clamp(0.875rem, 1.5vw, var(--font-size-lg));
    color: var(--gray-600);
}

.plan-features-register {
    margin-bottom: clamp(12px, 2vw, 20px);
    flex: 1;
    min-height: 0;
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: clamp(8px, 1.5vw, 12px) 0;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    font-size: clamp(0.8rem, 1.5vw, 0.95rem);
}

.feature-row:last-child {
    border-bottom: none;
}

.feature-row i {
    color: var(--primary-color);
    width: 20px;
    min-width: 20px;
    font-size: 1rem;
    flex-shrink: 0;
}

.feature-row span {
    min-width: 0;
    word-wrap: break-word;
}

.plan-upgrades {
    background: var(--gray-50);
    padding: clamp(10px, 2vw, 15px);
    border-radius: 12px;
    margin-bottom: clamp(12px, 2vw, 20px);
}

.plan-upgrades small {
    display: block;
    color: var(--gray-600);
    font-size: var(--font-size-xs);
    margin-bottom: 4px;
}

.plan-upgrades small:last-child {
    margin-bottom: 0;
}

.btn-select-plan {
    width: 100%;
    padding: clamp(12px, 2vw, 14px);
    background: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    font-weight: 600;
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.plan-card-register.selected .btn-select-plan {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-select-plan:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Plan Overview */
.plan-overview {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #bae6fd;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
}

.plan-overview h3 {
    font-size: var(--font-size-lg);
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-overview-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--gray-200);
}

.plan-overview-item:last-child {
    margin-bottom: 0;
}

.plan-overview-service {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-100);
}

.plan-overview-service i {
    font-size: 2rem;
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12, 50, 135, 0.1);
    border-radius: 12px;
}

.plan-overview-service strong {
    display: block;
    font-size: var(--font-size-lg);
    color: var(--gray-900);
    margin-bottom: 5px;
}

.plan-tier {
    color: var(--gray-600);
    font-size: var(--font-size-sm);
}

.plan-overview-details {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.plan-overview-details .detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-700);
    font-size: var(--font-size-sm);
}

.plan-overview-details .detail-item i {
    color: var(--primary-color);
    font-size: 1rem;
}

/* Promo Code Section */
.promo-code-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #bae6fd;
    border-radius: 16px;
    padding: 25px;
    margin: 30px 0;
}

.promo-code-section h3 {
    font-size: var(--font-size-lg);
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.promo-code-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.promo-code-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 10px;
    font-size: var(--font-size-base);
    text-transform: uppercase;
}

.promo-code-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(12, 50, 135, 0.1);
}

.promo-code-message {
    padding: 12px;
    border-radius: 10px;
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: 10px;
}

.promo-code-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.promo-code-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

/* Total Amount Box */
.total-amount-box {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
    color: white;
    text-align: center;
}

.total-discount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.discount-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--font-size-base);
    font-weight: 500;
}

.discount-value {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: #a7f3d0;
}

.total-original {
    margin-top: 10px;
    opacity: 0.8;
}

.total-original small {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: line-through;
}

.total-amount-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.total-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--font-size-lg);
    font-weight: 500;
}

.total-label i {
    font-size: 1.5rem;
}

.total-value {
    font-size: var(--font-size-4xl);
    font-weight: 700;
}

.total-note {
    text-align: center;
    opacity: 0.9;
}

.total-note small {
    color: rgba(255, 255, 255, 0.9);
}

/* Subscription Options */
.subscription-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.subscription-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.subscription-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.subscription-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(12, 50, 135, 0.05) 0%, rgba(12, 50, 135, 0.02) 100%);
    box-shadow: 0 0 0 4px rgba(12, 50, 135, 0.1);
}

.subscription-card.featured {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.subscription-header {
    margin-bottom: 20px;
}

.subscription-header h3 {
    font-size: var(--font-size-2xl);
    color: var(--gray-900);
    margin-bottom: 15px;
}

.discount-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    background: var(--gray-200);
    color: var(--gray-700);
}

.discount-badge.discount {
    background: var(--warning-color);
    color: white;
}

.discount-badge.best {
    background: var(--success-color);
    color: white;
}

.subscription-price {
    margin-bottom: 25px;
}

.price-label {
    display: block;
    font-size: var(--font-size-lg);
    color: var(--gray-600);
    margin-bottom: 8px;
}

.savings {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--success-color);
    font-weight: 600;
}

.subscription-features {
    text-align: left;
    margin-bottom: 30px;
}

.btn-select-subscription {
    width: 100%;
    padding: 14px;
    background: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
}

.subscription-card.selected .btn-select-subscription {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-select-subscription:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Registration Form */
.registration-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 2px solid var(--gray-100);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section-title {
    font-size: var(--font-size-xl);
    color: var(--gray-900);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subsection-prompt {
    font-size: 1.1rem;
    color: var(--primary-color, #0C3287);
    margin-bottom: 8px;
    font-weight: 500;
}

.subsection-hint {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 16px;
}

.radio-group-inline,
.form-row .radio-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-right: 20px;
}

.radio-label input[type="radio"] {
    margin-right: 6px;
}

/* Terms checkboxes: hide native checkbox so only the custom .checkmark shows (one checkmark) */
.registration-form .checkbox-group .checkbox-label {
    position: relative;
}
.registration-form .checkbox-group .checkbox-label input[type="checkbox"] {
    position: absolute;
    left: 0;
    top: 2px;
    opacity: 0;
    width: 22px;
    height: 22px;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

/* Review & Upgrades Section */
.review-upgrades-container {
    max-width: 1000px;
    margin: 0 auto;
}

.service-review-section {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.service-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gray-100);
}

.service-review-header h3 {
    font-size: var(--font-size-2xl);
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 12px;
}

.service-review-header h3 i {
    color: var(--primary-color);
}

.selected-plan-badge {
    background: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.upgrade-section {
    margin-top: 25px;
}

.upgrade-section h4 {
    font-size: var(--font-size-lg);
    color: var(--gray-900);
    margin-bottom: 20px;
}

.upgrade-item {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.upgrade-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(12, 50, 135, 0.1);
}

.upgrade-info {
    margin-bottom: 15px;
}

.upgrade-info label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--gray-900);
    font-size: var(--font-size-base);
    margin-bottom: 8px;
}

.upgrade-info label i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.upgrade-info small {
    color: var(--gray-600);
    font-size: var(--font-size-sm);
}

.upgrade-info strong {
    color: var(--primary-color);
}

.upgrade-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.btn-upgrade-decrease,
.btn-upgrade-increase {
    width: 40px;
    height: 40px;
    border: 2px solid var(--gray-300);
    background: white;
    border-radius: 8px;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-upgrade-decrease:hover,
.btn-upgrade-increase:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.btn-upgrade-decrease:disabled,
.btn-upgrade-increase:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upgrade-controls input[type="number"] {
    width: 80px;
    padding: 10px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    text-align: center;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-900);
    background: white;
}

.upgrade-unit {
    color: var(--gray-600);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.upgrade-cost {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--gray-200);
}

.cost-label {
    color: var(--gray-600);
    font-size: var(--font-size-sm);
}

.cost-value {
    color: var(--primary-color);
    font-weight: 700;
    font-size: var(--font-size-lg);
}

.review-total-box {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    color: white;
}

.review-total-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.review-total-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.review-total-value {
    font-size: var(--font-size-4xl);
    font-weight: 700;
}

.review-total-breakdown {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: var(--font-size-sm);
}

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

.breakdown-total {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    font-size: var(--font-size-lg);
}

/* Confirmation Summary */
.confirmation-summary {
    max-width: 900px;
    margin: 0 auto;
}

.summary-upgrades {
    margin-left: 20px;
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.summary-upgrades small {
    color: var(--gray-600);
    font-size: var(--font-size-xs);
    padding-left: 10px;
}

.summary-upgrade {
    background: var(--gray-50);
    padding-left: 20px;
}

.summary-section {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
}

.summary-section h3 {
    font-size: var(--font-size-xl);
    color: var(--gray-900);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.summary-section h3 i {
    color: var(--primary-color);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.summary-item-label {
    color: var(--gray-700);
    font-weight: 500;
}

.summary-item-value {
    color: var(--gray-900);
    font-weight: 600;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 12px;
    margin-top: 20px;
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.confirmation-note {
    display: flex;
    gap: 20px;
    background: #f0f9ff;
    border: 2px solid #bae6fd;
    border-radius: 16px;
    padding: 25px;
    margin: 30px 0;
}

.note-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.note-content {
    flex: 1;
    color: var(--gray-700);
    line-height: 1.6;
}

.note-content strong {
    color: var(--gray-900);
}

/* Step Actions */
.step-actions {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--gray-100);
}

.step-actions .btn {
    min-width: 150px;
}

/* Success Modal */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.success-modal-content {
    background: white;
    padding: 60px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.success-icon-large {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, var(--success-color), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-modal-content h2 {
    font-size: var(--font-size-3xl);
    color: var(--gray-900);
    margin-bottom: 15px;
}

.success-modal-content p {
    color: var(--gray-600);
    margin-bottom: 30px;
}

.success-spinner {
    margin-top: 20px;
}

/* Alert modal (replaces browser alert - no "localhost" in title) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.2s ease;
}

.modal-overlay-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.modal-overlay-body p {
    color: var(--gray-800, #1f2937);
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .registration-flow {
        padding: 60px 10px 10px;
        min-height: 100vh;
    }

    .progress-container {
        padding: 12px 10px;
    }

    .progress-steps::before {
        top: 18px;
    }

    .step-indicator::before {
        top: 18px;
        left: calc(50% + 18px);
    }

    .step-number {
        width: 36px;
        height: 36px;
        margin-bottom: 6px;
        font-size: 0.9rem;
    }

    .step-content {
        padding: 16px 12px;
    }

    .step-header h1 {
        font-size: var(--font-size-3xl);
    }

    #step1 .service-selection {
        flex-direction: column;
        gap: 10px;
    }

    #step1 .service-card {
        min-height: 0;
    }

    .service-selection,
    .subscription-options {
        grid-template-columns: 1fr;
    }

    .plans-grid-register {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .step-actions {
        flex-direction: column;
        gap: 10px;
    }

    .step-actions .btn {
        width: 100%;
    }

    .step-indicator .step-label {
        display: none;
    }

    .plan-card-register.featured {
        transform: none;
    }

    .subscription-card.featured {
        transform: none;
    }
}

@media (max-height: 700px) {
    .registration-flow {
        padding: 60px 12px 8px;
    }

    #step1 .step-header h1 {
        font-size: 1.15rem;
    }

    #step1 .service-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    #step1 .service-card h3 {
        font-size: 1rem;
    }

    #step1 .service-description,
    #step1 .feature-item {
        font-size: 0.8rem;
    }
}