/* 公共样式（参考站长工具类站点：浅灰底、白顶栏、卡片轻阴影） */
:root {
    --surface-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 1px 6px rgba(0, 0, 0, 0.04);
    --surface-shadow-hover: 0 2px 10px rgba(0, 0, 0, 0.05), 0 1px 4px rgba(0, 0, 0, 0.03);
    --surface-border: 1px solid rgba(0, 0, 0, 0.06);
    --divider-soft: 1px solid rgba(0, 0, 0, 0.06);
}

/* 通用：卡片悬停轻微上浮 + 投影（可加在任意块级卡片上） */
.bghover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.bghover:hover {
    transform: translateY(-2px);
    box-shadow: 0 26px 40px -24px rgba(0, 36, 100, 0.3);
}

html {
    height: 100%;
}
body {
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    background: #F8FAFB;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* 头部 */
.header.site-header,
.header {
    flex-shrink: 0;
    background: #fff;
    border-bottom: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 8px rgba(0, 0, 0, 0.03);
    padding: 0;
}
.header .wrap.site-header-wrap,
.header .wrap {
    box-sizing: border-box;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: stretch;
    gap: 0;
    min-height: 52px;
}
.site-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.header h1,
.site-brand h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #222;
    line-height: 1;
    display: flex;
    align-items: center;
}
.header h1 a,
.site-brand h1 a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: inherit;
    color: inherit;
    text-decoration: none;
    line-height: 1.2;
}
.header h1 a:hover,
.site-brand h1 a:hover { color: #1989fa; }
.header h1 img,
.site-brand h1 img {
    display: block;
    border-radius: 3px;
}

.header .nav.site-nav,
.header .nav {
    flex: 1;
    display: flex;
    align-items: stretch;
    align-self: stretch;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 0 0 28px;
    padding: 0;
    min-height: 52px;
}
.header .nav a,
.site-nav a {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    box-sizing: border-box;
    padding: 0 16px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: 0;
}
.header .nav a:hover,
.site-nav a:hover { color: #1989fa; }
.header .nav a.active,
.site-nav a.active {
    color: #1989fa;
    font-weight: 600;
    border-bottom-color: #1989fa;
}

/* 前台主导航：一级 + 二级下拉（plugin.json front_menu.children） */
.header .nav.site-nav .nav-dropdown,
.site-nav .nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    align-self: stretch;
}
.nav-dropdown .nav-dropdown-main {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    box-sizing: border-box;
    padding: 0 16px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: 0;
    cursor: default;
    white-space: nowrap;
}
a.nav-dropdown-main { cursor: pointer; }
.nav-dropdown:hover .nav-dropdown-main,
.nav-dropdown:focus-within .nav-dropdown-main,
.nav-dropdown.active .nav-dropdown-main {
    color: #1989fa;
}
.nav-dropdown.active .nav-dropdown-main {
    font-weight: 600;
    border-bottom-color: #1989fa;
}
.nav-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 168px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-radius: 0 0 4px 4px;
    padding: 6px 0;
    z-index: 200;
}
.nav-dropdown:hover .nav-submenu,
.nav-dropdown:focus-within .nav-submenu {
    display: block;
}
.nav-submenu a {
    display: block;
    padding: 0 16px;
    min-height: 36px;
    line-height: 36px;
    font-size: 13px;
    border-bottom: none;
    margin-bottom: 0;
    align-self: auto;
}
.nav-submenu a:hover { color: #1989fa; }
.nav-submenu a.active {
    color: #1989fa;
    font-weight: 600;
    background: #f5f9ff;
}

/* 用户状态（与顶栏同高，内容垂直居中） */
.header .user-status.site-user,
.header .user-status {
    display: flex;
    align-items: center;
    align-self: stretch;
    gap: 10px;
    margin-left: auto;
    padding-left: 16px;
    border-left: 1px solid #e5e5e5;
    flex-shrink: 0;
}
.header .user-status .user-name { color: #333; font-size: 13px; display: flex; align-items: center; gap: 4px; }
.header .user-status .user-name i { font-size: 16px; color: #1989fa; }
.header .user-status a { color: #666; font-size: 13px; text-decoration: none; }
.header .user-status a:hover { color: #1989fa; }

@media (max-width: 640px) {
    .header .wrap.site-header-wrap,
    .header .wrap { flex-wrap: wrap; padding: 10px 12px; align-items: center; }
    .site-brand { order: 0; flex: 1; min-width: 0; }
    .header .user-status { order: 0; margin-left: auto; border-left: none; padding-left: 0; }
    .header .nav.site-nav,
    .header .nav {
        order: 2;
        flex: 1 1 100%;
        margin-left: 0;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #eee;
        min-height: auto;
    }
    .header .nav a { padding: 0 10px; height: 42px; line-height: 42px; font-size: 13px; }
    .nav-dropdown .nav-dropdown-main { padding: 0 10px; height: 42px; line-height: 42px; font-size: 13px; }
    .nav-submenu {
        position: static;
        box-shadow: none;
        border: 1px solid #eee;
        border-radius: 4px;
        margin-top: 4px;
        padding: 4px 0;
    }
    .nav-submenu a { min-height: 40px; line-height: 40px; }
}

/* 主体（仅 layout 下直接子级 .main，避免命中用户中心 .container .main） */
body > .main {
    flex: 1 1 auto;
    width: 100%;
    box-sizing: border-box;
    max-width: 1200px;
    margin: 16px auto 24px;
    padding: 0 16px;
    min-height: 0;
}

/* Spage 嵌入：主模板在 .main 上加 main-layout-embed（原 header 内联 body 样式） */
body > .main.main-layout-embed {
    margin: 0 auto;
    padding: 12px;
    min-height: 100vh;
    box-sizing: border-box;
    max-width: none;
    width: 100%;
}

/* 用户中心：侧栏 + 主栏（body 已由全站 flex 撑满高度） */
body.user-center > .container {
    flex: 1 1 auto;
    width: 100%;
    box-sizing: border-box;
    min-height: 0;
}
body.user-center .site-footer-wrap .ToolFooter {
    max-width: 1100px;
}

/* ---------- 登录/注册、找回密码（多页共用，与全站浅灰底、白卡片、顶栏一致） ---------- */
body > .main.page-user-auth,
body > .main.page-user-forgot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20px;
    padding-bottom: 40px;
    max-width: 100%;
}
.user-forgot-tip {
    margin: 0 0 18px;
    font-size: 13px;
    color: #666;
    line-height: 1.65;
}
.user-auth-wrap {
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
}
.user-auth-card {
    background: #fff;
    border: var(--surface-border);
    border-radius: 3px;
    box-shadow: var(--surface-shadow);
    overflow: hidden;
}
.user-auth-card-hd {
    padding: 16px 20px;
    font-size: 17px;
    font-weight: 600;
    color: #222;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    letter-spacing: 0.02em;
}
.user-auth-card-bd {
    padding: 8px 20px 20px;
}
.user-auth-tab.layui-tab {
    margin: 0;
}
/* 仅两个 Tab 时隐藏 Layui 插入的「更多」条，避免右侧空白与错位 */
.user-auth-tab .layui-tab-bar,
.user-auth-tab .layui-tab-more {
    display: none !important;
}
.user-auth-tab .layui-tab-title {
    display: flex;
    position: relative;
    left: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    /* 整行底部分隔线（Tab 与表单之间），勿删 */
    padding: 0 !important;
    margin: 0;
    height: auto !important;
    overflow: visible;
}
/* 只去掉当前项上 Layui brief 自带的伪元素条，避免与 li 的 border-bottom 叠成双条、错位；不动其它 ::after */
.user-auth-tab.layui-tab-brief > .layui-tab-title > li.layui-this:after {
    display: none !important;
}
.user-auth-tab .layui-tab-title li {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    line-height: 1.4;
    border-bottom: 2px solid transparent;
    margin-bottom: 0px;
    transition: color 0.2s, border-color 0.2s;
}
.user-auth-tab .layui-tab-title li:hover {
    color: #1989fa;
}
.user-auth-tab .layui-tab-title li.layui-this {
    color: #1989fa;
    font-weight: 600;
    border-bottom-color: #1989fa;
}
.user-auth-tab .layui-tab-content {
    padding: 22px 0 0;
}
.user-auth-tab .layui-form-item {
    margin-bottom: 16px;
}
.user-auth-input.layui-input {
    height: 44px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: border-color 0.2s;
}
.user-auth-input.layui-input:focus {
    border-color: #1989fa;
}
.user-auth-submit-wrap {
    margin-bottom: 0;
    margin-top: 4px;
}
.user-auth-btn.layui-btn {
    height: 46px;
    line-height: 46px;
    border-radius: 3px;
    font-size: 15px;
    font-weight: 600;
    background-color: #1989fa;
    border: none;
}
.user-auth-btn.layui-btn:hover {
    background-color: #4da3fb;
}
.user-auth-btn.layui-btn:active {
    background-color: #1578d9;
}
.user-auth-card-ft {
    padding: 14px 20px 18px;
    text-align: center;
    font-size: 13px;
    color: #999;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #fafbfc;
}
.user-auth-card-ft a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}
.user-auth-card-ft a:hover {
    color: #1989fa;
}
.user-auth-ft-sep {
    margin: 0 8px;
    color: #d0d0d0;
    font-weight: 300;
    user-select: none;
}

/* 尾部：全站通用页脚（app/index/view/footer.php） */
.site-footer-wrap {
    flex-shrink: 0;
    width: 100%;
    min-height: 80px;
    margin-top: 10px;
    padding: 22px 16px 26px;
    box-sizing: border-box;
    background: #fff;
    border-top: none;
    box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.035);
}
.site-footer-wrap .ToolFooter {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.site-footer-wrap .ToolFooter .linkbtn {
    margin: 0 0 14px;
    padding: 0;
    font-size: 13px;
    line-height: 1.75;
    letter-spacing: 0.02em;
}
.site-footer-wrap .ToolFooter .linkbtn a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}
.site-footer-wrap .ToolFooter .linkbtn a:hover {
    color: #1989fa;
}
.site-footer-wrap .ToolFooter .ToolFooter-sep {
    margin: 0 6px;
    color: #d0d0d0;
    font-weight: 300;
    user-select: none;
}
.site-footer-wrap .ToolFooter .info {
    margin: 0;
    padding: 0;
    font-size: 12px;
    line-height: 1.85;
    color: #999;
    letter-spacing: 0.02em;
}
.site-footer-wrap .ToolFooter .info span {
    display: inline-block;
    margin: 0 6px;
}
.site-footer-wrap .ToolFooter .site-footer-icp {
    color: #aaa;
}
@media (max-width: 640px) {
    .site-footer-wrap .ToolFooter .linkbtn {
        font-size: 12px;
    }
    .site-footer-wrap .ToolFooter .ToolFooter-sep {
        margin: 0 4px;
    }
}

.footer { text-align: center; color: #aaa; font-size: 13px; padding: 30px 0; }

/* 空提示 */
.empty-tip { text-align: center; padding: 60px 0; color: #999; }

/* 分页 */
.pager { text-align: center; padding: 20px 0; }
