:root {
    --bg: #0b0f14;
    --panel: #0f141b;
    --panel-2: #111821;
    --text: #e6e8ea;
    --muted: #9aa4b2;
    --danger: #ff6b7a;
    --brand-hue: 210; /* tweak this to recolor quickly */
    --brand: hsl(var(--brand-hue) 100% 60%);
    --brand-600: hsl(var(--brand-hue) 100% 55%);
    --brand-700: hsl(var(--brand-hue) 100% 48%);
    --ring: hsla(var(--brand-hue), 100%, 60%, .45);
    --radius-xl: 18px;
    --radius: 12px;
    --shadow-lg: 0 10px 28px rgba(0, 0, 0, .35), 0 1px 4px rgba(0, 0, 0, .3);
}

* {
    box-sizing: border-box
}

html, body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--text);
    background: radial-gradient(1200px 800px at 100% -10%, #142131 0%, transparent 60%),
    radial-gradient(1200px 800px at -10% 100%, #0d1622 0%, transparent 60%),
    linear-gradient(180deg, #070b10, #0b0f14);
    display: grid;
    place-items: center;
}

/* animated subtle grid */
.bg-grid::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .06;
    background-image: linear-gradient(to right, #fff 1px, transparent 1px), linear-gradient(to bottom, #fff 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(1200px 600px at 50% -10%, black, transparent 70%);
    animation: gridmove 5s linear infinite;
}

@keyframes gridmove {
    to {
        background-position: 48px 48px
    }
}

.container {
    width: min(94vw, 420px);
    position: relative;
    padding: 24px;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 18%), radial-gradient(900px 400px at 20% -20%, rgba(255, 255, 255, .04), transparent 40%), linear-gradient(180deg, var(--panel), var(--panel-2));
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .06);
    isolation: isolate;
}

.accent-ring {
    position: absolute;
    inset: auto -25% auto auto;
    right: -25%;
    top: -25%;
    width: 420px;
    height: 420px;
    filter: blur(24px);
    opacity: .15;
    z-index: -1;
    background: radial-gradient(closest-side, var(--brand), transparent 70%);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.brand .logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--brand-700));
    box-shadow: 0 8px 30px rgba(0, 0, 0, .45), 0 0 0 6px rgba(72, 118, 255, .06);
}

h1 {
    font-size: clamp(20px, 3.2vw, 24px);
    margin: 0
}

.sub {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

form {
    display: grid;
    gap: 14px
}

.field {
    display: grid;
    gap: 8px
}

.label {
    font-size: 13px;
    color: #b9c2cf
}

.control {
    position: relative;
}

.input {
    width: 100%;
    font: inherit;
    color: var(--text);
    background: #0b1118;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: 14px 14px 14px 44px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .2s ease;
}

.input::placeholder {
    color: #647085
}

.input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 6px var(--ring);
    background: #0a0f16;
}

.icon {
    position: absolute;
    left: 12px;
    top: 50%;
    translate: 0 -50%;
    width: 18px;
    height: 18px;
    opacity: .7;
}

.icon svg {
    display: block
}

.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px
}

.remember {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #b9c2cf;
    font-size: 13px
}

.remember input {
    accent-color: var(--brand)
}

.link {
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    opacity: .85
}

.link:hover {
    text-decoration: underline
}

.btn {
    width: 100%;
    appearance: none;
    border: 0;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 14px;
    font-weight: 600;
    letter-spacing: .2px;
    background: linear-gradient(180deg, var(--brand), var(--brand-700));
    color: #fff;
    box-shadow: 0 8px 18px rgba(45, 125, 255, .28);
    transition: transform .06s ease, filter .15s ease, box-shadow .2s ease;
}

.btn:hover {
    filter: brightness(1.05)
}

.btn:active {
    transform: translateY(1px)
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0 2px;
    opacity: .8
}

.divider::before, .divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .15), transparent)
}

.footnote {
    color: #9aa4b2;
    font-size: 12px;
    margin-top: 10px;
    text-align: center
}

.error {
    display: none;
    margin-bottom: 6px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #201217;
    color: #fecdd3;
    border: 1px solid rgba(255, 0, 64, .25)
}

.error[aria-hidden="false"] {
    display: block
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    translate: 0 -50%;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: #0b1118;
    color: #b9c2cf;
    font-size: 12px;
    cursor: pointer;
}

.password-toggle:hover {
    border-color: rgba(255, 255, 255, .18)
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important
    }
}

@media (max-width: 480px) {
    .container {
        padding: 18px;
        border-radius: 14px
    }

    .input {
        padding: 12px 12px 12px 42px
    }

    .brand .logo {
        width: 32px;
        height: 32px;
        border-radius: 10px
    }

    .sub {
        font-size: 13px
    }

    .password-toggle {
        display: none
    }

    .bg-grid::before {
        display: none
    }

    .accent-ring {
        display: none
    }

    .btn {
        padding: 11px 14px;
        box-shadow: 0 6px 14px rgba(45, 125, 255, .22)
    }
}

.brand .title-block{
    display:flex;
    flex-direction:column;
    justify-content:center;
    line-height:1.2;
}