
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --success: #059669;
    --error: #dc2626;
    --warning: #d97706;
    --off-white: #f8fafc;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --navy: #1e293b;
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-accent: linear-gradient(135deg, #22d3ee 0%, #3b82f6 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--off-white);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 1300px;
    margin: 0 auto;
    background: white;
    box-shadow: var(--shadow-xl);

    padding-top: 55px;
}

.form-header {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.form-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><polygon points="0,0 1000,0 1000,60 0,100"/></svg>') no-repeat center bottom;
    background-size: cover;
}

.form-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.form-header p {
    font-size: 1.25rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.progress-container {
    background: var(--gray-100);
    padding: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 60%;
    right: -40%;
    height: 2px;
    background: var(--gray-300);
    z-index: 0;
}

.step.completed:not(:last-child)::after {
    background: var(--success);
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.step.active .step-circle {
    background: var(--primary);
}

.step.completed .step-circle {
    background: var(--success);
}

.step-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    text-align: center;
}

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

.form-container {
    flex: 1;
    padding: 3rem 2rem;
}

.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

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

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.section-description {
    color: var(--gray-600);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-row.two-cols {
    grid-template-columns: 1fr 1fr;
}

.form-row.three-cols {
    grid-template-columns: 1fr 1fr 1fr;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

.required {
    color: var(--error);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 10%);
}

input.error, select.error, textarea.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgb(220 38 38 / 10%);
}

input.valid, select.valid, textarea.valid {
    border-color: var(--success);
}

.error-message {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.customer-type-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.customer-type-option {
    border: 2px solid var(--gray-300);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.customer-type-option:hover {
    border-color: var(--primary);
}

.customer-type-option.selected {
    border-color: var(--primary);
    background: rgb(37 99 235 / 5%);
}

.customer-type-option input[type="radio"] {
    width: auto;
    margin-bottom: 0.5rem;
}

.customer-type-title {
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.25rem;
}

.customer-type-desc {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.business-only {
    transition: all 0.3s ease;
}

.business-only.hidden {
    display: none;
}

.plan-display {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.plan-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.25rem;
}

.plan-type {
    color: var(--gray-600);
    text-transform: uppercase;
    font-size: 0.875rem;
    font-weight: 600;
}


.sip-plan-config {
    margin-top: 1.5rem;
}

.cost-display {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-align: center;
    transition: all 0.3s ease;
}

.cost-display.updated {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.info-notice {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.info-notice p {
    margin: 0;
}

.info-notice strong {
    color: var(--navy);
}

/* Animation for smooth transitions */
.sip-plan-config {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .cost-display {
        margin-top: 0.5rem;
    }
}


.plan-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.feature {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.feature-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.feature-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.cost-summary {
    background: white;
    border: 2px solid var(--primary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.cost-summary h3 {
    color: var(--navy);
    margin-bottom: 1rem;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.cost-item.total {
    border-top: 2px solid var(--gray-200);
    margin-top: 1rem;
    padding-top: 1rem;
    font-weight: 700;
    font-size: 1.125rem;
}

.early-termination-notice {
    background: rgb(217 119 6 / 10%);
    border: 1px solid rgb(217 119 6 / 30%);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
}

.early-termination-notice h4 {
    color: var(--warning);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.early-termination-notice p {
    color: var(--gray-700);
    font-size: 0.875rem;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 1rem 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.125rem;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
    flex: 1;
}

.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.payment-method {
    border: 2px solid var(--gray-300);
    border-radius: 0.75rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.payment-method:hover {
    border-color: var(--primary);
}

.payment-method.selected {
    border-color: var(--primary);
    background: rgb(37 99 235 / 5%);
}

.payment-method input[type="radio"] {
    width: auto;
    margin-bottom: 0.5rem;
}

.payment-method-title {
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.25rem;
}

.payment-method-desc {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.payment-details {
    display: none;
    background: var(--gray-50);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

.payment-details.active {
    display: block;
}

.card-notice {
    background: rgb(59 130 246 / 10%);
    border: 1px solid rgb(59 130 246 / 30%);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
}

.card-notice h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.card-notice p {
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.card-notice .highlight {
    font-weight: 600;
    color: var(--primary);
}

.signature-container {
    border: 2px dashed var(--gray-300);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    background: var(--gray-50);
    margin: 1rem 0;
    transition: all 0.2s ease;
}

.signature-container:hover {
    border-color: var(--primary);
    background: rgb(37 99 235 / 5%);
}

.signature-container.has-signature {
    border-color: var(--success);
    background: rgb(5 150 105 / 5%);
    border-style: solid;
}

.signature-info {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 10px;
}

.signature-controls .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.terms-content {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.terms-content h4 {
    color: var(--navy);
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.terms-content h4:first-child {
    margin-top: 0;
}

.terms-content p {
    margin-bottom: 0.75rem;
}

.terms-content strong {
    color: var(--navy);
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--gray-500);
    color: white;
}

.btn-secondary:hover {
    background: var(--gray-600);
}

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

.step-info {
    color: var(--gray-600);
    font-weight: 500;
}

.success-section {
    text-align: center;
    padding: 3rem;
    display: none;
}

.success-section.active {
    display: block;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2rem;
}

.success-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1rem;
}

.success-description {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.notification {
    position: fixed;
    top: 60px;
    right: -20px;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.notification.show {
    right: 20px;
    transform: translateX(0);
}

.notification.success {
    background: var(--success);
}

.notification.error {
    background: var(--error);
}

.notification.warning {
    background: var(--warning);
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 768px) {
    .container {
        margin: 0;
        border-radius: 0;
    }

    .form-header {
        padding: 2rem 1rem;
    }

    .form-header h1 {
        font-size: 2rem;
    }

    .progress-container {
        padding: 1rem;
    }

    .progress-steps {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .step {
        min-width: 100px;
    }

    .step:not(:last-child)::after {
        display: none;
    }

    .form-container {
        padding: 2rem 1rem;
    }

    .form-row.two-cols,
    .form-row.three-cols {
        grid-template-columns: 1fr;
    }

    .customer-type-selection {
        grid-template-columns: 1fr;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    .plan-features {
        grid-template-columns: 1fr 1fr;
    }

    .form-navigation {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

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