:root {
    --bg: #020617;
    --panel: rgba(10, 18, 35, 0.78);
    --panel-strong: rgba(12, 20, 38, 0.94);
    --border: rgba(148, 163, 184, 0.28);
    --text: #f8fafc;
    --muted: #9aa8bd;
    --muted-2: #64748b;
    --blue: #38bdf8;
    --red: #ef4444;
    --red-dark: #b91c1c;
    --green: #a3e635;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    min-height: 100%;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: auto;
}

.login-page {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    overflow: hidden;
}

/* Background */
.bg-earth {
    position: absolute;
    inset: 0;
    background-image: url("/static/backgrounds/earth.jpg");
    background-size: cover;
    background-position: center bottom;
    transform: scale(1.02);
    z-index: 0;
}

.bg-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 52% 45%, rgba(56, 189, 248, 0.16), transparent 22%),
        linear-gradient(90deg,
            rgba(2, 6, 23, 0.22) 0%,
            rgba(2, 6, 23, 0.38) 45%,
            rgba(2, 6, 23, 0.70) 68%,
            rgba(2, 6, 23, 0.90) 100%
        ),
        linear-gradient(180deg,
            rgba(2, 6, 23, 0.12) 0%,
            rgba(2, 6, 23, 0.20) 55%,
            rgba(2, 6, 23, 0.76) 100%
        );
    z-index: 1;
}

/* Left hero */
.hero {
    position: relative;
    z-index: 2;
    padding-left: 96px;
    padding-top: 255px;
    padding-bottom: 120px;
    display: flex;
    flex-direction: column;
}

.partner-logos {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 62px;
}

.logo-huawei {
    width: 200px;
    height: auto;
    object-fit: contain;
}

.logo-ais {
    width: 200px;
    height: auto;
    object-fit: contain;
}

.divider {
    width: 1px;
    height: 58px;
    background: rgba(226, 232, 240, 0.55);
}

.hero-content h1 {
    margin: 0;
    font-size: 72px;
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: 0;
    text-shadow: 0 8px 35px rgba(0, 0, 0, 0.55);
}

.hero-content h2 {
    margin: 22px 0 0;
    color: var(--green);
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 0;
    text-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

.tagline {
    margin-top: 34px;
    font-size: 18px;
    letter-spacing: 0;
    color: #f1f5f9;
    text-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

.trust-line {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 20px;
    color: #dbeafe;
    font-size: 18px;
}

.trust-line i {
    display: block;
    width: 1px;
    height: 22px;
    background: rgba(203, 213, 225, 0.55);
}

/* Login card */
.login-zone {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 105px;
}

.login-card {
    width: 560px;
    min-height: 0;
    padding: 46px 50px 34px;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(6, 12, 24, 0.94));
    border: 1px solid rgba(148, 163, 184, 0.30);
    box-shadow:
        0 0 0 1px rgba(56, 189, 248, 0.04),
        0 0 72px rgba(56, 189, 248, 0.18),
        0 24px 120px rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(22px);
}

.card-logo {
    display: block;
    width: 126px;
    max-height: 82px;
    object-fit: contain;
    margin: 0 auto 26px;
}

.login-card h3 {
    margin: 0;
    text-align: center;
    font-size: 34px;
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: 0;
}

.login-card p {
    margin: 16px 0 34px;
    text-align: center;
    color: var(--muted);
    font-size: 17px;
}

form label {
    display: block;
    margin-bottom: 10px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 600;
}

.input-wrap {
    position: relative;
    margin-bottom: 24px;
}

.input-wrap input {
    width: 100%;
    height: 58px;
    padding: 0 58px 0 20px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.46);
    background: rgba(2, 6, 23, 0.66);
    color: #f8fafc;
    font-size: 17px;
    outline: none;
}

.input-wrap input::placeholder {
    color: rgba(148, 163, 184, 0.72);
}

.input-wrap input:focus {
    border-color: rgba(56, 189, 248, 0.85);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.input-wrap span {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(203, 213, 225, 0.72);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2px 0 28px;
    font-size: 15px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #cbd5e1;
    font-weight: 400;
}

.remember input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--red);
}

.form-row a {
    color: #60a5fa;
    text-decoration: none;
}

.form-row a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.login-error {
    margin: -16px 0 22px;
    padding: 12px 14px;
    border: 1px solid rgba(239, 68, 68, 0.46);
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.14);
    color: #fecaca;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

button {
    width: 100%;
    height: 60px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #ff3b36, #b83224);
    color: white;
    font-size: 19px;
    font-weight: 800;
    cursor: pointer;
    box-shadow:
        0 18px 45px rgba(239, 68, 68, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

button:hover {
    background: linear-gradient(135deg, #ff5a52, #991b1b);
}

.dev-users {
    display: grid;
    gap: 6px;
    margin-top: 20px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.38);
    color: #93a4b8;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.dev-users strong {
    color: #e2e8f0;
}

.version {
    margin-top: 32px;
    color: #6b7a91;
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
}

/* Responsive */
@media (max-width: 1400px) {
    .hero {
        padding-left: 64px;
    }

    .hero-content h1 {
        font-size: 62px;
    }

    .login-zone {
        padding-right: 56px;
    }

    .login-card {
        width: 500px;
        padding: 38px 44px 30px;
    }
}

@media (max-height: 820px) and (min-width: 1101px) {
    .hero {
        padding-top: 170px;
        padding-bottom: 80px;
    }

    .partner-logos {
        margin-bottom: 42px;
    }

    .logo-huawei,
    .logo-ais {
        width: 170px;
    }

    .hero-content h1 {
        font-size: 58px;
    }

    .hero-content h2 {
        font-size: 30px;
    }

    .tagline {
        margin-top: 24px;
        font-size: 16px;
    }

    .login-card {
        padding: 32px 42px 26px;
    }

    .card-logo {
        width: 108px;
        margin-bottom: 18px;
    }

    .login-card h3 {
        font-size: 28px;
    }

    .login-card p {
        margin: 12px 0 24px;
        font-size: 15px;
    }

    form label {
        margin-bottom: 8px;
    }

    .input-wrap {
        margin-bottom: 18px;
    }

    .input-wrap input {
        height: 52px;
    }

    .form-row {
        margin-bottom: 22px;
    }

    button {
        height: 56px;
    }

    .version {
        margin-top: 22px;
    }
}

@media (max-width: 1100px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .hero {
        display: none;
    }

    .login-zone {
        padding: 32px;
    }
}

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

    .login-zone {
        min-height: 100vh;
        padding: 20px;
    }

    .login-card {
        width: 100%;
        min-height: auto;
        padding: 34px 24px 28px;
    }

    .card-logo {
        width: 102px;
        margin-bottom: 24px;
    }

    .login-card h3 {
        font-size: 26px;
    }

    .login-card p {
        margin-bottom: 34px;
        font-size: 15px;
    }

    .input-wrap {
        margin-bottom: 22px;
    }

    .input-wrap input {
        height: 56px;
        font-size: 16px;
    }

    .form-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    button {
        height: 60px;
    }
}
