/* * ==============================================
 * 全局及基本布局
 * ==============================================
 */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
    margin: 0;
    color: #111827;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.auth-main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* * ==============================================
 * 页眉 (Header) & 页脚 (Footer)
 * ==============================================
 */
.page-header, .page-footer {
    width: 100%;
    padding: 1rem 2rem;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    box-sizing: border-box;
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-container {
    display: flex;
    align-items: center;
}
.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}
.header-nav a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}
.page-footer {
    text-align: center;
    font-size: 0.8rem;
    color: #6b7280;
    background-color: transparent;
    box-shadow: none;
}


/* * ==============================================
 * 表单容器及头部
 * ==============================================
 */
.form-container {
    width: 100%;
    max-width: 420px;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin: 16px;
}
.form-header {
    text-align: center;
    margin-bottom: 32px;
}
.form-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
}
.form-header p {
    margin-top: 8px;
    color: #4b5563;
}

/* * ==============================================
 * 表单组、标签和输入框
 * ==============================================
 */
.form-group {
    margin-bottom: 20px;
}
.input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #f9fafb;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-sizing: border-box;
}
.form-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* * ==============================================
 * 密码相关样式
 * ==============================================
 */
.password-wrapper {
    position: relative;
}
.password-input {
    padding-right: 45px;
}
.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6b7280;
}
.toggle-password:hover {
    color: #111827;
}
.toggle-password svg {
    width: 20px;
    height: 20px;
}
.icon-eye-off {
    display: none;
}
.password-hint {
    font-size: 0.8rem;
    margin-top: 6px;
    height: 16px;
    color: #6b7280;
}
.password-hint.invalid {
    color: #ef4444;
}
.password-hint.valid {
    color: #22c55e;
}

/* * ==============================================
 * 复选框及选项
 * ==============================================
 */
.form-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}
.checkbox-group {
    display: flex;
    align-items: center;
}
.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    height: 16px;
    width: 16px;
    accent-color: #4f46e5;
}
.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
    color: #374151;
    font-size: 0.9rem;
}

/* * ==============================================
 * 按钮
 * ==============================================
 */
.form-buttons {
    display: flex;
    gap: 1rem;
}
.submit-btn {
    flex-grow: 1;
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background-color: #4f46e5;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease;
    margin-top: 12px;
}
.submit-btn:hover {
    background-color: #4338ca;
}
.submit-btn:active {
    transform: scale(0.98);
}
.btn-secondary {
    background-color: #6b7280;
    border-color: #6b7280;
}
.btn-secondary:hover {
    background-color: #4b5563;
}

/* * ==============================================
 * 底部链接及消息通知
 * ==============================================
 */
.footer-link {
    margin-top: 24px;
    text-align: center;
    font-size: 0.875rem;
}
.footer-link a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}
.footer-link a:hover {
    text-decoration: underline;
}
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}
.notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.notification.success {
    background-color: #22c55e;
}
.notification.error {
    background-color: #ef4444;
}
