/* login.css - 统一登录页(紫色渐变背景) */

* {
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #7b61ff 0%, #5a43d0 100%);
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-width: 450px;
    width: 90%;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #7b61ff, #5a43d0);
}

.login-container h2 {
    margin: 0 0 4px 0;
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

.login-subtitle {
    text-align: center;
    color: #7f8c8d;
    font-size: 13px;
    margin: 0 0 24px 0;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #7b61ff;
    background: white;
    box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.1);
}

.btn-login {
    background: linear-gradient(to right, #7b61ff, #5a43d0);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(123, 97, 255, 0.3);
}

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

.error {
    background: #ffeaea;
    color: #e74c3c;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #e74c3c;
    font-size: 14px;
}

.back-link {
    text-align: center;
    margin-top: 24px;
}

.back-link a {
    color: #7b61ff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-link a:hover {
    color: #5a43d0;
    text-decoration: underline;
}

.system-info {
    margin-top: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

@media (max-width: 480px) {
    .login-container {
        padding: 30px 24px;
    }
    .login-container h2 {
        font-size: 24px;
    }
}

/* ──────────────────────────────────────────────
   二维码扫码登录
   ────────────────────────────────────────────── */
.qr-login-container {
    max-width: 480px;
}

.qr-loading {
    text-align: center;
    padding: 50px 20px;
    color: #7f8c8d;
}
.qr-loading .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0d8ff;
    border-top-color: #7b61ff;
    border-radius: 50%;
    margin: 0 auto 14px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.qr-area {
    text-align: center;
    padding: 6px 0 4px;
}

.qr-image-wrap {
    display: inline-block;
    padding: 14px;
    background: #fff;
    border: 1px solid #ebedf2;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(123, 97, 255, 0.08);
    margin-bottom: 16px;
}
.qr-image-wrap img {
    display: block;
    width: 240px;
    height: 240px;
}

.qr-timer {
    margin: 0 auto 4px;
    max-width: 260px;
}
.qr-timer-bar {
    width: 100%;
    height: 4px;
    background: #ebedf2;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}
.qr-timer-bar > div {
    height: 100%;
    background: linear-gradient(to right, #7b61ff, #5a43d0);
    transition: width 0.25s linear;
    width: 100%;
}
.qr-timer-text {
    font-size: 13px;
    color: #6b7596;
}
.qr-timer-text span {
    color: #5a43d0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-family: "Consolas", "Monaco", monospace;
}

.qr-status {
    text-align: center;
    padding: 30px 20px;
    border-radius: 10px;
    margin: 6px 0;
}
.qr-status .status-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 10px;
}
.qr-status .status-msg {
    font-size: 15px;
    margin-bottom: 14px;
    color: #2c3e50;
}
.qr-status button {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    background: linear-gradient(to right, #7b61ff, #5a43d0);
    color: #fff;
    transition: opacity 0.2s;
}
.qr-status button:hover { opacity: 0.9; }

.qr-expired { background: #fff7ed; }
.qr-expired .status-icon { color: #f59e0b; }
.qr-consumed { background: #f0fdf4; }
.qr-consumed .status-icon { color: #16a34a; }
.qr-error { background: #fef2f2; }
.qr-error .status-icon { color: #dc2626; }

.qr-help {
    margin-top: 22px;
    padding: 12px 16px;
    background: #fafbff;
    border-radius: 8px;
    border: 1px solid #ebedf2;
    text-align: left;
}
.qr-help summary {
    cursor: pointer;
    color: #5a43d0;
    font-size: 13px;
    user-select: none;
}
.qr-help ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
    font-size: 13px;
    color: #6b7596;
    line-height: 1.8;
}
