/* SpSnap Onboarding Portal */
:root {
    --primary: #0066FF;
    --primary-dark: #0052CC;
    --primary-light: #E6F0FF;
    --success: #00C853;
    --warning: #FF9800;
    --error: #F44336;
    --text: #1a1a2e;
    --text-secondary: #666;
    --bg: #f8f9fc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --radius: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.logo-icon { font-size: 36px; }
.logo-text { font-size: 32px; font-weight: 700; color: var(--primary); }
.tagline { color: var(--text-secondary); font-size: 16px; }

/* Progress Bar */
.progress-bar {
    margin-bottom: 32px;
    padding: 0 10px;
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

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

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

.step-label {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}

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

.step-line {
    flex: 1;
    height: 3px;
    background: var(--border);
    margin: 0 4px;
    margin-bottom: 20px;
    min-width: 20px;
    max-width: 60px;
    transition: background 0.3s;
}

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

/* Step Content */
.step-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

.step-content h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.step-content > p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Info Cards */
.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.info-card h3 { font-size: 16px; margin-bottom: 10px; }
.info-card ul, .info-card ol { padding-left: 20px; }
.info-card li { margin-bottom: 6px; }
.info-card p { color: var(--text-secondary); font-size: 14px; margin-bottom: 6px; }

.info-warning { border-left: 4px solid var(--warning); }

/* Instruction Steps */
.instruction-list { margin-bottom: 20px; }

.instruction {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.instruction-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.instruction-body h4 { font-size: 15px; margin-bottom: 4px; }
.instruction-body p { font-size: 14px; color: var(--text-secondary); margin-bottom: 4px; }
.instruction-body ul { font-size: 14px; padding-left: 18px; }
.instruction-body li { margin-bottom: 2px; }
.instruction-body code { background: var(--primary-light); padding: 2px 6px; border-radius: 4px; font-size: 13px; }

.copy-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f4f4f8;
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 6px;
}

.copy-box code { background: none; font-size: 13px; flex: 1; word-break: break-all; }

.btn-copy {
    background: var(--primary);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-copy:hover { background: var(--primary-dark); }

/* Microsoft consent button */
.consent-button-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.btn-microsoft {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: #fff;
    color: #5e5e5e;
    border: 1px solid #8c8c8c;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-microsoft:hover {
    background: #f4f4f4;
    border-color: #666;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.info-tip { border-left: 4px solid var(--primary); }

/* Forms */
.form-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.form-section h3 { font-size: 16px; margin-bottom: 4px; }
.section-hint { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group input.invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 3px #fde8e8;
}

.form-hint { font-size: 12px; color: var(--text-secondary); margin-top: 2px; display: block; }
.form-error { font-size: 12px; color: var(--error); display: none; margin-top: 2px; }
.form-group input.invalid ~ .form-error { display: block; }

/* Toggle */
.form-group-inline {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.toggle { position: relative; width: 48px; height: 26px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 26px;
    cursor: pointer;
    transition: 0.3s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    left: 3px;
    top: 3px;
    transition: 0.3s;
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(22px); }

/* Review */
.review-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 12px;
}

.review-card h3 { font-size: 15px; margin-bottom: 8px; }

.review-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f5;
}

.review-row:last-child { border-bottom: none; }
.review-row span { color: var(--text-secondary); }
.review-row code { font-size: 12px; background: #f4f4f8; padding: 2px 6px; border-radius: 4px; }

/* Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 16px;
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

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

.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-primary:disabled { background: #aaa; cursor: not-allowed; transform: none; }

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

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

/* Error Banner */
.error-banner {
    background: #fde8e8;
    border: 1px solid var(--error);
    color: var(--error);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

/* Success */
.success-container { text-align: center; }
.success-icon { font-size: 64px; margin-bottom: 16px; }
.success-container h2 { margin-bottom: 12px; }
.success-container > p { color: var(--text-secondary); margin-bottom: 24px; }
.success-container .info-card { text-align: left; }

/* Footer */
.footer {
    text-align: center;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-secondary);
}

.footer a { color: var(--primary); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer p { margin-bottom: 4px; }

/* Spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

/* Responsive */
@media (max-width: 500px) {
    .container { padding: 16px 12px; }
    .step-label { font-size: 9px; }
    .step-circle { width: 30px; height: 30px; font-size: 12px; }
    .instruction { flex-direction: column; gap: 8px; }
    .nav-buttons { flex-direction: column-reverse; gap: 8px; }
    .btn { width: 100%; text-align: center; }
    .review-row { flex-direction: column; gap: 2px; }
}
