:root {
    --ink: #070711;
    --ink-soft: #151323;
    --violet: #7b4dff;
    --violet-deep: #33206f;
    --violet-glow: #a78bfa;
    --cyan: #16c8f3;
    --white: #ffffff;
    --muted: rgba(255, 255, 255, 0.7);
    --line: rgba(255, 255, 255, 0.42);
    --glass: rgba(28, 22, 67, 0.55);
    --glass-border: rgba(255, 255, 255, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Barlow', system-ui, -apple-system, "Segoe UI", sans-serif;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    color: var(--white);
    background:
        radial-gradient(ellipse at 50% 88%, rgba(123, 77, 255, 0.34), transparent 44%),
        linear-gradient(115deg, rgba(255, 255, 255, 0.06), transparent 24% 74%, rgba(22, 200, 243, 0.08)),
        linear-gradient(135deg, #090814 0%, #251858 44%, #06152f 100%);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, transparent 0 32%, rgba(255, 255, 255, 0.055) 32% 32.5%, transparent 32.5% 58%, rgba(22, 200, 243, 0.045) 58% 58.5%, transparent 58.5% 100%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, transparent 0 8%, rgba(22, 200, 243, 0.08) 8% 9%, transparent 9% 18%, rgba(167, 139, 250, 0.08) 18% 20%, transparent 20% 34%, rgba(255, 255, 255, 0.045) 34% 35%, transparent 35% 52%, rgba(22, 200, 243, 0.07) 52% 54%, transparent 54% 70%, rgba(167, 139, 250, 0.07) 70% 73%, transparent 73% 100%);
    background-size: auto, 86px 86px, 86px 86px, 360px 180px;
    mask-image: radial-gradient(circle at center, black 0%, rgba(0, 0, 0, 0.78) 44%, transparent 82%);
    -webkit-mask-image: radial-gradient(circle at center, black 0%, rgba(0, 0, 0, 0.78) 44%, transparent 82%);
    opacity: 0.62;
    animation: loginAnalyticsDrift 56s linear infinite;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        url("data:image/svg+xml,%3Csvg width='760' height='360' viewBox='0 0 760 360' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 258 C96 214 142 226 206 176 S326 80 410 130 S534 236 604 178 S704 92 742 116' stroke='%2322d8eb' stroke-opacity='.30' stroke-width='3'/%3E%3Cpath d='M20 292 C90 284 142 250 214 256 S342 314 420 250 S552 130 628 152 S708 220 742 188' stroke='%23a78bfa' stroke-opacity='.26' stroke-width='2'/%3E%3Cpath d='M18 258 L206 176 L410 130 L604 178 L742 116' stroke='%23ffffff' stroke-opacity='.10' stroke-width='1'/%3E%3Ccircle cx='18' cy='258' r='4' fill='%2322d8eb' fill-opacity='.45'/%3E%3Ccircle cx='206' cy='176' r='4' fill='%23ffffff' fill-opacity='.38'/%3E%3Ccircle cx='410' cy='130' r='4' fill='%23a78bfa' fill-opacity='.48'/%3E%3Ccircle cx='604' cy='178' r='4' fill='%23ffffff' fill-opacity='.34'/%3E%3Ccircle cx='742' cy='116' r='4' fill='%2322d8eb' fill-opacity='.45'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(110deg, transparent 0 42%, rgba(255, 255, 255, 0.06) 42% 42.5%, transparent 42.5% 100%);
    background-position: 0 52%, center;
    background-repeat: repeat-x, no-repeat;
    background-size: 760px 360px, auto;
    mask-image: linear-gradient(to bottom, transparent, black 18%, black 78%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 18%, black 78%, transparent);
    opacity: 0.72;
    animation: loginChartFlow 64s linear infinite;
}

.login-shell {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    animation: loginReveal 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.brand-panel {
    display: none;
}

.form-panel {
    width: min(420px, 100%);
    position: relative;
    overflow: hidden;
    padding: 42px 48px 34px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background:
        linear-gradient(145deg, rgba(86, 55, 158, 0.62), rgba(19, 23, 83, 0.68)),
        rgba(16, 11, 38, 0.62);
    box-shadow:
        0 28px 68px rgba(3, 4, 18, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: loginCardFloat 14s ease-in-out infinite alternate;
}

.form-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.13), transparent 28%),
        linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 42%);
}

.form-panel::after {
    content: "";
    position: absolute;
    top: -30%;
    bottom: -30%;
    left: -70%;
    width: 54%;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
    transform: rotate(13deg);
    animation: loginCardShine 18s linear infinite;
}

.form-panel > * {
    position: relative;
    z-index: 1;
}

.form-meta,
.form-title,
.error,
form,
.link-register,
.tiny-footer {
    animation: loginItemReveal 0.62s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.form-title {
    animation-delay: 0.04s;
}

.error {
    animation-delay: 0.06s;
}

form {
    animation-delay: 0.08s;
}

.link-register {
    animation-delay: 0.12s;
}

.tiny-footer {
    animation-delay: 0.16s;
}

.form-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.form-meta .material-symbols-rounded {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    color: var(--violet-deep);
    background: var(--white);
    font-size: 16px;
}

.form-title {
    margin-top: 14px;
    color: var(--white);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0;
}

.form-subtitle {
    display: none;
}

.error {
    margin-top: 22px;
    padding: 11px 13px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 71, 125, 0.16);
    color: #ffe0eb;
    font-size: 13px;
    font-weight: 700;
}

form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 22px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 34px;
    border-bottom: 1px solid var(--line);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input-wrap:focus-within {
    border-color: var(--cyan);
    box-shadow: 0 1px 0 var(--cyan), 0 8px 22px rgba(22, 200, 243, 0.08);
}

.input-wrap input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    padding: 6px 34px 7px 0;
}

.input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.48);
}

.input-wrap .material-symbols-rounded {
    position: absolute;
    right: 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 19px;
    transition: color 0.18s ease, transform 0.18s ease;
}

.input-wrap:focus-within .material-symbols-rounded {
    color: var(--cyan);
    transform: translateY(-1px) scale(1.05);
}

.show-password-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: -4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.show-password-row input {
    width: 14px;
    height: 14px;
    accent-color: var(--cyan);
}

.btn {
    width: 100%;
    min-height: 42px;
    margin-top: 20px;
    border: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, #119ddd, #22d8eb);
    color: var(--white);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(4, 213, 240, 0.22);
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
    animation: loginButtonPulse 4.5s ease-in-out infinite;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 18px 34px rgba(4, 213, 240, 0.28);
}

.link-register {
    display: flex;
    justify-content: center;
    width: fit-content;
    margin: 24px auto 0;
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.link-register:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tiny-footer {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 11px;
    font-weight: 500;
    text-align: center;
}

@keyframes loginReveal {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes loginBackgroundFlow {
    from {
        background-position: 0 0, 0 0, 0 0, 0 0;
    }

    to {
        background-position: 22px -18px, -28px 16px, 18px 24px, 0 0;
    }
}

@keyframes loginAnalyticsDrift {
    from {
        background-position: 0 0, 0 0, 0 0, 0 0;
    }

    to {
        background-position: 0 0, 86px 86px, 86px 86px, 360px 0;
    }
}

@keyframes loginChartFlow {
    from {
        background-position: 0 52%, center;
    }

    to {
        background-position: -760px 52%, center;
    }
}

@keyframes loginCardFloat {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-3px);
    }
}

@keyframes loginCardShine {
    0% {
        left: -70%;
        opacity: 0.14;
    }

    100% {
        left: 118%;
        opacity: 0.14;
    }
}

@keyframes loginItemReveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loginButtonPulse {
    0%,
    100% {
        box-shadow: 0 14px 28px rgba(4, 213, 240, 0.22);
    }

    50% {
        box-shadow: 0 18px 36px rgba(4, 213, 240, 0.34);
    }
}

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

    .login-shell {
        min-height: auto;
        padding: 0;
    }

    .form-panel {
        padding: 34px 26px 28px;
    }
}

@media (max-height: 620px) {
    body {
        align-items: flex-start;
    }

    .login-shell {
        min-height: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
.language-toggle-btn.auth-language-toggle {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 20;
    height: 38px;
    min-width: 44px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 9px;
    background: rgba(23, 16, 32, 0.72);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.language-toggle-btn.auth-language-toggle:hover {
    background: rgba(124, 58, 237, 0.8);
}
