:root {
    --pt-primary: #2563EB;
    --pt-primary-dark: #1D4ED8;
    --pt-accent: #F97316;
    --pt-bg: #EFF6FF;
    --pt-text: #0F172A;
    --pt-muted: #64748B;
    --pt-border: #E2E8F0;
    --pt-card: #FFFFFF;
}

html {
    height: 100%;
}

body.signin {
    margin: 0 !important;
    padding: 0 !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--pt-text);
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(37, 99, 235, 0.18), transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 80%, rgba(249, 115, 22, 0.14), transparent 50%),
        linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 45%, #FFF7ED 100%) !important;
    background-attachment: fixed !important;
}

.login-shell {
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    width: 100%;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center;
    box-sizing: border-box;
    padding: 24px;
}

.login-visual {
    flex: 1 1 0;
    display: flex !important;
    align-items: center !important;
    justify-content: center;
    padding: 24px 40px;
    position: relative;
    overflow: hidden;
    height: 100%;
    max-height: 100%;
    box-sizing: border-box;
}

.login-visual::before {
    content: "";
    position: absolute;
    inset: 18% -8% auto auto;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.16), rgba(249, 115, 22, 0.12));
    filter: blur(2px);
    pointer-events: none;
}

.login-visual-inner {
    position: relative;
    z-index: 1;
    max-width: 460px;
    width: 100%;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.brand-logo,
.card-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: block;
    flex-shrink: 0;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.brand-text {
    min-width: 0;
}

.brand-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--pt-text);
    line-height: 1.3;
}

.company-name {
    margin-top: 4px;
    font-size: 13px;
    color: var(--pt-muted);
    line-height: 1.4;
}

.visual-title {
    margin: 0 0 14px;
    font-size: 32px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--pt-text);
}

.visual-desc {
    margin: 0 0 22px;
    font-size: 15px;
    line-height: 1.75;
    color: var(--pt-muted);
}

.visual-points {
    list-style: none;
    padding: 0;
    margin: 0;
}

.visual-points li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #334155;
}

.visual-points i {
    color: var(--pt-accent);
    font-size: 16px;
}

.login-panel {
    flex: 1 1 0;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px;
    height: 100%;
    max-height: 100%;
    box-sizing: border-box;
}

.login-card {
    width: 100%;
    max-width: 400px;
    max-height: calc(100vh - 48px);
    margin-top: -56px;
    overflow-y: auto;
    background: var(--pt-card);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    padding: 28px 32px 22px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    box-sizing: border-box;
}

.login-card-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--pt-border);
}

.card-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.card-brand-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--pt-text);
    line-height: 1.3;
}

.card-company-name {
    margin-top: 3px;
    font-size: 12px;
    color: var(--pt-muted);
    line-height: 1.4;
}

.login-card-head {
    margin-bottom: 18px;
}

.login-card-head h3 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: var(--pt-text);
}

.login-card-head p {
    margin: 0;
    color: var(--pt-muted);
    font-size: 13px;
}

.form-group-pt {
    margin-bottom: 14px;
}

.form-group-pt > label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.input-wrap {
    position: relative;
}

.input-wrap > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 14px;
    z-index: 2;
}

.signinpanel .form-control,
.login-card .form-control {
    display: block;
    width: 100%;
    height: 42px !important;
    padding: 10px 14px 10px 40px !important;
    border: 1px solid var(--pt-border) !important;
    border-radius: 12px !important;
    background: #F8FAFC;
    color: var(--pt-text);
    box-shadow: none !important;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.login-card .form-control:focus {
    border-color: var(--pt-primary) !important;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.login-card .uname,
.login-card .pword,
.login-card .code {
    background-image: none !important;
}

.captcha-row {
    margin-left: -8px;
    margin-right: -8px;
}

.captcha-row > [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
}

.captcha-label {
    display: block;
    height: 21px;
}

.captcha-box {
    display: block;
    height: 42px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--pt-border);
    background: #F8FAFC;
}

.captcha-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.login-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 6px;
    min-height: 28px;
}

.register-link {
    font-size: 12px;
    font-weight: 500;
    color: var(--pt-muted);
}

.register-link a {
    color: var(--pt-primary);
}

.btn-login {
    margin-top: 8px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pt-primary), var(--pt-primary-dark));
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
    cursor: pointer;
}

.btn-login:hover,
.btn-login:focus {
    color: #fff !important;
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.34);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--pt-border);
    text-align: center;
    font-size: 12px;
    color: #94A3B8;
}

/* checkbox */
.checkbox-custom {
    position: relative;
    padding: 0 0 0 24px;
    margin-bottom: 0;
    display: inline-block;
}

.checkbox-custom input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    cursor: pointer;
    z-index: 2;
    margin: -6px 0 0 0;
    top: 50%;
    left: 0;
    width: 18px;
    height: 18px;
}

.checkbox-custom label:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    margin-top: -9px;
    width: 18px;
    height: 18px;
    display: inline-block;
    border-radius: 5px;
    border: 1px solid #CBD5E1;
    background: #fff;
}

.checkbox-custom input[type="checkbox"]:checked + label:after {
    position: absolute;
    display: inline-block;
    font-family: 'Glyphicons Halflings';
    content: "\e013";
    top: 42%;
    left: 3px;
    margin-top: -5px;
    font-size: 11px;
    line-height: 1;
    width: 16px;
    height: 16px;
    color: var(--pt-primary);
}

.checkbox-custom label {
    cursor: pointer;
    line-height: 1.2;
    font-weight: 500;
    margin-bottom: 0;
    color: #475569;
    font-size: 13px;
}

body .layer-ext-moon-msg[type="dialog"] {
    min-width: 100px !important;
}

body .layer-ext-moon-msg {
    background-color: rgba(15, 23, 42, 0.78);
    color: #fff;
    border: none;
}

body .layer-ext-moon-msg .layui-layer-content {
    padding: 12px 25px;
    text-align: center;
}

@media screen and (max-width: 992px) {
    body.signin {
        height: auto !important;
        max-height: none !important;
        overflow: auto !important;
    }

    .login-shell {
        flex-direction: column !important;
        height: auto;
        min-height: 100vh;
        max-height: none;
        padding: 20px 16px 28px;
    }

    .login-visual,
    .login-panel {
        height: auto;
        max-height: none;
        padding: 16px;
    }

    .visual-title {
        font-size: 26px;
    }

    .visual-points {
        display: none;
    }

    .login-card {
        max-height: none;
        margin-top: 0;
        padding: 24px 20px 18px;
        border-radius: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-login,
    .login-card .form-control {
        transition: none;
    }
}
