/* ============================================================
   AdPlatform Registration Portal Styles
   ============================================================ */

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

:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --card-bg: #ffffff;
    --border: rgba(0,0,0,0.09);
    --border-light: rgba(0,0,0,0.05);
    --text: #1a1d23;
    --text-secondary: #5f6672;
    --text-dim: #9099a4;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: rgba(59,130,246,0.08);
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --success: #16a34a;
    --success-bg: #dcfce7;
    --warning-bg: #fef3cd;
    --warning-border: #ffc107;
    --warning-text: #856404;
    --header-height: 56px;
    --card-radius: 12px;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
}


/* ============================================================
   Shell Layout
   ============================================================ */

.shell { min-height: 100vh; display: flex; flex-direction: column; }

.shell-header {
    background: #1a1a2e;
    color: #fff;
    padding: 0 24px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shell-logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 24px; color: var(--accent); }
.logo-text { font-size: 18px; font-weight: 600; }
.logo-badge {
    font-size: 11px;
    background: var(--accent);
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.shell-user { display: flex; align-items: center; gap: 16px; }
.user-name { font-size: 13px; opacity: 0.9; }

.btn-signout {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
}
.btn-signout:hover { background: rgba(255,255,255,0.1); }

.shell-content {
    flex: 1;
    padding: 32px 24px;
    display: flex;
    justify-content: center;
}

.shell-footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.5);
    padding: 12px 24px;
    font-size: 12px;
    text-align: center;
}


/* ============================================================
   Loading
   ============================================================ */

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    color: var(--text-dim);
    gap: 16px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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


/* ============================================================
   Wizard Container
   ============================================================ */

.wizard-container {
    width: 100%;
    max-width: 580px;
}


/* ============================================================
   Progress Stepper
   ============================================================ */

.stepper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 28px;
    padding: 0 8px;
}

.stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
}

.stepper-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    background: #e5e7eb;
    color: var(--text-dim);
    transition: all 0.25s ease;
}

.stepper-active .stepper-circle {
    background: var(--accent);
    color: #fff;
}

.stepper-complete .stepper-circle {
    background: var(--success);
    color: #fff;
}

.stepper-label {
    font-size: 11px;
    margin-top: 4px;
    color: var(--text-dim);
    font-weight: 400;
}

.stepper-active .stepper-label {
    color: var(--accent);
    font-weight: 600;
}

.stepper-complete .stepper-label {
    color: var(--success);
}

.stepper-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin: 15px 8px 0;
    transition: background 0.25s ease;
}

.stepper-line-complete {
    background: var(--success);
}


/* ============================================================
   Step Card
   ============================================================ */

.step-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.03);
}

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

.step-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.step-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.step-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

.step-fine-print {
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.6;
    margin-top: 24px;
}


/* ============================================================
   Sign-In Providers
   ============================================================ */

.provider-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
    margin: 0 auto;
}

.btn-provider {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    background: var(--surface);
    color: var(--text);
}

.btn-provider:hover { border-color: var(--accent); background: var(--accent-light); }
.btn-provider:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-provider-google { background: #fff; border-color: #d1d5db; }
.btn-provider-apple { background: #000; color: #fff; border-color: #000; }
.btn-provider-apple:hover { background: #1a1a1a; border-color: #1a1a1a; }
.btn-provider-microsoft { background: #0078d4; color: #fff; border-color: #0078d4; }
.btn-provider-microsoft:hover { background: #006abc; border-color: #006abc; }

/* Two-path landing */
.path-choice { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }

.btn-path {
    display: flex; align-items: center; gap: 16px;
    padding: 18px 20px; border-radius: 12px; border: 2px solid var(--border);
    background: #fff; cursor: pointer; text-align: left;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
}
.btn-path:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.btn-path-primary:hover { border-color: #0078d4; box-shadow: 0 0 0 3px rgba(0,120,212,0.1); }

.path-icon { font-size: 24px; flex-shrink: 0; }
.path-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.path-text strong { font-size: 15px; color: var(--text); font-weight: 600; }
.path-text span { font-size: 13px; color: var(--text-muted); }
.path-arrow { font-size: 18px; color: var(--text-muted); flex-shrink: 0; }

.btn-back {
    display: inline-flex; align-items: center; gap: 4px;
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 14px; padding: 0 0 16px 0;
    transition: color 0.15s;
}
.btn-back:hover { color: var(--text); }

.provider-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}


/* ============================================================
   Forms
   ============================================================ */

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition: border-color 0.15s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-group textarea {
    resize: vertical;
    line-height: 1.5;
}

.form-group select {
    cursor: pointer;
}

.form-help {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}


/* ============================================================
   Buttons
   ============================================================ */

.step-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.btn-primary {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    padding: 10px 24px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}

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


/* ============================================================
   Info Cards & Banners
   ============================================================ */

.info-card {
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.info-card-primary {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.info-card-secondary {
    font-size: 13px;
    color: var(--text-secondary);
}

.info-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #1e40af;
    line-height: 1.5;
    margin-bottom: 16px;
}

.info-banner code {
    background: #dbeafe;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.info-banner-highlight {
    background: #fefce8;
    border-color: #fde68a;
    color: #92400e;
}

.info-banner-highlight code {
    background: #fef3c7;
}


/* ============================================================
   Error
   ============================================================ */

.error-message {
    background: var(--danger-bg);
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 16px;
    color: #991b1b;
    font-size: 13px;
    margin-bottom: 16px;
}


/* ============================================================
   Review Step
   ============================================================ */

.review-section {
    margin-bottom: 20px;
}

.review-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.review-section-body {
    background: var(--bg);
    border-radius: 8px;
    padding: 12px 16px;
}

.review-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.review-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.review-value {
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}


/* ============================================================
   Confirmation Step
   ============================================================ */

.confirmation-hero {
    text-align: center;
    padding: 24px 0;
}

.confirmation-check {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success), #059669);
    color: #fff;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.confirmation-hero h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}


/* ── Next Steps ── */

.next-steps {
    background: var(--bg);
    border-radius: var(--card-radius);
    padding: 24px;
    margin-bottom: 16px;
}

.next-steps-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.next-steps-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.next-step-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.next-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.next-step-label {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
    margin-bottom: 2px;
}

.next-step-desc {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}


/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 640px) {
    .shell-content { padding: 20px 12px; }
    .step-card { padding: 24px 20px; }
    .stepper-label { font-size: 10px; }
    .stepper-item { min-width: 44px; }
    .review-row { flex-direction: column; gap: 2px; }
    .review-value { text-align: left; max-width: 100%; }
}

/* ── Account Type Selector ─────────────────────────────────────────────── */

.account-type-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.account-type-option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}

.account-type-option:hover {
    border-color: var(--accent);
    background: var(--bg);
}

.account-type-option.selected {
    border-color: var(--accent);
    background: var(--accent-light);
}

.account-type-icon {
    font-size: 22px;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
}

.account-type-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.account-type-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.account-type-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.account-type-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    background: transparent;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.account-type-option.selected .account-type-check {
    background: var(--accent);
    border-color: var(--accent);
}
