/* ─────────────────────────────────────────────────────────────────────────────
   Install Wizard — install.css
   Matches the auth.css visual language (gradient bg, white card, indigo palette)
───────────────────────────────────────────────────────────────────────────── */

/* ── Body / page wrapper ─────────────────────────────────────────────────── */
.iz-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 60%, #faf5ff 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px 60px;
    position: relative;
    overflow-x: hidden;
}

.iz-body::before {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, .06) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    pointer-events: none;
}

.iz-body::after {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, .05) 0%, transparent 70%);
    bottom: -120px;
    left: -100px;
    pointer-events: none;
}

.iz-wrap {
    width: 100%;
    max-width: 840px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}

/* ── Brand ───────────────────────────────────────────────────────────────── */
.iz-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 800;
    color: #1e1b4b;
    letter-spacing: -.3px;
}

.iz-brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Step progress bar ───────────────────────────────────────────────────── */
.iz-steps {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 560px;
}

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

.iz-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    transition: background .25s, border-color .25s, color .25s;
}

.iz-step-label {
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    transition: color .25s;
}

/* Pending state */
.iz-step--pending .iz-step-circle {
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    color: #94a3b8;
}

.iz-step--pending .iz-step-label {
    color: #94a3b8;
}

/* Active state */
.iz-step--active .iz-step-circle {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: 2px solid transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, .35);
}

.iz-step--active .iz-step-label {
    color: #4f46e5;
}

/* Done state */
.iz-step--done .iz-step-circle {
    background: #22c55e;
    border: 2px solid transparent;
    color: #fff;
}

.iz-step--done .iz-step-label {
    color: #16a34a;
}

/* Connector lines */
.iz-step-connector {
    flex: 1;
    height: 2px;
    background: #cbd5e1;
    margin-bottom: 22px; /* aligns with circles, not labels */
    transition: background .25s;
}

.iz-step-connector--done {
    background: #22c55e;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.iz-card {
    width: 100%;
    max-width: 540px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .09), 0 1px 3px rgba(0, 0, 0, .05);
    padding: 40px;
    position: relative;
}

.iz-card--wide {
    max-width: 780px;
}

.iz-card--center {
    text-align: center;
    max-width: 480px;
}

/* ── Card typography ─────────────────────────────────────────────────────── */
.iz-card-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.5px;
    margin-bottom: 4px;
}

.iz-card-sub {
    font-size: 13.5px;
    color: #64748b;
    margin-bottom: 28px;
    line-height: 1.55;
}

.iz-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: .7px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1.5px solid #e0e7ff;
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.iz-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13.5px;
    margin-bottom: 22px;
    line-height: 1.5;
}

.iz-alert i {
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}

.iz-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.iz-alert--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.iz-alert--info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* ── Requirements grid ───────────────────────────────────────────────────── */
.iz-req-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
}

.iz-req-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: border-color .15s;
}

.iz-req-item:hover {
    border-color: #e2e8f0;
}

.iz-req-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.iz-req-icon--pass {
    color: #22c55e;
}

.iz-req-icon--fail {
    color: #ef4444;
}

.iz-req-body {
    flex: 1;
    min-width: 0;
}

.iz-req-label {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.iz-req-detail {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.45;
}

/* ── Required badge ──────────────────────────────────────────────────────── */
.iz-badge-required {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    text-transform: uppercase;
    letter-spacing: .4px;
    vertical-align: middle;
}

/* ── Form fields ─────────────────────────────────────────────────────────── */
.iz-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.iz-input {
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #111827;
    background: #f9fafb;
    padding: 10px 14px;
    transition: border-color .18s, box-shadow .18s, background .18s;
}

.iz-input:focus {
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
    outline: none;
}

.iz-input.is-invalid {
    border-color: #ef4444;
    background: #fff;
}

.iz-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .1);
}

/* ── DB test result ──────────────────────────────────────────────────────── */
.iz-test-result {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.iz-test-result--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.iz-test-result--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* ── Form actions row ────────────────────────────────────────────────────── */
.iz-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

.iz-form-actions--right {
    justify-content: flex-end;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.iz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all .2s;
}

.iz-btn--primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, .3);
}

.iz-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, .4);
    filter: brightness(1.06);
    color: #fff;
    text-decoration: none;
}

.iz-btn--primary:active {
    transform: translateY(0);
}

.iz-btn--primary:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    filter: none;
    box-shadow: 0 4px 14px rgba(79, 70, 229, .18);
}

.iz-btn--outline {
    background: #fff;
    color: #4f46e5;
    border: 1.5px solid #c7d2fe;
}

.iz-btn--outline:hover {
    background: #eef2ff;
    border-color: #818cf8;
}

.iz-btn--lg {
    padding: 13px 32px;
    font-size: 15px;
}

/* ── Complete page ───────────────────────────────────────────────────────── */
.iz-complete-icon {
    font-size: 64px;
    color: #22c55e;
    margin-bottom: 16px;
    animation: iz-pulse 2s ease-in-out infinite;
}

@keyframes iz-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.07); opacity: .88; }
}

.iz-complete-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
    margin: 20px auto 0;
    text-align: left;
}

.iz-complete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: #374151;
    font-weight: 500;
}

.iz-complete-item i {
    color: #22c55e;
    font-size: 16px;
    flex-shrink: 0;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.iz-footer {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    padding-top: 4px;
}

/* ── Spinner (for test button) ───────────────────────────────────────────── */
.iz-spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(79, 70, 229, .25);
    border-top-color: #4f46e5;
    animation: iz-spin .7s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

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

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .iz-body { padding: 24px 12px 48px; }
    .iz-wrap { gap: 18px; }
    .iz-card { padding: 28px 20px; }
    .iz-card--wide { padding: 28px 20px; }
    .iz-req-grid { grid-template-columns: 1fr; }
    .iz-step-label { font-size: 10px; }
    .iz-form-actions { flex-direction: column-reverse; align-items: stretch; }
    .iz-btn { justify-content: center; }
}
