/* ===== 大冻货采购登记系统 · 视觉设计 =====
   风格：专业财务后台 · 深色侧边栏 + 浅灰内容区 · 蓝色点缀
   原则：低饱和、统一圆角(10px)、柔和阴影、无emoji */

* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 登录页 ---------- */
.login-wrap {
  height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #1e40af 100%);
  position: relative; overflow: hidden;
}
.login-wrap::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(59,130,246,.15), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(96,165,250,.12), transparent 45%);
  pointer-events: none;
}
.login-card {
  width: 400px; padding: 42px 38px 36px; background: rgba(255,255,255,.98);
  border-radius: 16px; box-shadow: 0 24px 64px rgba(0,0,0,.28);
  position: relative; z-index: 1; backdrop-filter: blur(8px);
}
.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.login-brand .lb-icon { width: 34px; height: 34px; color: #2563eb; }
.login-card h2 { margin: 0; color: #0f172a; text-align: center; font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.login-card .sub { text-align: center; color: #64748b; font-size: 13px; margin: 8px 0 28px; }
.login-card .el-input__wrapper { border-radius: 10px; padding: 4px 12px; box-shadow: 0 0 0 1px #e2e8f0 inset; }
.login-card .el-input__wrapper.is-focus { box-shadow: 0 0 0 1px #3b82f6 inset, 0 0 0 3px rgba(59,130,246,.12); }
.login-card .el-button { width: 100%; margin-top: 8px; height: 42px; border-radius: 10px; font-size: 15px; font-weight: 600; }

/* ---------- 布局 ---------- */
.layout { display: flex; height: 100%; }

/* 侧边栏 */
.sidebar {
  width: 220px; background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #94a3b8; display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar .logo {
  padding: 20px 18px 18px; font-size: 15px; font-weight: 700; color: #fff;
  border-bottom: 1px solid rgba(148,163,184,.12); letter-spacing: .5px;
  display: flex; align-items: center; gap: 10px;
}
.logo-icon { width: 26px; height: 26px; color: #60a5fa; flex-shrink: 0; }
.menu-scroll { flex: 1; overflow-y: auto; padding: 12px 10px; }
.menu-scroll::-webkit-scrollbar-thumb { background: rgba(148,163,184,.25); }
.menu-group { padding: 14px 14px 6px; font-size: 11px; color: #475569; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }
.menu-item {
  padding: 11px 14px; cursor: pointer; font-size: 14px; display: flex; align-items: center;
  gap: 11px; transition: all .18s ease; border-radius: 8px; margin-bottom: 2px; color: #cbd5e1;
}
.menu-item:hover { background: rgba(148,163,184,.10); color: #fff; }
.menu-item.active { background: #2563eb; color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.35); }
.menu-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: .9; }

/* 主区 */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #f1f5f9; }
.topbar {
  height: 56px; background: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; box-shadow: 0 1px 3px rgba(15,23,42,.06); flex-shrink: 0;
  border-bottom: 1px solid #e2e8f0;
}
.topbar .title { font-size: 16px; font-weight: 600; color: #0f172a; display: flex; align-items: center; gap: 10px; }
.topbar .title::before { content: ''; width: 3px; height: 18px; background: #2563eb; border-radius: 2px; }
.topbar .right { display: flex; align-items: center; gap: 16px; color: #475569; font-size: 14px; }
.topbar .right .user-name { color: #1e293b; font-weight: 500; }
.content { flex: 1; overflow-y: auto; padding: 20px 24px; }

/* ---------- 看板 KPI ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.kpi-card {
  background: #fff; border-radius: 12px; padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(15,23,42,.05), 0 1px 2px rgba(15,23,42,.04);
  border: 1px solid #e2e8f0; border-left: 4px solid #2563eb;
  transition: transform .18s ease, box-shadow .18s ease;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,23,42,.08); }
.kpi-card .label { font-size: 13px; color: #64748b; font-weight: 500; }
.kpi-card .value { font-size: 26px; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi-card .value.blue { color: #2563eb; } .kpi-card .value.green { color: #16a34a; }
.kpi-card .value.orange { color: #ea580c; } .kpi-card .value.red { color: #dc2626; }
.kpi-card .extra { font-size: 12px; color: #94a3b8; margin-top: 6px; }

/* ---------- 图表卡片 / 通用卡片 ---------- */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.chart-card, .table-card {
  background: #fff; border-radius: 12px; padding: 18px;
  box-shadow: 0 1px 3px rgba(15,23,42,.05); border: 1px solid #e2e8f0;
}
.chart-card h4 { margin: 0 0 12px; font-size: 14px; color: #0f172a; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.chart-card h4::before { content: ''; width: 4px; height: 14px; background: #2563eb; border-radius: 2px; }
.chart { width: 100%; height: 300px; }
.alert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* ---------- 列表页 ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .el-input__wrapper, .toolbar .el-select__wrapper { border-radius: 8px; }
.pager { display: flex; justify-content: flex-end; margin-top: 14px; }
.money { font-variant-numeric: tabular-nums; }
.text-red { color: #dc2626; font-weight: 600; }
.text-orange { color: #ea580c; font-weight: 600; }
.text-green { color: #16a34a; }
.tag-warn { background: #fff7ed; color: #ea580c; border-color: #fed7aa; }

/* Element Plus 表格圆角收敛 */
.table-card .el-table { border-radius: 8px; overflow: hidden; }
.table-card .el-table th.el-table__cell { background: #f8fafc; color: #475569; font-weight: 600; }

/* 按钮圆角统一 */
.el-button { border-radius: 8px; }
.el-button--primary { background: #2563eb; border-color: #2563eb; }
.el-button--primary:hover { background: #1d4ed8; border-color: #1d4ed8; }

/* ---------- 附件 / 对账单 ---------- */
.upload-tip { font-size: 12px; color: #94a3b8; margin-top: 6px; }
.statement-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .statement-summary { grid-template-columns: repeat(2, 1fr); }
}
