* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    color-scheme: dark;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 15%, rgba(59, 130, 246, 0.16), transparent 32rem),
        radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.11), transparent 30rem),
        #080b12;
    color: #f8fafc;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.login-card {
    width: 100%;
    max-width: 430px;
    padding: 38px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: rgba(17, 24, 39, 0.72);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
}

.logo {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 26px;
    border-radius: 17px;
    background: linear-gradient(145deg, #2563eb, #4f46e5);
    box-shadow: 0 14px 35px rgba(37, 99, 235, 0.28);
}

.logo svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: white;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.logo svg circle {
    fill: white;
    stroke: none;
}

.heading {
    margin-bottom: 30px;
}

.heading h1 {
    font-size: 30px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.heading p {
    margin-top: 9px;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.55;
}

.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper > svg {
    position: absolute;
    left: 15px;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: #64748b;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    transition: stroke 160ms ease;
}

.input-wrapper input {
    width: 100%;
    height: 52px;
    padding: 0 46px;
    border: 1px solid #273244;
    border-radius: 13px;
    outline: none;
    background: rgba(8, 12, 20, 0.72);
    color: #f8fafc;
    font: inherit;
    font-size: 14px;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

.input-wrapper input::placeholder {
    color: #526077;
}

.input-wrapper input:hover {
    border-color: #38465b;
}

.input-wrapper input:focus {
    border-color: #3b82f6;
    background: rgba(8, 12, 20, 0.95);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.input-wrapper:focus-within > svg {
    stroke: #60a5fa;
}

.password-toggle {
    position: absolute;
    right: 9px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition:
        color 160ms ease,
        background 160ms ease;
}

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

.password-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-button {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: white;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        filter 160ms ease;
}

.login-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
}

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

.login-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.error {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -10px 0 22px;
    padding: 12px 14px;
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: 11px;
    background: rgba(127, 29, 29, 0.14);
    color: #fca5a5;
    font-size: 13px;
}

.error svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
    color: #64748b;
    font-size: 12px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.55);
}

.footer {
    margin-top: 22px;
    color: #475569;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 520px) {
    .login-page {
        padding: 20px 16px;
    }

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

    .logo {
        width: 54px;
        height: 54px;
        margin-bottom: 23px;
    }

    .heading h1 {
        font-size: 27px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
