.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 30px;
    display: flex;
}
.auth-shell {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

.auth-card {
    position: relative;
    background: var(--surface-2);
    border-radius: var(--radius-lg);
    padding: 64px 40px 40px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
.auth-card__inner { width: 100%; max-width: 440px; }

.back-home {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 500;
    padding: 7px 12px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: background .2s, color .2s;
    z-index: 2;
}
.back-home i { order: 2; font-size: 12px; }
.back-home:hover { background: var(--primary); color: #fff; }

.progress { margin-bottom: 28px; }
.progress__labels {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    margin-bottom: 6px;
}
.progress__labels span:first-child { color: var(--accent); font-weight: 500; }
.progress__labels span:last-child { color: var(--text); direction: ltr; }
.progress__track { height: 3px; background: #d4dbe3; border-radius: 3px; overflow: hidden; }
.progress__fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width .6s var(--ease);
}

.auth-logo { display: flex; justify-content: center; margin-bottom: 28px; }
.auth-logo .brand img { height: 52px; }

.auth-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    text-align: center;
    margin: 0 0 16px;
}
.auth-sub {
    font-size: 13.5px;
    color: var(--muted);
    text-align: center;
    margin: 0 auto 26px;
    line-height: 1.75;
}
.auth-sub b { color: var(--warning); font-weight: 600; }

.step { display: none; }
.step.is-active { display: block; animation: stepIn .45s var(--ease); }
.step.is-back { animation-name: stepInBack; }
@keyframes stepIn { from { opacity: 0; transform: translateX(-24px); } }
@keyframes stepInBack { from { opacity: 0; transform: translateX(24px); } }

.auth-form .btn--block, .auth-form .btn-row { margin-top: 10px; }
.auth-form .btn { min-height: 54px; }

.auth-switch {
    text-align: center;
    font-size: 13.5px;
    color: var(--text);
    margin: 26px 0 0;
}
.auth-switch a { font-weight: 500; }

.names .hint--name { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.names-hint { display: none; margin: -8px 0 16px; }

.nid-info { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.nid-info span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-50);
    color: var(--primary-700);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
}

.strength { display: flex; gap: 4px; margin-top: 8px; padding-inline: 2px; }
.strength span { flex: 1; height: 4px; border-radius: 4px; background: #dfe5ec; transition: background .3s; }
.strength[data-level="1"] span:nth-child(-n+1) { background: var(--danger); }
.strength[data-level="2"] span:nth-child(-n+2) { background: var(--warning); }
.strength[data-level="3"] span:nth-child(-n+3) { background: #22c55e; }
.strength[data-level="4"] span { background: var(--success); }

.step--done { text-align: center; }
.done-badge {
    width: 86px; height: 86px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--success);
    color: #fff;
    font-size: 36px;
    box-shadow: 0 0 0 10px var(--success-50), 0 0 0 20px rgba(16, 185, 129, .06);
    animation: pop .6s var(--ease);
}
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.08); } }
.done-summary {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 6px 16px;
    margin-bottom: 18px;
    text-align: start;
}
.done-summary div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    font-size: 13.5px;
    border-bottom: 1px dashed var(--line);
}
.done-summary div:last-child { border-bottom: 0; }
.done-summary span { color: var(--muted); }
.done-summary b { color: var(--ink); font-weight: 500; }

.status-box {
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    font-size: 13.5px;
    text-align: start;
    animation: stepIn .4s var(--ease);
}
.status-box i { font-size: 22px; margin-top: 2px; }
.status-box h3 { margin: 0 0 4px; font-size: 15px; }
.status-box p { margin: 0; line-height: 1.7; }
.status-box--pending { background: var(--warning-50); color: #92400e; border: 1px solid #fde68a; }
.status-box--rejected, .status-box--blocked { background: var(--danger-50); color: #991b1b; border: 1px solid #fecaca; }

.auth-aside {
    position: relative;
    background: var(--primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 640px;
}
.auth-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-aside__brand {
    position: absolute;
    bottom: 12%;
    inset-inline-start: 8%;
    max-width: 320px;
    color: #fff;
    z-index: 1;
}
.auth-aside__brand .brand { margin-bottom: 18px; justify-content: flex-start; }
.auth-aside__brand .brand img { height: 52px; }
.auth-aside__brand p { margin: 0; font-size: 15.5px; line-height: 1.85; }

.key-float { animation: floatY 5s ease-in-out infinite; transform-box: fill-box; }
.cloud-drift { animation: drift 9s ease-in-out infinite; }
.cloud-drift.slow { animation-duration: 14s; }
.cloud-drift.rev { animation-direction: reverse; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(14px); } }

.terms-page { max-width: 820px; margin: 0 auto; padding: 40px 16px 60px; }
.terms-page .auth-logo { margin-bottom: 20px; }
.terms-card { background: var(--surface-2); border-radius: var(--radius-lg); padding: 32px; }
.terms-card h1 { font-size: 22px; color: var(--ink); margin: 0 0 6px; text-align: center; }
.terms-card > p { text-align: center; color: var(--muted); margin: 0 0 28px; font-size: 14px; }
.terms-card h2 { font-size: 16px; color: var(--primary-700); margin: 24px 0 10px; display: flex; gap: 10px; align-items: center; }
.terms-card ol, .terms-card ul { margin: 0; padding-inline-start: 22px; }
.terms-card li { margin-bottom: 8px; line-height: 1.8; }

@media (max-width: 1200px) {
    .auth-card { padding-inline: 28px; }
    .auth-aside__brand p { font-size: 14px; }
}
@media (max-width: 992px) {
    .auth-page { padding: 16px; }
    .auth-shell { grid-template-columns: 1fr; max-width: 620px; }
    .auth-aside { display: none; }
    .auth-card { padding: 64px 28px 32px; }
    .auth-card__inner { max-width: 460px; }
}
@media (max-width: 520px) {
    .auth-page { padding: 0; }
    .auth-card { border-radius: 0; padding: 60px 16px 28px; min-height: 100vh; min-height: 100dvh; background: #fff; }
    .auth-card .control { background: var(--surface-2); border-color: transparent; }
    .auth-card .control:focus-within { background: #fff; border-color: var(--primary); }
    .auth-card .field.has-error .control { background: var(--danger-50); border-color: var(--danger); }
    .done-summary { background: var(--surface-2); border-color: transparent; }
    .auth-title { font-size: 18px; }
    .grid-2.names { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; }
    .names .hint--name { display: none; }
    .names-hint { display: block; }
    .terms-card { padding: 22px 16px; }
}
