/* ============================================================
   数据统计后台样式
   ============================================================ */

:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e5e9f2;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

code,
.selector {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.muted {
  color: var(--muted);
  font-size: 12.5px;
}

.block {
  display: block;
}

.link {
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 500;
}

.link:hover {
  color: var(--primary-dark);
}

/* ---------- 整体布局 ---------- */
.layout {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(520px 260px at 10% 0%, rgba(99, 102, 241, 0.35), transparent 65%),
    linear-gradient(180deg, #1e1b4b 0%, #2b2670 60%, #312e81 100%);
  color: #c7d2fe;
  padding: 22px 16px;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 8px 20px;
  color: #fff;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex: none;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.25;
}

.brand-text small {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1.6px;
  color: rgba(199, 210, 254, 0.55);
  text-transform: uppercase;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(199, 210, 254, 0.78);
  font-size: 13.5px;
  transition: background 0.16s ease, color 0.16s ease;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex: none;
  opacity: 0.85;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  transition: background 0.16s ease;
}

.user-card:hover {
  background: rgba(255, 255, 255, 0.08);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #818cf8, #a78bfa);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex: none;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 13px;
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.user-meta strong {
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta small {
  color: rgba(199, 210, 254, 0.6);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-form {
  margin: 0;
}

.logout-btn {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(224, 231, 255, 0.8);
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.main {
  margin-left: 232px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px 0;
  flex-wrap: wrap;
}

.topbar-title h1 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: 0.2px;
}

.topbar-title p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px 10px;
}

.site-switch label {
  font-size: 12px;
  color: var(--muted);
}

.site-switch select {
  border: 0;
  outline: none;
  background: transparent;
  font-size: 12.5px;
  color: var(--ink);
  max-width: 180px;
  cursor: pointer;
}

.content {
  padding: 18px 28px 44px;
}

.flash {
  margin: 16px 28px 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid transparent;
}

.flash-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.flash-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

/* ---------- 通用组件 ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 0 16px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.card {
  background: var(--card);
  border: 1px solid #edf0f7;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  min-width: 0;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-head h2 {
  font-size: 14.5px;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
}

.badge-soft {
  background: #f1f5f9;
  color: #475569;
}

.badge-success {
  background: #ecfdf3;
  color: #15803d;
}

.badge-muted {
  background: #f1f5f9;
  color: #94a3b8;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
  white-space: nowrap;
}

.btn:hover {
  border-color: #c7d2fe;
  color: var(--primary);
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
}

.btn-primary:hover {
  color: #fff;
  filter: brightness(1.04);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 12.5px;
  border-radius: 9px;
}

.btn-xs {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.btn-ghost {
  background: #fff;
}

.btn-danger {
  color: var(--danger);
  border-color: #fecaca;
  background: #fff;
}

.btn-danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input:focus {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.input-sm {
  height: 34px;
  font-size: 13px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12.5px;
  color: #475569;
  font-weight: 500;
}

.field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-inline label {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.field-inline select {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-size: 12.5px;
  outline: none;
  max-width: 320px;
  cursor: pointer;
}

.field-inline select:focus {
  border-color: #a5b4fc;
}

.empty {
  padding: 56px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.8;
}

.hint {
  color: #94a3b8;
  font-size: 12px;
  margin-top: 10px;
}

.footnote {
  color: #94a3b8;
  font-size: 12px;
  margin-top: 14px;
}

/* ---------- 日期筛选 ---------- */
.range-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.range-chip {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #475569;
  font-size: 12.5px;
  transition: all 0.16s ease;
}

.range-chip:hover {
  border-color: #c7d2fe;
  color: var(--primary);
}

.range-chip.active {
  background: var(--primary-soft);
  border-color: #c7d2fe;
  color: var(--primary-dark);
  font-weight: 600;
}

.range-custom {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 4px 6px;
}

.range-custom input[type="date"] {
  border: 0;
  outline: none;
  font-size: 12.5px;
  color: #475569;
  background: transparent;
  width: 122px;
}

.range-custom span {
  color: #94a3b8;
  font-size: 12px;
}

.range-custom .btn {
  border: 0;
  background: var(--primary-soft);
  color: var(--primary-dark);
  box-shadow: none;
}

/* ---------- KPI ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.kpi-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 17px 18px;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-label {
  color: var(--muted);
  font-size: 12.5px;
}

.kpi-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.dot-indigo { background: #6366f1; }
.dot-violet { background: #8b5cf6; }
.dot-sky { background: #0ea5e9; }
.dot-emerald { background: #10b981; }
.dot-amber { background: #f59e0b; }

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.2;
  color: var(--ink);
}

.kpi-value-text {
  font-size: 22px;
}

.kpi-hint {
  color: #94a3b8;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-sm {
  padding: 15px 16px;
}

.kpi-sm .kpi-value {
  font-size: 24px;
}

/* ---------- 图表 ---------- */
.grid-main {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.chart-card {
  display: flex;
  flex-direction: column;
}

.chart-box {
  position: relative;
  height: 286px;
  flex: 1;
}

.chart-box-doughnut {
  height: 286px;
}

.chart-box-scatter {
  height: 380px;
}

.legend-inline {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.legend-inline span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.chart-fallback {
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  margin-top: 10px;
}

/* ---------- 表格 ---------- */
.table-card {
  padding-bottom: 6px;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 -18px;
  padding: 0 18px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 500;
  color: #94a3b8;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: #fbfcfe;
}

.table td {
  padding: 11px 12px;
  border-bottom: 1px solid #f1f4f9;
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: #fafbff;
}

.th-num,
.td-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.th-bar {
  min-width: 150px;
}

.td-bar {
  min-width: 150px;
}

.th-actions {
  text-align: right;
}

.td-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.path-cell {
  max-width: 460px;
  min-width: 180px;
}

.path-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.path-heat {
  font-size: 11.5px;
  color: #4f46e5;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.path-heat:hover {
  text-decoration: underline;
}

.path {
  display: block;
  font-weight: 500;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.path-cell small {
  display: block;
  color: #94a3b8;
  font-size: 11.5px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.domain,
.utm-value {
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.bar-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.bar-cell small {
  color: #94a3b8;
  font-size: 11.5px;
  min-width: 42px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bar-cell-block {
  display: flex;
  margin-top: 6px;
  max-width: 240px;
}

.progress {
  display: inline-block;
  width: 100%;
  height: 7px;
  border-radius: 99px;
  background: #eef2f7;
  overflow: hidden;
  vertical-align: middle;
}

.progress-bar {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

/* ---------- 来源 ---------- */
.source-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.source-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
}

.source-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.source-card-top strong {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.source-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.source-direct { background: #f1f5f9; color: #475569; }
.source-search { background: #eff6ff; color: #1d4ed8; }
.source-social { background: #fdf2f8; color: #be185d; }
.source-external { background: #fffbeb; color: #b45309; }
.source-internal { background: #f0f9ff; color: #0369a1; }
.source-utm { background: #ecfdf5; color: #047857; }
.source-ads { background: #faf5ff; color: #7e22ce; }

.source-bg-direct { background: #94a3b8; }
.source-bg-search { background: #3b82f6; }
.source-bg-social { background: #ec4899; }
.source-bg-external { background: #f59e0b; }
.source-bg-internal { background: #0ea5e9; }
.source-bg-utm { background: #10b981; }
.source-bg-ads { background: #a855f7; }

/* ---------- 账号 / 个人中心 ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: start;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-cell strong {
  display: block;
  font-size: 13px;
}

.account-cell small {
  display: block;
  font-size: 11.5px;
  margin-top: 1px;
}

.action-form {
  display: inline-flex;
  margin: 0;
}

.row-details {
  position: relative;
  display: inline-block;
}

.row-details summary {
  list-style: none;
  cursor: pointer;
}

.row-details summary::-webkit-details-marker {
  display: none;
}

.row-details[open] summary {
  border-color: #c7d2fe;
  color: var(--primary);
}

.reset-form {
  margin-top: 8px;
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
}

.info-list {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.info-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.info-list > div:last-child {
  border-bottom: 0;
}

.info-list dt {
  color: var(--muted);
  font-size: 13px;
}

.info-list dd {
  margin: 0;
  font-size: 13px;
  text-align: right;
}

/* ---------- 热力图 ---------- */
.filter-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin-bottom: 16px;
}

.heat-filters {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.heat-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.heat-actions form {
  margin: 0;
}

.upload-label {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.fetch-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fetch-input {
  height: 32px;
  width: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-size: 12.5px;
  outline: none;
}

.fetch-input:focus {
  border-color: #4f46e5;
}

.upload-label input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 100px;
}

.heatmap-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.heatmap-card {
  min-width: 0;
}

.heat-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.heat-legend i {
  display: inline-block;
  width: 118px;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #2563eb, #0ea5e9, #facc15, #f97316, #dc2626);
}

.heat-stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
}

.heat-stage canvas {
  display: block;
  max-width: 100%;
}

.heat-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
}

.selector {
  display: block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 6px;
  padding: 3px 7px;
}

/* ---------- 登录页 ---------- */
.login-body {
  background: #fff;
}

.login-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.login-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 64px;
  color: #fff;
  background:
    radial-gradient(900px 480px at 12% 8%, rgba(129, 140, 248, 0.5), transparent 62%),
    linear-gradient(160deg, #1e1b4b 0%, #312e81 58%, #4338ca 100%);
}

.login-brand::after {
  content: "";
  position: absolute;
  right: -130px;
  bottom: -140px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.03), 0 0 0 140px rgba(255, 255, 255, 0.02);
}

.login-brand-inner {
  position: relative;
  z-index: 1;
  max-width: 430px;
}

.brand-mark-lg {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  font-size: 26px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.login-brand h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 24px 0 10px;
}

.login-brand-sub {
  color: rgba(224, 231, 255, 0.8);
  font-size: 14px;
  letter-spacing: 0.4px;
}

.login-points {
  list-style: none;
  margin: 38px 0 64px;
  padding: 0;
  color: rgba(224, 231, 255, 0.82);
  font-size: 13.5px;
  line-height: 2.15;
}

.login-points li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a5b4fc;
  margin-right: 10px;
  vertical-align: middle;
}

.login-copyright {
  font-size: 12px;
  color: rgba(199, 210, 254, 0.55);
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: #fff;
}

.login-card {
  width: 100%;
  max-width: 380px;
}

.login-card h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.login-sub {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
}

.login-card .flash {
  margin: 0 0 16px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-hint {
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
  margin: 0;
  line-height: 1.6;
}

.login-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
}

.login-errors p {
  margin: 2px 0;
}

.login-dberror {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 11px;
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.9;
}

.login-dberror ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

.login-dberror code {
  background: rgba(146, 64, 14, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-main,
  .grid-two,
  .split,
  .heatmap-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: 72px;
    padding: 18px 10px;
  }

  .brand {
    justify-content: center;
    padding: 0 0 18px;
  }

  .brand-text,
  .nav-item span,
  .user-meta,
  .logout-btn {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 11px 0;
  }

  .side-foot {
    align-items: center;
  }

  .user-card {
    padding: 4px;
  }

  .main {
    margin-left: 72px;
  }

  .topbar {
    padding: 18px 18px 0;
  }

  .content {
    padding: 16px 18px 36px;
  }

  .flash {
    margin: 14px 18px 0;
  }
}

@media (max-width: 760px) {
  .login-wrap {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 40px 28px;
    min-height: 220px;
  }

  .login-brand h1 {
    font-size: 26px;
    margin-top: 16px;
  }

  .login-points {
    display: none;
  }

  .login-copyright {
    display: none;
  }

  .login-panel {
    padding: 36px 22px 56px;
  }

  .kpi-grid,
  .kpi-grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .topbar-title h1 {
    font-size: 19px;
  }

  .range-custom {
    flex-wrap: wrap;
  }

  .table-card .table {
    min-width: 620px;
  }

  .heat-filters {
    width: 100%;
  }

  .field-inline {
    flex: 1;
  }

  .field-inline select {
    max-width: none;
    width: 100%;
  }
}
