/* 供应链 ERP（GYL）· 新版简洁风格
   取色与结构对齐现有 ERP 新版首页：蓝色主色 + 深蓝侧栏 + 白卡片 + 4 列图标网格 */
:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff6ff;
  --sidebar-1: #0f2744;
  --sidebar-2: #1a3a5c;
  --text: #1f2d3d;
  --text-sub: #6b7a8d;
  --border: #e8eef6;
  --card-shadow: 0 2px 8px rgba(30, 70, 120, .08);
  --radius: 10px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body, #app { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  background: #f4f7fb;
}

/* ---------- 登录页 ---------- */
.login-wrap {
  height: 100vh; position: relative; overflow: hidden;
  background: #0f2744 url('/img/login-bg.jpg') center/cover no-repeat;
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 8%;
  background-attachment: fixed;
}
/* 深色微遮罩：增强画面层次，保证右侧登录卡片对比度 */
.login-wrap::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, rgba(10, 25, 50, .34) 0%, rgba(15, 35, 65, .16) 45%, rgba(10, 28, 55, .40) 100%);
}
/* 顶部浅蓝光带（商务感） */
.login-wrap::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(56, 120, 190, .6) 30%, rgba(56, 120, 190, .32) 50%, rgba(56, 120, 190, .6) 70%, transparent 100%);
}
/* 左侧：日期 / 星期 / 实时时钟（纯 DOM 更新，每秒刷新） */
.login-calendar {
  position: absolute; left: 7%; top: 50%; transform: translateY(-50%);
  color: #fff; z-index: 1; pointer-events: none;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .6);
}
.login-calendar .lc-date { font-size: 36px; font-weight: 600; letter-spacing: 2px; line-height: 1.35; }
.login-calendar .lc-week { font-size: 16px; opacity: .92; margin-top: 10px; letter-spacing: 8px; }
.login-calendar .lc-time { font-size: 56px; font-weight: 300; letter-spacing: 3px; margin-top: 16px;
  font-variant-numeric: tabular-nums; }
.login-calendar .lc-sub { font-size: 13px; opacity: .8; margin-top: 14px; letter-spacing: 2px; }
@media (max-width: 1200px) { .login-calendar { display: none; } }
@media (max-width: 900px) { .login-wrap { justify-content: center; padding-right: 0; } }
.login-box {
  width: 400px; background: rgba(255, 255, 255, .97); border-radius: 16px; padding: 42px 38px 32px;
  box-shadow: 0 20px 60px rgba(10, 30, 60, .35), 0 2px 8px rgba(0, 0, 0, .12);
  border: 1px solid rgba(255, 255, 255, .9); backdrop-filter: blur(12px); position: relative; z-index: 1;
  margin-left: auto;
}
.login-logo { text-align: center; margin-bottom: 10px; }
.login-logo img { width: 66px; height: 66px; border-radius: 16px; object-fit: cover; box-shadow: 0 4px 16px rgba(0, 0, 0, .12); }
.login-title { text-align: center; font-size: 21px; font-weight: 700; color: #14375c; letter-spacing: 1px; }
.login-sub { text-align: center; font-size: 12.5px; color: var(--text-sub); margin: 6px 0 26px; letter-spacing: 1px; }
.login-tip { text-align: center; font-size: 12px; color: #b3bcc9; margin-top: 16px; }

/* ---------- 主框架：顶部横向导航（不再用左侧菜单栏，内容区全宽） ---------- */
.topnav {
  display: flex; align-items: center; gap: 14px;
  height: 58px; padding: 0 18px; background: #fff;
  border-bottom: 1px solid var(--border); box-shadow: 0 1px 3px rgba(30, 70, 120, .05);
  position: relative; z-index: 10;
}
.topnav .brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.topnav .brand img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.topnav .brand span { font-size: 14px; font-weight: 600; color: #14375c; white-space: nowrap; letter-spacing: .5px; }
.topmenu.el-menu { flex: 1; min-width: 0; border-bottom: none !important; background: transparent; }
.topmenu .el-menu-item, .topmenu .el-sub-menu__title {
  height: 58px; line-height: 58px; font-size: 14px; color: #3d5069; padding: 0 14px;
}
.topmenu .el-menu-item:hover, .topmenu .el-sub-menu__title:hover { background: transparent; color: var(--brand); }
.topmenu .el-menu-item.is-active { color: var(--brand); font-weight: 600; }
.topmenu .el-menu-item.is-active::after,
.topmenu .el-sub-menu.is-active .el-sub-menu__title::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px;
  background: linear-gradient(90deg, #3b82f6, #2563eb); border-radius: 2px;
}
.topnav .userbar { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-sub); flex-shrink: 0; }
.icon-mask { display: inline-block; width: 17px; height: 17px; background: currentColor; flex-shrink: 0;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.menu-label { margin-left: 8px; }
@media (max-width: 1200px) { .topnav .brand span { display: none; } }

.page-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px 0; font-size: 15px; font-weight: 600; color: #14375c;
}
.layout-col { display: flex; flex-direction: column; height: 100%; }
.main { flex: 1; min-height: 0; padding: 14px 22px 30px; overflow-y: auto; }

/* ---------- 卡片 ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--card-shadow); padding: 16px 18px; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 600; color: #14375c; display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 12px; }
.card-title .cnt { font-size: 12px; font-weight: 400; color: var(--text-sub); }

/* ---------- 工作台 ---------- */
.todo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 10px; }
.todo-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 8px;
  background: #fafcff; border: 1px solid var(--border); cursor: pointer; transition: all .18s; min-height: 56px; }
.todo-item:hover { border-color: #bcd4f5; background: var(--brand-soft); transform: translateX(2px); }
.todo-item .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.todo-item.warn .dot { background: #f59e0b; } .todo-item.danger .dot { background: #ef4444; }
.todo-item.info .dot { background: #3b82f6; } .todo-item.empty .dot { background: #cbd5e1; }
.todo-item .txt { flex: 1; font-size: 13.5px; }
.todo-item .num { font-size: 16px; font-weight: 700; color: #14375c; }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--card-shadow);
  padding: 14px 16px; cursor: pointer; transition: all .18s; }
.kpi:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(30, 70, 120, .12); }
.kpi .t { font-size: 12.5px; color: var(--text-sub); }
.kpi .v { font-size: 24px; font-weight: 700; color: #14375c; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 12px; font-weight: 400; color: var(--text-sub); margin-left: 4px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.app-cell { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--card-shadow);
  padding: 18px 10px; text-align: center; cursor: pointer; transition: all .18s; }
.app-cell:hover { border-color: #bcd4f5; transform: translateY(-2px); }
.app-cell .ico { width: 38px; height: 38px; margin: 0 auto 10px; border-radius: 11px; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center; color: var(--brand); }
.app-cell .ico .icon-mask { width: 20px; height: 20px; }
.app-cell .nm { font-size: 13px; color: #14375c; }

/* ---------- 列表页 ---------- */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-bar .grow { flex: 1; }
.table-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--card-shadow); padding: 14px 16px 6px; }
.pager { display: flex; justify-content: flex-end; padding: 12px 0 10px; }
.empty-hint { color: var(--text-sub); font-size: 13px; padding: 26px 0; text-align: center; }

/* ---------- 业务详情：左右并列（不做页签） ---------- */
.split2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.sub-title { font-size: 13px; font-weight: 600; color: #14375c; margin-bottom: 8px; padding-left: 2px;
  border-left: 3px solid var(--brand); line-height: 1.2; }

/* ---------- 角色权限（左右并列，不用页签） ---------- */
.split { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.perm-group { margin-bottom: 14px; }
.perm-group h4 { font-size: 13px; color: #14375c; margin-bottom: 6px; padding-left: 2px;
  border-left: 3px solid var(--brand); line-height: 1.2; }
.perm-box { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-left: 8px; }

@media (max-width: 1200px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .todo-list { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
