/* ==========================================================================
   铭泰国际报单管理系统 · 商务主题 Corporate Theme
   --------------------------------------------------------------------------
   设计语言：深海军蓝 + 香槟金 + 冷灰中性色
   目标：更沉稳、更克制的企业级观感（去渐变、去光晕、重层次与留白）

   引入方式：
     - 源码：在 main.js 中 `import './theme-business.css'`（须在 styles.css 之后）
     - 已构建产物：在 index.html 中于 index-*.css 之后追加 <link>

   覆盖策略：
     - Element Plus 变量在 :root 中重定义，全局生效
     - 组件内 scoped 样式使用 #app / body 前缀提升权重，
       不依赖 !important，也不依赖构建后的 data-v-* 哈希
   ========================================================================== */

/* ==========================================================================
   1. 设计令牌 Design tokens
   ========================================================================== */
:root {
  /* —— 品牌色 —— */
  --brand-ink: #132437;          /* 最深墨蓝，用于标题 */
  --brand-deep: #16293f;         /* 侧栏基色 */
  --brand-blue: #1f4e8c;         /* 商务主蓝 */
  --brand-blue-2: #2c67ad;       /* 主蓝提亮 */
  --brand-gold: #b08d4f;         /* 香槟金 */
  --brand-gold-soft: #e9dfc9;
  --brand-gold-line: rgba(176, 141, 79, .38);

  /* —— 中性色 —— */
  --page-bg: #f2f4f8;
  --card-bg: #ffffff;
  --line: #e6eaf0;
  --line-strong: #d8dfe8;
  --line-soft: #eef1f6;
  --text-main: #16202c;
  --text-sub: #5a6b7f;
  --text-muted: #8d99a8;

  /* —— 圆角与阴影 —— */
  --card-radius: 14px;
  --card-shadow: 0 1px 2px rgba(16, 32, 51, .04), 0 8px 24px -14px rgba(16, 32, 51, .16);
  --card-shadow-hover: 0 2px 4px rgba(16, 32, 51, .05), 0 18px 40px -18px rgba(16, 32, 51, .22);
  --shadow-pop: 0 12px 32px -10px rgba(13, 26, 42, .18), 0 2px 8px rgba(13, 26, 42, .06);

  /* —— Element Plus 主色（含浅色梯度，保证全局一致）—— */
  --el-color-primary: #1f4e8c;
  --el-color-primary-rgb: 31, 78, 140;
  --el-color-primary-light-3: #6283af;
  --el-color-primary-light-5: #8fa7c6;
  --el-color-primary-light-7: #bccadd;
  --el-color-primary-light-8: #d2dce8;
  --el-color-primary-light-9: #e9edf4;
  --el-color-primary-dark-2: #193e70;

  /* —— 语义色：整体降饱和，更"商务" —— */
  --el-color-success: #2e9e63;
  --el-color-success-rgb: 46, 158, 99;
  --el-color-success-light-3: #6dbb92;
  --el-color-success-light-5: #97cfb1;
  --el-color-success-light-7: #c0e2d0;
  --el-color-success-light-8: #d5ece0;
  --el-color-success-light-9: #eaf5ef;

  --el-color-warning: #d9902b;
  --el-color-warning-rgb: 217, 144, 43;
  --el-color-warning-light-3: #e4b16b;
  --el-color-warning-light-5: #ecc895;
  --el-color-warning-light-7: #f4debf;
  --el-color-warning-light-8: #f7e9d5;
  --el-color-warning-light-9: #fbf4ea;

  --el-color-danger: #d24a43;
  --el-color-danger-rgb: 210, 74, 67;
  --el-color-error: #d24a43;
  --el-color-error-rgb: 210, 74, 67;
  --el-color-danger-light-3: #e0807b;
  --el-color-danger-light-5: #e9a5a1;
  --el-color-danger-light-7: #f2c9c7;
  --el-color-danger-light-8: #f6dbd9;
  --el-color-danger-light-9: #fbedec;
  --el-color-error-light-3: #e0807b;
  --el-color-error-light-5: #e9a5a1;
  --el-color-error-light-7: #f2c9c7;
  --el-color-error-light-8: #f6dbd9;
  --el-color-error-light-9: #fbedec;

  --el-color-info: #77839a;
  --el-color-info-rgb: 119, 131, 154;
  --el-color-info-light-3: #a0a8b8;
  --el-color-info-light-5: #bbc1cd;
  --el-color-info-light-7: #d6dae1;
  --el-color-info-light-8: #e4e6eb;
  --el-color-info-light-9: #f1f3f5;

  /* —— 文字 / 边框 / 填充 —— */
  --el-text-color-primary: #16202c;
  --el-text-color-regular: #46586e;
  --el-text-color-secondary: #77869a;
  --el-text-color-placeholder: #a7b1bf;
  --el-text-color-disabled: #bcc4cf;
  --el-border-color: #d8dfe8;
  --el-border-color-light: #e6eaf0;
  --el-border-color-lighter: #eef1f6;
  --el-border-color-extra-light: #f3f6fa;
  --el-fill-color: #f2f5f9;
  --el-fill-color-light: #f6f8fb;
  --el-fill-color-lighter: #fafbfd;
  --el-fill-color-blank: #ffffff;
  --el-bg-color-page: #f2f4f8;
  --el-bg-color-overlay: #ffffff;

  /* —— 形状 / 字体 —— */
  --el-border-radius-base: 8px;
  --el-border-radius-small: 6px;
  --el-border-radius-round: 20px;
  --el-font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
                    "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --el-font-size-base: 14px;
  --el-font-weight-primary: 500;
  --el-box-shadow-light: 0 6px 20px -10px rgba(16, 32, 51, .18);
  --el-box-shadow: 0 12px 32px -10px rgba(13, 26, 42, .18);
}

/* ==========================================================================
   2. 基础排版 Base & typography
   ========================================================================== */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--el-font-family);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  color: var(--brand-ink);
  font-weight: 600;
  letter-spacing: .2px;
}

/* 数字统一等宽对齐，报表观感更整齐 */
.el-table,
.el-pagination,
.el-descriptions,
.stat-value,
.mini-stat .num,
.el-statistic__content {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

::selection {
  background: rgba(31, 78, 140, .15);
}

:focus-visible {
  outline: 2px solid rgba(31, 78, 140, .45);
  outline-offset: 1px;
  border-radius: 4px;
}

/* 滚动条：细、冷灰、低调 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: #c8d2de;
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: #a9b7c8;
  background-clip: content-box;
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* ==========================================================================
   3. 框架外壳 Shell：侧栏 / 顶栏 / 内容区
   ========================================================================== */

/* —— 侧栏 —— */
#app .side-aside {
  background: linear-gradient(180deg, #101f31 0%, #16293f 48%, #1b3554 100%);
  border-right: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 6px 0 26px -20px rgba(6, 16, 28, .75);
}

#app .logo {
  height: 64px;
  padding: 0 15px;
  justify-content: flex-start;
  gap: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0));
}

#app .logo-badge {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 700;
  color: #f4ead6;
  background: linear-gradient(150deg, #2a5f9e, #1b3f6d);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16),
              0 6px 16px -8px rgba(0, 0, 0, .8);
}

#app .logo-text {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  color: #f2f6fb;
  white-space: nowrap;
}

#app .logo-text-mini {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  color: #f4ead6;
}

/* —— 侧栏菜单：去掉蓝色渐变发光，改为克制的面板 + 金色指示条 —— */
#app .side-menu {
  --el-menu-bg-color: transparent;
  --el-menu-text-color: #a9b8cb;
  --el-menu-hover-bg-color: transparent;
  --el-menu-item-height: 46px;
  padding: 10px 0;
}

#app .side-menu .el-menu-item,
#app .side-menu .el-sub-menu__title {
  height: 46px;
  line-height: 46px;
  margin: 3px 10px;
  border-radius: 8px;
  font-size: 14px;
  letter-spacing: .3px;
  color: #a9b8cb;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

#app .side-menu .el-menu-item .el-icon,
#app .side-menu .el-sub-menu__title .el-icon {
  font-size: 17px;
  color: #7f93ac;
  transition: color .18s ease;
  margin-right: 10px;
}

#app .side-menu .el-menu-item:hover,
#app .side-menu .el-sub-menu__title:hover {
  background: rgba(255, 255, 255, .06);
  color: #ffffff;
}

#app .side-menu .el-menu-item:hover .el-icon,
#app .side-menu .el-sub-menu__title:hover .el-icon {
  color: #cddaea;
}

#app .side-menu .el-menu-item.is-active {
  background: rgba(255, 255, 255, .10);
  color: #ffffff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--brand-gold);
}

#app .side-menu .el-menu-item.is-active .el-icon {
  color: var(--brand-gold);
}

#app .side-menu .el-sub-menu .el-menu-item {
  margin: 2px 10px 2px 16px;
  font-size: 13.5px;
}

#app .side-menu .el-sub-menu .el-menu-item.is-active {
  margin: 2px 10px 2px 16px;
}

#app .side-foot {
  padding: 15px 0;
  color: rgba(255, 255, 255, .30);
  font-size: 10.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

/* —— 顶栏 —— */
#app .topbar {
  height: 64px;
  padding: 0 22px;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(16, 32, 51, .03);
}

#app .collapse-btn,
#app .topbar-icon {
  font-size: 19px;
  color: #6b7b8f;
  transition: color .18s ease;
}

#app .collapse-btn:hover,
#app .topbar-icon:hover {
  color: var(--brand-blue);
}

#app .user-chip {
  padding: 4px 10px 4px 4px;
  border-radius: 22px;
  transition: background-color .18s ease;
}

#app .user-chip:hover {
  background: #f4f7fb;
}

#app .user-avatar {
  background: linear-gradient(140deg, #2a5f9e, #1b3f6d);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

#app .user-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-main);
  letter-spacing: .2px;
}

#app .role-tag {
  border-color: var(--line-strong);
  background: #f6f8fb;
  color: var(--text-sub);
}

/* —— 内容区：给足留白 —— */
#app .el-main {
  padding: 20px 24px !important; /* 组件上是内联 padding，需强制覆盖 */
  overflow: auto;
}

/* ==========================================================================
   4. 页面基础件 Page primitives
   ========================================================================== */
#app .page-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 20px 24px;
  margin-bottom: 18px;
  box-shadow: var(--card-shadow);
  transition: box-shadow .22s ease, border-color .22s ease;
}

#app .page-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: #dfe5ee;
}

#app .page-card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  padding-bottom: 13px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .4px;
  color: var(--brand-ink);
  border-bottom: 1px solid var(--line-soft);
}

#app .page-card-title:before {
  content: "";
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, #c9a765, var(--brand-gold));
}

#app .filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}

#app .filter-bar .el-input,
#app .filter-bar .el-select {
  width: 180px;
}

#app .filter-bar .el-button,
#app .toolbar .el-button {
  height: 34px;
  font-size: 13.5px;
}

#app .toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

#app .table-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 12.5px;
  letter-spacing: .2px;
}

#app .mt16 {
  margin-top: 16px;
}

#app .muted {
  color: var(--text-muted);
  font-size: 12px;
}

#app .text-danger { color: var(--el-color-danger); }
#app .text-warn   { color: var(--el-color-warning); }
#app .text-ok     { color: var(--el-color-success); }

/* —— 统计卡：白底 + 左侧色条 + 图标胶囊 —— */
#app .stat-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 18px 20px 18px 22px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

#app .stat-card:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand-blue);
}

#app .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
  border-color: #dfe5ee;
}

#app .stat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

#app .stat-label {
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .6px;
}

#app .stat-value {
  font-size: 30px;
  font-weight: 650;
  line-height: 1.25;
  margin-top: 10px;
  letter-spacing: .2px;
  color: var(--brand-ink);
}

/* 图标做成柔和色块胶囊 */
#app .stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  font-size: 19px;
  opacity: 1;
  color: var(--brand-blue);
  background: #eef3fa;
}

/* —— 统计卡配色变体 —— */
#app .stat-card.stat-blue { border-top: none; background: var(--card-bg); }
#app .stat-card.stat-gold { border-top: none; background: var(--card-bg); }
#app .stat-card.stat-green { border-top: none; background: var(--card-bg); }
#app .stat-card.stat-red { border-top: none; background: var(--card-bg); }

#app .stat-card.stat-blue:before  { background: #1f4e8c; }
#app .stat-card.stat-gold:before  { background: var(--brand-gold); }
#app .stat-card.stat-green:before { background: var(--el-color-success); }
#app .stat-card.stat-red:before   { background: var(--el-color-danger); }

#app .stat-card.stat-blue .stat-value  { color: #1f4e8c; }
#app .stat-card.stat-gold .stat-value  { color: #9a7a35; }
#app .stat-card.stat-green .stat-value { color: #27824f; }
#app .stat-card.stat-red .stat-value   { color: #bf3f39; }

#app .stat-card.stat-blue .stat-icon  { color: #1f4e8c; background: #eaf0f8; }
#app .stat-card.stat-gold .stat-icon  { color: #9a7a35; background: #f7f1e6; }
#app .stat-card.stat-green .stat-icon { color: #27824f; background: #eaf5ef; }
#app .stat-card.stat-red .stat-icon   { color: #bf3f39; background: #fbedec; }

/* —— 小节标题 —— */
#app .sec-title {
  position: relative;
  margin: 4px 0 12px;
  padding-left: 11px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--brand-ink);
}

#app .sec-title:before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--brand-gold);
}

/* —— 迷你指标（报表中心）—— */
#app .mini-stat {
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
  transition: border-color .18s ease, background-color .18s ease;
}

#app .mini-stat:hover {
  background: #ffffff;
  border-color: var(--line-strong);
}

#app .mini-stat .num {
  font-size: 19px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--brand-ink);
}

#app .mini-stat .lbl {
  margin-top: 3px;
  font-size: 12px;
  letter-spacing: .3px;
  color: var(--text-muted);
}

#app .mini-stat.ok .num     { color: var(--el-color-success); }
#app .mini-stat.warn .num   { color: var(--el-color-warning); }
#app .mini-stat.danger .num { color: var(--el-color-danger); }

#app .due-badge { margin-top: 4px; }

/* —— 待办列表（看板）—— */
#app .todo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color .18s ease, padding-left .18s ease;
}

#app .todo-item:hover {
  background: #f5f8fc;
  padding-left: 16px;
}

#app .todo-item:last-child {
  border-bottom: none;
}

/* ==========================================================================
   5. Element Plus 组件精修
   ========================================================================== */

/* —— 按钮：去渐变，改实色 + 轻投影 —— */
.el-button {
  font-weight: 500;
  border-radius: var(--el-border-radius-base);
  transition: background-color .18s ease, border-color .18s ease,
              color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.el-button--primary:not(.is-plain):not(.is-link):not(.is-text) {
  background-color: var(--el-color-primary);
  border-color: var(--el-color-primary);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 32, 51, .08), 0 8px 18px -12px rgba(31, 78, 140, .75);
}

.el-button--primary:not(.is-plain):not(.is-link):not(.is-text):hover {
  background-color: var(--brand-blue-2);
  border-color: var(--brand-blue-2);
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(16, 32, 51, .10), 0 14px 26px -14px rgba(31, 78, 140, .85);
}

.el-button--primary:not(.is-plain):not(.is-link):not(.is-text):active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(16, 32, 51, .12);
}

.el-button--primary.is-disabled,
.el-button--primary.is-disabled:hover,
.el-button--primary.is-disabled:active {
  transform: none;
  box-shadow: none;
}

.el-button--primary.is-plain {
  background: #ffffff;
  border-color: var(--line-strong);
  color: var(--brand-blue);
  box-shadow: none;
}

.el-button--primary.is-plain:hover,
.el-button--primary.is-plain:focus {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #ffffff;
  box-shadow: 0 6px 16px -10px rgba(31, 78, 140, .9);
}

.el-button--default:not(.is-plain):not(.is-link):not(.is-text) {
  background: #ffffff;
  border-color: var(--line-strong);
  color: #40536a;
}

.el-button--default:not(.is-plain):not(.is-link):not(.is-text):hover {
  background: #f7faff;
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.el-button.is-link:hover,
.el-button.is-text:hover {
  background-color: var(--el-color-primary-light-9);
}

.el-table .el-button {
  margin: 2px 4px 2px 0;
}

.el-table .el-button + .el-button {
  margin-left: 0;
}

.el-table__cell .el-button--primary {
  box-shadow: none;
}

.el-table__cell .el-button--primary:hover {
  transform: none;
}

/* —— 输入 / 选择 / 文本域 —— */
.el-input {
  --el-input-border-color: var(--line-strong);
  --el-input-hover-border-color: #b9c5d4;
  --el-input-focus-border-color: var(--brand-blue);
  --el-input-border-radius: 8px;
}

.el-textarea__inner {
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--line-strong) inset;
  transition: box-shadow .18s ease;
}

.el-textarea__inner:hover {
  box-shadow: 0 0 0 1px #b9c5d4 inset;
}

.el-textarea__inner:focus {
  box-shadow: 0 0 0 1px var(--brand-blue) inset, 0 0 0 3px rgba(31, 78, 140, .10);
}

.el-select__wrapper {
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--line-strong) inset;
  transition: box-shadow .18s ease;
}

.el-select__wrapper:hover {
  box-shadow: 0 0 0 1px #b9c5d4 inset;
}

.el-select__wrapper.is-focused {
  box-shadow: 0 0 0 1px var(--brand-blue) inset, 0 0 0 3px rgba(31, 78, 140, .10);
}

.el-input-number {
  --el-input-border-radius: 8px;
}

.el-form-item__label {
  font-weight: 500;
  color: #46586e;
}

.el-form-item__error {
  font-size: 12px;
  padding-top: 3px;
}

/* —— 表格 —— */
.el-table {
  --el-table-header-bg-color: #f7f9fc;
  --el-table-header-text-color: #46586e;
  --el-table-border-color: var(--line-soft);
  --el-table-row-hover-bg-color: #f5f8fc;
  --el-table-text-color: #253347;
  font-size: 13.5px;
  border-radius: 10px;
  overflow: hidden;
}

.el-table th.el-table__cell {
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: .4px;
  color: #46586e;
}

.el-table td.el-table__cell {
  padding: 11px 0;
}

.el-table .cell {
  line-height: 1.55;
}

.el-table__inner-wrapper::before {
  background-color: var(--line-soft);
}

.el-table__empty-text {
  color: var(--text-muted);
  font-size: 13px;
}

.el-table--border .el-table__cell {
  border-right-color: var(--line-soft);
}

/* —— 分页 —— */
.el-pagination {
  --el-pagination-button-bg-color: #ffffff;
  --el-pagination-hover-color: var(--brand-blue);
  font-weight: 500;
  padding: 2px 0;
}

.el-pagination .el-pager li,
.el-pagination button {
  border-radius: 7px;
  font-weight: 500;
  color: #5a6b7f;
  transition: background-color .16s ease, color .16s ease;
}

.el-pagination .el-pager li:hover,
.el-pagination button:hover:not(:disabled) {
  color: var(--brand-blue);
  background: var(--el-color-primary-light-9);
}

.el-pagination .el-pager li.is-active {
  background: var(--brand-blue);
  color: #ffffff;
}

.el-pagination.is-background .el-pager li {
  background: #f4f7fb;
  border: 1px solid transparent;
}

.el-pagination.is-background .el-pager li:not(.is-active):hover {
  background: var(--el-color-primary-light-9);
  color: var(--brand-blue);
}

.el-pagination.is-background .el-pager li.is-active {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
}

/* —— 标签 —— */
.el-tag {
  border-radius: 6px;
  font-weight: 500;
  letter-spacing: .2px;
}

.el-tag--large {
  border-radius: 8px;
}

/* —— 弹窗 —— */
.el-overlay {
  background-color: rgba(13, 26, 42, .45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.el-dialog {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 32px 72px -24px rgba(9, 20, 34, .50), 0 4px 12px rgba(9, 20, 34, .10);
}

.el-dialog__header {
  margin: 0;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--line);
}

.el-dialog__title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--brand-ink);
}

.el-dialog__headerbtn {
  top: 15px;
  right: 16px;
}

.el-dialog__body {
  padding: 20px 24px;
  color: var(--text-sub);
}

.el-dialog__footer {
  padding: 14px 24px 18px;
  border-top: 1px solid var(--line);
}

/* —— 抽屉 —— */
.el-drawer {
  border-radius: 14px 0 0 14px;
  box-shadow: -28px 0 72px -28px rgba(9, 20, 34, .45);
}

.el-drawer__header {
  margin-bottom: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--brand-ink);
  font-weight: 600;
  letter-spacing: .3px;
}

.el-drawer__body {
  padding: 16px 20px;
}

/* —— 标签页 —— */
.el-tabs__item {
  font-weight: 500;
  color: #5a6b7f;
  transition: color .18s ease;
}

.el-tabs__item.is-active {
  color: var(--brand-blue);
  font-weight: 600;
}

.el-tabs__active-bar {
  height: 2.5px;
  border-radius: 2px;
}

.el-tabs__nav-wrap::after {
  height: 1px;
  background-color: var(--line);
}

/* —— 描述列表 —— */
.el-descriptions {
  --el-descriptions-item-bordered-label-background: #f7f9fc;
}

.el-descriptions__body {
  border-radius: 8px;
}

.el-descriptions__label {
  font-weight: 600;
  color: #46586e;
}

.el-descriptions__content {
  color: #253347;
}

.el-descriptions__cell {
  padding: 10px 14px;
}

/* —— 步骤条 / 时间线 —— */
.el-step__head.is-process,
.el-step__head.is-finish {
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}

.el-step__title.is-process {
  font-weight: 600;
  color: var(--brand-blue);
}

.el-step__description.is-process {
  color: var(--text-sub);
}

.el-timeline-item__node {
  box-shadow: 0 0 0 3px rgba(31, 78, 140, .08);
}

.el-timeline-item__timestamp {
  color: var(--text-muted);
  font-size: 12px;
}

/* —— 提示条 —— */
.el-alert {
  border-radius: 10px;
  padding: 12px 16px;
  border: 1px solid transparent;
  align-items: flex-start;
}

.el-alert--info.is-light    { background: #f5f7fb; border-color: var(--line); }
.el-alert--success.is-light { background: var(--el-color-success-light-9); border-color: var(--el-color-success-light-8); }
.el-alert--warning.is-light { background: var(--el-color-warning-light-9); border-color: var(--el-color-warning-light-8); }
.el-alert--error.is-light   { background: var(--el-color-error-light-9);   border-color: var(--el-color-error-light-8); }

.el-alert__title {
  font-weight: 600;
  letter-spacing: .2px;
}

.el-alert__description {
  font-size: 12.5px;
  line-height: 1.6;
}

/* —— 卡片 —— */
.el-card {
  border-radius: 12px;
  border-color: var(--line);
  box-shadow: var(--card-shadow);
}

.el-card__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  color: var(--brand-ink);
}

.el-card__body {
  padding: 20px;
}

/* —— 上传 —— */
.el-upload-dragger {
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: #fafbfd;
  transition: border-color .2s ease, background-color .2s ease;
}

.el-upload-dragger:hover {
  border-color: var(--brand-blue);
  background: #f5f9ff;
}

/* —— 空状态 —— */
.el-empty {
  padding: 40px 0;
}

.el-empty__description p {
  color: var(--text-muted);
  font-size: 13px;
}

/* —— 浮层：下拉 / 弹层 / 日期面板 —— */
.el-popper.is-light {
  border-color: var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-pop);
}

.el-dropdown-menu {
  padding: 6px;
  border-radius: 10px;
}

.el-dropdown-menu__item {
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 13.5px;
}

.el-dropdown-menu__item:not(.is-disabled):hover,
.el-dropdown-menu__item:not(.is-disabled):focus {
  background: var(--el-color-primary-light-9);
  color: var(--brand-blue);
}

.el-select-dropdown__item {
  font-size: 13.5px;
}

.el-select-dropdown__item.is-selected {
  color: var(--brand-blue);
  font-weight: 600;
}

.el-menu--popup {
  padding: 6px;
  border-radius: 10px;
  box-shadow: var(--shadow-pop);
}

.el-picker-panel {
  border-radius: 12px;
}

.el-date-picker__header-label {
  font-weight: 600;
  color: var(--brand-ink);
}

/* 表格操作列的 tooltip / popover 统一样式 */
.el-popover.el-popper {
  border-radius: 10px;
  color: var(--text-sub);
}

/* —— 消息 / 通知 / 确认框 —— */
.el-message {
  border-radius: 10px;
  border-width: 1px;
  box-shadow: var(--shadow-pop);
  padding: 12px 18px;
}

.el-message-box {
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 32px 72px -24px rgba(9, 20, 34, .50);
}

.el-message-box__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-ink);
}

.el-message-box__content {
  color: var(--text-sub);
  padding: 12px 0 4px;
}

.el-message-box__btns {
  padding-top: 16px;
}

.el-notification {
  border-radius: 12px;
  box-shadow: var(--shadow-pop);
}

.el-notification__title {
  color: var(--brand-ink);
  font-weight: 600;
}

/* —— 其它小件 —— */
.el-divider {
  border-color: var(--line);
}

.el-divider__text {
  background: #ffffff;
  color: var(--text-muted);
  font-size: 12.5px;
  letter-spacing: .3px;
}

.el-badge__content {
  border: 2px solid #ffffff;
  font-weight: 600;
}

.el-link.el-link--primary {
  font-weight: 500;
}

.el-switch.is-checked .el-switch__core {
  background-color: var(--brand-blue);
  border-color: var(--brand-blue);
}

.el-breadcrumb {
  font-size: 13px;
  letter-spacing: .3px;
}

.el-tooltip__popper.is-dark {
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 12.5px;
  background: #1b2c3f;
}

.el-statistic__head {
  color: var(--text-muted);
  font-size: 12.5px;
  letter-spacing: .5px;
}

.el-statistic__number {
  color: var(--brand-ink);
  font-weight: 650;
}

/* ==========================================================================
   6. 视图专属
   ========================================================================== */

/* —— 登录页：改为克制的深蓝 + 细网格 + 白卡 —— */
#app .login-bg {
  height: 100vh;
  background:
    radial-gradient(1100px 620px at 14% 8%, rgba(44, 103, 173, .26), transparent 62%),
    radial-gradient(900px 520px at 88% 92%, rgba(176, 141, 79, .16), transparent 62%),
    linear-gradient(158deg, #0b1929 0%, #12263d 52%, #0d1e33 100%);
}

/* 细网格纹理，替代原彩色光斑 */
#app .login-bg:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .040) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .040) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(circle at 50% 44%, #000 0%, transparent 76%);
  mask-image: radial-gradient(circle at 50% 44%, #000 0%, transparent 76%);
}

#app .bg-deco {
  display: none;
}

#app .login-card {
  width: 432px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 36px 84px -30px rgba(4, 12, 24, .70), 0 3px 10px rgba(4, 12, 24, .18);
}

/* 顶部香槟金压条 */
#app .login-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-gold), #d9c08a 46%, rgba(217, 192, 138, 0) 100%);
}

#app .login-card .el-card__body {
  padding: 40px 42px 30px;
}

#app .login-brand {
  gap: 11px;
}

#app .brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  font-size: 20px;
  font-weight: 700;
  color: #f4ead6;
  background: linear-gradient(150deg, #2a5f9e, #1b3f6d);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18),
              0 8px 20px -10px rgba(27, 63, 109, .9);
}

#app .login-title {
  margin: 0;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: 1.4px;
  color: var(--brand-ink);
}

#app .login-sub {
  margin: 12px 0 26px;
  font-size: 12.5px;
  letter-spacing: .6px;
  color: #8a94a6;
}

#app .login-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  letter-spacing: 1px;
  color: #a8b1bf;
}

/* —— 消息抽屉（teleport 到 body，故用 body 前缀）—— */
body .el-drawer .msg-item {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 10px;
  transition: background-color .18s ease;
}

body .el-drawer .msg-item:hover {
  background: #f7f9fc;
}

body .el-drawer .msg-item.unread {
  background: #f2f6fc;
  box-shadow: inset 3px 0 0 var(--brand-blue);
  border-bottom-color: transparent;
}

body .el-drawer .msg-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-ink);
}

body .el-drawer .msg-content {
  margin: 6px 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-sub);
}

body .el-drawer .msg-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-muted);
}

body .el-drawer .msg-dot {
  margin-left: 10px;
}

/* —— 水牌大屏 —— */
#app .shuipai-wrap {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 110px);
}

#app .shuipai-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  font-size: 13px;
  color: var(--text-sub);
}

#app .shuipai-bar .tip {
  color: var(--text-muted);
  font-size: 12px;
}

#app .shuipai-frame {
  flex: 1;
  width: 100%;
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: #0b1f3a;
}

/* —— 系统设置 / 文员待办 等辅助样式 —— */
#app .perms-cell {
  line-height: 22px;
}

#app .perm-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#app .perm-group .el-checkbox {
  margin-right: 0;
}

#app .feedback-cell span {
  display: block;
}

#app .no-clerk-tip {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--el-color-warning);
}

#app .no-clerk-tip a {
  color: var(--el-color-primary);
}

/* ==========================================================================
   7. 响应式与可访问性
   ========================================================================== */
@media (max-width: 1280px) {
  #app .el-main {
    padding: 16px 18px !important;
  }

  #app .stat-value {
    font-size: 26px;
  }
}

@media (max-width: 900px) {
  #app .page-card {
    padding: 16px 16px;
  }

  #app .login-card {
    width: min(432px, calc(100vw - 32px));
  }

  #app .login-card .el-card__body {
    padding: 30px 24px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ==========================================================================
   8. 增补：链接去下划线 + 详情页「页签 / 表格」区块重设计
   ========================================================================== */

/* —— 所有链接一律不要下划线（含 hover）—— */
a, a:visited, a:hover, a:active, a:focus,
.el-link, .el-link__inner,
.el-link:hover, .el-link:focus {
  text-decoration: none !important;
}
/* Element Plus 的 el-link 在 hover 时会用伪元素补一条线，一并去掉 */
.el-link.is-underline:hover::after,
.el-link.is-underline:focus::after {
  display: none !important;
  content: none !important;
}

/* —— 页签：改成商务导航条（底部一条发丝线，金色/主蓝指示条）—— */
#app .el-tabs__header {
  margin-bottom: 0;
  padding: 0 6px;
  border-bottom: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #fafcfe, #ffffff);
}
#app .el-tabs__nav-wrap::after {
  display: none; /* 去掉自带灰线，改用上面的 border-bottom */
}
#app .el-tabs__item {
  height: 48px;
  line-height: 48px;
  padding: 0 20px;
  font-size: 14px;
  letter-spacing: .3px;
  color: #5a6b7f;
}
#app .el-tabs__item.is-active {
  color: var(--brand-blue);
  font-weight: 600;
}
#app .el-tabs__item:hover {
  color: var(--brand-blue);
}
#app .el-tabs__active-bar {
  height: 2.5px;
  border-radius: 2px 2px 0 0;
  background: var(--brand-blue);
}
#app .el-tabs__content {
  padding: 14px 2px 2px;
}

/* —— 表格空状态：给足高度 + 一个线性图标，不再是一行干巴巴的文字 —— */
.el-table__empty-block {
  min-height: 190px;
}
.el-table__empty-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  line-height: 1.5;
  font-size: 13px;
  letter-spacing: .3px;
  color: var(--text-muted);
}
.el-table__empty-text::before {
  content: "";
  width: 52px;
  height: 52px;
  opacity: .6;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Crect x='9' y='12' width='30' height='25' rx='4' fill='none' stroke='%23a9b7c8' stroke-width='2'/%3E%3Cpath d='M9 25h8.5l3 4h7l3-4H39' fill='none' stroke='%23a9b7c8' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* —— 利得税表（页内 iframe）容器：贴合主框架高度，底部不再被切 —— */
#app .tax-embed {
  height: calc(100vh - 180px);
}
#app .tax-embed-frame {
  flex: 1;
  width: 100%;
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: #ffffff;
}
#app .tax-embed .shuipai-bar {
  border-radius: 10px 10px 0 0;
}
