:root {
    --bg-1: #06111f;
    --bg-2: #0f2742;
    --brand: #6ee7f9;
    --brand-2: #a78bfa;
    --brand-3: #22c55e;
    --text: #eaf6ff;
    --muted: rgba(234, 246, 255, 0.72);
    --border: rgba(255, 255, 255, 0.26);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

.login-page {
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 18%, rgba(110, 231, 249, 0.25), transparent 32%),
        radial-gradient(circle at 80% 22%, rgba(167, 139, 250, 0.25), transparent 30%),
        radial-gradient(circle at 58% 92%, rgba(34, 197, 94, 0.18), transparent 34%),
        linear-gradient(135deg, var(--bg-1), var(--bg-2));
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.24) 68%, transparent 100%);
}

#motionCanvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.9;
}

.page-shell {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 2vw, 2rem);
}

.login-frame {
    width: min(1120px, 100%);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07));
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
    animation: cardEnter 0.85s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.985);
    }

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

.login-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(360px, 5fr);
}

.brand-panel {
    position: relative;
    isolation: isolate;
    min-height: 680px;
    overflow: hidden;
    padding: clamp(2rem, 4vw, 4rem);
    background:
        linear-gradient(145deg, rgba(110, 231, 249, 0.16), rgba(167, 139, 250, 0.08)),
        rgba(255, 255, 255, 0.05);
}

.brand-panel::before,
.brand-panel::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 999px;
    filter: blur(6px);
    animation: floatOrb 8s ease-in-out infinite;
}

.brand-panel::before {
    top: 12%;
    left: -120px;
    width: 310px;
    height: 310px;
    background: rgba(110, 231, 249, 0.22);
}

.brand-panel::after {
    right: -90px;
    bottom: 8%;
    width: 260px;
    height: 260px;
    background: rgba(167, 139, 250, 0.24);
    animation-delay: -2.5s;
}

@keyframes floatOrb {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(14px, -22px, 0) scale(1.08);
    }
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

.badge-dot {
    width: 0.68rem;
    height: 0.68rem;
    border-radius: 999px;
    background: var(--brand-3);
    box-shadow: 0 0 22px var(--brand-3);
}

.hero-title {
    margin: 5.2rem 0 0;
    font-size: clamp(2.3rem, 5vw, 5.3rem);
    line-height: 0.96;
    letter-spacing: -0.07em;
    font-weight: 850;
}

.gradient-text {
    color: transparent;
    background: linear-gradient(90deg, #fff, #87f2ff 45%, #d8c8ff 100%);
    background-clip: text;
    -webkit-background-clip: text;
}

.hero-copy {
    max-width: 560px;
    margin: 1.5rem 0 3rem;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.mini-card {
    padding: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateZ(0);
    transition: transform 0.25s ease, background 0.25s ease;
}

.mini-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.14);
}

.mini-value {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.mini-label {
    color: var(--muted);
    font-size: 0.9rem;
}

.floating-chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(7, 17, 31, 0.38);
    color: var(--text);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    animation: chipFloat 6s ease-in-out infinite;
}

.floating-chip.one {
    left: 8%;
    bottom: 7%;
}

.floating-chip.two {
    top: 12%;
    right: 8%;
    animation-delay: -2.2s;
}

@keyframes chipFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-14px);
    }
}

.form-panel {
    min-height: 680px;
    display: grid;
    align-items: center;
    padding: clamp(1.3rem, 3vw, 3.2rem);
    background: rgba(5, 14, 27, 0.2);
}

.login-card {
    width: min(460px, 100%);
    margin-inline: auto;
    padding: clamp(1.5rem, 4vw, 2.4rem);
    border: 1px solid var(--border);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: 0 18px 70px rgba(0, 0, 0, 0.24);
    transform-style: preserve-3d;
    transition: transform 0.18s ease;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.login-brand-logo {
    display: block;
    width: min(230px, 74%);
    height: 64px;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.18));
}

.version-label,
.form-copy,
.helper-copy {
    color: rgba(234, 246, 255, 0.64);
}

.version-label {
    font-size: 0.85rem;
}

.login-card h2 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    letter-spacing: -0.05em;
    font-weight: 850;
}

.form-copy {
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

.form-floating {
    position: relative;
    margin-bottom: 1rem;
}

.form-floating label {
    position: absolute;
    top: 50%;
    left: 1rem;
    color: rgba(234, 246, 255, 0.72);
    pointer-events: none;
    transform: translateY(-50%);
    transition: top 0.16s ease, transform 0.16s ease, font-size 0.16s ease, color 0.16s ease;
}

.form-control {
    width: 100%;
    min-height: 58px;
    padding: 1.35rem 1rem 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.65rem;
    outline: 0;
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
    font: inherit;
    box-shadow: none;
}

.form-control:focus {
    border-color: rgba(110, 231, 249, 0.75);
    box-shadow: 0 0 0 0.25rem rgba(110, 231, 249, 0.12);
}

.form-control:focus + label,
.form-control:not(:placeholder-shown) + label {
    top: 0.55rem;
    color: rgba(234, 246, 255, 0.88);
    font-size: 0.78rem;
    transform: translateY(0);
}

.form-control::placeholder {
    color: transparent;
}

.password-wrap {
    position: relative;
}

.pe-5 {
    padding-right: 5rem;
}

.toggle-pass {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 36px;
    padding: 0.44rem 0.75rem;
    border: 0;
    border-radius: 999px;
    color: rgba(234, 246, 255, 0.76);
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    line-height: 1;
    transform: translateY(-50%);
}

.toggle-pass:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.btn-glow {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0.95rem 1rem;
    border: 0;
    border-radius: 18px;
    color: #06111f;
    background: linear-gradient(135deg, var(--brand), #c4b5fd);
    box-shadow: 0 18px 45px rgba(110, 231, 249, 0.2);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.btn-glow::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.48), transparent);
    transform: translateX(-120%);
    transition: transform 0.7s ease;
}

.btn-glow:hover::before {
    transform: translateX(120%);
}

.btn-glow:hover {
    transform: translateY(-1px);
}

.btn-glow:disabled {
    cursor: wait;
    opacity: 0.76;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.status-box {
    display: none;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
}

.status-box.show {
    display: block;
    animation: fadeIn 0.25s ease both;
}

.status-box.success {
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.12);
}

.status-box.error {
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(248, 113, 113, 0.12);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

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

.helper-copy {
    margin: 1.5rem 0 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

@media (max-width: 991.98px) {
    .login-grid {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        min-height: auto;
        padding-bottom: 2.4rem;
    }

    .hero-title {
        margin-top: 2.2rem;
    }

    .form-panel {
        min-height: auto;
    }

    .floating-chip {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .page-shell {
        padding: 0.75rem;
    }

    .login-frame {
        border-radius: 24px;
    }

    .brand-panel {
        display: none;
    }

    .form-panel {
        padding: 1.25rem;
    }

    .login-card {
        border-radius: 24px;
    }

    .mini-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}
