/* ===== Login Page Layout ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ===== Animated Background Shapes ===== */
.bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    animation: floatShape 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -80px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: -60px;
    animation-delay: 3s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: -50px;
    left: 30%;
    animation-delay: 6s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 20%;
    right: 20%;
    animation-delay: 9s;
    background: rgba(255, 255, 255, 0.05);
}

.shape-5 {
    width: 250px;
    height: 250px;
    bottom: 10%;
    right: 15%;
    animation-delay: 12s;
    background: rgba(255, 255, 255, 0.04);
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(40px, 20px) scale(1.02); }
}

/* ===== Login Card ===== */
.login-card {
    position: relative;
    z-index: 1;
    width: 420px;
    max-width: 92vw;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 40px 36px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

/* ===== Login Header ===== */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    display: inline-flex;
    margin-bottom: 14px;
    filter: drop-shadow(0 4px 12px rgba(79, 70, 229, 0.3));
}

.login-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== Input Wrapper ===== */
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-tertiary);
    pointer-events: none;
    z-index: 1;
}

.form-input.has-icon {
    padding-left: 42px;
}

.form-input.has-icon.has-right-icon {
    padding-right: 42px;
}

.toggle-pwd {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    background: transparent;
    transition: var(--transition);
}

.toggle-pwd:hover {
    color: var(--primary);
    background: var(--primary-bg);
}

/* ===== Captcha ===== */
.captcha-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.flex-1 {
    flex: 1;
}

.captcha-box {
    width: 110px;
    height: 42px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 4px;
    user-select: none;
    border: 1px solid var(--border);
    transition: var(--transition);
    font-family: 'Courier New', monospace;
    overflow: hidden;
    position: relative;
}

.captcha-box:hover {
    border-color: var(--primary);
}

.captcha-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.03) 3px,
        rgba(0, 0, 0, 0.03) 6px
    );
    pointer-events: none;
}

/* ===== Login Options ===== */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    user-select: none;
}

.checkbox-wrap input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-custom {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-radius: 4px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.checkbox-wrap input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-wrap input:checked + .checkbox-custom::after {
    content: '';
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.forgot-link {
    font-size: 13px;
    color: var(--primary);
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===== Login Button ===== */
.btn-login {
    width: 100%;
    height: 44px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ===== Login Tip ===== */
.login-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    padding: 10px;
    background: var(--primary-bg);
    border-radius: var(--radius);
    font-size: 12px;
    color: var(--primary);
}

/* ===== Login Footer ===== */
.login-footer {
    position: relative;
    z-index: 1;
    margin-top: 30px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px 24px;
        border-radius: 16px;
    }

    .login-title {
        font-size: 22px;
    }

    .captcha-box {
        width: 90px;
    }
}
