/* 便民服务平台 后台公共样式 · 党建政务风（党旗红 + 政务金） */
body { background: #f4f1ea; }

/* ============ 登录页 ============ */
.dj-login-body {
    background: url('/static/admin/login_bg.png') center/100% 100% no-repeat;
    display: flex; align-items: center; justify-content: center; height: 100vh; margin: 0;
    position: relative;
}
.dj-login-body::before {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px;
    background: linear-gradient(90deg, #f5c518, #e6b422, #f5c518);
    z-index: 2;
}
.dj-login-box {
    position: relative; z-index: 1;
    width: 380px; background: rgba(255, 253, 247, .96); border-radius: 12px; padding: 40px 36px;
    box-shadow: 0 12px 40px rgba(80, 0, 0, .45); border-top: 4px solid #e6b422;
}
.dj-login-title {
    font-size: 21px; font-weight: 700; color: #a00000; text-align: center; margin-bottom: 28px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    letter-spacing: 1px;
}
.dj-login-logo { width: 40px; height: 40px; object-fit: contain; }

/* ============ 布局 ============ */
.dj-header {
    background: linear-gradient(90deg, #a00000 0%, #c7000b 100%);
    border-bottom: 3px solid #e6b422;
}
.dj-header-title { float: left; color: #fff; font-size: 17px; font-weight: 700; line-height: 57px; padding-left: 20px; display: flex; align-items: center; gap: 8px; letter-spacing: 1px; }
.dj-logo { width: 30px; height: 30px; object-fit: contain; }
.dj-header .layui-nav { background: transparent; }
.dj-header .layui-nav .layui-nav-item a { color: #ffe9c2; }
.dj-header .layui-nav .layui-nav-item a:hover { color: #ffffff; }
.dj-side { top: 60px; background: #fffdf7; box-shadow: 1px 0 4px rgba(120, 40, 0, .08); }
.dj-side .layui-nav { background: #fffdf7; }
.dj-side .layui-nav-item a { color: #5a4a3a !important; }
.dj-side .layui-nav-itemed > a, .dj-side .layui-nav-tree .layui-nav-title a { color: #5a4a3a !important; }
.dj-side .layui-nav .layui-this > a {
    background: linear-gradient(90deg, #c7000b, #e03117); color: #fff !important; border-radius: 6px;
    box-shadow: 0 2px 6px rgba(199, 0, 11, .3);
}
.dj-side .layui-nav-child dd.layui-this a { background: linear-gradient(90deg, #c7000b, #e03117); color: #fff !important; border-radius: 6px; }
.dj-side .layui-nav-child { background: #f7f1e3 !important; }
.dj-side .layui-nav-child a { padding-left: 40px; }
.dj-side .layui-nav-item a:hover { background: #f7ecd4; color: #a00000 !important; }
.layui-layout-admin .layui-body.dj-body { top: 60px; bottom: 44px; padding-bottom: 0; background: #f4f1ea; display: flex; flex-direction: column; overflow: hidden; }
.dj-footer { left: 200px; background: #fffdf7; color: #a08c6a; text-align: center; height: 44px; line-height: 44px; border-top: 1px solid #eee3c8; }

/* ---- 主框架多标签页 ---- */
.dj-tabs {
    flex: none; height: 40px; box-sizing: border-box; display: flex; align-items: flex-end; gap: 4px;
    padding: 0 8px; background: #ece5d3; border-bottom: 2px solid #e6b422;
    overflow-x: auto; overflow-y: hidden;
}
.dj-tabs::-webkit-scrollbar { height: 4px; }
.dj-tabs::-webkit-scrollbar-thumb { background: #d8c9a3; border-radius: 2px; }
.dj-tab {
    flex: none; max-width: 180px; height: 32px; line-height: 30px; padding: 0 12px;
    display: flex; align-items: center; gap: 6px; cursor: pointer;
    background: #f7f1e3; color: #5a4a3a; font-size: 13px; white-space: nowrap; overflow: hidden;
    border: 1px solid #e3d7ba; border-bottom: 0; border-radius: 8px 8px 0 0;
}
.dj-tab:hover { background: #fffdf7; color: #a00000; }
.dj-tab.dj-tab-active {
    background: #fffdf7; color: #a00000; font-weight: 600; height: 34px;
    border-color: #e6b422; box-shadow: inset 0 3px 0 #c7000b;
}
.dj-tab .dj-tab-title { overflow: hidden; text-overflow: ellipsis; }
.dj-tab .dj-tab-close {
    flex: none; width: 16px; height: 16px; font-size: 12px; color: #a08c6a;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
}
.dj-tab .dj-tab-close:hover { background: #c7000b; color: #fff; }
.dj-frames { flex: 1; min-height: 0; position: relative; }
/* iframe 用 top+height:100% 精确贴满 .dj-frames（容器高度由 flex 确定，百分比可解析；不用 JS 量高，避免加载时测量偏小而留底缝） */
.dj-iframe { display: none; position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.dj-iframe.dj-iframe-active { display: block; }

/* ============ 数据看板 ============ */
.dj-dashboard { padding: 16px; }
.dj-card { background: #fffdf7; border-radius: 10px; padding: 18px; text-align: center; box-shadow: 0 1px 4px rgba(120, 40, 0, .08); margin-bottom: 15px; border: 1px solid #f0e6cc; }
.dj-card-num { font-size: 26px; font-weight: 700; color: #c7000b; }
.dj-card-label { color: #8a7a5a; margin-top: 6px; font-size: 13px; }
.dj-panel { margin-top: 6px; }
.dj-panel .layui-card-header { font-weight: 600; color: #7a3a00; border-bottom: 2px solid #e6b422; }

/* ============ 通用列表页 ============ */
.dj-page { padding: 16px; }
.dj-search { background: #fffdf7; border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; box-shadow: 0 1px 4px rgba(120, 40, 0, .06); border: 1px solid #f0e6cc; }
.dj-table-card { background: #fffdf7; border-radius: 10px; padding: 16px; box-shadow: 0 1px 4px rgba(120, 40, 0, .06); border: 1px solid #f0e6cc; min-height: calc(100vh - 170px); }
.dj-img-thumb { width: 36px; height: 36px; vertical-align: middle; border-radius: 4px; object-fit: contain; cursor: pointer; background: #f7f1e3; border: 1px solid #eee3c8; }

/* layui 主按钮红色化（党建红） */
.layui-btn { border-radius: 4px; }
.layui-btn-primary { border-color: #d8c9a3; color: #7a5c2e; }
.layui-laypage .layui-laypage-curr .layui-laypage-curr { background-color: #c7000b; }
.layui-form-checked[lay-skin=primary] i { border-color: #c7000b !important; background-color: #c7000b; }

/* ============ 弹层滚动条隐藏（保留滚动能力，视觉干净） ============ */
.layui-layer-content { scrollbar-width: none; -ms-overflow-style: none; }
.layui-layer-content::-webkit-scrollbar { display: none; }
.layui-layer-content [style*="overflow"] { scrollbar-width: none; -ms-overflow-style: none; }
.layui-layer-content [style*="overflow"]::-webkit-scrollbar { display: none; }

/* ============ 顶栏：清理缓存入口 + 退出按钮（高对比党建红金） ============ */
.dj-header .layui-nav .layui-nav-item a#djClearCache { color: #ffe9c2; }
.dj-header .layui-nav .layui-nav-item a#djClearCache:hover { color: #f5c518; }
/* 退出登录：深红底白字 + 金色描边，hover 再加深，保证清晰可辨 */
.dj-header .layui-nav .layui-nav-child dd.dj-logout a {
    margin: 5px 8px; padding: 8px 12px; text-align: center;
    background: #a00000; color: #ffffff !important;
    border: 1px solid #e6b422; border-radius: 4px;
}
.dj-header .layui-nav .layui-nav-child dd.dj-logout a:hover {
    background: #7a0000; color: #ffe9c2 !important;
}

/* ============ 表单 checkbox 按社区分组（社工辖区等两级选择） ============ */
.dj-cb-group { margin-bottom: 8px; }
.dj-cb-group-title { font-weight: 600; color: #7a5c2e; font-size: 13px; margin-bottom: 2px; }
.dj-cb-group-body .layui-form-checkbox[lay-skin=primary] { margin: 2px 8px 2px 0; }
