/**
 * 登录页面样式 - login.php
 * 包含登录容器、表单、按钮、提示信息等样式
 */

/* ==================== 基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

/* ==================== 登录容器 ==================== */
.login-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

/* ==================== 登录头部 ==================== */
.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.login-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.login-header p {
    opacity: 0.9;
    font-size: 14px;
}

/* ==================== 登录主体 ==================== */
.login-body {
    padding: 30px;
}

/* ==================== 表单样式 ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #606266;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control.is-error {
    border-color: #f56c6c;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group .form-control {
    flex: 1;
}

.error-message {
    color: #f56c6c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

/* ==================== 按钮样式 ==================== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-code {
    background: #667eea;
    color: white;
    white-space: nowrap;
    min-width: 100px;
}

.btn-code:disabled {
    background: #c0c4cc;
}

/* ==================== 登录选项 ==================== */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    font-size: 14px;
}

.login-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #606266;
    cursor: pointer;
}

.login-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #667eea;
}

.login-options a {
    color: #667eea;
    text-decoration: none;
}

/* ==================== 登录底部 ==================== */
.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e4e7ed;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

/* ==================== 提示信息 ==================== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background: #67c23a;
}

.toast.error {
    background: #f56c6c;
}

.pending-notice {
    background: #fdf6ec;
    border: 1px solid #f5dab1;
    color: #e6a23c;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
    display: none;
}

.pending-notice.show {
    display: block;
}

/* ==================== 分隔线 ==================== */
.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #909399;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e4e7ed;
}

.divider span {
    padding: 0 15px;
}

/* ==================== 管理员链接 ==================== */
.admin-link {
    text-align: center;
    margin-top: 15px;
}

.admin-link a {
    color: #909399;
    text-decoration: none;
    font-size: 13px;
}

.admin-link a:hover {
    color: #667eea;
}

/* ==================== 响应式 ==================== */
@media (max-width: 480px) {
    .login-container {
        margin: 10px;
    }

    .login-body {
        padding: 20px;
    }
}
