:root {
    --bg: #07111f;
    --panel: rgba(9, 17, 30, 0.74);
    --text: #eff6ff;
    --muted: rgba(228, 238, 255, 0.7);
    --line: rgba(255, 255, 255, 0.12);
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    --accent-a: #2dd4bf;
    --accent-b: #60a5fa;
    --accent-c: #8b5cf6;
    --danger-bg: rgba(255, 99, 132, 0.12);
    --danger-line: rgba(255, 99, 132, 0.22);
    --danger-text: #ffd1dc;
}

* {
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', Helvetica, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 10%, rgba(91, 124, 255, 0.18), transparent 28%),
        radial-gradient(circle at 90% 8%, rgba(110, 231, 249, 0.12), transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(184, 116, 255, 0.11), transparent 25%),
        linear-gradient(180deg, #050816 0%, #060a18 38%, #081021 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.login-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 28px;
}

.login-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.aurora {
    position: absolute;
    filter: blur(52px);
    opacity: 0.7;
    border-radius: 999px;
    animation: floatAurora 16s ease-in-out infinite;
}

.aurora-1 {
    width: 420px;
    height: 420px;
    background: rgba(45, 212, 191, 0.22);
    left: -80px;
    top: 80px;
}

.aurora-2 {
    width: 540px;
    height: 540px;
    background: rgba(96, 165, 250, 0.24);
    right: 16%;
    top: -100px;
    animation-delay: -4s;
}

.aurora-3 {
    width: 480px;
    height: 480px;
    background: rgba(139, 92, 246, 0.2);
    right: -120px;
    bottom: -90px;
    animation-delay: -9s;
}

.grid-glow {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, rgba(255,255,255,0.38), rgba(255,255,255,0.04));
}

.brand-top-left {
    position: absolute;
    top: 32px;
    left: 56px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
}

.brand-logo {
    height: 75px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.18));
}


.login-panel {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    width: 100%;
    max-width: 460px;
    padding: 34px;
    border-radius: 30px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(12, 20, 36, 0.82), rgba(7, 13, 24, 0.9));
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.login-header {
    margin-bottom: 24px;
}

.login-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #d6f3ff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    font-size: 0.88rem;
}

.login-header h2 {
    margin: 0 0 10px;
    font-size: clamp(1.9rem, 3vw, 2.3rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.login-header p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 0.98rem;
}

.login-error {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 14px 15px;
    border-radius: 16px;
    border: 1px solid var(--danger-line);
    background: var(--danger-bg);
    color: var(--danger-text);
    animation: fadeIn 0.25s ease;
}

.field-group {
    margin-bottom: 18px;
}

.field-group label {
    display: block;
    margin-bottom: 10px;
    color: #eaf2ff;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.field-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
}

.field-label-row label {
    margin-bottom: 10px;
}

.login-link {
    color: rgba(150, 190, 240, 0.92);
    font-size: 0.88rem;
    text-decoration: none;
}

.login-link:hover,
.login-link:focus-visible {
    color: #cfe3fb;
    text-decoration: underline;
}

.login-copy {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.6;
}

.input-wrap {
    position: relative;
}

.input-wrap > i:first-child {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(232, 240, 255, 0.52);
    font-size: 0.95rem;
    pointer-events: none;
}

.input-wrap input {
    width: 100%;
    height: 56px;
    padding: 0 16px 0 46px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    outline: none;
    font-size: 0.98rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.input-wrap input::placeholder {
    color: rgba(228, 238, 255, 0.38);
}

.input-wrap input:focus {
    border-color: rgba(96, 165, 250, 0.55);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12), 0 10px 30px rgba(0, 0, 0, 0.12);
}

.input-wrap-password input {
    padding-right: 58px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(232, 240, 255, 0.62);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.password-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.btn {
    width: 100%;
    height: 58px;
    margin-top: 8px;
    border: 0;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #effaff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent-a), var(--accent-b) 46%, var(--accent-c));
    box-shadow: 0 18px 40px rgba(48, 119, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 48px rgba(48, 119, 255, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.24);
    filter: saturate(1.06);
}

.login-footer {
    margin-top: 18px;
    text-align: center;
    color: rgba(226, 236, 252, 0.58);
    font-size: 0.88rem;
    line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
    .aurora {
        animation: none;
    }
}

@keyframes floatAurora {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(10px, -18px, 0) scale(1.06);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .login-shell {
        padding: 16px;
    }

    .brand-top-left {
        top: 20px;
        left: 20px;
    }

    .brand-logo {
        height: 58px;
    }

    .login-panel {
        padding-top: 72px;
    }

    .login-box {
        padding: 24px 18px;
        border-radius: 24px;
    }

    .login-header h2 {
        font-size: 1.8rem;
    }

    .input-wrap input,
    .btn {
        height: 54px;
    }
}
