:root {
    --bg-1: #081421;
    --bg-2: #0e2740;
    --bg-3: #163960;
    --panel: rgba(10, 20, 35, 0.72);
    --panel-border: rgba(180, 210, 240, 0.24);
    --text: #ecf6ff;
    --text-muted: #b1c5db;
    --accent: #33d2a0;
    --danger: #ff7b7b;
    --radius: 16px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --font: "Avenir Next", "Segoe UI Variable", "SF Pro Display", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font);
    color: var(--text);
    background: radial-gradient(circle at 12% 10%, #1f4b78 0%, transparent 34%),
                radial-gradient(circle at 85% 20%, #265f87 0%, transparent 30%),
                linear-gradient(145deg, var(--bg-1), var(--bg-2) 55%, var(--bg-3));
}

body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    overflow: hidden;
}

.halo {
    position: fixed;
    border-radius: 999px;
    filter: blur(70px);
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
    animation: drift 11s ease-in-out infinite;
}

.halo-1 {
    width: 240px;
    height: 240px;
    background: #2ac5ff;
    top: 10%;
    left: 7%;
}

.halo-2 {
    width: 320px;
    height: 320px;
    background: #33d2a0;
    bottom: 8%;
    right: 6%;
    animation-delay: 1.8s;
}

.login-shell {
    width: min(460px, 100%);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    background: var(--panel);
    backdrop-filter: blur(7px);
    box-shadow: var(--shadow);
    padding: 34px 30px 30px;
    z-index: 1;
    animation: rise 0.75s ease-out;
}

.brand {
    display: inline-flex;
    align-items: center;
    margin: 0 0 18px;
    padding: 10px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(232, 244, 255, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(6, 18, 32, 0.06) inset;
}

.brand-logo {
    width: clamp(130px, 28vw, 190px);
    height: auto;
    display: block;
    filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.18));
}

h1 {
    margin: 0;
    font-size: clamp(1.45rem, 1.2rem + 1vw, 1.95rem);
    line-height: 1.15;
}

.subtitle {
    margin: 8px 0 28px;
    color: var(--text-muted);
    font-size: 0.96rem;
}

.alert {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 123, 123, 0.48);
    background: rgba(255, 123, 123, 0.12);
    color: #ffd0d0;
    font-size: 0.88rem;
}

.alert--success {
    border-color: rgba(69, 215, 170, 0.5);
    background: rgba(69, 215, 170, 0.16);
    color: #d2ffe8;
}

form {
    display: grid;
    gap: 14px;
}

label {
    font-size: 0.84rem;
    color: #d6e9ff;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.field {
    display: grid;
    gap: 8px;
    opacity: 0;
    transform: translateY(9px);
    animation: reveal 0.45s ease-out forwards;
}

.field:nth-child(2) {
    animation-delay: 0.15s;
}

.field:nth-child(3) {
    animation-delay: 0.25s;
}

input {
    width: 100%;
    border: 1px solid rgba(182, 213, 238, 0.22);
    background: rgba(9, 22, 38, 0.8);
    color: var(--text);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.96rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder {
    color: #90abc3;
}

input:focus {
    border-color: rgba(54, 211, 162, 0.9);
    box-shadow: 0 0 0 3px rgba(54, 211, 162, 0.18);
}

.login-btn {
    margin-top: 6px;
    border: 0;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.96rem;
    font-weight: 700;
    color: #052016;
    background: linear-gradient(135deg, var(--accent), #56e2ba);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    box-shadow: 0 14px 28px rgba(51, 210, 160, 0.32);
}

.login-btn:hover {
    transform: translateY(-1px);
    filter: saturate(1.06);
}

.login-btn:active {
    transform: translateY(0);
}

.auth-links {
    margin: 14px 0 0;
    text-align: center;
}

.auth-link {
    color: #8fd0ff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.auth-link:hover {
    color: #b8e4ff;
    border-bottom-color: rgba(184, 228, 255, 0.55);
}

.footer-note {
    margin-top: 16px;
    font-size: 0.79rem;
    color: #93abc0;
    text-align: center;
}

.footer-note strong {
    color: #cae4ff;
    font-weight: 600;
}

@keyframes drift {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(14px, -10px, 0);
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 520px) {
    .login-shell {
        padding: 28px 20px 24px;
        border-radius: 14px;
    }

    .subtitle {
        margin-bottom: 22px;
    }
}
