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

html, body {
    height: 100%;
}

body.signin {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

/* =========== Theme: 浅黄→浅蓝 (管理员密码登录) =========== */
body.signin.theme-yellowblue {
    background: linear-gradient(135deg, #fef9e7 0%, #fdebd0 25%, #f5e1da 45%, #d4e6f1 70%, #aed6f1 100%);
    --accent-from: #f39c12;
    --accent-to: #3498db;
    --accent-rgb: 243, 156, 18;
    --badge-bg: linear-gradient(135deg, #f39c12, #3498db);
    --title-color: #2c3e50;
    --subtitle-color: rgba(0,0,0,0.45);
    --footer-color: rgba(0,0,0,0.3);
    --footer-link: rgba(0,0,0,0.4);
}
body.signin.theme-yellowblue::before {
    background: radial-gradient(ellipse at 20% 50%, rgba(243, 156, 18, 0.10) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 50%, rgba(52, 152, 219, 0.08) 0%, transparent 50%);
}
body.signin.theme-yellowblue::after {
    background: radial-gradient(circle, rgba(243, 156, 18, 0.05) 0%, transparent 70%);
}

/* =========== Theme: 浅白→浅紫 (验证码登录) =========== */
body.signin.theme-whitepurple {
    background: linear-gradient(135deg, #fdfeff 0%, #f5eef8 30%, #ebdef0 60%, #d7bde2 100%);
    --accent-from: #8e44ad;
    --accent-to: #9b59b6;
    --accent-rgb: 142, 68, 173;
    --badge-bg: linear-gradient(135deg, #8e44ad, #9b59b6);
    --title-color: #2c3e50;
    --subtitle-color: rgba(0,0,0,0.45);
    --footer-color: rgba(0,0,0,0.3);
    --footer-link: rgba(0,0,0,0.4);
}
body.signin.theme-whitepurple::before {
    background: radial-gradient(ellipse at 20% 50%, rgba(142, 68, 173, 0.10) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 50%, rgba(155, 89, 182, 0.08) 0%, transparent 50%);
}
body.signin.theme-whitepurple::after {
    background: radial-gradient(circle, rgba(142, 68, 173, 0.05) 0%, transparent 70%);
}

/* =========== Theme: 浅红→浅绿 (员工登录) =========== */
body.signin.theme-redgreen {
    background: linear-gradient(135deg, #fdedec 0%, #fadbd8 30%, #d5f5e3 65%, #a9dfbf 100%);
    --accent-from: #e74c3c;
    --accent-to: #27ae60;
    --accent-rgb: 231, 76, 60;
    --badge-bg: linear-gradient(135deg, #e74c3c, #27ae60);
    --title-color: #2c3e50;
    --subtitle-color: rgba(0,0,0,0.45);
    --footer-color: rgba(0,0,0,0.3);
    --footer-link: rgba(0,0,0,0.4);
}
body.signin.theme-redgreen::before {
    background: radial-gradient(ellipse at 20% 50%, rgba(231, 76, 60, 0.10) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 50%, rgba(39, 174, 96, 0.08) 0%, transparent 50%);
}
body.signin.theme-redgreen::after {
    background: radial-gradient(circle, rgba(231, 76, 60, 0.05) 0%, transparent 70%);
}

/* =========== Shared ambient effects =========== */
body.signin::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    animation: gradientShift 12s ease-in-out infinite alternate;
    pointer-events: none;
}

body.signin::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    top: -200px;
    right: -200px;
    pointer-events: none;
}

@keyframes gradientShift {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-2%, -2%) rotate(3deg); }
}

/* =========== Decorative badge =========== */
.login-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 16px;
    border-radius: 20px;
    background: var(--badge-bg);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 20;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* =========== Main container =========== */
.signinpanel {
    width: 420px;
    position: relative;
    z-index: 10;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========== Logo area =========== */
.signinpanel .logo {
    text-align: center;
    margin-bottom: 32px;
}

.signinpanel .logo .logo-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.signinpanel .logo .logo-icon.yellowblue {
    background: linear-gradient(135deg, #f39c12, #3498db);
}
.signinpanel .logo .logo-icon.whitepurple {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
}
.signinpanel .logo .logo-icon.redgreen {
    background: linear-gradient(135deg, #e74c3c, #27ae60);
}

.signinpanel .logo .logo-icon i {
    color: #fff;
}

.signinpanel .logo span {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--title-color, #fff);
    letter-spacing: 6px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.signinpanel .logo .subtitle {
    font-size: 13px;
    color: var(--subtitle-color, rgba(255,255,255,0.6));
    margin-top: 10px;
    letter-spacing: 3px;
    font-weight: 300;
}

/* =========== Login card =========== */
.signinpanel form {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    padding: 45px 38px 38px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: visible;
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.signinpanel form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-from), var(--accent-to), var(--accent-from));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

form .no-margins {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 6px;
    letter-spacing: 2px;
}

/* =========== Form elements =========== */
.form-group {
    margin-bottom: 22px;
    position: relative;
}

.ico {
    position: absolute;
    left: 0;
    top: 0;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
}

.ico img {
    width: 18px;
    opacity: 0.45;
}

.signinpanel .form-control {
    display: block;
    width: 100%;
    height: 46px;
    padding: 10px 16px 10px 46px;
    font-size: 14px;
    color: #333;
    background: #f0f4f8;
    border: 2px solid transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: none;
}

.signinpanel .form-control:focus {
    background: #fff;
    border-color: var(--accent-from);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
}

.signinpanel .form-control::placeholder {
    color: #aaa;
    font-size: 13px;
}

.checkbox-custom {
    display: flex;
    align-items: center;
    margin-bottom: 22px;
    cursor: pointer;
}

.checkbox-custom input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-right: 8px;
    accent-color: var(--accent-from);
    cursor: pointer;
}

.checkbox-custom label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
    font-weight: 400;
}

/* =========== Button =========== */
.signinpanel .btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent-from) 0%, var(--accent-to) 100%);
    position: relative;
    transition: all 0.35s ease;
    letter-spacing: 3px;
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.35);
}

.signinpanel .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.45);
}

.signinpanel .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.3);
}

/* =========== Footer =========== */
.signup-footer {
    text-align: center;
    margin-top: 28px;
    display: flex;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
}

.signup-footer span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--footer-color, rgba(255,255,255,0.75));
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.signup-footer span img {
    width: 15px;
    opacity: 0.7;
}

.ba {
    text-align: center;
    margin-top: 22px;
    font-size: 12px;
    color: var(--footer-color, rgba(255,255,255,0.4));
    line-height: 1.8;
}

.ba a {
    color: var(--footer-link, rgba(255,255,255,0.5));
    text-decoration: none;
    transition: color 0.3s;
}

.ba a:hover {
    color: var(--title-color, rgba(255,255,255,0.8));
}

/* =========== Side info panel =========== */
.signin-info {
    text-align: center;
    margin-bottom: 20px;
}

.signin-info .logopanel h1 {
    margin: 0;
}

.signin-info .logopanel h1 img {
    max-width: 120px;
}

.signin-info h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1e3a5f;
    margin: 10px 0;
}

.signin-info ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.signin-info ul li {
    padding: 5px 0;
    font-size: 14px;
    color: #555;
}

label.error {
    position: inherit;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* =========== Responsive =========== */
@media screen and (max-width: 768px) {
    .signinpanel {
        width: 92%;
        max-width: 400px;
    }

    .login-badge {
        top: 10px;
        right: 10px;
        padding: 4px 12px;
        font-size: 11px;
    }

    .signinpanel form {
        padding: 32px 24px 28px;
    }

    .signinpanel .logo span {
        font-size: 22px;
        letter-spacing: 4px;
    }

    .signup-footer {
        gap: 14px;
    }

    .signup-footer span {
        font-size: 12px;
    }
}

@media screen and (max-width: 320px) {
    .signinpanel form {
        padding: 25px 18px 22px;
    }
}
