/* ===================================================
   基础全局样式与色彩变量（与原网站色彩风格一致）
   =================================================== */
:root {
    --primary-color: #26A69A;        /* 主题墨绿色，与原站 theme.css 一致 */
    --primary-hover: #1f8a80;        /* 悬停深色 */
    --primary-active: #176e66;       /* 点击深色 */
    --bg-page: #f0f7f6;              /* 页面浅青色背景 */
    --bg-card: #ffffff;              /* 卡片白色背景 */
    --text-primary: #1e293b;         /* 主标题深色文字 */
    --text-secondary: #64748b;       /* 副标题与说明次级文字 */
    --border-color: #e2e8f0;         /* 输入框与卡片边框色 */
    --border-hover: #cbd5e1;         /* 边框悬停色 */
    --error-color: #ef4444;          /* 错误红色 */
    --radius-md: 12px;               /* 统一圆角大小 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--bg-page);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===================================================
   中心认证卡片
   =================================================== */
.auth-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 440px;
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
    animation: cardAppear 0.4s ease-out;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 顶部圆形 Logo 居中 */
.logo-box {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #e6f5f3;
    border: 3px solid #b2dfdb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

/* 标题与副标题 */
.header-text {
    text-align: center;
    margin-bottom: 24px;
}

.header-text .title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

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

/* ===================================================
   表单各项布局
   =================================================== */
.form-item {
    margin-bottom: 16px;
}

.item-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.required {
    color: var(--error-color);
    margin-left: 2px;
}

.optional {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 12px;
}

/* 输入框外层相对定位容器 */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* 输入框本身 */
.input-field {
    width: 100%;
    height: 46px;
    padding: 0 42px; /* 左右留空给小图标 */
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #fafbfc;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.25s ease;
}

.input-field::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

.input-field:hover {
    border-color: var(--border-hover);
}

.input-field:focus {
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(38, 166, 154, 0.15);
}

/* 图标定位 */
.icon-left {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    pointer-events: none; /* 穿透点击，点击图标也能聚焦输入框 */
}

.icon-right {
    position: absolute;
    right: 14px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: color 0.2s;
    background: transparent;
    border: none;
    padding: 0;
    outline: none;
}

.icon-right:hover {
    color: var(--primary-color);
}

.btn-link {
    background: transparent;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

/* 记住我与忘记密码选项条 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 14px 0 20px 0;
    font-size: 13px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.link-text {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.link-text:hover {
    opacity: 0.8;
}

/* ===================================================
   操作按钮
   =================================================== */
.btn-primary {
    width: 100%;
    height: 48px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(38, 166, 154, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 16px rgba(38, 166, 154, 0.35);
}

.btn-primary:active {
    background-color: var(--primary-active);
    transform: scale(0.98);
}

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

/* 底部切换栏 */
.switch-bar {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-secondary);
}

.switch-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-left: 6px;
    cursor: pointer;
}

.switch-link:hover {
    text-decoration: underline;
}

/* 隐藏隐藏类 */
.hidden {
    display: none !important;
}

/* ===================================================
   顶部浮动提示框（Toast）
   =================================================== */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    background: #1e293b;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #ef4444;
}

.toast.info {
    background: #0ea5e9;
}

/* ===================================================
   忘记密码与风控拦截专属样式系统
   =================================================== */

/* 快捷角色测试胶囊容器 */
.quick-test-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    align-items: center;
}

.quick-test-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

.role-chip {
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.role-chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #f0fdfa;
}

.role-chip.family {
    border-color: #a7f3d0;
    color: #059669;
    background: #ecfdf5;
}

.role-chip.staff {
    border-color: #fecaca;
    color: #dc2626;
    background: #fef2f2;
}

@keyframes alertFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 短信验证码行组合布局 */
.captcha-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-wrapper .input-wrapper {
    flex: 1;
}

.btn-captcha {
    flex-shrink: 0;
    height: 46px;
    padding: 0 14px;
    background-color: #f0fdfa;
    color: var(--primary-color);
    border: 1.5px solid rgba(38, 166, 154, 0.4);
    border-radius: var(--radius-md);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-captcha:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.btn-captcha:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
    border-color: #e2e8f0;
    cursor: not-allowed;
    opacity: 0.7;
}

/* 输入框禁用状态增强 */
.input-field:disabled {
    background-color: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

/* 输入框下方行内反馈提示标签 */
.field-feedback-tip {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.55;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    animation: alertFadeIn 0.25s ease-out;
}

.field-feedback-tip.error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.field-feedback-tip.success {
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.field-feedback-tip.warning {
    background-color: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

/* 输入框校验状态样式（离焦检测高亮） */
.input-field.is-invalid {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.input-field.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.input-field.is-valid {
    border-color: #10b981;
}

/* 输入框右侧绿色校验成功对号图标 */
.icon-valid-check {
    color: #10b981;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: checkPopIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes checkPopIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 密码显隐小眼睛激活样式（样式行为解耦） */
.toggle-password.is-active {
    color: var(--primary-color) !important;
}

/* ===================================================
   服务条款模态框（Modal）样式系统
   =================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalBackdropFadeIn 0.25s ease-out;
}

@keyframes modalBackdropFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 580px;
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: #f8fafc;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
    color: var(--error-color);
    transform: scale(1.1);
}

.modal-body {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
    font-size: 13.5px;
    line-height: 1.7;
    color: #334155;
    background: #ffffff;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.terms-lead {
    background: #f0fdfa;
    border-left: 4px solid var(--primary-color);
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 16px;
    font-size: 13px;
    color: #134e4a;
}

.terms-content h4 {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 16px 0 6px 0;
}

.terms-content p {
    margin-bottom: 10px;
    color: #475569;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: #f8fafc;
}

.modal-confirm-btn {
    width: auto !important;
    min-width: 140px;
    height: 42px;
    padding: 0 24px;
    font-size: 14px;
}

/* 倒计时不可选状态样式增强 */
.modal-confirm-btn:disabled {
    background-color: #e2e8f0 !important;
    color: #64748b !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.85 !important;
}

/* ===================================================
   响应式移动端适配（针对小于 480px 屏幕优化）
   =================================================== */
@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .auth-card {
        padding: 24px 18px;
        border-radius: 16px;
    }

    .header-text .title {
        font-size: 20px;
    }

    .btn-captcha {
        padding: 0 10px;
        font-size: 12px;
    }

    .modal-overlay {
        padding: 10px;
    }

    .modal-card {
        max-height: 92vh;
        border-radius: 14px;
    }

    .modal-header {
        padding: 14px 16px;
    }

    .modal-title {
        font-size: 15px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 12px 16px;
    }

    .modal-confirm-btn {
        width: 100% !important;
    }
}





