/* 鸿为包装 ERP · 全局样式（视觉升级版） */
:root {
  --hw-blue: #2457e6;
  --hw-blue-dark: #1a43b8;
  --hw-blue-light: #3f7bff;
  --hw-navy: #16295e;
  --hw-bg: #f3f5fa;
  --hw-border: #e6e9f0;
  --hw-grad: linear-gradient(135deg, #2457e6 0%, #3f7bff 100%);
  --hw-side-grad: linear-gradient(180deg, #0f1e4c 0%, #16295e 55%, #1b3480 100%);
  --hw-shadow: 0 1px 2px rgba(16,31,78,.04), 0 4px 16px rgba(16,31,78,.06);
  --hw-shadow-lg: 0 2px 6px rgba(16,31,78,.06), 0 10px 28px rgba(16,31,78,.10);

  /* Element Plus 主题变量：统一品牌蓝 */
  --el-color-primary: #2457e6;
  --el-color-primary-light-3: #4d78ec;
  --el-color-primary-light-5: #7596f1;
  --el-color-primary-light-7: #a3b7f7;
  --el-color-primary-light-8: #c0cdfa;
  --el-color-primary-light-9: #e0e8fd;
  --el-color-primary-dark-2: #1a43b8;
  --el-border-radius-base: 6px;
  --el-border-radius-small: 5px;
  --el-border-color: #dfe3ee;
  --el-border-color-light: #e6e9f2;
  --el-border-color-lighter: #eef1f7;
  --el-fill-color-light: #f5f7fc;
  --el-fill-color-blank: #fff;
  --el-text-color-primary: #262b33;
  --el-text-color-regular: #4a5060;
  --el-box-shadow-light: 0 6px 18px rgba(16,31,78,.10);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; background: var(--hw-bg);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif; font-size: 14px; color: #262b33;
  -webkit-font-smoothing: antialiased; }
#app { height: 100%; }
a { color: var(--hw-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.money { font-variant-numeric: tabular-nums; font-weight: 600; }
.masked { color: #a8adb8; font-size: 12px; letter-spacing: 1px; }
.muted { color: #8a90a0; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #ccd3e2; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #adb8d0; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Element Plus 全局打磨 ---------- */
.el-button { border-radius: 7px; font-weight: 500; }
.el-button--primary { background: var(--hw-grad); border: none; box-shadow: 0 3px 9px rgba(36,87,230,.28); }
.el-button--primary:hover, .el-button--primary:focus { filter: brightness(1.07); box-shadow: 0 5px 14px rgba(36,87,230,.36); }
.el-button--primary.is-plain { background: #eef3ff; border: 1px solid #c0cdfa; box-shadow: none; filter: none; }
.el-button--primary.is-plain:hover { background: #e0e8fd; }
.el-tag { border-radius: 6px; }
.el-input__wrapper, .el-textarea__wrapper { border-radius: 7px; }
.el-dialog { border-radius: 14px; overflow: hidden; box-shadow: var(--hw-shadow-lg); }
.el-dialog__header { border-bottom: 1px solid #eef1f7; padding: 14px 20px; margin-right: 0; background: #fbfcff; }
.el-dialog__title { font-weight: 700; color: #1c2333; }
.el-dialog__body { padding: 18px 20px; }
.el-table { --el-table-border-color: #edf0f6; --el-table-header-bg-color: #f7f9fd;
  --el-table-row-hover-bg-color: #f4f8ff; border-radius: 10px; overflow: hidden; font-size: 13px; }
.el-table th.el-table__cell { color: #5a6072; font-weight: 600; }
.el-table--border .el-table__inner-wrapper::after, .el-table--border::before { background-color: #edf0f6; }
.el-descriptions__title { font-weight: 600; }
.el-pagination { --el-pagination-button-bg-color: #fff; }
.el-message-box { border-radius: 14px; }
.el-dropdown-menu { border-radius: 10px; padding: 6px; box-shadow: var(--hw-shadow-lg); }
.el-dropdown-menu__item { border-radius: 7px; }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: stretch;
  background:
    radial-gradient(1100px 560px at 88% -12%, rgba(63,123,255,.55), transparent 60%),
    radial-gradient(900px 520px at -12% 112%, rgba(9,20,60,.85), transparent 55%),
    linear-gradient(135deg, #0f1e4c 0%, #2457e6 58%, #3f7bff 100%); }
.login-brand { flex: 1.2; color: #fff; padding: 72px 64px; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden; }
.login-brand::before { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 26px 26px; mask-image: linear-gradient(120deg, transparent 30%, #000 75%);
  -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000 75%); }
.login-brand h1 { font-size: 38px; letter-spacing: 3px; margin: 0 0 10px; position: relative; }
.login-brand .en { opacity: .6; font-size: 13px; letter-spacing: 4px; margin-bottom: 32px; position: relative; }
.login-brand p { opacity: .92; line-height: 2.1; font-size: 14px; position: relative; max-width: 560px; }
.login-panel { flex: 1; background: #fff; display: flex; align-items: center; justify-content: center; padding: 40px;
  border-radius: 28px 0 0 28px; box-shadow: -24px 0 70px rgba(6,15,50,.35); }
.login-card { width: 400px; max-width: 100%; }
.login-card h2 { margin: 0 0 6px; font-size: 23px; letter-spacing: 1px; }
.login-card .sub { color: #8a90a0; font-size: 13px; margin-bottom: 26px; }
.login-card .el-button--primary { height: 42px; font-size: 15px; letter-spacing: 2px; }
.demo-list { margin-top: 22px; border-top: 1px dashed var(--hw-border); padding-top: 14px; }
.demo-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px;
  border-radius: 9px; cursor: pointer; transition: background .15s, transform .15s; }
.demo-item:hover { background: #f0f4ff; transform: translateX(2px); }
.demo-item .nm { font-weight: 600; font-size: 13px; }
.demo-item .ds { color: #98a0b3; font-size: 12px; }

/* ---------- 主框架 ---------- */
.layout { height: 100vh; display: flex; flex-direction: column; }
.layout-head { height: 58px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); color: #1c2333;
  display: flex; align-items: center; padding: 0 22px; flex-shrink: 0;
  border-bottom: 1px solid var(--hw-border); box-shadow: 0 1px 0 rgba(16,31,78,.02); z-index: 5; }
.layout-head .logo { font-size: 17px; font-weight: 800; letter-spacing: 1px; margin-right: 8px; color: var(--hw-navy); }
.layout-head .logo-badge { background: var(--hw-grad); color: #fff; border-radius: 8px; padding: 2px 8px;
  font-size: 14px; margin-right: 9px; font-weight: 800; box-shadow: 0 3px 9px rgba(36,87,230,.35); }
.layout-head .env-tag { font-size: 11px; background: #eef3ff; color: var(--hw-blue); padding: 3px 10px; border-radius: 10px; margin-left: 12px; font-weight: 500; }
.layout-head .spacer { flex: 1; }
.layout-head .head-btn { color: #4a5060; margin-left: 18px; cursor: pointer; display: flex; align-items: center; gap: 4px;
  font-size: 13px; padding: 6px 8px; border-radius: 8px; transition: background .15s; }
.layout-head .head-btn:hover { background: #f0f4ff; }
.layout-head .user-chip { display: flex; align-items: center; gap: 8px; margin-left: 14px; cursor: default;
  padding: 5px 10px 5px 6px; border-radius: 20px; transition: background .15s; font-weight: 500; }
.layout-head .user-chip:hover { background: #f0f4ff; }
.layout-head .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--hw-grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
  box-shadow: 0 2px 6px rgba(36,87,230,.35); }
.layout-body { flex: 1; display: flex; overflow: hidden; }
.layout-side { width: 212px; background: var(--hw-side-grad); overflow-y: auto; flex-shrink: 0; padding: 12px 10px; }
.layout-side::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); }
.layout-side .el-menu { border-right: none; background: transparent; }
.layout-side .el-menu-item { color: rgba(255,255,255,.72); border-radius: 9px; margin: 3px 0; height: 44px; line-height: 44px; }
.layout-side .el-menu-item:hover { background: rgba(255,255,255,.09); color: #fff; }
.layout-side .el-menu-item.is-active { background: var(--hw-grad); color: #fff; font-weight: 600;
  box-shadow: 0 4px 12px rgba(36,87,230,.45); }
.layout-main { flex: 1; overflow-y: auto; padding: 18px 22px 40px; }

/* ---------- 通用 ---------- */
.page-head { display: flex; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.page-head h3 { margin: 0; font-size: 19px; letter-spacing: .5px; color: var(--hw-navy); font-weight: 800; }
.page-head .spacer { flex: 1; }
.card { background: #fff; border: 1px solid #e9edf5; border-radius: 12px; padding: 18px 20px;
  box-shadow: var(--hw-shadow); margin-bottom: 14px; }
.card .card-title { font-weight: 700; font-size: 15px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; color: #1c2333; }
.card .card-title::before { content: ""; width: 4px; height: 15px; background: var(--hw-grad); border-radius: 2px; }
.filter-bar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
table.hw-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.hw-table th { background: #f7f8fc; color: #5a6072; font-weight: 600; }
table.hw-table th, table.hw-table td { border-bottom: 1px solid #eef0f5; padding: 9px 10px; text-align: left; }
table.hw-table tr:hover td { background: #f8faff; }

/* 看板 */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid #e9edf5; border-radius: 12px; padding: 16px 18px;
  box-shadow: var(--hw-shadow); position: relative; overflow: hidden; transition: transform .18s, box-shadow .18s; }
.kpi::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--hw-grad); opacity: .9; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--hw-shadow-lg); }
.kpi .k-label { color: #8a90a0; font-size: 13px; margin-bottom: 6px; }
.kpi .k-value { font-size: 26px; font-weight: 800; color: #16295e; letter-spacing: .3px; }
.kpi .k-sub { font-size: 12px; color: #98a0b3; margin-top: 4px; }
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart-box { height: 300px; }
@media (max-width: 1000px) { .chart-row { grid-template-columns: 1fr; } }

/* 时间线 */
.tl { list-style: none; margin: 0; padding: 0 0 0 4px; }
.tl li { position: relative; padding: 0 0 18px 22px; }
.tl li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--hw-blue); box-shadow: 0 0 0 3px #dbe5ff; }
.tl li::after { content: ""; position: absolute; left: 8px; top: 16px; bottom: -2px; width: 2px; background: #e8ebf3; }
.tl li:last-child::after { display: none; }
.tl .tl-title { font-weight: 600; font-size: 13px; }
.tl .tl-sub { color: #8a90a0; font-size: 12px; margin-top: 2px; }

/* 消息卡片（模拟企微） */
.wecom-wrap { max-width: 720px; margin: 0 auto; }
.wecom-card { background: #fff; border-radius: 12px; box-shadow: var(--hw-shadow);
  padding: 16px 18px; margin-bottom: 14px; border: 1px solid #eef0f5; transition: box-shadow .18s, transform .18s; }
.wecom-card:hover { box-shadow: var(--hw-shadow-lg); }
.wecom-card.unread { border-left: 3px solid var(--hw-blue); }
.wecom-card .wc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wecom-card .wc-type { font-size: 11px; padding: 2px 8px; border-radius: 5px; background: #eef3ff; color: var(--hw-blue); font-weight: 600; }
.wecom-card .wc-title { font-weight: 700; }
.wecom-card .wc-time { margin-left: auto; color: #a0a6b5; font-size: 12px; }
.wecom-card .wc-body { color: #4a5060; font-size: 13px; white-space: pre-line; line-height: 1.7;
  background: #f8f9fd; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.wecom-card .wc-actions { display: flex; gap: 8px; }

/* 报价单新建 */
.item-editor .el-input-number { width: 130px; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--hw-border); }

/* 设计工单文件行 */
.file-line { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed #eef0f5; font-size: 13px; }
.file-line:last-of-type { border-bottom: none; }
.file-line a { flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 打印页入口 */
.print-frame { border: 1px solid var(--hw-border); border-radius: 10px; overflow: hidden; }

/* 详情操作条 */
.action-bar { position: sticky; bottom: 0; background: rgba(255,255,255,.95); backdrop-filter: blur(6px);
  border-top: 1px solid var(--hw-border); padding: 12px 20px; display: flex; gap: 10px; align-items: center; margin: 0 -22px -40px; }

/* 营业额目标常驻进度条 */
.target-bar { background: #fff; border: 1px solid #e9edf5; border-radius: 12px; box-shadow: var(--hw-shadow);
  padding: 12px 16px 14px; margin-bottom: 14px; }
.target-bar .tb-head { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 10px; color: #1c2333; }
.tb-cols { display: grid; grid-template-columns: 1fr 1fr auto; gap: 20px; align-items: center; }
@media (max-width: 1100px) { .tb-cols { grid-template-columns: 1fr; gap: 12px; } }
.tb-label { font-size: 12px; color: #8a90a0; margin-bottom: 6px; display: flex; gap: 6px; align-items: baseline; }
.tb-label .tb-num { color: #16295e; font-size: 14px; font-weight: 700; }
.tb-label .tb-pct { margin-left: auto; color: var(--hw-blue); font-size: 13px; }
.tb-track { height: 10px; background: #eef1f7; border-radius: 6px; overflow: hidden; display: flex; }
.tb-green { background: linear-gradient(90deg, #52c41a, #67c23a); height: 100%; transition: width .4s; }
.tb-blue { background: linear-gradient(90deg, #2457e6, #69a1ff); height: 100%; transition: width .4s; }
.tb-side { font-size: 12px; color: #8a90a0; white-space: nowrap; }

/* 右侧常驻攻坚建议 */
.layout-aside { width: 300px; flex-shrink: 0; overflow-y: auto; padding: 18px 18px 18px 0; }
@media (max-width: 1280px) { .layout-aside { display: none; } }
.advice-panel { padding: 14px 16px; margin-bottom: 0; }
.advice-summary { font-size: 12px; color: #4a5060; background: #f5f8ff; border: 1px solid #e0e8fd;
  border-radius: 8px; padding: 8px 10px; line-height: 1.9; margin-bottom: 10px; }
.advice-item { border: 1px solid #e9edf5; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px;
  cursor: pointer; transition: .15s; background: #fbfcff; }
.advice-item:hover { border-color: #c0cdfa; box-shadow: var(--hw-shadow); transform: translateY(-1px); }
.advice-item .ai-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 6px; color: #1c2333; }
.advice-item .ai-tags { display: flex; gap: 4px; margin-bottom: 6px; flex-wrap: wrap; }
.advice-item .ai-advice { font-size: 12px; color: #4a5060; line-height: 1.7; }
.advice-foot { font-size: 11px; display: flex; align-items: center; gap: 6px; }
