/* ============================================================
   海豚灵汐 / DolphinLynxi — 响应式布局
   主题: 海洋蓝 (克制版, 取自 logo)
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* 主色 — 海洋蓝 (logo 同源) */
  --primary: #2c7fbf;
  --primary-2: #1d5a8e;
  --primary-grad: linear-gradient(135deg, #4ba3d4 0%, #1f5a8a 100%);
  --accent-grad: linear-gradient(135deg, #67e8f9 0%, #0891b2 100%);

  /* 中性 — 微微偏冷, 像海雾 */
  --bg: #f4f7fb;
  --bg-2: #ffffff;
  --bg-sidebar: #ffffff;
  --border: #e4ebf2;
  --text-1: #0f2540;
  --text-2: #4b5b73;
  --text-3: #8a96aa;

  /* 语义 */
  --success: #14b8a6;
  --warning: #faad14;
  --danger: #ef4444;
  --info: #0ea5e9;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(15, 17, 38, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 17, 38, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 17, 38, 0.10);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* 间距 */
  --gap-xs: 6px;
  --gap-sm: 10px;
  --gap-md: 16px;
  --gap-lg: 24px;
  --gap-xl: 32px;

  /* 布局尺寸 */
  --topbar-h: 60px;
  --sidebar-w: 240px;
  --sidebar-w-collapsed: 64px;
  --tabbar-h: 60px;
  --content-max: 1440px;
}

/* ============================================================
   暗色主题 (data-theme="dark") — 覆盖关键变量
   ============================================================ */
[data-theme="dark"] {
  --bg: #0b1424;
  --bg-2: #142037;
  --bg-sidebar: #0f1a2c;
  --border: #1f2d44;
  --text-1: #e6edf7;
  --text-2: #9eb0c8;
  --text-3: #5e6e88;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.50);
  color-scheme: dark;
}
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] .card { background: var(--bg-2); border-color: var(--border); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea {
  background: var(--bg) !important; color: var(--text-1) !important; border-color: var(--border) !important;
}
[data-theme="dark"] .nav-item:hover { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .nav-item.active { background: rgba(44,127,191,0.18); }
[data-theme="dark"] .topbar { background: var(--bg-sidebar); border-color: var(--border); }
[data-theme="dark"] .sidebar { background: var(--bg-sidebar); border-color: var(--border); }
[data-theme="dark"] .device-chip { background: rgba(255,255,255,0.03); }
[data-theme="dark"] .servo-row .bar,
[data-theme="dark"] .joystick { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .icon-btn { background: rgba(255,255,255,0.04); border-color: var(--border); color: var(--text-2); }
[data-theme="dark"] .icon-btn:hover { background: rgba(255,255,255,0.08); }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
input, textarea { font-family: inherit; font-size: inherit; }

/* ============================================================
   1. 应用骨架 (App Shell)
   ============================================================ */

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-areas:
    "sidebar topbar"
    "sidebar main";
}

.topbar { grid-area: topbar; }
.sidebar { grid-area: sidebar; }
.main { grid-area: main; }

/* ============================================================
   2. 顶部导航栏
   ============================================================ */

.topbar {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar .crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-2);
  flex: 1;
}
.topbar .crumb .sep { color: var(--text-3); }
.topbar .crumb .now { color: var(--text-1); font-weight: 600; }

.search {
  position: relative;
  width: 320px;
  max-width: 40vw;
}
.search input {
  width: 100%;
  height: 36px;
  padding: 0 14px 0 36px;
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s;
}
.search input:focus { border-color: var(--primary); background: #fff; }
.search::before {
  content: "🔍";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0.5;
}

.topbar .actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-2);
  transition: all 0.2s;
  position: relative;
}
.icon-btn:hover { background: var(--bg); color: var(--text-1); }
.icon-btn .dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid #fff;
}
.topbar-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  line-height: 1.4;
  min-width: 16px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 0 0 2px var(--bg-2, #fff);
}

.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-grad);
  color: #fff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 移动端汉堡按钮，PC 隐藏 */
.hamburger { display: none; }

/* ============================================================
   3. 侧边栏导航
   ============================================================ */

.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 20px;
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
}
a.brand { cursor: pointer; }
a.brand:hover .name { color: var(--primary); }
a.brand:hover .logo { transform: scale(1.06); transition: transform 0.18s; }
.topbar .crumb a.home {
  color: var(--text-2);
  text-decoration: none;
  cursor: pointer;
}
.topbar .crumb a.home:hover { color: var(--primary); }
.brand .logo {
  width: 32px; height: 32px;
  background: transparent;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}
.brand .logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brand .name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
}
.brand .ver {
  font-size: 11px;
  color: var(--text-3);
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
}

.nav-section {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 12px 12px 6px;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 14px;
  transition: all 0.15s;
  cursor: pointer;
}
.nav-item:hover { background: var(--bg); color: var(--text-1); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(44,127,191,0.10), rgba(29,90,142,0.10));
  color: var(--primary);
  font-weight: 600;
}
.nav-item .ico {
  width: 20px;
  text-align: center;
  font-size: 16px;
}
.nav-item .badge {
  margin-left: auto;
  font-size: 11px;
  background: var(--bg);
  color: var(--text-2);
  padding: 1px 7px;
  border-radius: 8px;
}
.nav-item.active .badge { background: rgba(44,127,191,0.15); color: var(--primary); }

.sidebar .userbar {
  margin-top: auto;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.sidebar .userbar .info { flex: 1; min-width: 0; }
.sidebar .userbar .name { font-size: 13px; font-weight: 600; color: var(--text-1); }
.sidebar .userbar .role { font-size: 11px; color: var(--text-3); }

/* ============================================================
   4. 主内容区
   ============================================================ */

.main {
  padding: 24px;
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-3);
  text-decoration: none;
  margin-bottom: 8px;
  padding: 4px 8px 4px 0;
  transition: color 0.15s;
  font-weight: 500;
}
.back-link:hover { color: var(--primary); }

/* Modal (详情弹窗) */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 17, 38, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  padding: 16px;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal-card {
  background: var(--bg-2);
  border-radius: var(--radius-xl);
  max-width: 520px; width: 100%;
  padding: 28px 26px;
  box-shadow: var(--shadow-lg);
  transform: translateY(8px) scale(0.97);
  transition: transform 0.22s;
  position: relative;
  max-height: 86vh;
  overflow-y: auto;
}
.modal-overlay.show .modal-card { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
  border: 0;
}
.modal-close:hover { background: var(--border); color: var(--text-1); }

/* Empty state — "空空如也" */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-3);
}
.empty-state .ico {
  font-size: 64px;
  margin-bottom: 14px;
  opacity: 0.55;
}
.empty-state .title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}
.empty-state .sub {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 18px;
  line-height: 1.6;
}
.page-head .title h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
}
.page-head .title p {
  font-size: 13px;
  color: var(--text-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary-grad);
  color: #fff;
  box-shadow: 0 4px 12px rgba(44,127,191,0.30);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(44,127,191,0.40); }
.btn-ghost {
  background: var(--bg-2);
  color: var(--text-1);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ============================================================
   5. 卡片 / 列表 / 网格
   ============================================================ */

.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); border-color: rgba(44,127,191,0.25); }
.card-pad { padding: 20px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 14px;
}
.section-head h2 {
  font-size: 16px;
  font-weight: 700;
}
.section-head a {
  font-size: 12px;
  color: var(--primary);
}

/* KPI 卡片 */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.kpi {
  padding: 18px;
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.kpi .label { font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.kpi .value { font-size: 26px; font-weight: 700; color: var(--text-1); }
.kpi .sub { font-size: 11px; color: var(--text-3); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.kpi .sub.up { color: var(--success); }
.kpi .ico {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: rgba(44,127,191,0.10);
}

/* 12 列响应式网格 */
.col-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.col-8 { grid-column: span 8; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-12 { grid-column: span 12; }

/* ============================================================
   6. 设备卡片
   ============================================================ */

.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.device {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: all 0.2s;
  cursor: pointer;
}
.device:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(44,127,191,0.30); }
.device .row1 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.device .icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(44,127,191,0.12), rgba(29,90,142,0.12));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.device .name {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
}
.device .status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-2);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg);
}
.device .status .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(82,196,26,0.15);
}
.device .status.offline .dot { background: var(--text-3); box-shadow: none; }
.device .status.offline { color: var(--text-3); }

.device .meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.device .meta .item .k { font-size: 10px; color: var(--text-3); }
.device .meta .item .v { font-size: 13px; font-weight: 600; color: var(--text-1); }

/* ============================================================
   7. 排行榜 / 收藏 / 任务列表
   ============================================================ */

.list .row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.list .row:last-child { border-bottom: 0; }
.list .row:hover { background: var(--bg); }
.list .rank {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--bg);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.list .row:nth-child(1) .rank { background: linear-gradient(135deg,#ffd700,#ffb700); color:#fff; }
.list .row:nth-child(2) .rank { background: linear-gradient(135deg,#c0c0c0,#a0a0a0); color:#fff; }
.list .row:nth-child(3) .rank { background: linear-gradient(135deg,#cd7f32,#a06420); color:#fff; }
.list .row .info { flex: 1; min-width: 0; }
.list .row .info .t { font-size: 13px; font-weight: 600; color: var(--text-1); }
.list .row .info .s { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.list .row .v { font-size: 13px; font-weight: 600; color: var(--primary); }

/* ============================================================
   8. 商店任务卡片
   ============================================================ */

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.task-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
}
.task-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.task-card .cover {
  height: 140px;
  background: linear-gradient(135deg, rgba(44,127,191,0.20), rgba(29,90,142,0.20));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
}
.task-card .cover .tag {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(255,255,255,0.92);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
}
.task-card .body { padding: 14px; }
.task-card .title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.task-card .desc {
  font-size: 12px;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 36px;
}
.task-card .stats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-3);
}

/* ============================================================
   9. 控制台特定页面
   ============================================================ */

.control-stage {
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 540px;
}
.control-stage .joystick-area {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.control-pad {
  background: var(--bg);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 280px;
  position: relative;
}
.control-pad .pad-title {
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.gyro-ball {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: var(--primary-grad);
  box-shadow: 0 12px 32px rgba(44,127,191,0.40);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
}
.joystick {
  width: 200px; height: 200px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 4px solid var(--border);
  position: relative;
  touch-action: none;             /* 阻止移动端滚动占用拖拽 */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.joystick:active { cursor: grabbing; }
.joystick .joystick-knob {
  position: absolute;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--primary-grad);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 16px rgba(44,127,191,0.35);
  pointer-events: none;            /* 让父容器接收所有 pointer 事件 */
  transition: transform 0.18s cubic-bezier(.4,2,.4,1);
}
.joystick.dragging .joystick-knob { transition: none; }
.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.action-btn {
  flex: 1;
  min-width: 120px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-1);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}
.action-btn:hover { border-color: var(--primary); color: var(--primary); }
.action-btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.action-btn.success { background: var(--accent-grad); color: #fff; border: 0; }
.action-btn.primary { background: var(--primary-grad); color: #fff; border: 0; }

.servo-panel { display: flex; flex-direction: column; gap: 12px; }
.servo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.servo-row:last-child { border-bottom: 0; }
.servo-row .lbl { width: 60px; font-size: 12px; color: var(--text-2); }
.servo-row .bar {
  flex: 1;
  height: 18px;                     /* 加高便于点击 */
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  touch-action: none;
}
.servo-row .bar > i {
  display: block;
  height: 100%;
  background: var(--primary-grad);
  border-radius: 999px;
  pointer-events: none;
  transition: width 0.12s ease-out;
}
.servo-row .bar.dragging > i { transition: none; }
.servo-row .bar:hover > i { filter: brightness(1.08); }
.servo-row .num { width: 56px; text-align: right; font-size: 12px; color: var(--text-1); font-weight: 600; }

/* ============================================================
   10. 移动端 Tab Bar (PC 隐藏)
   ============================================================ */

.tabbar { display: none; }

/* ============================================================
   11. 响应式断点
   ============================================================ */

/* 平板 (768-1023px) — 折叠侧栏为 icon-only */
@media (max-width: 1023px) {
  :root { --sidebar-w: var(--sidebar-w-collapsed); }
  .brand .name, .brand .ver { display: none; }
  .nav-section { text-align: center; padding: 12px 0 6px; font-size: 0; }
  .nav-section::before { content: "···"; font-size: 11px; }
  .nav-item { justify-content: center; padding: 12px 0; }
  .nav-item span:not(.ico):not(.badge) { display: none; }
  .nav-item .badge { display: none; }
  .sidebar .userbar .info { display: none; }
  .sidebar .userbar { justify-content: center; padding: 8px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .col-8, .col-4, .col-6 { grid-column: span 12; }
  .control-stage .joystick-area { grid-template-columns: 1fr; }
  .search { width: 200px; }
}

/* 手机 (<768px) — 顶部精简 + 单列 + 底部 Tab Bar */
@media (max-width: 767px) {
  :root { --topbar-h: 52px; }
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: var(--topbar-h) 1fr var(--tabbar-h);
    grid-template-areas:
      "topbar"
      "main"
      "tabbar";
  }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s;
    --sidebar-w: 260px;
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar .brand .name,
  .sidebar .brand .ver { display: inline-block; }
  .sidebar .nav-item { justify-content: flex-start; padding: 10px 14px; }
  /* 注意：选择器特异度必须 >= 1023px 的隐藏规则 */
  .sidebar .nav-item span:not(.ico):not(.badge) { display: inline; }
  .sidebar .nav-item .badge { display: inline-block; }
  .sidebar .nav-section { text-align: left; padding: 12px 14px 6px; font-size: 11px; color: var(--text-3); }
  .sidebar .nav-section::before { content: ""; font-size: inherit; }
  .sidebar .userbar { justify-content: flex-start; padding: 12px; }
  .sidebar .userbar .info { display: block; }

  .topbar { padding: 0 14px; gap: 10px; }
  .hamburger { display: inline-flex; }
  .topbar .crumb { font-size: 15px; font-weight: 600; color: var(--text-1); }
  .topbar .crumb .sep, .topbar .crumb .home { display: none; }
  .search { display: none; }
  .topbar .actions { gap: 4px; }
  .icon-btn { width: 32px; height: 32px; }

  .main { padding: 16px 14px 24px; }
  .page-head { margin-bottom: 16px; }
  .page-head .title h1 { font-size: 20px; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; justify-content: center; }

  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
  .kpi { padding: 14px; }
  .kpi .value { font-size: 22px; }
  .kpi .ico { width: 28px; height: 28px; font-size: 14px; }

  .col-grid { gap: 14px; }
  .col-8, .col-4, .col-6 { grid-column: span 12; }

  .device-grid { grid-template-columns: 1fr; gap: 10px; }
  .store-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .task-card .cover { height: 100px; font-size: 36px; }
  .task-card .body { padding: 10px; }
  .task-card .title { font-size: 13px; }
  .task-card .desc { font-size: 11px; height: 32px; }

  .control-stage { padding: 14px; gap: 14px; min-height: auto; }
  .control-stage .joystick-area { grid-template-columns: 1fr; gap: 14px; }
  .control-pad { min-height: 220px; padding: 16px; }
  .joystick { width: 160px; height: 160px; }
  .joystick .joystick-knob { width: 50px; height: 50px; }

  .scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 99; }
  .scrim.show { display: block; }

  /* 底部 Tab Bar */
  .tabbar {
    grid-area: tabbar;
    display: flex;
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    position: sticky;
    bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    z-index: 50;
  }
  .tabbar .tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 0;
    color: var(--text-3);
    font-size: 10px;
    transition: color 0.15s;
  }
  .tabbar .tab .ico { font-size: 18px; }
  .tabbar .tab.active { color: var(--primary); }
  .tabbar .tab.center .ico {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--primary-grad);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-top: -16px;
    box-shadow: 0 6px 16px rgba(44,127,191,0.40);
  }
}

/* 大屏 (≥1440px) */
@media (min-width: 1440px) {
  .main { padding: 32px 40px; }
}

/* ============================================================
   11.4  Hero 大卡 / Pipeline / 占位页
   ============================================================ */

/* --- 欢迎 Hero 大卡 --- */
.hero-card {
  background: linear-gradient(135deg, #4ba3d4 0%, #1f5a8a 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(255,255,255,0.15), transparent 50%),
    radial-gradient(ellipse at 0% 100%, rgba(67,233,123,0.15), transparent 50%);
}
.hero-card > * { position: relative; }
.hero-card .greet { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 6px; }
.hero-card .sub { font-size: 14px; opacity: 0.85; margin-bottom: 22px; }
.hero-card .stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.hero-card .stats .item .v {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.hero-card .stats .item .l {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 4px;
}
.hero-card .cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-card .cta-row .btn {
  padding: 10px 20px;
  font-weight: 600;
}
.hero-card .cta-row .btn-white {
  background: #fff;
  color: var(--primary);
}
.hero-card .cta-row .btn-white:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,0.20); }
.hero-card .cta-row .btn-trans {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.30);
}
.hero-card .cta-row .btn-trans:hover { background: rgba(255,255,255,0.26); }

/* --- 设备状态总览（横向 chip 列表）--- */
.device-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.device-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.15s;
  cursor: pointer;
}
.device-chip:hover { border-color: rgba(44,127,191,0.30); }
.device-chip .ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(44,127,191,0.10), rgba(29,90,142,0.10));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.device-chip .info { flex: 1; min-width: 0; }
.device-chip .n {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.device-chip .s {
  font-size: 11px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 4px;
}
.device-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.device-chip.offline .dot { background: var(--text-3); }
.device-chip.offline .s { color: var(--text-3); }

/* --- Pipeline 三步走 --- */
.pipeline {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px 1fr;
  gap: 0;
  align-items: stretch;
}
.pipeline-step {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  transition: all 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.pipeline-step:hover {
  transform: translateY(-3px);
  border-color: rgba(44,127,191,0.40);
  box-shadow: var(--shadow-md);
}
.pipeline-step .step-num {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.pipeline-step .step-ico {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--primary-grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 14px;
  box-shadow: 0 8px 20px rgba(44,127,191,0.25);
}
.pipeline-step h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.pipeline-step .step-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
}
.pipeline-step .step-stat {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pipeline-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
}

/* --- 占位页（开发中）--- */
.coming-soon {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.coming-soon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(44,127,191,0.08), transparent 60%);
  pointer-events: none;
}
.coming-soon > * { position: relative; }
.coming-soon .ico-big {
  width: 96px; height: 96px;
  border-radius: 24px;
  background: var(--primary-grad);
  color: #fff;
  font-size: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 16px 40px rgba(44,127,191,0.30);
}
.coming-soon .badge-soon {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(44,127,191,0.10);
  color: var(--primary);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}
.coming-soon h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
.coming-soon .desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 24px;
}
.coming-soon .features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 0 auto 28px;
  text-align: left;
}
.coming-soon .feat {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.coming-soon .feat .ic {
  font-size: 18px;
  flex-shrink: 0;
}
.coming-soon .feat .t { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.coming-soon .feat .s { font-size: 11px; color: var(--text-3); }
.coming-soon .actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 1023px) {
  .pipeline { grid-template-columns: 1fr; gap: 14px; }
  .pipeline-arrow { transform: rotate(90deg); padding: 8px 0; }
}
@media (max-width: 767px) {
  .hero-card { padding: 22px; }
  .hero-card .greet { font-size: 22px; }
  .hero-card .stats { gap: 18px; }
  .hero-card .stats .item .v { font-size: 20px; }
  .hero-card .cta-row .btn { flex: 1; justify-content: center; }
  .pipeline-step { padding: 18px; }
  .coming-soon { padding: 36px 18px; }
  .coming-soon .ico-big { width: 72px; height: 72px; font-size: 36px; }
  .coming-soon h2 { font-size: 20px; }
}

/* ============================================================
   11.5  社区 / 个人中心 / 帮助 — 控制台子页面
   ============================================================ */

/* --- 帖子卡片 --- */
.post {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  transition: all 0.15s;
}
.post + .post { margin-top: 14px; }
.post:hover { border-color: rgba(44,127,191,0.25); box-shadow: var(--shadow-sm); }
.post .head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.post .head .av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-grad);
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.post .head .who { flex: 1; min-width: 0; }
.post .head .who .n { font-size: 13px; font-weight: 600; color: var(--text-1); }
.post .head .who .t { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.post .head .pin {
  font-size: 10px;
  background: rgba(44,127,191,0.10);
  color: var(--primary);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}
.post h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
.post .body {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 10px;
}
.post .imgs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.post .imgs .img {
  aspect-ratio: 1;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(44,127,191,0.10), rgba(29,90,142,0.10));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.post .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.post .tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-2);
}
.post .actions {
  display: flex;
  gap: 22px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--text-3);
}
.post .actions span { display: inline-flex; align-items: center; gap: 5px; transition: color 0.15s; cursor: pointer; }
.post .actions span:hover { color: var(--primary); }

/* --- 悬赏卡 --- */
.bounty {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
}
.bounty .row1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.bounty .title { font-size: 13px; font-weight: 600; }
.bounty .price { font-size: 14px; color: var(--warning); font-weight: 700; white-space: nowrap; }
.bounty .meta { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* --- 个人中心 资料卡 / 头像 / KPI --- */
.profile-hero {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.profile-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 100% 0%, rgba(44,127,191,0.10), transparent 50%);
}
.profile-hero > * { position: relative; }
.profile-hero .av-lg {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--primary-grad);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(44,127,191,0.30);
  flex-shrink: 0;
}
.profile-hero .info { flex: 1; min-width: 0; }
.profile-hero .name { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.profile-hero .meta { font-size: 13px; color: var(--text-2); display: flex; gap: 14px; flex-wrap: wrap; }
.profile-hero .meta .pill {
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--text-2);
}
.profile-hero .meta .pill.vip {
  background: linear-gradient(135deg, #ffd700, #ffb700);
  color: #fff;
  font-weight: 600;
}

/* --- 菜单组（个人中心+帮助通用）--- */
.menu-list {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.menu-item:last-child { border-bottom: 0; }
.menu-item:hover { background: var(--bg); }
.menu-item .ico-sq {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: linear-gradient(135deg, rgba(44,127,191,0.10), rgba(29,90,142,0.10));
  flex-shrink: 0;
}
.menu-item .lbl { flex: 1; min-width: 0; }
.menu-item .lbl .t { font-size: 14px; font-weight: 500; color: var(--text-1); }
.menu-item .lbl .s { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.menu-item .arrow { color: var(--text-3); font-size: 14px; }
.menu-item .badge {
  background: var(--bg);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--text-2);
}

/* --- FAQ 折叠 --- */
.faq {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq details:last-child { border-bottom: 0; }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background 0.15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "＋";
  font-size: 16px;
  color: var(--text-3);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq details[open] summary { background: var(--bg); color: var(--primary); }
.faq details[open] summary::after { content: "－"; color: var(--primary); }
.faq .a {
  padding: 0 20px 18px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
}
.faq .a code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  color: var(--primary);
}

/* --- 帮助分类标签 --- */
.help-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.help-tab {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-2);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.help-tab:hover { color: var(--primary); border-color: rgba(44,127,191,0.40); }
.help-tab.active { background: var(--primary-grad); color: #fff; border-color: transparent; }

/* --- 社区 / 帮助 顶部搜索 --- */
.search-bar {
  position: relative;
  margin-bottom: 18px;
}
.search-bar input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 42px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  font-size: 14px;
  transition: all 0.15s;
}
.search-bar input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(44,127,191,0.12); }
.search-bar::before {
  content: "🔍";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
}

/* --- 个人中心 KPI 紧凑版 --- */
.profile-kpi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.profile-kpi .kpi-mini {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
}
.profile-kpi .kpi-mini .v {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1;
  margin-bottom: 4px;
}
.profile-kpi .kpi-mini .l {
  font-size: 11px;
  color: var(--text-3);
}

@media (max-width: 1023px) {
  .post .imgs { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  .profile-hero { padding: 18px; gap: 14px; flex-direction: row; }
  .profile-hero .av-lg { width: 60px; height: 60px; font-size: 24px; }
  .profile-hero .name { font-size: 18px; }
  .profile-hero .meta { font-size: 12px; gap: 8px; }
  .profile-kpi { grid-template-columns: repeat(2, 1fr); }
  .post { padding: 14px; }
  .post .imgs { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .post .actions { gap: 18px; }
  .help-tabs { gap: 6px; }
  .help-tab { padding: 6px 10px; font-size: 12px; }
}

/* ============================================================
   11.6  通知 / 详情页 / OTA 条 / 表单
   ============================================================ */

/* --- OTA 状态条 --- */
.ota-bar {
  background: linear-gradient(135deg, rgba(44,127,191,0.08), rgba(29,90,142,0.05));
  border: 1px solid rgba(44,127,191,0.20);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.ota-bar.ok {
  background: linear-gradient(135deg, rgba(82,196,26,0.06), rgba(82,196,26,0.02));
  border-color: rgba(82,196,26,0.25);
}
.ota-bar .ico {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--primary-grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.ota-bar.ok .ico { background: linear-gradient(135deg, var(--success), #6dd820); }
.ota-bar .info { flex: 1; min-width: 0; }
.ota-bar .info .t { font-size: 14px; font-weight: 600; }
.ota-bar .info .s { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* --- 通知列表 --- */
.notif {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.notif:last-child { border-bottom: 0; }
.notif:hover { background: var(--bg); }
.notif.unread::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
}
.notif .ico-sq {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.notif .body { flex: 1; min-width: 0; }
.notif .t { font-size: 13px; font-weight: 600; color: var(--text-1); }
.notif .s { font-size: 12px; color: var(--text-2); margin-top: 3px; line-height: 1.5; }
.notif .time { font-size: 11px; color: var(--text-3); margin-top: 6px; }

/* --- 详情页 hero / 评论 --- */
.detail-hero {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 20px;
}
.detail-hero .cover {
  height: 220px;
  background: linear-gradient(135deg, rgba(44,127,191,0.20), rgba(29,90,142,0.20));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 92px;
  position: relative;
}
.detail-hero .cover .badge-pin {
  position: absolute;
  top: 16px; left: 16px;
  background: rgba(255,255,255,0.95);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.detail-hero .cover .badge-price {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--primary-grad);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(44,127,191,0.30);
}
.detail-hero .body { padding: 22px 24px; }
.detail-hero h1 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.detail-hero .meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.detail-hero .desc { font-size: 14px; color: var(--text-2); line-height: 1.7; }

.author-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg);
  margin-bottom: 16px;
}
.author-card .av {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary-grad);
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.author-card .who { flex: 1; min-width: 0; }
.author-card .who .n { font-size: 14px; font-weight: 600; }
.author-card .who .s { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.comments-list { display: flex; flex-direction: column; gap: 14px; }
.comment {
  display: flex;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}
.comment:last-child { border-bottom: 0; padding-bottom: 0; }
.comment .av {
  width: 36px; height: 36px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.comment .body { flex: 1; min-width: 0; }
.comment .head1 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.comment .head1 .n { font-size: 13px; font-weight: 600; }
.comment .head1 .t { font-size: 11px; color: var(--text-3); }
.comment .text { font-size: 13px; color: var(--text-1); line-height: 1.6; }
.comment .acts {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-3);
}
.comment .acts span { cursor: pointer; transition: color 0.15s; }
.comment .acts span:hover { color: var(--primary); }
.comment .replies {
  margin-top: 10px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
}

/* --- 表单 --- */
.form-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 6px;
}
.form-row label .req { color: var(--danger); }
.form-row .hint {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
}
.form-row input[type="text"],
.form-row input[type="number"],
.form-row input[type="date"],
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.15s;
  box-sizing: border-box;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44,127,191,0.12);
}
.form-row textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.tag-pickers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-pick {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  background: #fff;
  transition: all 0.15s;
}
.tag-pick:hover { color: var(--primary); border-color: rgba(44,127,191,0.40); }
.tag-pick.active { background: var(--primary-grad); color: #fff; border-color: transparent; }
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.15s;
}
.upload-zone:hover { border-color: var(--primary); color: var(--primary); background: rgba(44,127,191,0.03); }
.upload-zone .ic { font-size: 32px; margin-bottom: 6px; }

/* --- 双列表单 --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 767px) { .two-col { grid-template-columns: 1fr; } }

/* ============================================================
   12. 门户页 (Landing) — 公开访问
   ============================================================ */

.landing { min-height: 100vh; background: #fff; }

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.landing-nav .wrap {
  max-width: 1200px;
  margin: 0 auto;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.landing-nav .brand {
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.landing-nav .brand .name { font-size: 17px; }
.landing-nav .links {
  display: flex;
  gap: 24px;
  flex: 1;
}
.landing-nav .links a {
  font-size: 14px;
  color: var(--text-2);
  font-weight: 500;
  transition: color 0.15s;
}
.landing-nav .links a:hover { color: var(--text-1); }
.landing-nav .auth { display: flex; gap: 8px; align-items: center; }

.landing-nav-toggle { display: none; }

/* Hero */
.hero {
  background:
    radial-gradient(ellipse at 80% 0%, rgba(44,127,191,0.20), transparent 55%),
    radial-gradient(ellipse at 0% 60%, rgba(67,233,123,0.12), transparent 50%),
    linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(44,127,191,0.10);
  color: var(--primary);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: 52px;
  line-height: 1.1;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -1px;
  margin-bottom: 18px;
}
.hero h1 .grad {
  background: var(--primary-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 520px;
}
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .cta-row .btn { padding: 12px 22px; font-size: 14px; font-weight: 600; }
.hero .cta-row .btn-primary { box-shadow: 0 8px 24px rgba(44,127,191,0.40); }

.hero .visual {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero .visual .arm {
  font-size: 200px;
  filter: drop-shadow(0 24px 48px rgba(44,127,191,0.30));
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.hero .visual .chip {
  position: absolute;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-1);
  box-shadow: var(--shadow-md);
  font-weight: 500;
}
.hero .visual .chip .dot-g { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(82,196,26,0.20); }
.hero .visual .chip .dot-p { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.hero .visual .c1 { top: 20%; left: 0; animation: float 5s ease-in-out infinite 0.3s; }
.hero .visual .c2 { top: 50%; right: 0; animation: float 6s ease-in-out infinite 0.7s; }
.hero .visual .c3 { bottom: 18%; left: 12%; animation: float 5.5s ease-in-out infinite 0.5s; }

/* 实时数据条 */
.live-stats {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 24px;
  position: relative;
}
.live-stats .wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.live-stat {
  text-align: center;
  position: relative;
}
.live-stat:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: var(--border);
}
.live-stat .lbl {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}
.live-stat .lbl .pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  position: relative;
}
.live-stat .lbl .pulse::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--success);
  opacity: 0.5;
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}
.live-stat .num {
  font-size: 36px;
  font-weight: 800;
  background: var(--primary-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.live-stat .sub { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* 通用 section */
.section {
  padding: 72px 24px;
}
.section.alt { background: var(--bg); }
.section .wrap { max-width: 1200px; margin: 0 auto; }
.section-title {
  text-align: center;
  margin-bottom: 48px;
}
.section-title .eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.section-title h2 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-1);
  margin-bottom: 12px;
  line-height: 1.2;
}
.section-title p {
  font-size: 16px;
  color: var(--text-2);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

/* 能力 4 列卡片 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  transition: all 0.2s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(44,127,191,0.30); }
.feature .ico {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(44,127,191,0.12), rgba(29,90,142,0.12));
  color: var(--primary);
  font-size: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feature h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature p { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 12px; }
.feature .tag {
  display: inline-block;
  font-size: 11px;
  color: var(--primary);
  background: rgba(44,127,191,0.10);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

/* 更多平台能力 - 紧凑 4x2 网格 */
.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.capability {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s;
}
.capability:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(44,127,191,0.30);
}
.capability .row1 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.capability .ico-sm {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(44,127,191,0.10), rgba(29,90,142,0.10));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.capability h4 { font-size: 14px; font-weight: 700; color: var(--text-1); }
.capability p {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 1023px) {
  .capability-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .capability-grid { grid-template-columns: 1fr; }
}

/* 架构图 */
.arch {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 80px 1fr 80px 1fr;
  gap: 0;
  align-items: stretch;
  box-shadow: var(--shadow-md);
}
.arch-col {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
  border: 1px solid var(--border);
}
.arch-col .layer {
  font-size: 11px;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.arch-col h4 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.arch-col .item {
  font-size: 12px;
  background: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}
.arch-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 11px;
  position: relative;
}
.arch-arrow::before {
  content: "";
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  position: absolute;
  top: 50%;
}
.arch-arrow .label {
  background: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  z-index: 1;
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
}

/* Store 预览 */
.store-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.preview-cta {
  text-align: center;
  margin-top: 32px;
}

/* CLI 暗色 + API 双卡 */
.dev-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}
.cli-card {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.cli-card .eyebrow {
  font-size: 11px;
  color: #43e97b;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 8px;
}
.cli-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.cli-card p { font-size: 14px; opacity: 0.75; margin-bottom: 20px; line-height: 1.6; }
.cli-card .code {
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-family: "Fira Code", "JetBrains Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.9;
}
.cli-card .code .sh { color: #43e97b; }
.cli-card .code .cm { color: rgba(255,255,255,0.5); }
.cli-card .code .ar { color: #fcd34d; }

.api-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
}
.api-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.api-card .lead { font-size: 14px; color: var(--text-2); margin-bottom: 20px; }
.api-card .api-list { display: flex; flex-direction: column; gap: 10px; }
.api-card .api-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-family: monospace;
}
.api-card .api-item .method {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.api-card .api-item .get { background: rgba(82,196,26,0.10); color: var(--success); }
.api-card .api-item .post { background: rgba(44,127,191,0.10); color: var(--primary); }
.api-card .api-item .ws { background: rgba(250,140,22,0.10); color: var(--warning); }

/* 底部 CTA */
.final-cta {
  background: var(--primary-grad);
  padding: 80px 24px;
  text-align: center;
  color: #fff;
}
.final-cta h2 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.final-cta p { font-size: 16px; opacity: 0.92; margin-bottom: 28px; }
.final-cta .btn {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  padding: 14px 32px;
  font-size: 15px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.20);
}

/* Footer */
.footer {
  background: #0f1024;
  color: rgba(255,255,255,0.7);
  padding: 56px 24px 24px;
  font-size: 13px;
}
.footer .wrap { max-width: 1200px; margin: 0 auto; }
.footer .cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer .col h5 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.footer .col a {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
}
.footer .col a:hover { color: #fff; }
.footer .desc { font-size: 13px; line-height: 1.7; margin: 12px 0 16px; opacity: 0.7; max-width: 280px; }
.footer .copy {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  opacity: 0.5;
  font-size: 12px;
}

/* ============================================================
   13. 登录 / 注册 页
   ============================================================ */

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
}
.auth-side {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(255,255,255,0.18), transparent 50%),
    var(--primary-grad);
  color: #fff;
  padding: 64px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.10) 0%, transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(67,233,123,0.20) 0%, transparent 30%);
}
.auth-side > * { position: relative; }
.auth-side .brand {
  padding: 0;
  color: #fff;
}
.auth-side .brand .name { color: #fff; font-size: 18px; }
.auth-side .brand .ver { background: rgba(255,255,255,0.18); color: #fff; }
.auth-side .brand .logo { width: 44px; height: 44px; background: rgba(255,255,255,0.10); }
.auth-side .pitch h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 14px;
}
.auth-side .pitch p {
  font-size: 15px;
  line-height: 1.7;
  opacity: 0.9;
  max-width: 420px;
}
.auth-side .quote {
  font-size: 13px;
  opacity: 0.7;
  border-left: 2px solid rgba(255,255,255,0.30);
  padding-left: 12px;
  margin-top: 24px;
}

.auth-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.auth-form .panel {
  width: 100%;
  max-width: 380px;
}
.auth-form .panel h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}
.auth-form .panel .sub { font-size: 13px; color: var(--text-2); margin-bottom: 24px; }
.auth-form .tabs {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
}
.auth-form .tabs button {
  flex: 1;
  padding: 9px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  transition: all 0.2s;
}
.auth-form .tabs button.active { background: #fff; color: var(--text-1); box-shadow: var(--shadow-sm); }
.auth-form .field { margin-bottom: 14px; }
.auth-form .field label {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 500;
}
.auth-form .field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  font-size: 14px;
  background: #fff;
  transition: all 0.15s;
  box-sizing: border-box;
}
.auth-form .field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(44,127,191,0.12); }
.auth-form .row-x {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 12px;
}
.auth-form .row-x label { color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.auth-form .row-x a { color: var(--primary); }
.auth-form .submit {
  width: 100%;
  height: 46px;
  background: var(--primary-grad);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}
.auth-form .submit:hover { box-shadow: 0 8px 24px rgba(44,127,191,0.40); transform: translateY(-1px); }
.auth-form .divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
  color: var(--text-3);
  font-size: 12px;
}
.auth-form .divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--border);
}
.auth-form .divider span { background: #fff; padding: 0 12px; position: relative; }
.auth-form .socials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.auth-form .socials button {
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-1);
  background: #fff;
}
.auth-form .socials button:hover { border-color: var(--primary); color: var(--primary); }
.auth-form .footer-link {
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  margin-top: 18px;
}
.auth-form .footer-link a { color: var(--primary); font-weight: 600; }

/* ============================================================
   响应式 — 门户 / 登录页
   ============================================================ */

@media (max-width: 1023px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 24px; }
  .hero h1 { font-size: 42px; }
  .hero .visual { height: 280px; }
  .hero .visual .arm { font-size: 140px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .arch { grid-template-columns: 1fr; gap: 10px; padding: 20px; }
  .arch-arrow {
    /* 重置桌面横向写法, 改竖向 */
    transform: none;
    height: 36px;
    width: 100%;
    flex-direction: row;
    gap: 8px;
  }
  .arch-arrow::before {
    /* 竖向短虚线 */
    width: 1px;
    height: 28px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(180deg, transparent, var(--primary), transparent);
  }
  .arch-arrow .label {
    position: relative;
    z-index: 1;
  }
  .store-preview { grid-template-columns: repeat(2, 1fr); }
  .dev-grid { grid-template-columns: 1fr; }
  .footer .cols { grid-template-columns: repeat(2, 1fr); }
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

@media (max-width: 767px) {
  .landing-nav .wrap { padding: 0 16px; height: 56px; gap: 12px; }
  .landing-nav .links { display: none; }
  .landing-nav-toggle {
    display: inline-flex;
    width: 36px; height: 36px;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
  }
  .landing-nav .auth .btn-ghost { display: none; }

  .hero { padding: 40px 16px 32px; }
  .hero h1 { font-size: 32px; }
  .hero p.lead { font-size: 14px; }
  .hero .visual { height: 200px; }
  .hero .visual .arm { font-size: 100px; }
  .hero .visual .chip { font-size: 10px; padding: 6px 10px; }
  .hero .cta-row .btn { flex: 1; justify-content: center; }

  .live-stats { padding: 18px 12px; }
  .live-stats .wrap { grid-template-columns: repeat(2, 1fr); gap: 16px 8px; }
  .live-stat:nth-child(2)::after { display: none; }
  .live-stat .num { font-size: 26px; }

  .section { padding: 48px 16px; }
  .section-title { margin-bottom: 32px; }
  .section-title h2 { font-size: 26px; }
  .section-title p { font-size: 14px; }

  .feature-grid { grid-template-columns: 1fr; gap: 12px; }
  .feature { padding: 20px 18px; }

  .arch { padding: 14px; }
  .arch-col { padding: 16px 12px; }

  .store-preview { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .store-preview .task-card .cover { height: 90px; font-size: 32px; }
  .store-preview .task-card .body { padding: 10px; }
  .store-preview .task-card .title { font-size: 12px; }
  .store-preview .task-card .desc { font-size: 11px; height: 32px; }

  .cli-card, .api-card { padding: 22px; }
  .cli-card h3, .api-card h3 { font-size: 18px; }
  .cli-card .code { font-size: 11px; padding: 12px; }

  .final-cta { padding: 48px 16px; }
  .final-cta h2 { font-size: 26px; }

  .footer { padding: 36px 16px 16px; }
  .footer .cols { grid-template-columns: 1fr 1fr; gap: 20px; }

  .auth-form { padding: 24px 16px; }
  .auth-form .panel h1 { font-size: 24px; }
}
