/* 基础样式：登录页（纲要 2.1）+ 主框架骨架。组件视觉由 Element UI 提供 */
[v-cloak] { display: none; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif; }

/* ---------------- 登录页 ---------------- */
.login-body { background: #f4f7fb; }
.login-wrap { display: flex; min-height: 100vh; }
.login-left {
  position: relative; flex: 1; min-width: 420px; color: #fff; padding: 56px 64px;
  background: linear-gradient(150deg, #2f6bff 0%, #1e4fd8 60%, #173bb0 100%);
  overflow: hidden;
}
.login-brand { font-size: 22px; font-weight: 600; letter-spacing: 1px; }
.login-slogan { margin-top: 22vh; position: relative; z-index: 2; }
.login-slogan h1 { font-size: 40px; margin: 0 0 18px; font-weight: 600; }
.login-slogan p { font-size: 18px; margin: 8px 0; opacity: .95; }
.login-slogan .login-sub { font-size: 13px; opacity: .72; max-width: 420px; line-height: 1.8; }
.login-art { position: absolute; right: 8%; top: 18%; width: 320px; height: 320px; opacity: .28; }
.art-card { position: absolute; border-radius: 16px; background: #fff; transform: rotate(-12deg); }
.art-card-1 { width: 220px; height: 140px; left: 0; top: 60px; }
.art-card-2 { width: 170px; height: 110px; left: 90px; top: 120px; transform: rotate(10deg); }
.art-card-3 { width: 120px; height: 80px; left: 40px; top: 210px; transform: rotate(-4deg); }
.login-right { flex: 1; min-width: 460px; display: flex; align-items: center; justify-content: center; }
.login-box { width: 380px; padding: 40px; background: #fff; border-radius: 10px; box-shadow: 0 12px 40px rgba(31, 56, 120, .10); }
.login-title { margin: 0 0 28px; font-size: 24px; font-weight: 600; color: #303133; text-align: center; }
.login-box .el-input__inner { height: 46px; line-height: 46px; }
.login-box .el-input-group__append { padding: 0 14px; background: #fff; }
.code-btn { color: #2f6bff; cursor: pointer; font-size: 13px; white-space: nowrap; }
.code-btn.no-click { color: #a0a4ae; cursor: not-allowed; }
.login-submit { width: 100%; height: 46px; font-size: 16px; margin-top: 6px; }
/* number 输入去掉上下箭头（原系统 type=number，视觉保持一致） */
.login-box input[type=number]::-webkit-outer-spin-button,
.login-box input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.login-box input[type=number] { -moz-appearance: textfield; }

/* ---------------- 主框架 ---------------- */
.app-header { height: 60px; display: flex; align-items: center; padding: 0 20px; background: #fff; border-bottom: 1px solid #e6e9f0; }
.app-logo { font-size: 18px; font-weight: 600; color: #2f6bff; min-width: 220px; }
.app-book-picker { margin-left: 10px; display: flex; align-items: center; gap: 8px; }
.app-header-right { margin-left: auto; display: flex; align-items: center; gap: 18px; color: #606266; font-size: 14px; }
.app-body { display: flex; height: calc(100vh - 60px); }
.app-aside { width: 220px; background: #fff; border-right: 1px solid #e6e9f0; overflow-y: auto; }
.app-aside .el-menu { border-right: none; }
.app-main { flex: 1; padding: 20px; background: #f4f7fb; overflow-y: auto; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric-card { background: #fff; border-radius: 8px; padding: 20px; }
.metric-card .label { color: #909399; font-size: 13px; }
.metric-card .value { font-size: 26px; font-weight: 600; color: #303133; margin-top: 10px; }
.placeholder-box { background: #fff; border-radius: 8px; padding: 30px; margin-top: 16px; color: #909399; text-align: center; }
@media (max-width: 1100px) { .login-left { display: none; } .metric-grid { grid-template-columns: repeat(2, 1fr); } }

/* ==================== 第 2 期业务页面 ==================== */
[v-cloak] { display: none; }
.yj-body { margin: 0; }
.yj-layout { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: 60px 1fr; height: 100vh; }
#app-header { grid-column: 1 / 3; grid-row: 1; display: flex; align-items: center; padding: 0 20px; background: #fff; border-bottom: 1px solid #e6e9f0; }
#app-header .app-logo { font-size: 18px; font-weight: 600; color: #2f6bff; min-width: 220px; }
#app-header .app-book-picker { margin-left: 10px; display: flex; align-items: center; gap: 8px; }
#app-header .app-header-right { margin-left: auto; display: flex; align-items: center; gap: 18px; color: #606266; font-size: 14px; }
#app-aside { grid-column: 1; grid-row: 2; background: #fff; border-right: 1px solid #e6e9f0; overflow-y: auto; }
#app-aside .el-menu { border-right: none; min-height: 100%; }
.yj-main { grid-column: 2; grid-row: 2; padding: 20px; background: #f4f7fb; overflow-y: auto; }
.yj-page-head { margin: 0 0 16px; }
.yj-page-head h3 { margin: 0; font-weight: 600; color: #303133; font-size: 18px; }
.yj-panel { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.yj-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.yj-hint { color: #909399; font-size: 12px; }
.yj-muted { color: #909399; font-size: 13px; }
.yj-danger-text { color: #f56c6c !important; }
.yj-tree-arrow { color: #c0c4cc; margin-right: 6px; }

/* 查询区 */
.yj-search { border: 1px solid #ebeef5; border-radius: 6px; padding: 12px 14px; margin-bottom: 14px; background: #fafafa; }
.yj-search-body { margin-bottom: 10px; }
.yj-search-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.yj-filter-grid { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.yj-filter-item { display: flex; align-items: center; gap: 6px; }
.yj-filter-item .yj-hint { min-width: 76px; text-align: right; }

/* 汇总条 */
.yj-summary5 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; padding: 12px 16px; margin-bottom: 14px;
               background: #f5f9ff; border: 1px solid #e1ecff; border-radius: 6px; }
.yj-summary5-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.yj-summary5-item .label { color: #606266; }
.yj-summary5-item b { color: #2f6bff; font-size: 15px; }
.yj-total-count { margin-left: auto; color: #909399; font-size: 13px; }

/* 表格与设置 */
.yj-table-wrap { width: 100%; }
.yj-table-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.yj-pager { display: flex; justify-content: flex-end; margin-top: 14px; }
.yj-set-title { font-size: 13px; font-weight: 600; color: #303133; margin: 8px 0 6px; }
.yj-set-cols { max-height: 220px; overflow-y: auto; }
.yj-empty { padding: 40px; text-align: center; color: #c0c4cc; }
.yj-empty i { display: block; font-size: 34px; margin-bottom: 8px; }
.yj-empty span { font-size: 13px; }

/* 指标卡与进度 */
.yj-metric3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 14px 0; }
.yj-metric-card { background: #f8faff; border: 1px solid #ebeef5; border-radius: 6px; padding: 16px; }
.yj-metric-card .label { color: #909399; font-size: 13px; }
.yj-metric-card .value { font-size: 24px; font-weight: 600; color: #303133; margin: 8px 0 10px; }
.yj-over { color: #f56c6c !important; }
.yj-empty-rate { color: #909399 !important; }
.yj-formula { margin-bottom: 14px; }
.yj-group-label { font-weight: 600; color: #303133; margin: 6px 0 12px; }
.yj-summary-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 12px 16px; margin-top: 14px;
                  background: #f5f9ff; border: 1px solid #e1ecff; border-radius: 6px; font-size: 13px; }
.yj-summary-row b { color: #303133; }
.yj-balance { color: #2f6bff !important; font-size: 16px; }
.yj-rank { margin-top: 20px; }
.yj-rank h4 { font-size: 14px; color: #606266; margin: 0 0 10px; }
.yj-month-totals { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; padding: 12px; background: #fafafa; border-radius: 6px; }
.yj-month-total { font-size: 12px; color: #606266; }
.yj-month-total b { color: #2f6bff; }

/* 抽屉与表单 */
.yj-drawer-body { padding: 0 20px 24px; height: 100%; overflow-y: auto; }
.yj-bill-form { padding-top: 8px; }
.yj-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.yj-fieldset:disabled { opacity: .72; }
.yj-field-tip { color: #909399; font-size: 12px; line-height: 1.6; margin-top: 2px; }
.yj-warn-tip { color: #e6a23c; }
.yj-contract-block { background: #f5f7fa; border: 1px dashed #dcdfe6; border-radius: 4px; padding: 10px 14px;
                     color: #909399; font-size: 12px; margin: 0 0 12px; }
.yj-missing-alert { margin-bottom: 14px; }
.is-missing .el-form-item__label { color: #e6a23c !important; font-weight: 600; }
.is-missing .el-input__inner, .is-missing .el-textarea__inner { border-color: #e6a23c !important; }
.yj-form-footer { display: flex; align-items: center; gap: 8px; padding: 16px 0 8px; border-top: 1px solid #ebeef5; margin-top: 14px; }
.yj-void-tip { margin-left: auto; color: #f56c6c; font-size: 13px; }
.yj-void-memo { color: #606266; }
.yj-no-param { padding: 10px 0; }

/* 附件 */
.yj-upload-tip { color: #909399; font-size: 12px; margin-top: 6px; }
.yj-upload-item { display: flex; align-items: center; gap: 14px; font-size: 13px; padding: 4px 0; }
.yj-upload-item a { color: #2f6bff; text-decoration: none; }
.yj-link { font-size: 12px; }

@media (max-width: 1200px) {
  .yj-metric3 { grid-template-columns: 1fr; }
  .yj-layout { grid-template-columns: 190px 1fr; }
  .yj-chart-grid { grid-template-columns: 1fr; }
}

/* ==================== 第 3 期 ==================== */

/* T3-01 / T3-02 利润表 */
.yj-profit-legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #909399; margin: 10px 0; }
.yj-profit-foot { margin-top: 12px; line-height: 1.8; }
.yj-row-bold { font-weight: 700; color: #303133; }
.yj-row-warn { color: #e6a23c; }
.yj-neg { color: #e4393c; font-weight: 600; }   /* Q3-03：负利润带负号 + 红色 */

/* T3-03 工作台 */
.app-main { min-width: 0; }
.yj-dash-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.yj-dash-head h3 { margin: 0; font-weight: 600; color: #303133; font-size: 20px; }
.yj-dash-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; background: #fff; border: 1px solid #ebeef5; border-radius: 6px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { min-width: 0; background: #fff; border: 1px solid #ebeef5; border-radius: 8px; padding: 17px 18px; box-shadow: 0 2px 8px rgba(31, 56, 120, .03); }
.metric-card .label { color: #909399; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.metric-card .value { font-size: 23px; font-weight: 700; color: #303133; margin-top: 9px; font-variant-numeric: tabular-nums; word-break: break-all; }
.metric-placeholder { background: #fafafa; }
.metric-placeholder .value { color: #c0c4cc; }
.yj-tag-ph { font-size: 11px; color: #909399; background: #f2f3f5; border-radius: 3px; padding: 0 5px; }

.yj-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.yj-chart-card { min-width: 0; background: #fff; border: 1px solid #ebeef5; border-radius: 8px; padding: 16px 18px; box-shadow: 0 2px 8px rgba(31, 56, 120, .03); }
.yj-chart-card-wide { grid-column: 1 / -1; }
.yj-chart-title { font-size: 14px; font-weight: 600; color: #303133; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 14px; }
.yj-chart-sub { font-size: 12px; font-weight: 400; color: #909399; }
.yj-chart-box { position: relative; height: 280px; margin-top: 10px; }
.yj-chart-box-wide { height: 310px; }
.yj-chart-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #c0c4cc; font-size: 13px; background: #fafafa; border: 1px dashed #e4e7ed; border-radius: 6px; }
.yj-chart-empty i { font-size: 30px; color: #dcdfe6; }

.yj-dash-rank { background: #fff; border: 1px solid #ebeef5; border-radius: 8px; padding: 16px 18px; margin-top: 18px; }
.yj-dash-rank h4 { margin: 0 0 12px; font-size: 14px; }
.yj-dash-placeholders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.yj-ph-card { background: #fafafa; border: 1px dashed #dcdfe6; border-radius: 6px; padding: 14px; font-size: 13px; color: #909399; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.yj-ph-card b { color: #606266; }
.yj-diag-list { margin: 12px 0 4px; padding-left: 20px; color: #606266; font-size: 13px; line-height: 1.9; }

@media (max-width: 1100px) {
  .yj-chart-grid { grid-template-columns: 1fr; }
  .yj-chart-card-wide { grid-column: auto; }
  .yj-chart-box-wide { height: 280px; }
}
@media (max-width: 900px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yj-dash-placeholders { grid-template-columns: 1fr; }
  .yj-dash-head { align-items: flex-start; }
  .yj-dash-filter { width: 100%; }
}

/* ==================== V3.1 系统管理 4 模块 ==================== */
.yj-sys-staff, .yj-sys-role, .yj-sys-log, .yj-sys-config { min-width: 0; }

/* 部门员工：左树右表 */
.yj-sys-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; }
.yj-sys-tree { border: 1px solid #ebeef5; border-radius: 6px; background: #fff; padding: 10px 8px; min-height: 520px; display: flex; flex-direction: column; }
.yj-sys-tree-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 10px; border-bottom: 1px solid #f0f2f5; margin-bottom: 8px; font-size: 13px; }
.yj-sys-tree-node { display: flex; align-items: center; justify-content: space-between; width: 100%; padding-right: 6px; }
.yj-sys-tree-node em { color: #c0c4cc; font-style: normal; font-size: 12px; }
.yj-sys-tree-ops { opacity: 0; white-space: nowrap; transition: opacity .15s; }
.yj-sys-tree-node:hover .yj-sys-tree-ops { opacity: 1; }
.yj-sys-tree-ops .el-button { padding: 2px; margin-left: 2px; }
.yj-sys-tree-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid #f0f2f5; }
.yj-sys-main { min-width: 0; }
.yj-sys-avatar-cell { display: inline-flex; align-items: center; gap: 8px; }
.yj-sys-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; }
.yj-sys-avatar-empty { background: #ecf5ff; color: #2f6bff; font-size: 12px; font-weight: 600; }
.yj-sys-form .el-form-item { margin-bottom: 16px; }
.yj-sys-inline-check { margin-left: 12px; }
.yj-sys-drawer-foot { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #ebeef5; padding: 12px 0 4px; text-align: right; margin-top: 18px; z-index: 2; }
.yj-sys-import-result { margin-top: 14px; }
.yj-danger-text { color: #e4393c !important; }

/* 角色：13×13 权限矩阵 */
.yj-sys-role-tabs .el-tabs__content { padding-top: 8px; }
.yj-sys-matrix-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 16px 0 8px; padding: 10px 12px; background: #f8fafc; border: 1px solid #ebeef5; border-radius: 4px; }
.yj-sys-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #2f6bff; margin-left: 4px; vertical-align: middle; }
.yj-sys-matrix-wrap { max-height: 430px; overflow: auto; border: 1px solid #ebeef5; border-radius: 4px; }
.yj-sys-matrix { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12px; }
.yj-sys-matrix th, .yj-sys-matrix td { border-right: 1px solid #ebeef5; border-bottom: 1px solid #ebeef5; text-align: center; padding: 7px 4px; background: #fff; white-space: nowrap; }
.yj-sys-matrix th { position: sticky; top: 0; z-index: 2; background: #f5f7fa; color: #606266; font-weight: 600; }
.yj-sys-matrix td:first-child, .yj-sys-matrix th:first-child { position: sticky; left: 0; z-index: 1; background: #fafafa; text-align: left; padding-left: 10px; min-width: 96px; }
.yj-sys-matrix th:first-child { z-index: 3; background: #f5f7fa; }
.yj-sys-matrix tr:last-child td { border-bottom: 0; }
.yj-sys-matrix th:last-child, .yj-sys-matrix td:last-child { border-right: 0; }
.yj-sys-matrix-mod { color: #303133; font-weight: 500; }
.yj-sys-matrix-real { background: #f5f9ff !important; }
.yj-sys-matrix-all { background: #fafafa !important; }
.yj-sys-matrix .el-checkbox { margin-right: 0; }
.yj-sys-matrix .el-checkbox__label { display: none; }

/* 角色：数据权限区块 */
.yj-sys-scope { padding: 18px; background: #fafafa; border: 1px solid #ebeef5; border-radius: 6px; }
.yj-sys-scope h4 { margin: 0 0 16px; font-size: 14px; color: #303133; }
.yj-sys-scope-detail { margin-top: 16px; }

/* 日志：长 diff 文本与告警提示 */
.yj-sys-log-content { white-space: pre-wrap; word-break: break-word; line-height: 1.7; color: #606266; max-width: 720px; }
.yj-sys-alert-tips { padding: 10px 14px; background: #fdf6ec; border: 1px solid #faecd8; border-radius: 4px; color: #b88230; font-size: 12px; line-height: 1.9; }

/* 系统设置 */
.yj-sys-config-block { padding: 16px 18px; border: 1px solid #ebeef5; border-radius: 6px; margin-bottom: 14px; }
.yj-sys-config-block h4 { margin: 0 0 14px; font-size: 14px; color: #303133; }
.yj-sys-wording { padding: 12px 14px; background: #f5f7fa; border-radius: 4px; color: #606266; line-height: 1.8; }
.yj-sys-config-actions { padding-top: 4px; }

/* 工作台图表组件缺失时的可见提示（替代静默 return） */
.yj-chart-fallback { height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; color: #909399; font-size: 12px; line-height: 1.8; padding: 20px; background: #fafafa; border: 1px dashed #dcdfe6; border-radius: 4px; }

@media (max-width: 1000px) {
  .yj-sys-layout { grid-template-columns: 1fr; }
  .yj-sys-tree { min-height: auto; }
}
