:root {
    --blue: #205197;
    --cyan: #27b4c8;
    --ink: #08162e;
    --gold: #e6b64d;
    --line: rgba(180, 218, 255, 0.28);
    --panel: rgba(255, 255, 255, 0.14);
    --panel-border: rgba(255, 255, 255, 0.32);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #fff;
    background: linear-gradient(120deg, rgba(8, 22, 46, 0.94), rgba(24, 71, 132, 0.8)),
    linear-gradient(32deg, rgba(39, 180, 200, 0.2), transparent 34%, rgba(230, 182, 77, 0.16) 72%, transparent),
    #0a1934;
    overflow: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 78%, transparent);
    opacity: 0.42;
    transform: perspective(760px) rotateX(58deg) translateY(-14%);
    transform-origin: top;
    animation: gridFlow 16s linear infinite;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.08)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 18px);
    opacity: 0.24;
}

@keyframes gridFlow {
    from {
        background-position: 0 0, 0 0;
    }
    to {
        background-position: 0 72px, 72px 0;
    }
}

.network-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.login-shell {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.login-panel {
    width: min(570px, 100%);
    padding: 34px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)),
    var(--panel);
    box-shadow: 0 28px 80px rgba(1, 11, 28, 0.42);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    text-align: center;
}

.logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 188px;
    height: 74px;
    margin-bottom: 26px;
}

.logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.22));
}

.page-title {
    font-size: 1.7rem;
    font-weight: 750;
    line-height: 1.15;
    margin: 0 0 10px;
    letter-spacing: 0;
}

.page-info {
    font-size: 1.4rem;
    font-weight: 750;
    line-height: 1.15;
    margin: 0 0 10px;
    letter-spacing: 0;
}

.page-subtitle {
    margin: 0 auto 26px;
    color: rgba(255, 255, 255, 0.76);
    max-width: 340px;
    font-size: 1.2rem;
    line-height: 1.55;
}

.alert {
    text-align: left;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.92);
    color: #842029;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14);
}

.digital-login-btn {
    position: relative;
    width: 100%;
    min-height: 58px;
    padding: 18px 18px 12px 18px;
    border: 0;
    border-radius: 8px;
    color: #10254c;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 720;
    box-shadow: 0 18px 44px rgba(4, 19, 45, 0.3);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    overflow: hidden;
}

.digital-login-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 0 28%, rgba(39, 180, 200, 0.16) 44%, rgba(230, 182, 77, 0.18) 56%, transparent 72% 100%);
    transform: translateX(-100%);
    transition: transform 0.45s ease;
}

.digital-login-btn img,
.digital-login-btn span,
.digital-login-btn i {
    position: relative;
    z-index: 1;
}

.digital-login-btn img {
    height: 24px;
}

.digital-login-btn:hover {
    color: #10254c;
    background: #f8fbff;
    box-shadow: 0 22px 54px rgba(4, 19, 45, 0.42);
    transform: translateY(-2px);
}

.digital-login-btn:hover::before {
    transform: translateX(100%);
}

.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0 18px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.82rem;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
}

.classic-login-link {
    color: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.93rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.48);
    transition: color 0.18s ease, border-color 0.18s ease;
}

.classic-login-link:hover {
    color: #fff;
    border-color: #fff;
}

.login-footer {
    position: fixed;
    z-index: 2;
    left: 24px;
    right: 24px;
    bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.78rem;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

.status-mark {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 18px rgba(230, 182, 77, 0.85);
}

.login-form label {
    text-align: left;
}

.remember-me {
    color: #fff !important;
}

.remember-div, .form-input {
    text-align: left !important;
}

@media (max-width: 630px) {
    body {
        overflow-y: auto;
    }

    .login-shell {
        padding: 22px;
        align-items: center;
    }

    .login-panel {
        padding: 28px 22px;
        border-radius: 8px;
    }

    .page-info {
        font-size: 1.1rem;
    }

    .page-title {
        font-size: 1.3rem;
    }

    .page-subtitle {
        font-size: 1.1rem;
    }

    .digital-login-btn img {
        height: 20px;
    }

    .digital-login-btn {
        min-height: auto;
        padding: 15px 9px 9px 9px;
    }

    .logo-wrap {
        width: 152px;
        height: 62px;
        margin-bottom: 20px;
    }

    .login-footer {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        padding: 0 22px 22px;
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 470px) {
    .page-info {
        font-size: 1rem;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .digital-login-btn img {
        height: 16px;
    }

    .digital-login-btn {
        min-height: auto;
        padding: 15px 9px 9px 9px;
    }
}

@media (max-width: 440px) {
    .page-info {
        font-size: 0.9rem;
    }

    .page-title {
        font-size: 1.1rem;
    }

    .page-subtitle {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .page-title {
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .page-info {
        font-size: 0.7rem;
    }

    .page-title {
        font-size: 0.8rem;
    }

    .page-subtitle {
        font-size: 0.7rem;
    }
}

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