.auth-shell {
    width: min(100% - 32px, 470px);
    margin: 118px auto 56px;
    position: relative;
    z-index: 2;
}

.auth-card {
    position: relative;
    overflow: hidden;
    padding: 38px 36px 34px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 20px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.018)),
        rgba(10,9,15,.82);
    box-shadow: 0 28px 90px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.06);
    backdrop-filter: blur(22px);
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(192,132,252,.85), rgba(236,72,153,.85), transparent);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    color: #fff;
    font-size: .88rem;
    font-weight: 750;
    letter-spacing: .02em;
}

.auth-brand img { width: 31px; height: 31px; object-fit: contain; }
.auth-card h1 { margin: 0 0 10px; font-size: clamp(1.7rem, 5vw, 2.05rem); line-height: 1.12; letter-spacing: -.04em; }
.auth-lead { margin: 0 0 28px; color: rgba(255,255,255,.56); font-size: .91rem; line-height: 1.55; }
.auth-field { margin: 0 0 17px; }
.auth-field label { display: block; margin-bottom: 7px; color: rgba(255,255,255,.72); font-size: .82rem; font-weight: 650; }
.auth-input-wrap { position: relative; }
.auth-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 15px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 11px;
    outline: none;
    background: rgba(255,255,255,.045);
    color: #fff;
    font: inherit;
    font-size: .94rem;
    transition: border-color .22s ease, background .22s ease, box-shadow .22s ease, transform .22s ease;
}
.auth-field input:hover { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.058); }
.auth-field input:focus { border-color: rgba(192,132,252,.78); box-shadow: 0 0 0 4px rgba(168,85,247,.11); }
.auth-field input:disabled { color: rgba(255,255,255,.58); cursor: not-allowed; }

.auth-btn {
    width: 100%;
    min-height: 49px;
    margin-top: 5px;
    padding: 13px 18px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(115deg, #8b5cf6 0%, #bd42df 52%, #ec4899 100%);
    color: #fff;
    font: inherit;
    font-size: .95rem;
    font-weight: 760;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(168,85,247,.24), inset 0 1px 0 rgba(255,255,255,.22);
    transition: transform .24s cubic-bezier(.2,.8,.2,1), filter .24s ease, box-shadow .24s ease;
}
.auth-btn:hover { transform: translateY(-2px); filter: brightness(1.07); box-shadow: 0 17px 38px rgba(168,85,247,.31), inset 0 1px 0 rgba(255,255,255,.25); }
.auth-btn:active { transform: translateY(0) scale(.985); }
.auth-btn:disabled { opacity: .5; cursor: wait; transform: none; filter: none; }
.auth-btn-secondary { background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.12); box-shadow: none; }

.auth-message { display: none; margin: 0 0 18px; padding: 11px 13px; border-radius: 10px; font-size: .82rem; line-height: 1.45; }
.auth-message.error { display: block; color: #fda4af; border: 1px solid rgba(244,63,94,.26); background: rgba(244,63,94,.085); }
.auth-message.success { display: block; color: #86efac; border: 1px solid rgba(34,197,94,.24); background: rgba(34,197,94,.075); }
.auth-message.info { display: block; color: #d8b4fe; border: 1px solid rgba(168,85,247,.24); background: rgba(168,85,247,.075); }

.auth-steps { display: flex; gap: 7px; margin-bottom: 25px; }
.auth-step { height: 3px; flex: 1; border-radius: 99px; background: rgba(255,255,255,.09); transition: background .35s ease, box-shadow .35s ease; }
.auth-step.active { background: linear-gradient(90deg,#8b5cf6,#ec4899); box-shadow: 0 0 16px rgba(192,132,252,.35); }
.auth-panel { display: none; animation: authIn .34s cubic-bezier(.2,.8,.2,1); }
.auth-panel.active { display: block; }
@keyframes authIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.auth-code-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; align-items: end; }
.auth-code-row .auth-field { margin-bottom: 0; }
.auth-code-row .auth-btn { width: auto; min-width: 120px; margin: 0; }
.auth-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; color: rgba(255,255,255,.38); font-size: .76rem; }
.auth-text-btn { padding: 0; border: 0; background: none; color: #c084fc; font: inherit; font-weight: 650; cursor: pointer; }
.auth-text-btn:disabled { color: rgba(255,255,255,.3); cursor: default; }
.auth-links { margin-top: 23px; text-align: center; color: rgba(255,255,255,.45); font-size: .83rem; line-height: 1.7; }
.auth-links a { color: #c084fc; text-decoration: none; font-weight: 650; }
.auth-links a:hover { color: #e9d5ff; }
.auth-note { margin: 18px 0 0; padding: 12px 13px; border: 1px solid rgba(255,255,255,.075); border-radius: 10px; background: rgba(255,255,255,.025); color: rgba(255,255,255,.43); font-size: .77rem; line-height: 1.5; }

@media (max-width: 640px) {
    .auth-shell { width: min(100% - 22px, 470px); margin-top: 92px; }
    .auth-card { padding: 29px 21px 27px; border-radius: 17px; }
    .auth-brand { margin-bottom: 23px; }
    .auth-code-row { grid-template-columns: 1fr; }
    .auth-code-row .auth-btn { width: 100%; }
}
