/* ============================================================
   拓立外贸管理系统 · 全局主题层 v3（扁平极简风）
   主色：青绿 #009688（沿用系统既有强调色）
   原则：无渐变 / 无阴影 / 微圆角 / 细边框 / 高对比文字
   用法：所有页面 <head> 注入 <link rel="stylesheet" href="css/theme.css">
   ============================================================ */

/* ---------- 全局字体与页面底色 ---------- */
html, body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body {
  color: #333;
  background: #f4f5f7;
  min-height: 100vh;
}

/* ---------- 表格：白底细边框，浅灰表头 ---------- */
.layui-table-view {
  border: 1px solid #e6e8eb;
  border-radius: 2px;
  background: #fff;
}
.layui-table-header { background: transparent !important; }
.layui-table-view .layui-table thead tr,
.layui-table-view table.layui-table thead tr {
  background: #f7f8fa !important;
  background-color: #f7f8fa !important;
  color: #333 !important;
}
.layui-table-view .layui-table thead tr th,
.layui-table-view table.layui-table thead tr th {
  color: #333 !important;
  font-weight: 600 !important;
  border-color: #e6e8eb !important;
}
.layui-table thead th { text-shadow: none; }
.layui-table thead th .layui-table-cell { font-size: 12.5px; letter-spacing: 0.3px; }
.layui-table tbody tr:hover { background-color: #f5f7f9 !important; }
.layui-table tbody tr.layui-table-hover { background-color: #f5f7f9 !important; }
.layui-table td, .layui-table th { border-color: #eef0f2 !important; }
.layui-table-total {
  background: #f7f8fa !important;
  color: #333 !important;
  font-weight: 600;
}
.layui-table-cell { line-height: 24px; }
.layui-table-mend { background: transparent !important; }

/* ---------- 按钮：纯色 / 无阴影 / 微圆角 ---------- */
.layui-btn, button.layui-btn, .dayou_button_tool, .dayou_button_tool_delete,
.layui-btn-sm, .layui-btn-xs {
  border-radius: 2px !important;
  transition: background-color .15s ease, color .15s ease;
  box-shadow: none !important;
  font-weight: 500;
}
.layui-btn:hover, .dayou_button_tool:hover {
  box-shadow: none;
  transform: none;
  filter: brightness(0.96);
}
.dayou_button_tool {
  border-radius: 2px !important;
  background: #009688 !important;
  border: none !important;
  color: #fff !important;
}
.dayou_button_tool_delete, .dayou_button_tool_danger, .dayou_button_tool_red {
  background: #e05c5c !important;
  border: none !important;
  color: #fff !important;
}
/* 查询/重置按钮色（沿用既有规范） */
button.layui-btn[style*="60b879"], #search_data { background: #60b879 !important; border:none !important; color:#fff !important; }
button.layui-btn[style*="e2e2e2"], #search_refresh { background: #ececec !important; color:#333 !important; border:none !important; }
button.layui-btn[style*="57a8e8"] { background: #57a8e8 !important; border:none !important; color:#fff !important; }
button.layui-btn[style*="5b9dbd"] { background: #5b9dbd !important; border:none !important; color:#fff !important; }
button.layui-btn[style*="de4545"] { background: #e05c5c !important; border:none !important; color:#fff !important; }
button.layui-btn[style*="009688"], #saveBtn, button[style*="009688"] {
  background: #009688 !important; border:none !important; color:#fff !important;
}
/* 通用 icon 链接按钮 */
.fa-print, .fa-file-pdf-o, .fa-arrow-circle-down { cursor: pointer; }

/* ---------- 输入框 / 选择框：无圆角光晕 ---------- */
.layui-input, .layui-textarea, .layui-select {
  border-radius: 2px !important;
  border-color: #d9dde1 !important;
  transition: border-color .15s ease;
  background: #fff;
}
.layui-input:focus, .layui-textarea:focus, .layui-select:focus {
  border-color: #009688 !important;
  box-shadow: none;
}
.layui-form-select dl { border-radius: 2px; padding: 2px; }
.layui-form-select dl dd:hover { background: #eef4f3 !important; }
.layui-form-select dl dd.layui-this { background: #009688 !important; }

/* ---------- 分页 ---------- */
.layui-laypage a, .layui-laypage span {
  border-radius: 2px !important;
  margin: 0 2px;
  border: 1px solid #e6e8eb !important;
  background: #fff !important;
}
.layui-laypage .layui-laypage-curr .layui-laypage-em { background-color: #009688 !important; border-radius: 2px; }

/* ---------- 弹窗：无阴影大圆角 ---------- */
.layui-layer {
  border-radius: 2px !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12) !important;
  overflow: hidden;
}
.layui-layer-title {
  background: #009688 !important;
  color: #fff !important;
  border-radius: 0 !important;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.layui-layer-btn a { border-radius: 2px !important; }
.layui-layer-setwin a { color: #fff !important; opacity: .9; }

/* ---------- 提示 / 状态徽章 ---------- */
.layui-tag, .layui-badge { border-radius: 2px !important; padding: 0 6px; }
.layui-badge-rim { border-color: #d9dde1 !important; color: #3c6b55 !important; }
/* 状态点 */
.dot-green, .dot-red, .dot-orange, .dot-blue, .dot-gray {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle;
}
.dot-green { background: #5fb878; } .dot-red { background: #ff5722; }
.dot-orange { background: #ff8c00; } .dot-blue { background: #5b9dbd; } .dot-gray { background: #b5bfb8; }

/* ---------- 统计卡（详情增强通用）：白底细边框，左侧纯色条 ---------- */
.stat-cards { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 16px 4px; }
.stat-card {
  flex: 1 1 150px; min-width: 140px; background: #fff !important; border-radius: 2px;
  border: 1px solid #e6e8eb; box-shadow: none !important;
  padding: 12px 14px; box-sizing: border-box; position: relative; overflow: hidden;
}
.stat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: #009688;
}
.stat-card .st-label { font-size: 12px; color: #77867d; margin-bottom: 4px; }
.stat-card .st-value { font-size: 20px; font-weight: 700; color: #1f3a2c; line-height: 1.2; }
.stat-card .st-value small { font-size: 12px; font-weight: 400; color: #8a978f; }
.stat-card.st-green::before { background: #5fb878; }
.stat-card.st-red::before { background: #ff5722; }
.stat-card.st-blue::before { background: #5b9dbd; }
.stat-card.st-orange::before { background: #ff8c00; }
/* dashboard 页彩色渐变统计卡 → 扁平覆盖 */
.stat-card > div, .stat-card .icon { text-shadow: none !important; }
.stat-card .icon { color: rgba(0,0,0,0.18) !important; }

/* ---------- 查询条：白底细边框 ---------- */
#searchdiv, .layui-form[action="custom_save"] {
  border-radius: 2px;
  background: #fff !important;
  box-shadow: none !important;
  border: 1px solid #e6e8eb;
}

/* ---------- 表单区域 ---------- */
.layui-form-label { color: #46554c; font-weight: 500; }
.layui-form-onswitch { border-color: #009688 !important; background-color: #009688 !important; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f4f5f7; }
::-webkit-scrollbar-thumb { background: #c3c8ce; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #9CAF88; }

/* ---------- 日期面板 ---------- */
.laydate-main-list-0 .laydate-day-today, .laydate-main-list-1 .laydate-day-today { color: #009688 !important; font-weight: 700; }
.laydate-day-selected { background-color: #009688 !important; }
.layui-laydate { border-radius: 2px; }

/* ---------- 侧边导航（index）：浅色扁平 + 树状层级 ---------- */
/* 锁死菜单栏：固定定位不随滚动，宽度恒定 */
.layui-side {
  position: fixed !important;
  top: 60px; left: 0; bottom: 0;
  z-index: 999;
}
.layui-side .layui-side-scroll { width: 168px !important; }
.layui-side .layui-nav {
  background: #fff !important;
  border-right: 1px solid #e6e8eb;
  width: 168px !important;
}
/* 主菜单：加粗、大字号、绿色图标，紧凑行距（一屏放完） */
.layui-side .layui-nav .layui-nav-item > a {
  border-radius: 0; margin: 0;
  font-size: 15px; font-weight: 600; color: #333;
  padding: 0 12px !important;
  line-height: 48px !important;
  height: 48px !important;
}
.layui-side .layui-nav .layui-nav-item > a .dayou_left_icon,
.layui-side .layui-nav .layui-nav-item > a .fa {
  width: 18px; text-align: center; margin-right: 6px;
  color: #009688; font-size: 14px;
}
.layui-side .layui-nav .layui-nav-item a:hover { background: #f0f5f4 !important; color: #009688 !important; }
.layui-side .layui-nav .layui-nav-item > a:hover, .layui-side .layui-nav .layui-nav-child a:hover { background: #f0f5f4 !important; color: #009688 !important; }
.layui-side .layui-nav .layui-nav-itemed > a { background: #f0f5f4 !important; color: #009688 !important; }
/* 子菜单：更深缩进 + 小字号浅色，形成树状分级 */
.layui-side .layui-nav .layui-nav-child { background: #fff !important; padding: 2px 0 4px; }
.layui-side .layui-nav .layui-nav-child a {
  color: #333; font-size: 14px; font-weight: 500;
  padding: 5px 0 5px 40px; line-height: 20px;
}
.layui-side .layui-nav .layui-nav-child a .dayou_left_icon_child,
.layui-side .layui-nav .layui-nav-child a .fa {
  width: 12px; margin-right: 5px; font-size: 13px; color: #009688;
}
.layui-side .layui-nav .layui-nav-child .layui-this { background: transparent !important; border-radius: 0; }
/* 子菜单选中项（layui-this 加在 a 上，index openTab 逻辑） */
.layui-side .layui-nav .layui-nav-child a.layui-this,
.layui-side .layui-nav .layui-nav-child dd.layui-this > a {
  background: #e6f2f0 !important;
  color: #009688 !important;
  font-weight: 600;
  border-left: 3px solid #009688;
}
.layui-side .layui-nav .layui-nav-child dd a:hover { background: #f5f8f7 !important; color: #009688 !important; }
/* 展开的父级菜单项高亮 */
.layui-side .layui-nav .layui-nav-tree .layui-nav-itemed > a {
  background: #f0f5f4 !important;
  color: #009688 !important;
}
.layui-side .layui-nav .layui-nav-item a::after { display: none !important; }
/* 父级箭头隐藏、当前项高亮条 */
.layui-side .layui-nav .layui-nav-item .layui-nav-more { display: none !important; }
.layui-side .layui-nav .layui-this > a { color: #009688 !important; font-weight: 600; }

/* ---------- 顶部标签页（index 工作区） ---------- */
.layui-tab-title { background: #fff !important; border-bottom: 1px solid #e6e8eb !important; }
.layui-tab-title li { border-radius: 0; }
.layui-tab-title .layui-this { color: #009688 !important; font-weight: 600; }
.layui-tab-title .layui-this::after { border-bottom-color: #009688; }

/* ---------- 页面标题 ---------- */
.dayou-title { color: #333; font-weight: 600; }
.dayou-page-box .dayou-title i { color: #009688 !important; }

/* ---------- 头部（index 顶栏）：固定 + 紧凑 ---------- */
.layui-header {
  border-bottom: 1px solid #e6e8eb !important;
  position: fixed !important;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 60px !important;
  box-sizing: border-box;
}
/* 顶栏右侧功能项紧凑排版 */
.layui-header .layui-nav { height: 60px; line-height: 60px; }
.layui-header .layui-nav .layui-nav-item { line-height: 60px; }
.layui-header .layui-nav .layui-nav-item > a { padding: 0 10px !important; }
.layui-header .layui-nav .layui-nav-item > a .fa { margin-right: 4px; }
.layui-header .layui-nav .layui-nav-child { top: 60px !important; }
/* 手机/窄屏：标题紧凑 + 隐藏刷新，保证一行放下 */
@media screen and (max-width: 768px){
  #indexp { font-size: 17px !important; padding: 0 10px !important; }
  .layui-header .layui-nav .layui-nav-item > a { padding: 0 7px !important; font-size: 13px; }
  .layui-header .layui-nav-item:first-child { display: none; } /* 隐藏刷新 */
}

/* ---------- 小屏适配 ---------- */
@media screen and (max-width: 1450px){
  .layui-btn, .layui-btn-sm { font-size: 12px !important; }
}
