:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e5e9f0;
  --line-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

/* ---------- 登录 ---------- */

.auth-view {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 12% -10%, #dbeafe 0%, rgba(219, 234, 254, 0) 60%),
    radial-gradient(700px 420px at 100% 0%, #e0e7ff 0%, rgba(224, 231, 255, 0) 55%),
    linear-gradient(180deg, #f7faff 0%, #eef3fb 100%);
}

.auth-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.14) 0%, rgba(37, 99, 235, 0) 70%);
  bottom: -140px;
  right: -80px;
  pointer-events: none;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  padding: 34px 32px 28px;
  box-shadow: var(--shadow-lg);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.logo-mark .icon {
  width: 21px;
  height: 21px;
  stroke-width: 2;
}

.auth-sub {
  margin: 10px 0 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: var(--surface-2);
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.18s ease;
}

.auth-tab.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.auth-tip {
  margin: 18px 0 0;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
}

/* ---------- 表单与按钮 ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.field > span {
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input:focus,
.field select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-error {
  margin: -4px 0 14px;
  color: var(--danger);
  font-size: 13px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
  background: var(--surface-2);
  border-color: #d5dbe6;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: transparent;
  color: var(--text);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.btn-block {
  width: 100%;
  height: 42px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* ---------- 主界面 ---------- */

.main-view {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.quota-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.quota-track {
  width: 110px;
  height: 6px;
  border-radius: 99px;
  background: #e8edf5;
  overflow: hidden;
}

.quota-track > div {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  transition: width 0.35s ease;
}

.quota-track.large {
  width: 100%;
  height: 7px;
  margin: 10px 0 8px;
}

.quota-track.warn > div {
  background: linear-gradient(90deg, #f59e0b, #ea580c);
}

.quota-track.danger > div {
  background: linear-gradient(90deg, #f87171, #dc2626);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
}

.layout {
  display: flex;
  flex: 1;
  min-height: 0;
}

.sidebar {
  width: 228px;
  flex: none;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  transition: background 0.16s ease, color 0.16s ease;
}

.nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.nav-item .icon {
  width: 19px;
  height: 19px;
}

.sidebar-card {
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.sidebar-card-title {
  font-size: 12px;
  color: var(--muted);
}

.content {
  flex: 1;
  min-width: 0;
  padding: 20px 26px 40px;
  position: relative;
}

.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  min-height: 32px;
  margin-bottom: 12px;
  font-size: 13px;
}

.crumb {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 7px;
  cursor: pointer;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crumb:hover {
  background: var(--surface-2);
  color: var(--text);
}

.crumb.current {
  color: var(--text);
  font-weight: 600;
  cursor: default;
}

.crumb.current:hover {
  background: transparent;
}

.crumb-sep {
  color: #cbd5e1;
  font-size: 12px;
  padding: 0 1px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.table-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.file-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.file-table th {
  height: 42px;
  padding: 0 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.file-table td {
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
  color: var(--text);
}

.file-table tbody tr:last-child td {
  border-bottom: 0;
}

.file-table tbody tr:hover {
  background: #f9fbff;
}

.col-size {
  width: 110px;
  color: var(--muted);
}

.col-time {
  width: 176px;
  color: var(--muted);
  font-size: 13px;
}

.col-actions {
  width: 210px;
  text-align: right !important;
}

.name-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.file-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
}

.file-thumb.dir {
  background: #fff7ed;
  color: #d97706;
}

.file-thumb .icon {
  width: 19px;
  height: 19px;
}

.file-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name.link {
  cursor: pointer;
}

.file-name.link:hover {
  color: var(--primary);
}

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  opacity: 0.72;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.row-action:hover {
  background: var(--primary-soft);
  color: var(--primary);
  opacity: 1;
}

.row-action.danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.row-action .icon {
  width: 17px;
  height: 17px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 72px 20px;
  color: var(--muted);
  font-size: 13px;
}

.empty p {
  margin: 0;
}

.empty-icon {
  width: 42px;
  height: 42px;
  color: #cbd5e1;
  stroke-width: 1.4;
}

/* ---------- 上传 ---------- */

.drop-hint {
  position: fixed;
  inset: 12px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #93c5fd;
  border-radius: 16px;
  background: rgba(239, 246, 255, 0.86);
  backdrop-filter: blur(3px);
  color: var(--primary);
  font-size: 16px;
  font-weight: 600;
  pointer-events: none;
}

.upload-tray {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: 52vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.tray-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}

.upload-list {
  overflow: auto;
  padding: 8px 12px 12px;
}

.upload-item {
  padding: 10px 2px;
  border-bottom: 1px solid var(--line-soft);
}

.upload-item:last-child {
  border-bottom: 0;
}

.upload-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  font-size: 13px;
}

.upload-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-pct {
  color: var(--muted);
  font-size: 12px;
  flex: none;
}

.bar {
  height: 6px;
  border-radius: 99px;
  background: #eef2f7;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  transition: width 0.2s ease;
}

.upload-item.done .bar-fill {
  background: linear-gradient(90deg, #34d399, #059669);
}

.upload-item.error .bar-fill {
  background: #f87171;
}

.upload-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  font-size: 12px;
}

.link-btn:hover {
  text-decoration: underline;
}

/* ---------- 弹窗 ---------- */

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
  animation: fade-in 0.16s ease;
}

.modal {
  width: 100%;
  max-width: 430px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  animation: pop-in 0.18s ease;
  overflow: hidden;
}

.modal-wide {
  max-width: 480px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
}

.modal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.modal-body {
  padding: 4px 20px 8px;
  overflow: auto;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line-soft);
  margin-top: 8px;
}

.confirm-text {
  margin: 6px 0 12px;
  color: var(--muted);
  line-height: 1.8;
}

.share-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}

.share-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
}

.share-file-name {
  font-weight: 600;
  word-break: break-all;
}

.copy-row {
  display: flex;
  gap: 8px;
}

.copy-row input {
  flex: 1;
  min-width: 0;
}

.copy-row .btn {
  flex: none;
}

/* ---------- 提示 ---------- */

.toast-host {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 9px 16px;
  border-radius: 9px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.2s ease;
  max-width: 80vw;
}

.toast.error {
  background: #b91c1c;
}

.toast.success {
  background: #047857;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 响应式 ---------- */

@media (max-width: 980px) {
  .sidebar {
    width: 68px;
    padding: 16px 10px;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .nav-item span,
  .sidebar-card {
    display: none;
  }

  .col-time {
    display: none;
  }

  .col-actions {
    width: 160px;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 0 14px;
  }

  .quota-mini {
    display: none;
  }

  .content {
    padding: 14px 14px 32px;
  }

  .col-size,
  .col-actions {
    width: 92px;
  }

  .file-table td,
  .file-table th {
    padding: 0 10px;
  }

  .row-action {
    width: 28px;
  }

  .upload-tray {
    right: 10px;
    bottom: 10px;
  }
}

/* ===== 起点统计 + 导航占位 ===== */
.nav-sep {
  height: 1px;
  background: #e8edf3;
  margin: 8px 6px;
}

.nav-item[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

.nav-tag {
  margin-left: auto;
  font-size: 10px;
  font-style: normal;
  background: #eef2f7;
  color: #94a3b8;
  padding: 1px 6px;
  border-radius: 8px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  padding: 14px 16px;
}

.stat-card .lbl {
  color: #6b7280;
  font-size: 13px;
}

.stat-card .num {
  font-size: 20px;
  font-weight: 600;
  margin-top: 4px;
  word-break: break-all;
}

.stat-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .stat-panels { grid-template-columns: 1fr; }
}

.stat-panel {
  padding: 14px 16px;
}

.stat-title {
  font-size: 14px;
  margin: 0 0 10px;
}

.stat-days {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 140px;
}

.stat-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
}

.stat-day .bar {
  width: 70%;
  background: #3b82f6;
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height .3s ease;
}

.stat-day .cnt {
  font-size: 11px;
  color: #374151;
}

.stat-day .day-lbl {
  font-size: 11px;
  color: #6b7280;
}

/* ===== 起点统计（站点管理） ===== */

.stat-create {
  padding: 14px 16px;
  margin-bottom: 14px;
}

.stat-create-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-create-row input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  outline: none;
  flex: 1;
  min-width: 180px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.stat-create-row input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.stat-create-row .btn {
  flex: none;
}

.stat-create-tip {
  margin: 8px 0 0;
  font-size: 12px;
}

.stat-table-card {
  overflow-x: auto;
}

.stat-table {
  min-width: 980px;
  table-layout: auto;
}

.stat-table th,
.stat-table td {
  padding: 0 10px;
  white-space: nowrap;
}

.stat-table td {
  height: 48px;
}

.stat-table .stat-name {
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-table .stat-num {
  text-align: center;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-table th {
  text-align: center;
}

.stat-table th:first-child,
.stat-table td:first-child {
  text-align: left;
}

.stat-col-op {
  width: 240px;
  text-align: right !important;
}

.stat-ops {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.stat-ops .link-btn {
  white-space: nowrap;
}

.stat-op-danger {
  color: var(--danger);
}

.stat-trend-panel {
  margin-bottom: 14px;
}

.stat-mini {
  table-layout: auto;
}

.stat-mini td {
  height: 34px;
  padding: 0 8px;
  font-size: 13px;
  border-bottom: 1px solid var(--line-soft);
}

.stat-mini tr:last-child td {
  border-bottom: 0;
}

.stat-mini-key {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-mini-count {
  width: 60px;
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.stat-empty-sm {
  padding: 28px 12px;
}

.stat-visits-table {
  table-layout: auto;
}

.stat-visits-table th,
.stat-visits-table td {
  padding: 0 10px;
  height: 38px;
  font-size: 13px;
  white-space: nowrap;
}

.stat-visits-table .sv-time {
  width: 160px;
  color: var(--muted);
}

.stat-visits-table .sv-ip {
  width: 130px;
}

.stat-visits-table .sv-cv {
  width: 80px;
  text-align: center;
}

.stat-visits-table .sv-url {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 0 4px;
}

.stat-pager .btn {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

/* ===== 起点统计 - 独立查看页 ===== */

.statview-body {
  background: var(--bg);
  min-height: 100%;
}

.statview-main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.statview-head {
  display: flex;
  align-items: center;
  height: 62px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.statview-content {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 20px 40px;
}

/* ===== 门户导航首页 ===== */

.portal-view {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 12% -10%, #dbeafe 0%, rgba(219, 234, 254, 0) 60%),
    radial-gradient(700px 420px at 100% 0%, #e0e7ff 0%, rgba(224, 231, 255, 0) 55%),
    linear-gradient(180deg, #f7faff 0%, #eef3fb 100%);
}

.portal-glow {
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.13) 0%, rgba(37, 99, 235, 0) 70%);
  bottom: -160px;
  right: -90px;
  pointer-events: none;
}

.portal-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  padding: 0 30px;
}

.portal-top-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.portal-top-right .user-chip {
  padding-left: 0;
  border-left: 0;
  gap: 6px;
  font-size: 14px;
}

.portal-hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 46px 20px 34px;
}

.portal-hero h1 {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1px;
}

.portal-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 2px;
}

.portal-grid {
  position: relative;
  z-index: 1;
  flex: 1;
  align-content: start;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 6px 30px 30px;
}

.portal-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 168px;
  padding: 22px 20px 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.portal-card:hover {
  transform: translateY(-4px);
  border-color: #bfdbfe;
  box-shadow: var(--shadow-md);
}

.pc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.pc-icon .icon {
  width: 23px;
  height: 23px;
  stroke-width: 1.9;
}

.pc-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.pc-desc {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.pc-go {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}

.pc-go .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.18s ease;
}

.portal-card:hover .pc-go .icon {
  transform: translateX(3px);
}

.portal-card.soon {
  cursor: default;
  background: rgba(255, 255, 255, 0.66);
}

.portal-card.soon:hover {
  transform: none;
  border-color: rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-sm);
}

.portal-card.soon .pc-icon {
  background: linear-gradient(135deg, #94a3b8, #cbd5e1);
  box-shadow: none;
}

.portal-card.soon .pc-name,
.portal-card.soon .pc-desc {
  color: #94a3b8;
}

.pc-tag {
  margin-top: auto;
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: #94a3b8;
  font-size: 12px;
}

.portal-foot {
  position: relative;
  z-index: 1;
  padding: 16px 0 22px;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
}

/* 登录弹窗（门户内） */

#modalAuth .auth-card {
  animation: pop-in 0.18s ease;
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

/* 主界面品牌可点击返回门户 */

.brand-home {
  cursor: pointer;
  user-select: none;
}

@media (max-width: 720px) {
  .portal-top {
    padding: 0 18px;
  }

  .portal-hero {
    padding: 30px 16px 24px;
  }

  .portal-hero h1 {
    font-size: 24px;
  }

  .portal-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    padding: 4px 18px 24px;
  }

  .portal-card {
    min-height: 150px;
    padding: 18px 16px 14px;
  }
}
