/* ============================================================
   百宝豆经营管理平台 · 全局样式
   ============================================================ */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f2f3f5;
}

a { text-decoration: none; color: inherit; }

/* ---------------- 登录页 ---------------- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e2a38 0%, #16baaa 100%);
}

.login-box {
    width: 380px;
    background: #fff;
    border-radius: 8px;
    padding: 36px 32px 28px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}

.login-box .login-title {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #1e2a38;
    margin: 0 0 6px;
}

.login-box .login-sub {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin: 0 0 24px;
}

.login-box .login-field { margin-bottom: 16px; }

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    height: 42px;
    line-height: 42px;
    padding: 0 12px;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}

.login-box input:focus { border-color: #16baaa; }

.login-box .login-btn {
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: 4px;
    background: #16baaa;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: background .2s;
}

.login-box .login-btn:hover { background: #14a396; }

.login-box .login-err {
    background: #fff6f6;
    border: 1px solid #ffdede;
    color: #e63f3f;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 16px;
}

.login-box .login-tip {
    text-align: center;
    color: #bbb;
    font-size: 12px;
    margin-top: 18px;
}

/* ---------------- 主框架 ---------------- */
.layout-side {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 220px;
    background: #20222a;
    overflow-y: auto;
    z-index: 100;
}

.layout-logo {
    height: 56px;
    line-height: 56px;
    padding: 0 18px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    background: #1a1c22;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layout-side .menu-group-title {
    padding: 14px 18px 6px;
    color: #6b6f7a;
    font-size: 12px;
}

.layout-side a.menu-item {
    display: block;
    padding: 0 18px;
    height: 42px;
    line-height: 42px;
    color: #c7c9cf;
    font-size: 14px;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.layout-side a.menu-item:hover { background: #2a2d36; color: #fff; }

.layout-side a.menu-item.active {
    background: #2a2d36;
    color: #fff;
    border-left-color: #16baaa;
}

.layout-side a.menu-item .layui-icon { margin-right: 8px; font-size: 15px; }

.layout-side .menu-item.disabled { color: #6b6f7a; cursor: not-allowed; }
.layout-side .menu-item.disabled:hover { background: transparent; color: #6b6f7a; }

.tag-soon {
    float: right;
    font-size: 11px;
    color: #6b6f7a;
    border: 1px solid #3a3d47;
    border-radius: 3px;
    padding: 0 5px;
    line-height: 16px;
    margin-top: 12px;
}

.layout-top {
    position: fixed;
    left: 220px; right: 0; top: 0;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 99;
}

.layout-top .top-title { font-size: 16px; font-weight: 600; color: #1e2a38; }

.layout-top .top-user { color: #666; font-size: 14px; }
.layout-top .top-user b { color: #16baaa; font-weight: 600; }
.layout-top .top-user a { margin-left: 14px; color: #999; }
.layout-top .top-user a:hover { color: #e63f3f; }

.layout-main {
    margin-left: 220px;
    padding: 74px 20px 24px;
    min-height: 100vh;
}

/* ---------------- 卡片 ---------------- */
.card {
    background: #fff;
    border-radius: 6px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
    margin-bottom: 16px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e2a38;
    margin: 0 0 14px;
    padding-left: 10px;
    border-left: 3px solid #16baaa;
    line-height: 1.2;
}

/* 指标卡 */
.stat-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }

.stat-card {
    flex: 1 1 200px;
    background: #fff;
    border-radius: 6px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.stat-card .stat-label { color: #999; font-size: 13px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; color: #1e2a38; line-height: 1; }
.stat-card .stat-value .unit { font-size: 13px; font-weight: 400; color: #999; margin-left: 4px; }
.stat-card.green .stat-value { color: #16baaa; }
.stat-card.red .stat-value { color: #e63f3f; }
.stat-card.orange .stat-value { color: #f59a23; }

/* ---------------- 列表页工具栏 ---------------- */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.toolbar .layui-inline { margin: 0; width: 180px; }
.toolbar .layui-input { width: 100%; }
.toolbar .layui-btn { height: 38px; line-height: 38px; }
.toolbar .layui-form-select { width: 100%; }

/* ---------------- 查询栏下拉（方案 A：主题色下拉 + 状态彩点）---------------- */
.filter-bar .layui-form-select dl dd.layui-this { background-color: #e6f7f5; color: #0f9c8e; }
.filter-bar .layui-form-select dl dd.layui-this::after { border-top-color: #0f9c8e; }

.filter-bar .layui-form-select dl dd.opt-status-on::before,
.filter-bar .layui-form-select dl dd.opt-status-off::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    vertical-align: middle;
    background: #b9c0c7;
}

.filter-bar .layui-form-select dl dd.opt-status-on::before { background: #16baaa; }

/* 通用彩色圆点：给下拉选项加 .opt-dot，再按 lay-value 上色（状态类下拉通用） */
.filter-bar .layui-form-select dl dd.opt-dot::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    vertical-align: middle;
    background: #b9c0c7;
}
.filter-bar .layui-form-select dl dd.opt-dot[lay-value="1"]::before        { background: #16baaa; }
.filter-bar .layui-form-select dl dd.opt-dot[lay-value="0"]::before        { background: #b9c0c7; }
.filter-bar .layui-form-select dl dd.opt-dot[lay-value="draft"]::before    { background: #b9c0c7; }
.filter-bar .layui-form-select dl dd.opt-dot[lay-value="doing"]::before    { background: #1e6fd9; }
.filter-bar .layui-form-select dl dd.opt-dot[lay-value="paused"]::before   { background: #f59a23; }
.filter-bar .layui-form-select dl dd.opt-dot[lay-value="done"]::before     { background: #12a06a; }
.filter-bar .layui-form-select dl dd.opt-dot[lay-value="closed"]::before   { background: #c9ccd1; }

/* 思路库状态下拉圆点（new/review/converted/archived） */
.filter-bar .layui-form-select dl dd.opt-dot[lay-value="new"]::before       { background: #1e6fd9; }
.filter-bar .layui-form-select dl dd.opt-dot[lay-value="review"]::before    { background: #f59a23; }
.filter-bar .layui-form-select dl dd.opt-dot[lay-value="converted"]::before { background: #12a06a; }
.filter-bar .layui-form-select dl dd.opt-dot[lay-value="archived"]::before  { background: #b9c0c7; }

/* 标签下拉：动态值统一主题色圆点 */
.filter-bar .layui-form-select dl dd.opt-dot.opt-tag::before { background: #16baaa; }

/* 表格内标题链接 */
.link-name { color: #1e6fd9; }
.link-name:hover { color: #16baaa; text-decoration: underline; }

/* ---------------- 业务分组标签 ---------------- */
.tag-group {
    display: inline-block;
    height: 22px;
    line-height: 22px;
    padding: 0 8px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
}

.tag-group.software { background: #eaf3ff; color: #1e6fd9; }
.tag-group.store    { background: #fff4e6; color: #c97a10; }
.tag-group.common   { background: #f1f1f4; color: #64666b; }

/* ---------------- 标签页容器（费用科目等） ---------------- */
.tab-bar { margin: 0 0 14px; }
.tab-bar .layui-tab-title { border-bottom: 1px solid #eee; }
.tab-bar .layui-tab-title li { font-size: 14px; }

/* ---------------- 项目状态 / 优先级标签 ---------------- */
.tag-status,
.tag-prio {
    display: inline-block;
    height: 22px;
    line-height: 22px;
    padding: 0 8px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
}

.tag-status.draft  { background: #f1f1f4; color: #64666b; }
.tag-status.doing  { background: #eaf3ff; color: #1e6fd9; }
.tag-status.paused { background: #fff4e6; color: #c97a10; }
.tag-status.done   { background: #e8f7f1; color: #12a06a; }
.tag-status.closed { background: #f3f3f5; color: #9aa0a6; }

.tag-prio.high   { background: #ffecec; color: #d93838; }
.tag-prio.normal { background: #f1f1f4; color: #64666b; }
.tag-prio.low    { background: #f6f8fa; color: #9aa0a6; }

/* ---------------- 进度条 ---------------- */
.pcell { display: flex; align-items: center; gap: 8px; }
.pbar {
    flex: 1 1 auto;
    height: 6px;
    min-width: 40px;
    background: #eef0f2;
    border-radius: 3px;
    overflow: hidden;
}
.pbar > i { display: block; height: 100%; background: #16baaa; border-radius: 3px; }
.pcell em { font-style: normal; color: #666; font-size: 12px; min-width: 32px; text-align: right; }

.pbar-lg { height: 10px; border-radius: 5px; }
.pbar-lg > i { border-radius: 5px; }

/* ---------------- 表单两列栅格 ---------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.form-grid .span2 { grid-column: 1 / -1; }
.form-grid .layui-form-label { width: 96px; }
.form-grid .layui-input-block { margin-left: 126px; }

.form-actions {
    text-align: right;
    padding-top: 14px;
    margin-top: 4px;
    border-top: 1px solid #f0f0f0;
}

/* 成员勾选区 */
.member-pick { padding: 2px 0; }
.member-pick .layui-form-checkbox[lay-skin="primary"] { margin-right: 18px; margin-bottom: 8px; }

/* ---------------- 详情页 ---------------- */
.detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.detail-head .dh-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-head .dh-name { font-size: 18px; font-weight: 600; color: #1e2a38; }
.detail-head .dh-code { color: #9aa0a6; font-size: 13px; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 24px; }
.info-item .k { color: #9aa0a6; font-size: 12px; margin-bottom: 6px; }
.info-item .v { color: #1e2a38; font-size: 14px; word-break: break-all; }

.text-block {
    color: #444;
    font-size: 14px;
    line-height: 1.9;
    white-space: pre-wrap;
    word-break: break-word;
}

.member-list { display: flex; flex-wrap: wrap; gap: 10px; }
.member-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    border: 1px solid #eee;
    border-radius: 20px;
    font-size: 13px;
    color: #333;
}
.member-chip .duty { font-size: 12px; color: #c97a10; }
.member-chip .duty.member-role { color: #9aa0a6; }


/* ---------------- 头像 ---------------- */
.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #eee;
    background: #f2f3f5;
    vertical-align: middle;
}

.avatar-prev {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e6e6e6;
    background: #f2f3f5;
    vertical-align: middle;
}

.avatar-btns {
    display: inline-block;
    vertical-align: middle;
    margin-left: 14px;
}

.avatar-btns .layui-word-aux { margin-top: 6px; }

/* 裁剪容器 */
.crop-box {
    height: 420px;
    background: #f2f3f5;
    overflow: hidden;
}

.crop-box img { display: block; max-width: 100%; }

/* 表格内数字右对齐 */
.num { text-align: right; font-variant-numeric: tabular-nums; }
.money-in { color: #16baaa; }
.money-out { color: #e63f3f; }

/* 小工具类 */
.mt0 { margin-top: 0; }
.text-muted { color: #999; }
.text-danger { color: #e63f3f; }
.text-ok { color: #16baaa; }
.tips-box {
    background: #f7fbfb;
    border: 1px solid #e3f3f1;
    border-radius: 4px;
    padding: 12px 16px;
    color: #667;
    font-size: 13px;
    line-height: 1.9;
}
.tips-box b { color: #16baaa; }

/* ---------------- 预算编制表格（科目 × 12 个月）---------------- */
.bg-wrap {
    overflow-x: auto;
    border: 1px solid #eef0f2;
    border-radius: 4px;
}

.bg-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.bg-table th,
.bg-table td {
    border-bottom: 1px solid #eef0f2;
    border-right: 1px solid #eef0f2;
    height: 36px;
    text-align: center;
    padding: 0;
    white-space: nowrap;
}

.bg-table thead th {
    background: #fafbfc;
    color: #64666b;
    font-weight: 600;
    height: 38px;
}

.bg-table th:last-child,
.bg-table td:last-child { border-right: 0; }

/* 首列（科目）吸附左侧 */
.bg-table .bg-item-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    text-align: left;
    padding: 0 10px;
    min-width: 190px;
    color: #1e2a38;
}

.bg-table thead .bg-item-col {
    z-index: 3;
    background: #fafbfc;
}

.bg-table .bg-month-col { min-width: 74px; }
.bg-table .bg-sum-col { min-width: 96px; background: #f7fbfb; color: #0f9c8e; font-weight: 600; }

.bg-table .bg-input {
    width: 100%;
    height: 34px;
    border: 0;
    outline: none;
    background: transparent;
    text-align: right;
    padding: 0 8px;
    font-size: 13px;
    color: #888;
    font-variant-numeric: tabular-nums;
}

.bg-table .bg-input.has-val { color: #1e2a38; font-weight: 600; }
.bg-table .bg-input:focus { background: #e6f7f5; color: #0f9c8e; }

.bg-table .bg-cell-sum {
    background: #f7fbfb;
    min-width: 96px;
    font-variant-numeric: tabular-nums;
}

.bg-table .bg-cell-sum em { font-style: normal; color: #0f9c8e; font-weight: 600; }

.bg-table tr.bg-group td {
    background: #f5f6f8;
    color: #64666b;
    font-size: 12px;
    text-align: left;
    padding: 0 10px;
    height: 28px;
}

.bg-table tr.bg-total-row td {
    background: #f7fbfb;
    color: #0f9c8e;
    font-weight: 600;
    height: 38px;
    font-variant-numeric: tabular-nums;
}

.bg-table tr.bg-total-row .bg-item-col { background: #f7fbfb; color: #0f9c8e; }

.bg-code {
    display: inline-block;
    margin-right: 6px;
    color: #9aa0a6;
    font-size: 12px;
    font-family: Consolas, Monaco, monospace;
}

.bg-off {
    display: inline-block;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 3px;
    background: #f1f1f4;
    color: #9aa0a6;
    font-size: 11px;
}

/* ---------------- 版本历史弹层 ---------------- */
.ver-box { padding: 14px 16px; overflow-y: auto; max-height: 460px; }
.ver-loading { padding: 24px; text-align: center; color: #999; font-size: 13px; }
.ver-table { margin: 0; }
.ver-table td { font-size: 13px; }
.ver-detail-box { background: #fafbfc; padding: 6px 12px 12px; }
.ver-dir {
    font-size: 13px;
    font-weight: 600;
    color: #1e2a38;
    margin: 10px 0 8px;
    padding-left: 8px;
    border-left: 3px solid #16baaa;
    line-height: 1.2;
}
.ver-detail-table { margin: 0 0 6px; background: #fff; }
.ver-detail-table td { font-size: 13px; }
.ver-chip {
    display: inline-block;
    margin: 2px 6px 2px 0;
    padding: 1px 8px;
    border-radius: 3px;
    background: #eef7f6;
    color: #0f9c8e;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

/* ---------------- 支出 / 收入登记 ---------------- */
.sum-line {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}
.sum-line b { color: #1e2a38; }
.sum-line b.money-out { color: #e63f3f; }
.sum-line b.money-in { color: #16baaa; }

.req { color: #e63f3f; }

/* 金额被明细合计锁定时的样式 */
.input-locked,
.layui-input[readonly].input-locked {
    background: #f7fbfb !important;
    color: #0f9c8e !important;
}

/* 明细行表格 */
.ei-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.ei-head .ei-title { font-size: 13px; font-weight: 600; color: #1e2a38; }

.ei-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.ei-table th,
.ei-table td {
    border: 1px solid #eef0f2;
    height: 34px;
    padding: 0 6px;
    text-align: left;
}
.ei-table thead th {
    background: #fafbfc;
    color: #64666b;
    font-size: 12px;
    font-weight: 600;
}
.ei-table .ei-in {
    width: 100%;
    height: 32px;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: #333;
}
.ei-table .ei-in:focus { background: #e6f7f5; }
.ei-table .ei-num { text-align: right; font-variant-numeric: tabular-nums; }
.ei-table td.ei-sum {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #0f9c8e;
    font-weight: 600;
    background: #f7fbfb;
}
.ei-table .ei-op { text-align: center; }
.ei-table .ei-del { color: #e63f3f; cursor: pointer; font-size: 16px; }
.ei-table .ei-del:hover { color: #c62828; }

.ei-total { margin-top: 8px; font-size: 13px; color: #666; }
.ei-total b { color: #e63f3f; font-variant-numeric: tabular-nums; }

/* 凭证预览 */
.att-box { margin-top: 12px; }
.att-box img {
    max-width: 220px;
    max-height: 160px;
    border: 1px solid #eee;
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 12px;
}
.att-view {
    max-width: 100%;
    max-height: 320px;
    border: 1px solid #eee;
    border-radius: 4px;
}

/* 弹层内的详情内容 */
.view-box-wrap {
    padding: 16px 20px;
    max-height: 540px;
    overflow-y: auto;
}

/* ---------------- 预算监控 ---------------- */
/* 筛选栏内的月份区间：两个下拉并排 */
.month-range { display: flex; align-items: center; gap: 6px; }
.month-range .mr-sep { color: #bbb; }

/* 灯级筛选项的彩色圆点（配合 .opt-dot 基础样式） */
.filter-bar .layui-form-select dl dd.opt-dot[lay-value="red"]::before    { background: #e63f3f; }
.filter-bar .layui-form-select dl dd.opt-dot[lay-value="yellow"]::before { background: #f59a23; }
.filter-bar .layui-form-select dl dd.opt-dot[lay-value="green"]::before  { background: #12a06a; }
.filter-bar .layui-form-select dl dd.opt-dot[lay-value="none"]::before   { background: #c9ccd1; }

/* 图例 */
.mk-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 12px;
    color: #888;
    margin-bottom: 12px;
}
.mk-legend .lg { display: flex; align-items: center; }

/* 灯 */
.mk-light {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    background: #c9ccd1;
}
.mk-light.green  { background: #12a06a; box-shadow: 0 0 0 3px rgba(18, 160, 106, .14); }
.mk-light.yellow { background: #f59a23; box-shadow: 0 0 0 3px rgba(245, 154, 35, .14); }
.mk-light.red    { background: #e63f3f; box-shadow: 0 0 0 3px rgba(230, 63, 63, .14); }
.mk-light.none   { background: #c9ccd1; }

/* 灯级标签 */
.mk-tag {
    display: inline-block;
    height: 22px;
    line-height: 22px;
    padding: 0 8px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
}
.mk-tag.green  { background: #e8f7f1; color: #12a06a; }
.mk-tag.yellow { background: #fff4e6; color: #c97a10; }
.mk-tag.red    { background: #ffecec; color: #d93838; }
.mk-tag.none   { background: #f1f1f4; color: #64666b; }

/* 执行率：进度条 + 百分比 */
.mk-cell { display: flex; align-items: center; gap: 10px; }
.mk-bar {
    flex: 1 1 auto;
    min-width: 50px;
    height: 8px;
    background: #eef0f2;
    border-radius: 4px;
    overflow: hidden;
}
.mk-bar > i { display: block; height: 100%; border-radius: 4px; background: #c9ccd1; }
.mk-bar > i.green  { background: #12a06a; }
.mk-bar > i.yellow { background: #f59a23; }
.mk-bar > i.red    { background: #e63f3f; }
.mk-bar > i.none   { background: #c9ccd1; }

.mk-rate { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }
.mk-rate.green  { color: #12a06a; }
.mk-rate.yellow { color: #c97a10; }
.mk-rate.red    { color: #d93838; }
.mk-rate.none   { color: #9aa0a6; }

/* 明细弹层 */
.mk-detail-box { max-height: 560px; }

/* ---------------- 经营报表 ---------------- */
/* 顶部五视角切换 */
.rp-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 16px;
    border-bottom: 1px solid #eee;
}
.rp-tab {
    padding: 8px 20px;
    font-size: 14px;
    color: #666;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    user-select: none;
}
.rp-tab:hover { color: #16baaa; }
.rp-tab.active {
    color: #0f9c8e;
    font-weight: 600;
    background: #e6f7f5;
}

/* 指标卡可点击下钻 */
.stat-card.stat-click { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.stat-card.stat-click:hover { box-shadow: 0 2px 12px rgba(22, 186, 170, .28); transform: translateY(-1px); }

/* 两栏并排 */
.rp-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rp-2col > .card { margin-bottom: 0; }

/* 报表内表格 */
.rp-rt { margin: 0; }
.rp-rt th { background: #f7f9fa; white-space: nowrap; font-size: 13px; }
.rp-rt td { font-size: 13px; vertical-align: middle; }
.rp-lines { color: #999; font-size: 12px; line-height: 1.7; }

/* 图例与图表 */
.rp-legend { display: flex; align-items: center; gap: 18px; font-size: 12px; color: #666; margin-bottom: 6px; }
.rp-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.rp-svg { display: block; width: 100%; height: auto; }
.rp-axis { font-size: 11px; fill: #9aa0a6; }

/* 环形图 + 科目占比列表 */
.rp-pie-wrap { display: flex; align-items: center; gap: 18px; }
.rp-donut { flex: 0 0 200px; width: 200px; height: 200px; }
.rp-donut-val { font-size: 18px; font-weight: 700; fill: #1e2a38; }
.rp-empty { font-size: 12px; fill: #b9c0c7; }
.rp-pie-list { flex: 1 1 auto; max-height: 220px; overflow-y: auto; }
.rp-pie-item { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 4px; font-size: 13px; }
.rp-pie-item:hover { background: #f7fbfb; }
.rp-pie-item .dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 2px; }
.rp-pie-item .nm { flex: 1 1 auto; color: #1e2a38; }
.rp-pie-item .pv { color: #1e2a38; font-variant-numeric: tabular-nums; }
.rp-pie-item .pc { width: 58px; text-align: right; color: #999; font-variant-numeric: tabular-nums; }

/* 下钻链接 */
.rp-drill { color: #1e6fd9; font-size: 12px; margin: 0 4px; cursor: pointer; }
.rp-drill:hover { color: #16baaa; text-decoration: underline; }

/* 年度标记 */
.rp-mark { display: inline-block; padding: 0 6px; border-radius: 3px; font-size: 12px; line-height: 20px; }
.rp-mark.best  { background: #e8f7f1; color: #12a06a; }
.rp-mark.worst { background: #ffecec; color: #d93838; }

/* ---------------- 仪表盘（工作台）---------------- */
/* 欢迎语 */
.dash-welcome .dw-hello { font-size: 15px; color: #1e2a38; margin-bottom: 6px; }
.dash-welcome .dw-hello b { color: #16baaa; }
.dash-welcome .dw-sub { color: #8d9298; font-size: 13px; line-height: 1.8; }

/* 指标卡副标题 */
.stat-card .stat-sub { color: #9aa0a6; font-size: 12px; margin-top: 10px; }
.stat-card .stat-sub b { font-variant-numeric: tabular-nums; }
.stat-card .stat-value { white-space: nowrap; }

/* 卡片内小标题行（标题 + 右侧操作） */
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.card-head .card-title { margin: 0; }
.card-head .dash-more { color: #1e6fd9; font-size: 13px; }
.card-head .dash-more:hover { color: #16baaa; text-decoration: underline; }

/* 待办提醒 */
.dash-alerts { display: flex; flex-wrap: wrap; gap: 12px; }
.dash-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid #eee;
    background: #fafbfc;
    transition: box-shadow .15s, transform .15s;
}
.dash-alert:hover { box-shadow: 0 2px 12px rgba(0, 0, 0, .10); transform: translateY(-1px); }
.dash-alert .da-num { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.dash-alert .da-txt { color: #444; font-size: 13px; }
.dash-alert .da-go { color: #9aa0a6; font-size: 12px; }
.dash-alert.red    { background: #fff6f6; border-color: #ffdede; }
.dash-alert.red .da-num    { color: #d93838; }
.dash-alert.yellow { background: #fffaf0; border-color: #ffe9c2; }
.dash-alert.yellow .da-num { color: #c97a10; }
.dash-alert.gray   { background: #f6f8fa; border-color: #e9ecef; }
.dash-alert.gray .da-num   { color: #64666b; }

/* 左右分栏：趋势图 2/3 + 超支列表 1/3 */
.dash-2col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.dash-2col > .card { margin-bottom: 0; min-width: 0; }

/* 趋势图维度切换 */
.dash-seg { display: inline-flex; border: 1px solid #e2e6ea; border-radius: 4px; overflow: hidden; }
.dash-seg a {
    padding: 0 16px;
    height: 30px;
    line-height: 30px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    user-select: none;
    border-right: 1px solid #e2e6ea;
}
.dash-seg a:last-child { border-right: 0; }
.dash-seg a:hover { color: #16baaa; }
.dash-seg a.active { background: #16baaa; color: #fff; }

/* 超支预警列表 */
.dash-over-item {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #eef0f2;
    margin-bottom: 10px;
    transition: background .15s, box-shadow .15s;
}
.dash-over-item:last-child { margin-bottom: 0; }
.dash-over-item:hover { background: #fbfcfd; box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }
.dov-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dov-name {
    color: #1e2a38;
    font-size: 14px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dov-bar {
    height: 8px;
    background: #eef0f2;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.dov-bar > i { display: block; height: 100%; border-radius: 4px; background: #c9ccd1; }
.dov-bar > i.green  { background: #12a06a; }
.dov-bar > i.yellow { background: #f59a23; }
.dov-bar > i.red    { background: #e63f3f; }
.dov-bar > i.none   { background: #c9ccd1; }
.dov-sub { color: #9aa0a6; font-size: 12px; }
.dov-sub b { color: #d93838; font-variant-numeric: tabular-nums; }

/* 最近动态表格 */
.dash-rt { width: 100%; border-collapse: collapse; margin: 0; }
.dash-rt th {
    background: #f7f9fa;
    color: #64666b;
    font-weight: 600;
    font-size: 13px;
    text-align: left;
    padding: 9px 10px;
    border-bottom: 1px solid #eef0f2;
    white-space: nowrap;
}
.dash-rt td {
    padding: 9px 10px;
    border-bottom: 1px solid #f4f6f7;
    font-size: 13px;
    color: #444;
    vertical-align: middle;
}
.dash-rt tbody tr:hover { background: #fbfcfd; }
.dash-rt th.num, .dash-rt td.num { text-align: right; }

/* 类型标签 */
.dash-kind {
    display: inline-block;
    height: 20px;
    line-height: 20px;
    padding: 0 7px;
    border-radius: 3px;
    font-size: 12px;
}
.dash-kind.out { background: #ffecec; color: #d93838; }
.dash-kind.in  { background: #e8f7f1; color: #12a06a; }

/* 空状态 */
.dash-ok { color: #9aa0a6; font-size: 13px; padding: 26px 0; text-align: center; }

/* ---------------- 思路库 ---------------- */
/* 视图切换段控件（与仪表盘 dash-seg 同风格） */
.idea-viewseg { display: inline-flex; border: 1px solid #e2e6ea; border-radius: 4px; overflow: hidden; }
.idea-viewseg a {
    padding: 0 14px;
    height: 38px;
    line-height: 38px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    user-select: none;
    border-right: 1px solid #e2e6ea;
}
.idea-viewseg a:last-child { border-right: 0; }
.idea-viewseg a .layui-icon { margin-right: 4px; font-size: 13px; }
.idea-viewseg a:hover { color: #16baaa; }
.idea-viewseg a.active { background: #16baaa; color: #fff; }

/* 状态统计行 */
.idea-stat { color: #8d9298; font-size: 13px; margin: 12px 0; }
.idea-stat b { color: #16baaa; font-variant-numeric: tabular-nums; }
.idea-stat .is-item { margin-left: 16px; }

/* 状态标签 */
.idea-status {
    display: inline-block;
    height: 20px;
    line-height: 20px;
    padding: 0 7px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
}
.idea-status.new       { background: #eaf3ff; color: #1e6fd9; }
.idea-status.review    { background: #fff4e6; color: #c97a10; }
.idea-status.converted { background: #e8f7f1; color: #12a06a; }
.idea-status.archived  { background: #f1f1f4; color: #9aa0a6; }

/* 标签胶囊 */
.idea-tag {
    display: inline-block;
    height: 20px;
    line-height: 20px;
    padding: 0 7px;
    margin: 0 4px 4px 0;
    border-radius: 10px;
    background: #f1f6f9;
    color: #52708c;
    font-size: 12px;
    white-space: nowrap;
}

/* 卡片网格 */
.idea-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}
.idea-card {
    border: 1px solid #eef0f2;
    border-radius: 8px;
    padding: 14px 16px;
    background: #fff;
    transition: box-shadow .15s, border-color .15s;
    display: flex;
    flex-direction: column;
}
.idea-card:hover { box-shadow: 0 3px 14px rgba(0, 0, 0, .07); border-color: #e0e6ea; }
.idea-card.is-converted { background: #fbfefc; border-color: #dff0e9; }

.idea-card .ic-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.idea-card .ic-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e2a38;
    line-height: 1.5;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.idea-card .ic-content {
    color: #667;
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 8px;
}
.idea-card .ic-tags { margin-bottom: 8px; }
.idea-card .ic-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px dashed #eef0f2;
}
.idea-card .ic-meta { color: #9aa0a6; font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idea-card .idea-proj { color: #12a06a; font-size: 12px; white-space: nowrap; }
.idea-card .idea-proj:hover { text-decoration: underline; }
.idea-card .idea-proj .layui-icon { font-size: 12px; }

/* 卡片/表格操作链接 */
.op { color: #1e6fd9; font-size: 12px; margin-right: 10px; cursor: pointer; white-space: nowrap; }
.op:hover { color: #16baaa; text-decoration: underline; }
.op.op-go { color: #12a06a; font-weight: 600; }
.op.op-danger { color: #d93838; }

/* 表格视图补充 */
.idea-table td { vertical-align: top; }
.idea-table .idea-sub { color: #9aa0a6; font-size: 12px; font-weight: 400; margin-top: 4px; }
.idea-ops { white-space: nowrap; }

/* 详情弹层 */
.idea-view .iv-line { margin-bottom: 10px; font-size: 13px; color: #444; line-height: 1.7; }
.idea-view .iv-k {
    display: inline-block;
    width: 44px;
    color: #9aa0a6;
    font-size: 12px;
}
.idea-view .iv-content {
    margin-top: 12px;
    padding: 12px 14px;
    background: #fafbfc;
    border: 1px solid #eef0f2;
    border-radius: 6px;
    font-size: 13px;
    color: #444;
    line-height: 1.9;
    max-height: 220px;
    overflow-y: auto;
}
.idea-view .idea-flow { display: inline; margin-left: 8px; }
.idea-view .idea-flow a {
    display: inline-block;
    margin-right: 8px;
    padding: 0 10px;
    height: 24px;
    line-height: 24px;
    border: 1px solid #d9e2ea;
    border-radius: 3px;
    font-size: 12px;
    color: #1e6fd9;
    cursor: pointer;
}
.idea-view .idea-flow a:hover { border-color: #16baaa; color: #16baaa; }

/* 空状态（思路库） */
.idea-empty { color: #9aa0a6; font-size: 13px; padding: 46px 0; text-align: center; }

/* ---------------- 策划方案 ---------------- */
/* 方案类型标签 */
.plan-type {
    display: inline-block;
    height: 20px;
    line-height: 20px;
    padding: 0 7px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
}
.plan-type.plan    { background: #eaf3ff; color: #1e6fd9; }
.plan-type.operate { background: #e8f7f1; color: #12a06a; }
.plan-type.promote { background: #fff4e6; color: #c97a10; }
.plan-type.review  { background: #f3eaff; color: #8a6fd9; }

/* 方案状态标签 */
.plan-status {
    display: inline-block;
    height: 20px;
    line-height: 20px;
    padding: 0 7px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
}
.plan-status.draft   { background: #f1f1f4; color: #64666b; }
.plan-status.review  { background: #fff4e6; color: #c97a10; }
.plan-status.final   { background: #e8f7f1; color: #12a06a; }
.plan-status.discard { background: #f3f3f5; color: #9aa0a6; text-decoration: line-through; }

/* 正文预览（详情弹层） */
.plan-content { font-size: 13px; line-height: 2 !important; }

/* 详情弹层分区 */
.pv-sec { margin-top: 14px; }
.pv-sec-h {
    font-size: 13px;
    font-weight: 600;
    color: #1e2a38;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 流转按钮（详情弹层内） */
.pf-btn {
    display: inline-block;
    margin-right: 8px;
    padding: 0 12px;
    height: 26px;
    line-height: 26px;
    border: 1px solid #d9e2ea;
    border-radius: 3px;
    font-size: 12px;
    color: #1e6fd9;
    cursor: pointer;
    user-select: none;
}
.pf-btn:hover { border-color: #16baaa; color: #16baaa; }
.pf-btn.pf-danger { color: #d93838; border-color: #f3caca; }
.pf-btn.pf-danger:hover { border-color: #d93838; }
.pf-btn.pf-up { position: relative; overflow: hidden; }

/* 附件缩略图网格 */
.pa-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.pa-item {
    position: relative;
    width: 92px;
    height: 92px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #eef0f2;
    cursor: zoom-in;
}
.pa-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pa-item .pa-del {
    position: absolute;
    right: 0;
    top: 0;
    width: 20px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 14px;
    border-radius: 0 0 0 6px;
    cursor: pointer;
    display: none;
}
.pa-item:hover .pa-del { display: block; }

/* 版本对比 */
.pd-stat {
    font-size: 12px;
    color: #667;
    background: #fafbfc;
    border: 1px solid #eef0f2;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 10px;
}
.pd-stat .pd-add { color: #12a06a; }
.pd-stat .pd-del { color: #d93838; }
.pd-stream {
    border: 1px solid #eef0f2;
    border-radius: 4px;
    overflow-y: auto;
    max-height: 60vh;
    font-family: Consolas, "Microsoft YaHei", monospace;
    font-size: 12px;
    line-height: 1.9;
}
.pd-line { padding: 0 12px; white-space: pre-wrap; word-break: break-all; }
.pd-line.same { color: #444; }
.pd-line.add  { background: #e9f9f2; color: #0d8a5f; }
.pd-line.del  { background: #ffefef; color: #c23b3b; text-decoration: line-through; }
.pd-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pd-col .pd-h { font-size: 12px; color: #9aa0a6; margin-bottom: 6px; }
.pd-pre {
    margin: 0;
    border: 1px solid #eef0f2;
    border-radius: 4px;
    background: #fafbfc;
    padding: 12px;
    max-height: 60vh;
    overflow-y: auto;
    font-family: Consolas, "Microsoft YaHei", monospace;
    font-size: 12px;
    line-height: 1.9;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ---------------- 附件中心 ---------------- */
/* 缩略图 */
.af-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #eef0f2;
    display: block;
    cursor: zoom-in;
}

/* 非图片的扩展名块 */
.af-ext {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 4px;
    background: #f1f6f9;
    color: #52708c;
    font-size: 12px;
    text-transform: uppercase;
    border: 1px solid #e2eaef;
    overflow: hidden;
    white-space: nowrap;
}

/* ---------------- 操作日志 ---------------- */
.log-act {
    display: inline-block;
    height: 20px;
    line-height: 20px;
    padding: 0 7px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
}
.log-act.green { background: #e8f7f1; color: #12a06a; }
.log-act.blue  { background: #eaf3ff; color: #1e6fd9; }
.log-act.red   { background: #ffecec; color: #d93838; }
.log-act.gray  { background: #f1f1f4; color: #64666b; }
.log-act.orange { background: #fff4e6; color: #c97a10; }

/* ---------------- 系统设置 ---------------- */
.sys-logo-box {
    display: flex;
    align-items: center;
    gap: 14px;
}
.sys-logo-box .sys-logo-img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 1px dashed #d9e2ea;
    background: #fafbfc;
    object-fit: contain;
    display: none;
}
.sys-logo-box .sys-logo-img.show { display: block; }
.sys-logo-box .sys-logo-tip { color: #9aa0a6; font-size: 12px; margin-top: 4px; }

