/* PICMS Enhanced Onboarding Wizard Styles */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --background: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
}

.onboarding-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

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

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.progress-step.active .step-circle {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

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

.progress-step.completed .step-circle::after {
    content: '✓';
    position: absolute;
    font-size: 18px;
}

.step-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
}

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

.progress-line {
    height: 2px;
    background: var(--border);
    flex: 1;
    margin: 0 -1rem;
    margin-bottom: 1.5rem;
}

/* Step Content */
.step-content {
    background: var(--surface);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    animation: fadeIn 0.3s ease;
}

.step-content.hidden {
    display: none;
}

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

.step-content h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.help-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Buttons */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

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

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

.btn-secondary:hover {
    background: #475569;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-selected {
    background: var(--success-color);
    color: white;
    border: 2px solid var(--success-color);
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.125rem;
}

/* Bundle Notice */
.bundle-notice {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease;
}

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

.notice-icon {
    font-size: 1.5rem;
}

.notice-text {
    color: #92400e;
    font-weight: 600;
}

/* Standards Grid */
.standards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.standard-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.standard-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.standard-card.selected {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.standard-card.recommended {
    border-color: var(--warning-color);
}

.standard-header {
    margin-bottom: 1rem;
}

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

.standard-category {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.standard-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.standard-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.standard-features {
    margin-bottom: 1rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.feature-check {
    color: var(--success-color);
    font-weight: 700;
    flex-shrink: 0;
}

.recommended-badge {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: inline-block;
}

/* User Count */
.user-count-display {
    text-align: center;
    margin-bottom: 2rem;
}

.user-count-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.user-count-label {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--border);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.1);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pricing-tier-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
}

.tier-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.tier-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.original-price {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.tier-total {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Premium Card (Expert Support) */
.premium-card {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 3px solid #8b5cf6;
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa, #c4b5fd);
}

.premium-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.premium-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.premium-icon {
    font-size: 2rem;
}

.premium-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.premium-badge {
    background: #8b5cf6;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.premium-subtitle {
    font-size: 1rem;
    color: #6b21a8;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.premium-features {
    margin-bottom: 1.5rem;
}

.premium-features .feature-item {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.premium-price {
    font-size: 2rem;
    font-weight: 700;
    color: #8b5cf6;
    text-align: center;
    margin: 1.5rem 0;
}

.premium-testimonial {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border-left: 4px solid #8b5cf6;
}

.testimonial-quote {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.testimonial-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.premium-toggle {
    text-align: center;
    margin-bottom: 1.5rem;
}

.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    user-select: none;
}

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

.toggle-slider {
    width: 60px;
    height: 30px;
    background: #cbd5e1;
    border-radius: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
    background: #8b5cf6;
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::after {
    transform: translateX(30px);
}

.toggle-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.additional-services {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-top: 1.5rem;
}

.additional-services h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.additional-services p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.services-list {
    list-style: none;
    margin-bottom: 1rem;
}

.services-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.services-list li:last-child {
    border-bottom: none;
}

/* Legal Register Preview */
.legal-register-preview {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.legal-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.legal-header p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.regulations-list {
    margin-bottom: 1.5rem;
}

.regulation-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
}

.regulation-check {
    color: var(--success-color);
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.regulation-info {
    flex: 1;
}

.regulation-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.regulation-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.legal-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
}

/* Pricing Summary */
.pricing-summary-container {
    max-width: 600px;
    margin: 0 auto;
}

.pricing-breakdown {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.pricing-breakdown h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.pricing-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.pricing-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pricing-section h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.standards-list {
    margin-bottom: 1rem;
}

.standard-item {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.pricing-line.discount {
    color: var(--success-color);
    font-weight: 600;
}

.pricing-line.total {
    font-weight: 700;
    font-size: 1.125rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.pricing-line.grand-total {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.total-section {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--primary-color);
}

.annual-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--success-color);
}

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

.annual-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 0.5rem;
}

.annual-benefit {
    font-size: 1.125rem;
    font-weight: 600;
    color: #15803d;
    margin-bottom: 0.5rem;
}

.annual-equivalent {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.payment-toggle {
    text-align: center;
    margin-bottom: 2rem;
}

.annual-toggle {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

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

.security-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.badge {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.payment-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

/* Success Page */
.success-animation {
    text-align: center;
    margin-bottom: 3rem;
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounce 1s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.success-message {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.quick-start-checklist {
    max-width: 500px;
    margin: 0 auto 2rem;
}

.quick-start-checklist h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
}

.checklist-item.completed {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: var(--success-color);
}

.check-icon {
    font-size: 1.25rem;
    font-weight: 700;
}

.checklist-item.completed .check-icon {
    color: var(--success-color);
}

/* Floating Price Summary */
.floating-price-summary {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--surface);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    max-width: 200px;
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.summary-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.summary-line.total {
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .onboarding-container {
        padding: 1rem;
    }

    .progress-bar {
        padding: 1rem;
        overflow-x: auto;
    }

    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .step-label {
        font-size: 10px;
    }

    .step-content {
        padding: 1.5rem;
    }

    .step-content h1 {
        font-size: 1.5rem;
    }

    .standards-grid {
        grid-template-columns: 1fr;
    }

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

    .btn {
        width: 100%;
    }

    .floating-price-summary {
        top: 1rem;
        right: 0.5rem;
        min-width: 150px;
        max-width: 180px;
        padding: 0.5rem 0.75rem;
    }

    .user-count-number {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .progress-bar {
        flex-wrap: nowrap;
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }

    .progress-step {
        min-width: 60px;
    }

    .progress-line {
        min-width: 20px;
    }
}
