@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&family=Sora:wght@500;600;700&display=swap');

:root {
    --ink: #071426;
    --ink-800: #0B1F3A;
    --signal: #0088C8;
    --signal-dim: #006ea3;
    --ice: #67E8F9;
    --paper: #eef3f8;
    --card: #ffffff;
    --line: #d7e1eb;
    --muted: #5d6d80;
    --danger: #b4233c;
    --ok: #047857;
}

* { box-sizing: border-box; }
html, body.mk-auth { margin: 0; min-height: 100%; }
body.mk-auth {
    font-family: Figtree, system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

.mk-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
}

.mk-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 36px;
    padding: 36px 36px 32px;
    color: #f7f9fb;
    background:
        radial-gradient(820px 420px at -10% -20%, rgba(0, 136, 200, .55), transparent 58%),
        radial-gradient(520px 420px at 120% 115%, rgba(103, 232, 249, .16), transparent 52%),
        var(--ink);
}
.mk-brand a { display: inline-flex; }
.mk-brand img { height: 58px; width: auto; display: block; }
.mk-brand-kicker {
    margin: 0 0 10px;
    font-family: Sora, system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ice);
}
.mk-brand h2 {
    margin: 0 0 12px;
    font-family: Sora, system-ui, sans-serif;
    font-size: 34px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.03em;
}
.mk-brand-lead {
    margin: 0;
    max-width: 34ch;
    color: #c5d2e0;
    font-size: 15px;
    line-height: 1.55;
}
.mk-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mk-points li,
.sl-item {
    display: block;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .08);
}
.mk-points strong,
.sl-title { display: block; font-size: 14px; font-weight: 700; }
.mk-points span,
.sl-sub { display: block; margin-top: 3px; color: #a9b8c9; font-size: 13px; line-height: 1.4; }
.sl-num {
    display: inline-block;
    margin-bottom: 6px;
    font-family: Sora, system-ui, sans-serif;
    font-size: 11px;
    letter-spacing: .12em;
    color: var(--ice);
}
.sl-item.active {
    background: rgba(0, 136, 200, .22);
    border-color: rgba(103, 232, 249, .45);
}
.sl-item.done { opacity: .72; }

.mk-main {
    display: flex;
    justify-content: center;
    padding: 48px 28px;
    background:
        radial-gradient(700px 280px at 50% -10%, rgba(0, 136, 200, .08), transparent 70%),
        var(--paper);
}
.mk-card {
    width: min(440px, 100%);
    margin: auto;
    position: relative;
    overflow: hidden;
    background: var(--card);
    border: 1px solid rgba(7, 20, 38, .06);
    border-radius: 22px;
    padding: 36px 36px 32px;
    box-shadow: 0 1px 2px rgba(7, 20, 38, .04), 0 22px 50px rgba(7, 20, 38, .08);
}
.mk-card.wide { width: min(560px, 100%); }
.mk-card::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 3px;
    background: linear-gradient(90deg, #0088C8, #67E8F9);
}

.mk-kicker {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--signal);
}
.mk-card h1,
.mk-verify h1 {
    margin: 0 0 8px;
    font-family: Sora, system-ui, sans-serif;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -.03em;
    line-height: 1.15;
}
.mk-lead {
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.mk-field { position: relative; margin-bottom: 16px; }
.mk-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-800);
}
.mk-field input,
.mk-field select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
    color: var(--ink);
    font: 15px/1 Figtree, system-ui, sans-serif;
    padding: 0 14px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.mk-field input { padding-right: 42px; }
.mk-field select {
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235d6d80' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.mk-field input:hover,
.mk-field select:hover { border-color: #b7c6d6; }
.mk-field input:focus,
.mk-field select:focus {
    outline: none;
    background: #fff;
    border-color: var(--signal);
    box-shadow: 0 0 0 4px rgba(0, 136, 200, .14);
}
.mk-field input.err,
.mk-field input.error,
.mk-field select.err {
    border-color: var(--danger);
    background: #fff7f8;
    box-shadow: 0 0 0 4px rgba(180, 35, 60, .1);
}
.mk-field input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #f8fafc inset;
    -webkit-text-fill-color: var(--ink);
}
.mk-field .eye {
    position: absolute;
    right: 12px;
    bottom: 14px;
    display: flex;
    border: 0;
    background: transparent;
    color: #607086;
    cursor: pointer;
    padding: 0;
}
.mk-field .eye:hover { color: var(--ink); }
.mk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.mk-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 2px 0 20px;
    font-size: 14px;
}
.mk-row a,
.mk-foot a,
.mk-verify a {
    color: var(--signal);
    font-weight: 700;
    text-decoration: none;
}
.mk-row a:hover,
.mk-foot a:hover,
.mk-verify a:hover { text-decoration: underline; }
.mk-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-800);
    font-weight: 600;
}
.mk-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--signal);
}

.mk-submit,
.mk-next,
.mk-back {
    height: 48px;
    border-radius: 12px;
    font-family: Figtree, system-ui, sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.mk-submit,
.mk-next {
    border: 0;
    background: var(--signal);
    color: #fff;
}
.mk-submit { width: 100%; position: relative; }
.mk-submit:hover,
.mk-next:hover { background: var(--signal-dim); }
.mk-submit:disabled,
.mk-next:disabled { opacity: .7; cursor: wait; }
.mk-submit .spin {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mkspin .7s linear infinite;
}
.mk-submit.loading .lbl { visibility: hidden; }
.mk-submit.loading .spin {
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    margin: -8px 0 0 -8px;
}
@keyframes mkspin { to { transform: rotate(360deg); } }
.mk-back {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 0 18px;
}
.mk-back:hover { border-color: var(--ink-800); }
.mk-next { flex: 1; }
.mk-actions { display: flex; gap: 10px; margin-top: 6px; }

.err-alert,
.msg-err {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    border: 1px solid #f3c3cc;
    background: #fff5f6;
    color: #8e1b32;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.45;
}
.success-box,
.mk-success {
    border: 1px solid #b7e4d4;
    background: #f3fbf7;
    color: #065f46;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.success-box h3,
.mk-success h3 {
    margin: 0 0 4px;
    font-family: Sora, system-ui, sans-serif;
    font-size: 16px;
}
.success-box p,
.mk-success p { margin: 0; }

.mk-foot { margin: 18px 0 0; font-size: 14px; color: var(--muted); }

.step-panel { display: none; }
.step-panel.active { display: block; }
.mk-steps {
    display: flex;
    gap: 8px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}
.mk-steps .prog-step {
    flex: 1;
    padding: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    color: #8b98a8;
    border-bottom: 2px solid #e4ebf2;
}
.mk-steps .active { color: var(--ink); border-bottom-color: var(--signal); }
.mk-steps .done { color: var(--signal-dim); border-bottom-color: #9edff5; }

.s-wrap,
.strength-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -4px 0 16px;
    font-size: 12px;
    color: var(--muted);
}
.s-bars,
.strength-bars { display: flex; gap: 4px; }
.sbar { width: 28px; height: 4px; border-radius: 99px; background: #d5e0ea; }
.str1 .sbar:nth-child(1), .s1 .sbar:nth-child(1) { background: var(--danger); }
.str2 .sbar:nth-child(-n+2), .s2 .sbar:nth-child(-n+2) { background: #d97706; }
.str3 .sbar:nth-child(-n+3), .s3 .sbar:nth-child(-n+3) { background: var(--signal); }
.str4 .sbar:nth-child(-n+4), .s4 .sbar:nth-child(-n+4) { background: var(--ok); }
.match-hint { display: none; font-size: 13px; margin: -6px 0 14px; font-weight: 600; }
.match-hint.visible { display: flex; align-items: center; gap: 6px; }
.match-hint.ok { color: var(--ok); }
.match-hint.no { color: var(--danger); }

@media (max-width: 900px) {
    .mk-shell { grid-template-columns: 1fr; }
    .mk-brand { gap: 18px; padding: 22px 20px 20px; }
    .mk-brand h2 { font-size: 26px; }
    .mk-brand-lead,
    .mk-points { display: none; }
    .mk-main { padding: 20px 16px 36px; }
    .mk-card { padding: 28px 20px 24px; border-radius: 18px; }
    .mk-grid { grid-template-columns: 1fr; }
    .mk-card h1 { font-size: 26px; }
}
