:root {
    --dg-primary: #002c79;
    --dg-primary-dark: #06152e;
    --dg-primary-hover: #001f5b;
    --dg-primary-light: #2f67b2;
    --dg-primary-soft: rgba(0, 44, 121, 0.1);
    --dg-page: #06152e;
    --dg-border: #dce6f2;
    --dg-text: #14213d;
    --dg-muted: #64748b;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--dg-text);
    background: var(--dg-page);
}

body {
    overflow-x: hidden;
}

.login-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 16%, rgba(47, 103, 178, 0.42), transparent 32%),
        radial-gradient(circle at 88% 84%, rgba(0, 82, 180, 0.30), transparent 34%),
        linear-gradient(145deg, #030d20 0%, #061a36 44%, #002c79 100%);
}

.login-bg .bg-photo,
.login-bg .overlay1,
.login-bg .overlay2 {
    position: absolute;
    inset: 0;
}

.login-bg .bg-photo {
    opacity: 0.65;
    background-image:
        linear-gradient(rgba(140, 184, 242, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(140, 184, 242, 0.07) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 82%);
    mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

.login-bg .orb-right,
.login-bg .orb-left {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
}

.login-bg .orb-right {
    width: 360px;
    height: 360px;
    top: -170px;
    right: -110px;
    border: 70px solid rgba(140, 184, 242, 0.10);
}

.login-bg .orb-left {
    width: 280px;
    height: 280px;
    bottom: -150px;
    left: -90px;
    border: 58px solid rgba(47, 103, 178, 0.16);
}

.login-bg .grid-lines {
    display: none;
}

.login-wrapper {
    position: relative;
    z-index: 1;
    width: min(560px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px 0 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-brandbar {
    height: 48px;
    margin-bottom: 18px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brandbar-lockup {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brandbar-lockup img {
    width: 38px;
    height: 38px;
    padding: 4px;
    border-radius: 10px;
    background: #fff;
    object-fit: contain;
}

.brandbar-tag {
    color: rgba(216, 233, 255, 0.74);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.login-content {
    width: 100%;
    min-height: 620px;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(216, 233, 255, 0.2);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 32px 80px -28px rgba(0, 5, 20, 0.58);
}

.form-panel {
    display: flex;
    align-items: center;
    min-height: 620px;
    padding: 52px clamp(34px, 7vw, 64px);
    background: #fff;
}

.form-card {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 36px;
}

.form-brand-logo {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    object-fit: contain;
    filter: drop-shadow(0 8px 14px rgba(0, 44, 121, 0.12));
}

.form-heading h2 {
    margin: 0 0 6px;
    color: var(--dg-text);
    font-size: 28px;
    line-height: 1.1;
    font-weight: 750;
    letter-spacing: -0.025em;
}

.form-heading p {
    margin: 0;
    color: var(--dg-muted);
    font-size: 14px;
}

.form-card .field-group {
    margin-bottom: 18px;
}

.form-card .field-label {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 650;
}

.form-card .field-label .hint {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 400;
}

.form-card .input-wrap {
    position: relative;
}

.form-card .input-wrap .icon {
    position: absolute;
    z-index: 1;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
    transform: translateY(-50%);
    transition: color 0.2s;
}

.form-card .input-wrap input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 42px;
    border: 1px solid var(--dg-border);
    border-radius: 12px;
    outline: none;
    background: #f8fafd;
    color: var(--dg-text);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-card .input-wrap input::placeholder {
    color: #a3afbf;
}

.form-card .input-wrap input:focus {
    border-color: var(--dg-primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--dg-primary-soft);
}

.form-card .input-wrap:focus-within .icon {
    color: var(--dg-primary);
}

.captcha-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.captcha-row .input-wrap {
    flex: 1;
}

.captcha-box {
    width: 126px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--dg-border);
    border-radius: 12px;
    background: #f4f7fb;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.captcha-box:hover {
    border-color: var(--dg-primary-light);
    box-shadow: 0 0 0 3px var(--dg-primary-soft);
}

.captcha-box img {
    width: 100%;
    height: 34px;
    object-fit: cover;
}

.form-card .btn-login {
    width: 100%;
    height: 50px;
    margin-top: 10px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--dg-primary), var(--dg-primary-hover));
    box-shadow: 0 12px 24px -10px rgba(0, 44, 121, 0.55);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.form-card .btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px -12px rgba(0, 44, 121, 0.62);
    filter: brightness(1.06);
}

.form-card .btn-login:active {
    transform: translateY(0);
}

.form-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #edf2f7;
    text-align: center;
}

.form-footer p {
    margin: 0;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

@media (max-width: 960px) {
    .login-wrapper {
        width: min(560px, calc(100% - 32px));
        padding: 22px 0 30px;
    }

    .brandbar-tag {
        display: none;
    }

    .form-panel {
        min-height: 0;
        padding: 44px clamp(24px, 8vw, 54px);
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        width: calc(100% - 20px);
        padding-top: 12px;
    }

    .login-brandbar {
        margin-bottom: 8px;
    }

    .login-content {
        border-radius: 20px;
    }

    .form-panel {
        padding: 34px 20px 28px;
    }

    .form-header {
        margin-bottom: 30px;
    }

    .form-brand-logo {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
    }

    .form-heading h2 {
        font-size: 24px;
    }

    .captcha-box {
        width: 110px;
    }
}
