:root {
  --sidebar-w: 220px;
  --top-h: 56px;
  --c-bg: #f5f7fa;
  --c-side: #ffffff;
  --c-side-text: #64748b;
  --c-side-text-strong: #1a2331;
  --c-side-hover: #f1f5f9;
  --c-side-active-bg: #eef2ff;
  --c-side-border: #ebeef5;
  --c-accent: #4a88ed;
  --c-accent-2: #6c63ff;
  --c-ok: #059669;
  --c-ok-bg: #ecfdf5;
  --c-warn: #ff9800;
  --c-warn-bg: #fff7ed;
  --c-axis: #a3aed0;
  --c-grid: #f2f4f7;
  --c-ink: #1a2331;
}

body.console-body {
  margin: 0;
  background: var(--c-bg);
  min-height: 100vh;
}

.console-app {
  display: flex;
  min-height: 100vh;
}

.console-side {
  width: var(--sidebar-w);
  background: var(--c-side);
  color: var(--c-side-text);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
  border-right: 1px solid var(--c-side-border);
}

.console-brand {
  padding: 18px 16px 12px;
  border-bottom: 1px solid var(--c-side-border);
}
.console-brand .name {
  color: var(--c-side-text-strong);
  font-weight: 700;
  font-size: 1.05rem;
}
.console-brand .sub {
  font-size: 0.75rem;
  margin-top: 4px;
  color: var(--c-side-text);
  opacity: 1;
}

.console-nav {
  flex: 1;
  overflow: auto;
  padding: 10px 8px;
}
.console-nav a {
  display: block;
  color: var(--c-side-text);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 2px;
  font-size: 0.92rem;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.console-nav a:hover {
  background: var(--c-side-hover);
  color: var(--c-side-text-strong);
}
.console-nav a.active {
  background: var(--c-side-active-bg);
  color: var(--c-accent);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--c-accent);
}
.console-nav .nav-group {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 12px 6px;
  color: #94a3b8;
  opacity: 1;
}

.console-side-foot {
  padding: 12px 14px 16px;
  border-top: 1px solid var(--c-side-border);
  font-size: 0.82rem;
}
.console-side-foot a {
  color: var(--c-accent);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 6px;
}
.console-side-foot a:hover {
  text-decoration: underline;
}
.console-side-foot .meta {
  color: var(--c-side-text);
  opacity: 0.85;
  font-size: 0.75rem;
}

.console-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.console-top {
  height: var(--top-h);
  background: #fff;
  border-bottom: 1px solid var(--border, #e4e7ec);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.console-top .title { font-weight: 700; font-size: 1rem; }
.console-top .right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted, #667085);
}

/*
 * CSS Cascade Layers（低 → 高）
 * poqs.shell  = 壳层（侧栏/内容区内边距）
 * poqs.saas   = 首页/通用 SaaS 组件
 * poqs.pages  = 页面级覆盖（报表紧凑等）
 */
@layer poqs.shell, poqs.saas, poqs.pages;

@layer poqs.shell {
.console-content {
  padding: 24px;
  max-width: 1280px;
}
.console-content .card { margin-bottom: 20px; }
}

/* ---- 首页 SaaS 看板 ---- */
@layer poqs.saas {
.home-meta {
  color: var(--muted, #6b7280);
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.home-link {
  color: var(--c-accent, #4a88ed);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.home-link:hover { text-decoration: underline; }

.dept-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.dept-mini {
  background: #f9fafb;
  border: 1px solid #ebeef5;
  border-radius: 12px;
  padding: 12px 14px;
}
.dept-mini-name {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}
.dept-mini-num {
  font-size: 22px;
  font-weight: 700;
  color: #1a2331;
}
.dept-mini-num span {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
}
.dept-mini-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.kpi-card {
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease;
}
.kpi-card:hover {
  border-color: #e2e8f0;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
  transform: translateY(-1px);
}

@keyframes poqs-rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.motion-in .kpi-card,
.motion-in .saas-card {
  animation: poqs-rise-in 0.55s ease-out both;
}
.motion-in .kpi-card:nth-child(1) { animation-delay: 0.02s; }
.motion-in .kpi-card:nth-child(2) { animation-delay: 0.08s; }
.motion-in .kpi-card:nth-child(3) { animation-delay: 0.14s; }
.motion-in .kpi-card:nth-child(4) { animation-delay: 0.2s; }
.motion-in.home-charts .saas-card:nth-child(1) { animation-delay: 0.06s; }
.motion-in.home-charts .saas-card:nth-child(2) { animation-delay: 0.14s; }

@media (prefers-reduced-motion: reduce) {
  .motion-in .kpi-card,
  .motion-in .saas-card {
    animation: none !important;
  }
}

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kpi-icon svg { width: 18px; height: 18px; }
.kpi-icon.blue { background: #eef2ff; color: var(--c-accent); }
.kpi-icon.green { background: var(--c-ok-bg); color: var(--c-ok); }
.kpi-icon.orange { background: var(--c-warn-bg); color: var(--c-warn); }
.kpi-icon.purple { background: #f3e8ff; color: var(--c-accent-2); }
.kpi-body { min-width: 0; flex: 1; }
.kpi-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.kpi-num {
  font-size: 28px;
  font-weight: 700;
  color: #1a2331;
  line-height: 1.15;
}
.kpi-trend {
  font-size: 11px;
  font-weight: 600;
}
.kpi-trend.up { color: #059669; }
.kpi-trend.down { color: #dc2626; }
.kpi-trend.flat { color: #6b7280; }
.kpi-trend.info { color: #4a88ed; }
.kpi-label {
  margin-top: 6px;
  font-size: 13px;
  color: #6b7280;
}

.home-charts {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.saas-card {
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 18px 20px;
  transition: box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease;
}
.saas-card:hover {
  border-color: #e2e8f0;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
  transform: translateY(-1px);
}
.saas-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.saas-card-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-ink);
  letter-spacing: 0.01em;
}
.saas-more {
  color: var(--c-axis);
  font-size: 16px;
  line-height: 1;
  letter-spacing: 1px;
  user-select: none;
  opacity: 0.85;
}
.saas-card canvas {
  width: 100%;
  display: block;
}

.home-table-card { margin-bottom: 20px; }
.home-table-card .saas-card-head { margin-bottom: 14px; }

.saas-table {
  width: 100%;
  border-collapse: collapse;
}
.saas-table th {
  background: #f9fafb;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid #ebeef5;
}
.saas-table td {
  height: 64px;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid #ebeef5;
  vertical-align: middle;
  font-size: 14px;
  color: #1a2331;
}
.saas-table tr:last-child td { border-bottom: none; }
.saas-table tbody tr:hover { background: #fafbfd; }

.person-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.progress-cell {
  min-width: 110px;
}
.progress-track {
  height: 8px;
  background: #f2f4f7;
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #6c63ff, #4a88ed);
}
.progress-txt {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  white-space:nowrap;
}
.pill.ok { background: #ecfdf5; color: #047857; }
.pill.warn { background: #fffbeb; color: #b45309; }
.pill.bad { background: #fef2f2; color: #b91c1c; }
.pill.muted { background: #f3f4f6; color: #6b7280; }

.home-alerts {
  margin-bottom: 20px;
  border-color: #fecaca;
  background: #fff5f5;
}
.home-alerts ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #7f1d1d;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .home-charts { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .kpi-grid { grid-template-columns: 1fr; }
}
} /* end @layer poqs.saas */

/* ---- 一页主数据版式（职务/部门/角色说明） ---- */
.page-one {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: calc(100vh - var(--top-h) - 48px);
}
.page-one-card {
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.page-one-card .saas-card-head {
  margin-bottom: 14px;
}
.page-one-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.page-one-form {
  display: grid;
  grid-template-columns: 2fr 100px auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  margin-bottom: 14px;
  background: #f9fafb;
  border: 1px solid #ebeef5;
  border-radius: 12px;
}
.page-one-form.depts {
  grid-template-columns: 1.6fr 1.2fr 90px 1.4fr auto;
}
.page-one-form label {
  margin-bottom: 4px;
}
.page-one-form input,
.page-one-form select {
  margin: 0;
  width: 100%;
}
.page-one-form .form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.page-one-body {
  flex: 1;
  overflow: auto;
  min-height: 200px;
}
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.role-card {
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.role-card h3 {
  margin: 0;
  font-size: 16px;
  color: #1a2331;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.role-card .meta { margin: 0; }
.role-card ul {
  margin: 4px 0 0;
  padding-left: 18px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .page-one-form,
  .page-one-form.depts {
    grid-template-columns: 1fr 1fr;
  }
  .page-one-form .form-actions { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .page-one-form,
  .page-one-form.depts {
    grid-template-columns: 1fr;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  align-items: end;
}
.form-grid .span2 { grid-column: span 2; }
.form-grid .span3 { grid-column: span 3; }

.chip {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: var(--muted, #667085);
}
.chip.pass { background: #e6f4ea; color: var(--ok, #1b7f4a); }
.chip.off { background: #fce8e6; color: var(--bad, #c62828); }
.chip.role { background: #e8f1fb; color: var(--c-accent); }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions .btn { padding: 4px 10px; font-size: 0.8rem; }

.perm-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.perm-card {
  background: #fff;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 12px;
  padding: 12px 14px;
}
.perm-card h3 { margin: 0 0 6px; font-size: 0.95rem; }
.perm-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted, #667085);
  font-size: 0.85rem;
}

.charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.chart-card canvas { width: 100%; height: 200px; display: block; }
.chart-title { font-size: 0.85rem; color: var(--muted, #667085); margin-bottom: 8px; }

.side-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

td.rate-warn {
  color: var(--bad, #c62828);
  font-weight: 700;
}

/* ---- 报表页：B端紧凑（页面层覆盖组件层） ---- */
@layer poqs.pages {
.console-content:has(.page-reports) {
  padding: 16px;
  max-width: 1280px;
}
.page-reports {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.page-reports .home-meta {
  margin-bottom: 0;
}
.page-reports .saas-card {
  padding: 16px;
  margin-bottom: 0;
}
.page-reports .home-table-card {
  margin-bottom: 0;
}
.page-reports .kpi-grid {
  gap: 16px;
  margin-bottom: 0;
}
.page-reports .home-charts {
  gap: 16px;
  margin-bottom: 0;
}
.page-reports .home-charts.reports-charts-split {
  grid-template-columns: 1fr 1.2fr;
}
.page-reports .reports-table-wrap {
  overflow: auto;
}
/* 筛选卡整体抬高层级，避免人员下拉被下方 KPI 卡片盖住 */
.page-reports .reports-filter {
  position: relative;
  z-index: 30;
  overflow: visible;
}
.page-reports .reports-filter .saas-card-head {
  margin-bottom: 8px;
}
.page-reports .kpi-grid {
  position: relative;
  z-index: 1;
}
.page-reports .reports-filter .rf-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.page-reports .reports-filter .rf-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px 10px;
}
.page-reports .reports-filter .rf-row-export {
  padding-top: 8px;
  border-top: 1px solid #eef2f7;
}
.page-reports .reports-filter .rf-pair {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.page-reports .reports-filter .rf-controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
}
.page-reports .reports-filter .rf-field {
  display: flex;
  flex-direction: column;
  min-width: 118px;
}
.page-reports .reports-filter .rf-field-grow {
  flex: 1 1 160px;
  min-width: 150px;
}
.page-reports .reports-filter .rf-field-action {
  min-width: auto;
  flex: 0 0 auto;
}
.page-reports .reports-filter label {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 3px;
  display: block;
  line-height: 1.2;
  min-height: 14px;
}
.page-reports .reports-filter .rf-label-spacer {
  visibility: hidden;
  user-select: none;
}
.page-reports .reports-filter .rf-hint {
  margin: 0;
  flex: 1 1 180px;
  align-self: end;
  padding-bottom: 10px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.35;
}

/* 查货人搜索选择 */
.person-pick {
  position: relative;
  z-index: 40;
  min-width: 180px;
}
.person-pick-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.person-pick-row input[type="search"] {
  flex: 1;
  min-width: 0;
}
.person-pick-clear {
  flex-shrink: 0;
  padding: 0 10px !important;
  min-height: 38px;
  font-size: 12px !important;
}
.person-pick-drop {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 50;
  max-height: 260px;
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}
.person-pick-drop.hidden {
  display: none;
}
.person-pick-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #111827;
}
.person-pick-item:hover,
.person-pick-item:focus {
  background: #f3f4f6;
  outline: none;
}
.person-pick-item .sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
}
.person-pick-empty {
  padding: 12px;
  font-size: 12px;
  color: #6b7280;
}
.person-link {
  border: 0;
  background: none;
  padding: 0;
  color: #1769aa;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.person-link:hover {
  text-decoration: underline;
}

/* 个人明细抽屉 */
.person-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.35);
}
.person-drawer.hidden {
  display: none;
}
.person-drawer-panel {
  width: min(440px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 28px rgba(15, 23, 42, 0.15);
  display: flex;
  flex-direction: column;
  animation: personDrawerIn 0.2s ease;
}
@keyframes personDrawerIn {
  from { transform: translateX(16px); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}
.person-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #eef2f7;
}
.person-drawer-head h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}
.person-drawer-head .meta {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
}
.person-drawer-body {
  flex: 1;
  overflow: auto;
  padding: 14px 18px 24px;
}
.person-drawer-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.person-drawer-kpi {
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px 12px;
}
.person-drawer-kpi .n {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
}
.person-drawer-kpi .l {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}
.person-drawer-body h4 {
  margin: 14px 0 8px;
  font-size: 13px;
  color: #374151;
}
.person-drawer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.person-drawer-item {
  border: 1px solid #eef2f7;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}
.person-drawer-item .row1 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.person-drawer-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.page-reports .reports-filter .meta {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #6b7280;
  white-space: normal;
  overflow-wrap: anywhere;
}
.page-reports .reports-filter .saas-card-head h3 {
  font-size: 15px;
}
.page-reports .reports-filter .btn {
  font-size: 13px;
  border-radius: 8px;
}
.page-reports .kpi-card {
  padding: 12px 16px;
  max-height: 80px;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
}
.page-reports .kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.page-reports .kpi-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.page-reports .kpi-top {
  gap: 6px;
}
.page-reports .kpi-num {
  font-size: 24px;
  line-height: 1.1;
}
.page-reports .kpi-label {
  margin-top: 0;
  font-size: 12px;
  line-height: 1.2;
}
.page-reports .kpi-trend {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 12px;
}
.page-reports .kpi-trend:empty {
  display: none;
}
.page-reports .saas-card-head {
  margin-bottom: 8px;
}
.page-reports .saas-card-head h3 {
  font-size: 15px;
}
.page-reports .saas-card canvas {
  width: 100%;
}
.page-reports .saas-table th {
  padding: 8px 12px;
  font-size: 12px;
}
.page-reports .saas-table td {
  height: 48px;
  padding: 8px 12px;
  font-size: 13px;
}
.page-reports .avatar {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .page-reports .home-charts.reports-charts-split {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 860px) {
  .console-content:has(.page-reports) {
    padding: 12px;
  }
}
} /* end @layer poqs.pages */

/* 报表筛选：小屏时导出行拆行，仍保持「控件+按钮」成对 */
@media (max-width: 860px) {
  .page-reports .reports-filter .rf-pair {
    flex: 1 1 100%;
  }
  .page-reports .reports-filter .rf-controls {
    width: 100%;
  }
  .page-reports .reports-filter .rf-hint {
    flex-basis: 100%;
    align-self: start;
    padding-bottom: 0;
  }
}

/*
 * 必须放在 @layer 外：app.css 的 .btn padding 未分层，会压过 layer 内高度，
 * 导致导出按钮比月份/周次输入框更高、看起来“不平”，并裁切框内文字。
 */
.page-reports .reports-filter input,
.page-reports .reports-filter select {
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.25;
  border-radius: 8px;
  margin: 0;
  box-sizing: border-box;
  width: 100%;
  vertical-align: middle;
}
.page-reports .reports-filter select {
  padding-top: 8px;
  padding-bottom: 8px;
  line-height: normal;
}
.page-reports .reports-filter .rf-controls input,
.page-reports .reports-filter .rf-controls select {
  width: auto;
  min-width: 148px;
  flex: 1 1 auto;
}
.page-reports .reports-filter .rf-field-action .btn,
.page-reports .reports-filter .rf-controls .btn {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 14px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  white-space: nowrap;
  border-radius: 8px;
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: 0;
}

@media (max-width: 860px) {
  .console-side {
    position: fixed;
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  .console-app.side-open .console-side { transform: translateX(0); }
  .side-toggle { display: inline-block; }
  .form-grid .span2, .form-grid .span3 { grid-column: span 1; }
}

@layer poqs.shell {
@media (max-width: 860px) {
  .console-content { padding: 12px; }
}
}

/* 系统「减少动态效果」时关闭位移，保留颜色过渡可省略 */
@media (prefers-reduced-motion: reduce) {
  .console-nav a,
  .kpi-card,
  .saas-card {
    transition: none;
  }
  .kpi-card:hover,
  .saas-card:hover {
    transform: none;
  }
}

/*
 * 基础设置页紧凑外观（对齐报表「筛选与导出」密度）
 * 放在 @layer 外，避免被 app.css 未分层 .btn 撑大。
 */
.page-admin {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.page-admin .admin-card {
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  padding: 12px 14px;
}
.page-admin .admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.page-admin .admin-card-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #1a2331;
}
.page-admin .admin-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}
.page-admin .admin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px 10px;
}
.page-admin .admin-field {
  display: flex;
  flex-direction: column;
  min-width: 110px;
  flex: 1 1 120px;
}
.page-admin .admin-field-sm {
  flex: 0 1 110px;
  min-width: 96px;
}
.page-admin .admin-field-grow {
  flex: 1 1 180px;
  min-width: 150px;
}
.page-admin .admin-field-action {
  flex: 0 0 auto;
  min-width: auto;
}
.page-admin .admin-field-check {
  flex: 0 1 auto;
  min-width: auto;
  justify-content: flex-end;
  padding-bottom: 8px;
}
.page-admin .admin-field-check label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  height: 40px;
}
.page-admin label {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 3px;
  display: block;
  line-height: 1.2;
  min-height: 14px;
}
.page-admin input:not([type="checkbox"]):not([type="radio"]),
.page-admin select {
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.25;
  border-radius: 8px;
  margin: 0;
  box-sizing: border-box;
  width: 100%;
}
.page-admin select {
  line-height: normal;
}
.page-admin .admin-field-action .btn,
.page-admin .admin-row .btn {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 14px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  border-radius: 8px;
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  margin: 0;
}
.page-admin .admin-list-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.page-admin .admin-list-bar h3 {
  margin: 0;
  font-size: 15px;
}
.page-admin .admin-list-bar input[type="search"],
.page-admin .admin-list-bar input:not([type]) {
  max-width: 240px;
  flex: 1 1 180px;
}
.page-admin .admin-table-wrap {
  overflow: auto;
}
.page-admin .admin-table-wrap table {
  font-size: 13px;
}
.page-admin .admin-table-wrap th {
  padding: 8px 10px;
  font-size: 12px;
}
.page-admin .admin-table-wrap td {
  padding: 8px 10px;
}
.page-admin .row-actions .btn {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
}
.page-admin .role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.page-admin .role-card {
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  gap: 6px;
}
.page-admin .role-card h3 {
  font-size: 14px;
}
.page-admin .role-card ul {
  font-size: 12px;
  line-height: 1.45;
  margin: 2px 0 0;
}
.page-admin .perm-role {
  margin-bottom: 0;
}
.page-admin .perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px 10px;
  margin-top: 8px;
}
.page-admin .perm-grid .remember-row {
  margin: 0;
  font-size: 12px;
  gap: 6px;
}
.page-admin .page-one {
  gap: 10px;
  min-height: 0;
}
.page-admin .page-one-card {
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.page-admin .page-one-card .saas-card-head {
  margin-bottom: 8px;
}
.page-admin .page-one-card .saas-card-head h3 {
  font-size: 15px;
}
.page-admin .page-one-form {
  gap: 8px 10px;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: #f8fafc;
}
.page-admin .page-one-form label {
  margin-bottom: 3px;
}
.page-admin .home-meta {
  margin-bottom: 0;
  font-size: 12px;
}
