:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --border: #dbe3ef;
    --surface: #ffffff;
    --success: #15803d;
    --danger: #b91c1c;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 40px 16px;
    color: var(--ink);
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 55%, #eef2ff 100%);
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.main-container {
    width: min(100%, 820px);
    margin: 0 auto;
}

.installer-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(30, 41, 59, 0.14);
}

.installer-header {
    display: flex;
    min-height: 120px;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(120deg, #1e3a8a, #4338ca);
}

.installer-header img {
    display: block;
    max-width: min(100%, 240px);
    max-height: 72px;
    object-fit: contain;
}

.installer-body {
    padding: 30px clamp(18px, 5vw, 48px) 38px;
}

.stepper {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 32px;
}

.step {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    text-align: center;
}

.step:not(:last-child)::after {
    position: absolute;
    z-index: 0;
    top: 17px;
    left: calc(50% + 22px);
    width: calc(100% - 36px);
    height: 2px;
    background: var(--border);
    content: "";
}

.step.completed:not(:last-child)::after {
    background: #93c5fd;
}

.step-circle {
    z-index: 1;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    font-size: 14px;
    font-weight: 700;
}

.step.active,
.step.completed {
    color: var(--primary-dark);
}

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

.step-label {
    max-width: 100%;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

h3 {
    margin: 0 0 10px;
    color: #1e3a8a;
    font-size: clamp(22px, 4vw, 28px);
    line-height: 1.25;
    text-align: center;
}

p {
    margin: 0 0 22px;
    color: var(--muted);
}

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

.check-list {
    display: grid;
    gap: 10px;
    margin: 22px 0;
}

.check-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}

.check-item.error {
    border-color: #fecaca;
    background: #fff7f7;
}

.check-item small {
    color: var(--danger) !important;
}

.status-badge {
    display: inline-block;
    min-width: 54px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.status-badge.ok {
    background: #dcfce7;
    color: var(--success);
}

.status-badge.fail {
    background: #fee2e2;
    color: var(--danger);
}

.form-group {
    margin: 0 0 18px;
}

label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-weight: 650;
}

.form-control {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: white;
    color: var(--ink);
    font: inherit;
}

.form-control:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(37, 99, 235, 0.16);
}

.bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 17px;
    border: 1px solid transparent;
    border-radius: 9px;
    font: inherit;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}

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

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

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

.alert {
    margin: 16px 0;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 9px;
}

.alert-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.alert-danger {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.security-disclaimer {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    background: #fff7ed;
    color: #7c2d12;
    font-size: 13px;
}

.security-disclaimer strong {
    display: block;
    margin-bottom: 3px;
}

.footer-links {
    padding: 0 8px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.footer-links p {
    margin: 12px 0 4px;
}

.footer-links a {
    color: var(--primary-dark);
}

@media (max-width: 560px) {
    body {
        padding: 16px 10px;
    }

    .installer-header {
        min-height: 90px;
        padding: 16px;
    }

    .installer-body {
        padding: 22px 16px 28px;
    }

    .stepper {
        gap: 2px;
        margin-bottom: 24px;
    }

    .step:not(:last-child)::after {
        left: calc(50% + 19px);
        width: calc(100% - 30px);
    }

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

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

    .check-item {
        align-items: flex-start;
        padding: 11px;
        font-size: 14px;
    }
}
