/* ============================================================
   网站统一美化主题 - 沉稳商务风 (方案B)
   深蓝灰 #1e3a5f + 石板底 #f1f5f9 + 白卡片
   纯 CSS 覆盖，不改任何 DOM / JS / PHP 逻辑
   注意：保留业务状态色 <tr bgcolor>，不覆盖有含义的行底色
   ============================================================ */

/* ---------- 1. 全局字体与基线 ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", "Hiragino Sans GB", sans-serif !important;
  color: #334155 !important;
  line-height: 1.6;
}

/* ---------- 2. 顶部菜单栏（主框架，样式在 body 内靠后） ---------- */
body .app-header { background: #1e3a5f; border-bottom: 3px solid #0ea5e9; }
body ul#main-menu,
body #main-menu {
  background: #1e3a5f !important;
  height: 56px !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
}
body #main-menu > li { height: 56px; }
body #main-menu > li > a {
  height: 56px !important;
  line-height: 56px !important;
  color: #e8eef5 !important;
  background: transparent !important;
  font-size: 15px;
  letter-spacing: .3px;
  transition: background .18s, color .18s;
}
body #main-menu > li > a:hover { background: #2b5486 !important; color: #fff !important; }
body #main-menu > li.user-chip > a {
  color: #fff !important;
  background: rgba(255, 255, 255, .1) !important;
  border-radius: 4px;
  margin: 10px 6px;
  height: 36px !important;
  line-height: 36px !important;
  padding-left: 1em !important;
  padding-right: 1em !important;
}
body #main-menu > li.user-chip > a:hover,
body #main-menu > li.user-chip.open > a { background: #0ea5e9 !important; color: #fff !important; }
body .caret { color: inherit; }
body .user-menu {
  border: 1px solid #cbd5e1 !important;
  border-radius: 0 0 8px 8px !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .22) !important;
}
body #main-menu .user-menu a {
  color: #334155 !important;
  font-size: 14px !important;
  padding: 10px 18px !important;
}
body #main-menu .user-menu a:hover { background: #1e3a5f !important; color: #fff !important; }

/* ---------- 3. 主框架布局区 ---------- */
body .app-main { background: #f1f5f9; }
body .app-footer {
  background: #fff !important;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 12px;
}

/* ---------- 3b. 菜单布局表格：排除数据表格通用样式误伤 ----------
   菜单外壳是 <table width="98%" align="center">，会被下方 table[width="98%"]
   规则刷成白底+边框，导致深蓝菜单两侧露白。此处仅在 .app-header 内还原。 */
body .app-header table { background: transparent !important; border: 0 !important; width: 100% !important; border-radius: 0 !important; }
body .app-header table td { padding: 0 !important; }
body #main-menu { width: 100% !important; }

/* ---------- 4. 业务表格 ---------- */
table { border-collapse: collapse !important; }
/* 数据表格：柔和边框 + 浅色表头（不用深蓝，避免与状态色冲突） */
table[border="1"], table[width="98%"], table.result-table, table.form-table {
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px;
  background: #fff;
}
th {
  background: #e8eef5 !important;
  color: #1e3a5f !important;
  font-weight: 600;
  padding: 10px 8px !important;
  border: 1px solid #cbd5e1 !important;
  text-align: center;
}
td {
  padding: 9px 8px !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155;
}
/* 仅无状态色的普通数据行给白底；有 bgcolor 的业务状态行原样保留 */
table[border="1"] tr:not([bgcolor]) td { background: #fff; }
table[border="1"] tr[bgcolor] td { background: transparent !important; }
table[border="1"] tr:hover td { filter: brightness(.97); }

/* ---------- 5. 表单：圆角输入框 / 聚焦描边 ---------- */
input[type="text"], input[type="password"], input[type="date"],
input:not([type]), select, textarea {
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  font-family: inherit;
  font-size: 14px;
  color: #334155;
  background: #fff;
  transition: border-color .18s, box-shadow .18s;
}
input[type="text"]:focus, input[type="password"]:focus,
input:not([type]):focus, select:focus, textarea:focus {
  border-color: #0ea5e9 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .15);
}
input[type="checkbox"], input[type="radio"] { accent-color: #1e3a5f; }

/* ---------- 6. 按钮 ---------- */
input[type="submit"], input[type="button"], button {
  background: #1e3a5f !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 6px !important;
  padding: 8px 18px !important;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .15);
  transition: background .18s, transform .1s;
}
input[type="submit"]:hover, input[type="button"]:hover, button:hover { background: #0ea5e9 !important; }
input[type="submit"]:active, input[type="button"]:active, button:active { transform: translateY(1px); }

/* ---------- 7. 分页链接 ---------- */
.page-link, .current-page {
  padding: 4px 10px !important;
  border-radius: 5px;
  background: #fff;
  border: 1px solid #e2e8f0;
  margin: 0 3px !important;
}
.page-link { color: #1e3a5f !important; }
.page-link:hover { background: #eaf2fb; }
.current-page { color: #fff !important; background: #1e3a5f !important; border-color: #1e3a5f; }

/* ---------- 8. 登录页卡片微调（不用深蓝按钮，保留原蓝更亲和） ---------- */
.login-form { border: 1px solid #cbd5e1 !important; box-shadow: 0 8px 24px rgba(15,23,42,.12) !important; }
.login-form button { background: #1e3a5f !important; }
.login-form button:hover { background: #0ea5e9 !important; }
