:root {
    --bg: #070c18;
    --panel: rgba(13, 21, 38, .76);
    --line: rgba(255, 255, 255, .1);
    --line-strong: rgba(255, 255, 255, .16);
    --text: #e8eefc;
    --muted: #93a1bd;
    --brand: #1abb9c;
    --brand-2: #22d3b0;
    --blue: #3b82f6;
    --violet: #8b5cf6;
    --danger: #fb7185;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-d: 'Unbounded', 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body.auth-page {
    margin: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--brand); color: #04110e; }

.auth-aurora,
.auth-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
}
.auth-aurora { overflow: hidden; }
.auth-aurora i {
    position: absolute;
    width: 48vw;
    height: 48vw;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .24;
    animation: auth-blob 18s var(--ease) infinite alternate;
}
.auth-aurora i:nth-child(1) { top: -24vw; left: -16vw; background: var(--brand); }
.auth-aurora i:nth-child(2) { top: 18vh; right: -18vw; background: var(--blue); animation-delay: -6s; }
.auth-aurora i:nth-child(3) { bottom: -28vw; left: 26vw; background: var(--violet); animation-delay: -12s; opacity: .28; }
.auth-grid {
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at 50% 40%, #000 0, transparent 72%);
}

.auth-shell {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 40px 18px;
}
.auth-panel {
    display: flex;
    width: min(100%, 440px);
    flex-direction: column;
    align-items: center;
}

.auth-logo {
    margin-bottom: 28px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--brand);
    font: 800 23px/1 var(--font-d);
    letter-spacing: -.5px;
}
.auth-logo__cube {
    position: relative;
    width: 24px;
    height: 24px;
    transform-style: preserve-3d;
    animation: auth-cube 9s linear infinite;
}
.auth-logo__cube i {
    position: absolute;
    inset: 0;
    border: 2px solid var(--brand);
    border-radius: 6px;
    background: rgba(26, 187, 156, .12);
}
.auth-logo__cube i:nth-child(2) { transform: rotateY(90deg) translateZ(9px); border-color: var(--blue); background: rgba(59, 130, 246, .12); }
.auth-logo__cube i:nth-child(3) { transform: rotateX(90deg) translateZ(9px); border-color: var(--violet); background: rgba(139, 92, 246, .12); }
.auth-card {
    position: relative;
    width: min(100%, 440px);
    padding: 34px;
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: 0 40px 100px -40px rgba(0,0,0,.95), inset 0 1px 0 rgba(255,255,255,.08);
    backdrop-filter: blur(22px) saturate(140%);
    animation: auth-rise .7s .08s var(--ease) both;
}
.auth-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(34,211,176,.65), transparent 35%, rgba(139,92,246,.45));
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
}
.auth-card__head { margin-bottom: 26px; }
.auth-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    margin-bottom: 20px;
    border: 1px solid rgba(26,187,156,.3);
    border-radius: 17px;
    background: rgba(26,187,156,.12);
    color: var(--brand-2);
    font-size: 21px;
}
.auth-icon--blue { border-color: rgba(59,130,246,.32); background: rgba(59,130,246,.13); color: #75a9ff; }
.auth-icon--violet { border-color: rgba(139,92,246,.34); background: rgba(139,92,246,.13); color: #b49cff; }
.auth-card h1 { margin: 0 0 9px; font: 800 28px/1.15 var(--font-d); letter-spacing: -.8px; }
.auth-card__head p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

.auth-alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(59,130,246,.3);
    border-radius: 14px;
    background: rgba(59,130,246,.1);
    color: #bfd5ff;
    font-size: 14px;
    line-height: 1.5;
}
.auth-alert--success { border-color: rgba(26,187,156,.32); background: rgba(26,187,156,.1); color: #9ff0dc; }
.auth-alert--danger, .auth-alert--error { border-color: rgba(251,113,133,.34); background: rgba(244,63,94,.1); color: #fecdd3; }
.auth-alert--warning { border-color: rgba(245,158,11,.34); background: rgba(245,158,11,.1); color: #fde68a; }

.auth-form { display: grid; gap: 18px; }
.auth-field label { display: block; margin-bottom: 8px; color: #d8e1f2; font-size: 13px; font-weight: 800; }
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth-label-row a, .auth-back { color: #6ee7cf; font-size: 13px; font-weight: 700; transition: color .2s; }
.auth-label-row a:hover, .auth-back:hover { color: #fff; }
.auth-input { position: relative; }
.auth-input > .fa {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 1;
    color: #71809c;
    transform: translateY(-50%);
    transition: color .2s;
}
.auth-input input {
    width: 100%;
    height: 52px;
    padding: 0 48px 0 44px;
    border: 1px solid var(--line-strong);
    border-radius: 15px;
    outline: 0;
    background: rgba(5, 10, 21, .58);
    color: var(--text);
    font: 600 15px var(--font);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.auth-input input::placeholder { color: #66748f; }
.auth-input input:focus {
    border-color: rgba(34,211,176,.8);
    background: rgba(5, 10, 21, .76);
    box-shadow: 0 0 0 4px rgba(26,187,156,.13);
}
.auth-input:focus-within > .fa { color: var(--brand-2); }
.auth-input input:-webkit-autofill {
    -webkit-text-fill-color: var(--text);
    box-shadow: 0 0 0 1000px #08101f inset;
    caret-color: var(--text);
}
.auth-eye {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #8190ab;
    cursor: pointer;
}
.auth-eye:hover, .auth-eye:focus-visible { outline: 0; background: rgba(255,255,255,.07); color: #fff; }
.auth-field.has-error input { border-color: rgba(251,113,133,.75); }
.auth-error { display: block; margin-top: 7px; color: var(--danger); font-size: 12px; font-weight: 700; }

.auth-submit {
    position: relative;
    display: flex;
    width: 100%;
    height: 54px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 4px;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), #14a589);
    box-shadow: 0 16px 34px -18px rgba(26,187,156,.95), inset 0 1px 0 rgba(255,255,255,.3);
    color: #fff;
    font: 800 15px var(--font);
    cursor: pointer;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .2s;
}
.auth-submit::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -55%;
    width: 38%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.34), transparent);
    transform: skewX(-20deg);
    animation: auth-shine 4.5s 1.2s infinite;
}
.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 20px 42px -16px rgba(26,187,156,1), inset 0 1px 0 rgba(255,255,255,.34); }
.auth-submit:hover i { transform: translateX(3px); }
.auth-submit i { transition: transform .25s var(--ease); }
.auth-submit:focus-visible { outline: 3px solid rgba(110,231,207,.45); outline-offset: 3px; }
.auth-submit.is-loading { pointer-events: none; filter: saturate(.75) brightness(.9); }
.auth-submit.is-loading i::before { content: "\f110"; }
.auth-submit.is-loading i { animation: auth-spin .8s linear infinite; }
.auth-back { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; }
.auth-copy { margin: 22px 0 0; color: #66748f; font-size: 12px; text-align: center; }

@keyframes auth-blob { to { transform: translate3d(8vw, 6vh, 0) scale(1.18); } }
@keyframes auth-cube { to { transform: rotateX(360deg) rotateY(360deg); } }
@keyframes auth-rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes auth-shine { 0%, 65% { left: -55%; } 100% { left: 125%; } }
@keyframes auth-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
    .auth-card { padding: 26px 20px; border-radius: 23px; }
    .auth-card h1 { font-size: 24px; }
    .auth-icon { width: 46px; height: 46px; border-radius: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
