/* ============ 通用 Reset ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Inter', sans-serif;
    background: #fff;
    color: #1a1a2e;
    line-height: 1.6;
}
a { color: inherit; }

/* ============ 顶部导航 ============ */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    padding: 14px 32px;
    font-size: 13px;
    color: #222;
    background: #fff;
    border-bottom: 1px solid #f0f1f3;
}
.top-nav a { color: #222; text-decoration: none; cursor: pointer; transition: color 0.2s; }
.top-nav a:hover { color: #4e6ef2; }
.top-nav .nav-btn { color: #4e6ef2; font-weight: 500; }

/* 导航左右分组：链接在左 */
.nav-left { display: flex; align-items: center; gap: 24px; flex: 0 0 auto; }

/* 会员入口：固定在页面左下角（与检索台侧栏底部同一位置逻辑） */
.fab-user {
    position: fixed; left: 16px; bottom: 16px; z-index: 900;
    display: flex; align-items: center; gap: 9px;
    padding: 8px 14px 8px 8px;
    border-radius: 14px; border: 1px solid #eceef4; background: #fff;
    box-shadow: 0 6px 20px -8px rgba(15, 23, 42, .18);
    text-decoration: none; color: #333; transition: .15s;
}
.fab-user:hover { border-color: #c7d7fb; background: #f6f9ff; color: #333; }
.fu-avatar {
    width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px;
    background: linear-gradient(135deg, #4e6ef2, #7c3aed); color: #fff;
    font-size: 13px; font-weight: 600; display: grid; place-items: center;
}
.fab-user.fab-guest .fu-avatar { background: #e6e9f0; color: #9aa3b2; font-weight: 500; }
.fu-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; max-width: 150px; }
.fu-name { font-size: 12.5px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fu-sub { font-size: 11px; color: #8a94a6; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fu-btn {
    flex: 0 0 auto; padding: 4px 12px; border-radius: 14px;
    background: #4e6ef2; color: #fff; font-size: 11.5px; font-weight: 550;
}
.fab-user.fab-guest:hover .fu-btn { background: #3f5be0; }
.fu-arrow { width: 13px; height: 13px; flex: 0 0 13px; stroke: #8a94a6; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fab-user:hover .fu-arrow { stroke: #4e6ef2; }

/* ============ 弹窗 ============ */
.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: #fff;
    border-radius: 14px;
    width: 100%; max-width: 460px; max-height: 85vh;
    display: flex; flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalIn 0.25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f1f3;
}
.modal-header h3 { font-size: 16px; font-weight: 600; color: #1a1a2e; }
.modal-close { background: none; border: none; font-size: 22px; color: #9195a3; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #333; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-body .form-group { margin-bottom: 14px; }
.modal-body label { display: block; font-size: 13px; color: #626675; margin-bottom: 5px; font-weight: 500; }
.modal-body label .required { color: #dc2626; }
.modal-body input, .modal-body textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e6ee;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    background: #fff;
    color: #1a1a2e;
}
.modal-body input:focus, .modal-body textarea:focus {
    border-color: #4e6ef2;
    box-shadow: 0 0 0 3px rgba(78,110,242,0.08);
}
.modal-body textarea { resize: vertical; min-height: 80px; }
.modal-footer {
    padding: 16px 20px;
    display: flex; gap: 10px;
    border-top: 1px solid #f0f1f3;
}
.modal-footer button {
    flex: 1; padding: 10px;
    border: none; border-radius: 8px;
    font-size: 14px; font-family: inherit; font-weight: 500;
    cursor: pointer; transition: all 0.2s;
}
.modal-footer .btn-cancel { background: #f5f6f8; color: #626675; }
.modal-footer .btn-cancel:hover { background: #e8eaee; }
.modal-footer .btn-submit { background: #4e6ef2; color: #fff; }
.modal-footer .btn-submit:hover { background: #3a5ce0; }
.modal-footer .btn-submit:disabled { opacity: 0.5; }
.form-msg { font-size: 13px; text-align: center; margin-top: 8px; min-height: 18px; }
.form-msg.success { color: #16a34a; }
.form-msg.error { color: #dc2626; }

/* ============ 页脚 ============ */
.footer {
    flex-shrink: 0;
    text-align: center;
    padding: 16px 14px 20px;
    font-size: 12px;
    color: #9195a3;
    line-height: 1.7;
    background: #fff;
    border-top: 1px solid #f0f1f3;
}
.footer p { margin: 0; font-size: 12px; color: #9195a3; }
.footer .divider { margin: 0 8px; color: #d0d5dd; }
.footer a, .footer .beian-link {
    color: #9195a3; text-decoration: none; transition: color 0.2s;
}
.footer a:hover, .footer .beian-link:hover { color: #4e6ef2; }

/* ============ 手机端 ============ */
@media (max-width: 767px) {
    .top-nav {
        justify-content: flex-start;
        gap: 10px;
        padding: 12px 14px;
        font-size: 12px;
        white-space: nowrap;
        overflow: visible;
    }
    /* 左侧菜单可横向滑动 */
    .nav-left {
        gap: 14px;
        flex: 1 1 auto;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        white-space: nowrap;
        flex-wrap: nowrap;
    }
    .nav-left::-webkit-scrollbar { display: none; }
    /* 手机上左下角会员入口收窄：只留头像 + 昵称 */
    .fab-user { left: 10px; bottom: 10px; padding: 6px 10px 6px 6px; gap: 7px; }
    .fu-main { max-width: 92px; }
    .fu-sub { display: none; }
    .fu-avatar { width: 26px; height: 26px; flex-basis: 26px; font-size: 12px; }
    /* 页脚底部给左下角会员悬浮组件留白，避免备案号被遮挡 */
    .footer { padding-bottom: 72px; }
}
