/* ========================================
   登录注册页面样式
   ======================================== */

:root {
    --primary-dark: #0f172a;
    --text-muted: #64748b;
    --accent-blue: #2563eb;
    --accent-light: #3b82f6;
    --shadow-hover: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.auth-page {
    background: #f0f0f0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-box {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.auth-header .logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.auth-header h1 {
    font-size: 1.6rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
    font-weight: 600;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 6px;
    color: var(--primary-dark);
    font-weight: 500;
    font-size: 0.85rem;
}

.auth-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-form input::placeholder {
    color: #999;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.remember-me input {
    width: auto;
}

.forgot-password {
    color: var(--accent-blue);
    font-size: 0.85rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

.btn-auth {
    width: 100%;
    padding: 13px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-auth:hover {
    background: var(--accent-light);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.auth-footer p {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.auth-footer a {
    color: var(--accent-blue);
    font-weight: 500;
    font-size: 0.85rem;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted) !important;
    font-weight: 500 !important;
    font-size: 0.85rem;
}

.back-home:hover {
    color: var(--accent-blue) !important;
}

.change-pwd-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* 登录方式切换标签 */
.login-tabs {
    display: flex;
    margin-bottom: 24px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 4px;
    border: 1px solid #e2e8f0;
}

.login-tabs .tab-btn {
    flex: 1;
    padding: 11px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-tabs .tab-btn.active {
    background: white;
    color: var(--accent-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.login-tabs .tab-btn:hover:not(.active) {
    color: var(--primary-dark);
}

/* 验证码输入行 */
.code-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.code-row input {
    flex: 1;
}

.btn-code {
    padding: 12px 18px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-code:hover:not(:disabled) {
    background: var(--accent-light);
}

.btn-code:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

/* 消息提示样式 */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    text-align: center;
}

.message-success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.message-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* 管理员登录特殊样式 */
.admin-auth .auth-box {
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-overlay .modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-overlay .modal-content h3 {
    margin: 0 0 20px 0;
    font-size: 1.25rem;
    color: var(--primary-dark);
    font-weight: 600;
    text-align: center;
}

.modal-overlay .form-group {
    margin-bottom: 18px;
}

.modal-overlay label {
    display: block;
    margin-bottom: 6px;
    color: var(--primary-dark);
    font-weight: 500;
    font-size: 0.85rem;
}

.modal-overlay input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.modal-overlay input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modal-overlay .input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.modal-overlay .input-group input {
    flex: 1;
}

.modal-overlay .btn-send-code {
    padding: 12px 16px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.modal-overlay .btn-send-code:hover:not(:disabled) {
    background: var(--accent-light);
}

.modal-overlay .btn-send-code:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

.modal-overlay .modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.modal-overlay .btn-cancel {
    padding: 10px 24px;
    border: 1px solid #ddd;
    background: white;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.modal-overlay .btn-cancel:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.modal-overlay .btn-submit {
    padding: 10px 28px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.modal-overlay .btn-submit:hover {
    background: var(--accent-light);
}

/* 响应式 */
@media (max-width: 480px) {
    .auth-box {
        padding: 30px 20px;
        border-radius: 10px;
    }

    .auth-header h1 {
        font-size: 1.4rem;
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .auth-footer {
        flex-direction: column;
        gap: 8px;
    }

    .modal-overlay .modal-content {
        padding: 20px 15px;
        margin: 15px;
    }
}