@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* MeshP2P 控制台 — 全屏应用壳与统一视觉；管理平台页（data-shell=app）使用 Inter + MeshConsole 浅色侧栏 */

#meshPaneHost .mesh-pane[hidden] {
  display: none !important;
}

#meshPaneHost .mesh-pane:not([hidden]) {
  display: block;
}

:root {
  /* 与 Tailwind slate-950 / 登录页深色网格对齐 */
  --bg-deep: #020617;
  --bg: #0a0f18;
  --surface: #121826;
  --surface2: #1a2234;
  --surface-elevated: #1e2738;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eef2f8;
  --muted: #8b96ab;
  --accent: #22d3ee;
  --accent-dim: #06b6d4;
  --accent-glow: rgba(34, 211, 238, 0.22);
  --success: #34d399;
  --danger: #f87171;
  --radius: 12px;
  --radius-sm: 8px;
  --font: system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  --sidebar-w: 260px;
  --sidebar-w-collapsed: 72px;
  --topbar-h: 56px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  font-family: var(--font);
  background-color: var(--bg-deep);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* 背景：网格 + 光晕 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 100% 80% at 15% -10%, rgba(34, 211, 238, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 95% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-dim);
  text-decoration: none;
}

/* —— 营销页 / 通用窄布局 —— */
.layout {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
  position: relative;
}

.layout-wide {
  max-width: none;
  padding: 0;
  min-height: 100vh;
}

/* —— 全屏应用壳 —— */
.app-body {
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-shell {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
}

/* 未通过 /api/mesh/me 前不展示控制台（对齐 LoongStar admin-gate） */
body.app-body[data-shell='app'] .app-shell {
  display: none !important;
}

html.mesh-shell-ready body.app-body[data-shell='app'] .app-shell {
  display: flex !important;
}

.mesh-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
}

body.app-body[data-shell='app'] .mesh-auth-gate {
  display: flex;
}

html.mesh-shell-ready .mesh-auth-gate {
  display: none !important;
}

.mesh-auth-gate-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
}

.mesh-auth-gate-hourglass {
  display: flex;
  color: var(--accent);
}

.mesh-auth-gate-hourglass svg {
  animation: mesh-gate-spin 1.1s linear infinite;
}

@keyframes mesh-gate-spin {
  to {
    transform: rotate(360deg);
  }
}

.mesh-auth-gate-text {
  font-size: 15px;
  color: var(--muted);
}

.mesh-auth-gate-login-btn {
  min-width: 120px;
  padding: 10px 28px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: #020617;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.mesh-auth-gate-login-btn:hover {
  background: var(--accent-dim);
}

.mesh-auth-gate-login-btn:focus-visible {
  outline: 2px solid var(--accent-glow);
  outline-offset: 2px;
}

.sidebar {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: rgba(18, 24, 38, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--border);
  transition: flex-basis 0.22s ease, width 0.22s ease;
}

.app-shell.is-sidebar-collapsed .sidebar {
  flex-basis: var(--sidebar-w-collapsed);
  width: var(--sidebar-w-collapsed);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
  min-height: var(--topbar-h);
}

.sidebar-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
  box-shadow: 0 4px 20px var(--accent-glow);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.sidebar-brand-mark svg {
  display: block;
}

.sidebar-brand-text {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
}

.app-shell.is-sidebar-collapsed .sidebar-brand-text {
  opacity: 0;
  width: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.sidebar-link.is-active {
  position: relative;
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.22), 0 0 24px rgba(34, 211, 238, 0.06);
}
.sidebar-link.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #22d3ee, #06b6d4);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
}
.sidebar-link svg {
  flex-shrink: 0;
  opacity: 0.9;
}
.sidebar-link.is-active svg {
  color: var(--accent);
}

/* 覆盖 .sidebar-link { display:flex }，否则带 hidden 的项仍会显示 */
.sidebar-nav .sidebar-link[hidden] {
  display: none !important;
}

.sidebar-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  flex-shrink: 0;
  opacity: 0.95;
  color: inherit;
}
.sidebar-ico svg {
  display: block;
}

.sidebar-label {
  white-space: nowrap;
  overflow: hidden;
}

.app-shell.is-sidebar-collapsed .sidebar-label {
  display: none;
}

.sidebar-foot {
  padding: 0.6rem;
  border-top: 1px solid var(--border);
}

.sidebar-collapse-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sidebar-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.app-shell.is-sidebar-collapsed .sidebar-collapse-btn .collapse-text {
  display: none;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  /* 右侧工作区：白系浅色（侧栏仍为深色 :root 变量） */
  --ws-bg: #f1f5f9;
  --ws-surface: #ffffff;
  --ws-surface-muted: #f8fafc;
  --ws-border: #e2e8f0;
  --ws-border-strong: #cbd5e1;
  --ws-text: #0f172a;
  --ws-muted: #64748b;
  background: var(--ws-bg);
  color: var(--ws-text);
}

.app-topbar {
  flex: 0 0 var(--topbar-h);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 16, 23, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.app-topbar--with-token {
  /* 覆盖 .app-topbar 的 flex: 0 0 var(--topbar-h)，否则主轴高度锁在 56px，令牌条会溢出盖住 .app-scroll */
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-content: center;
  row-gap: 0.35rem;
  min-height: var(--topbar-h);
  height: auto;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.app-topbar--with-token .page-title {
  order: 1;
}

.app-topbar--with-token .shell-user-wrap {
  order: 2;
}

.client-token-strip {
  order: 3;
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(99, 102, 241, 0.08));
  box-shadow: 0 0 0 1px var(--accent-glow);
}

.client-token-strip-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.client-token-strip-hint {
  font-size: 0.78rem;
  color: var(--muted);
  flex: 1 1 180px;
}

.client-token-value {
  font-size: 0.75rem;
  word-break: break-all;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-strong);
  color: var(--success);
  max-width: min(100%, 42rem);
}

.client-token-copy-btn {
  flex-shrink: 0;
}

.page-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.topbar-right,
.shell-user-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.app-body[data-shell='app'] .mesh-lang-select {
  padding: 0.35rem 1.75rem 0.35rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  color: #1e3b4a;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 0.5rem center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  min-height: 2rem;
  box-sizing: border-box;
}

body.app-body[data-shell='app'] .mesh-lang-select:hover {
  border-color: #76b900;
}

body.app-body[data-shell='app'] .mesh-lang-select:focus {
  outline: 2px solid rgba(118, 185, 0, 0.35);
  outline-offset: 1px;
}

.shell-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.shell-badge-admin {
  background: rgba(34, 211, 238, 0.15);
  color: var(--accent);
}
.shell-badge-user {
  background: rgba(139, 150, 171, 0.12);
  color: var(--muted);
}

.shell-user-pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(8, 12, 22, 0.65);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.08);
}

.shell-user-meta {
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  cursor: pointer;
}
.btn-logout:hover {
  color: var(--text);
  border-color: var(--muted);
}

.app-scroll {
  flex: 1;
  overflow: auto;
  padding: 1.25rem 1.5rem 2rem;
}

/* —— 控制台主内容（与侧栏一致的深色玻璃卡片） —— */
.app-scroll-inner {
  width: 100%;
  max-width: none;
  margin: 0;
}

.app-scroll .card {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.app-scroll .card:hover {
  border-color: rgba(34, 211, 238, 0.2);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(34, 211, 238, 0.08),
    0 0 40px rgba(34, 211, 238, 0.06);
}

/* —— 控制台右侧工作区：浅色顶栏、卡片与表格（继承 .app-main 上 --ws-*） —— */
.app-main .page-title {
  color: var(--ws-text);
}

.app-main .app-topbar {
  background: #ffffff;
  border-bottom-color: var(--ws-border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.app-main .shell-user-pill {
  background: var(--ws-surface-muted);
  border-color: var(--ws-border-strong);
  box-shadow: none;
}

.app-main .shell-user-meta {
  color: var(--ws-muted);
}

.app-main .shell-badge-user {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.app-main .shell-badge-admin {
  background: rgba(6, 182, 212, 0.12);
  color: #0e7490;
}

.app-main .btn-logout {
  border-color: var(--ws-border-strong);
  color: var(--ws-muted);
}

.app-main .btn-logout:hover {
  color: var(--ws-text);
  border-color: #94a3b8;
}

.app-main .client-token-strip {
  border-color: rgba(6, 182, 212, 0.45);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(99, 102, 241, 0.06));
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.app-main .client-token-strip-hint {
  color: var(--ws-muted);
}

.app-main .client-token-value {
  background: var(--ws-surface-muted);
  border-color: var(--ws-border-strong);
  color: #047857;
}

.app-main .app-scroll .card {
  background: var(--ws-surface);
  border: 1px solid var(--ws-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.app-main .app-scroll .card:hover {
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(6, 182, 212, 0.12);
}

.app-main .card-section-title,
.app-main .subcard-title {
  color: var(--ws-text);
}

.app-main .card-desc,
.app-main .subcard-desc {
  color: var(--ws-muted);
}

.app-main .table-wrap {
  background: var(--ws-surface-muted);
  border-color: var(--ws-border);
}

.app-main .table-wrap th,
.app-main table th {
  color: var(--ws-muted);
  background: #eef2f6;
  border-bottom-color: var(--ws-border);
}

.app-main .table-wrap td,
.app-main table td {
  color: var(--ws-text);
  border-bottom-color: var(--ws-border);
}

.app-main tbody tr:hover td {
  background: rgba(15, 23, 42, 0.035);
}

/* Mesh 各页：表格/输入/按钮与虚拟网络页对齐 */
.app-main .table-wrap table {
  font-size: 0.875rem;
  margin-top: 0;
}

.app-main .table-wrap th {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #3b4e62;
}

.app-main .table-wrap td {
  font-size: 0.875rem;
  color: #0f172a;
}

.app-main .table-wrap .dev-pill {
  font-size: 0.875rem;
}

.app-main .table-wrap tr.empty-row td {
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
  padding: 2rem 1rem;
}

.app-main .device-empty p {
  font-size: 0.875rem;
}

.app-main .card .console-field-label,
.app-main .mesh-field-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #3b4e62;
}

.app-main .card .console-field select,
.app-main .card .console-field input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='button']):not([type='submit']):not([type='reset']):not([type='file']):not([type='image']),
.app-main .app-scroll .console-field select,
.app-main .app-scroll .console-field input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='button']):not([type='submit']):not([type='reset']):not([type='file']):not([type='image']) {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin-top: 0.35rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: #ffffff;
  color: #0f172a;
}

.app-main .card .console-field select,
.app-main .app-scroll .console-field select {
  cursor: pointer;
}

.app-main .card .console-field select:focus,
.app-main .card .console-field input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='button']):not([type='submit']):not([type='reset']):not([type='file']):not([type='image']):focus,
.app-main .app-scroll .console-field select:focus,
.app-main .app-scroll .console-field input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='button']):not([type='submit']):not([type='reset']):not([type='file']):not([type='image']):focus {
  outline: none;
  border-color: #3c8dbc;
  box-shadow: 0 0 0 3px rgba(60, 141, 188, 0.2);
  background: #ffffff;
}

.app-main .card .console-field select option {
  color: #1e2f3c;
  background: #ffffff;
}

.app-main .card .console-field select option:checked,
.app-main .card .console-field select option:hover,
.app-main .card .console-field select:focus option:checked {
  background: #3c8dbc;
  color: #ffffff;
}

.app-main .card-toolbar .btn,
.app-main .table-wrap .btn,
.app-main .mesh-modal-actions .btn {
  margin-top: 0;
}

.app-main .card-toolbar .btn-primary,
body[data-shell='app'] .mesh-modal-panel .btn-primary {
  background: linear-gradient(105deg, #1e6f9f, #2388b5);
  color: #ffffff;
  border: none;
  box-shadow: none;
  filter: none;
}

.app-main .card-toolbar .btn-primary:hover,
body[data-shell='app'] .mesh-modal-panel .btn-primary:hover {
  background: linear-gradient(105deg, #155f89, #1c729b);
  color: #ffffff;
  box-shadow: none;
  filter: none;
  transform: translateY(-1px);
}

.app-main .card-toolbar .btn-outline,
.app-main .table-wrap .btn-outline.btn-sm {
  background: #eef3fc;
  border: 1px solid #caddf0;
  color: #1e6f9f;
  box-shadow: none;
  filter: none;
}

.app-main .card-toolbar .btn-outline:hover,
.app-main .table-wrap .btn-outline.btn-sm:hover {
  background: #e2edf9;
  border-color: #b8d4ec;
  color: #155f89;
  box-shadow: none;
  filter: none;
  transform: translateY(-1px);
}

.app-main .table-wrap .btn-danger.btn-sm {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  box-shadow: none;
  filter: none;
}

.app-main .table-wrap .btn-danger.btn-sm:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
  box-shadow: none;
  filter: none;
}

body[data-shell='app'] .mesh-modal-panel .mesh-modal-actions .btn-outline {
  color: #475569;
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: none;
  filter: none;
}

body[data-shell='app'] .mesh-modal-panel .mesh-modal-actions .btn-outline:hover {
  color: #0f172a;
  background: #e2e8f0;
  border-color: #94a3b8;
  box-shadow: none;
  filter: none;
}

body[data-shell='app'] .mesh-modal-panel .btn-danger {
  background: linear-gradient(105deg, #c53030, #e53e3e);
  color: #ffffff;
  border: none;
  box-shadow: none;
  filter: none;
}

body[data-shell='app'] .mesh-modal-panel .btn-danger:hover {
  background: linear-gradient(105deg, #9b2c2c, #c53030);
  color: #ffffff;
  border: none;
  box-shadow: none;
  filter: none;
}

.app-main .console-summary-box {
  background: var(--ws-surface-muted);
  border-color: var(--ws-border);
  color: var(--ws-text);
}

.app-main .console-summary-box .hl {
  background: rgba(6, 182, 212, 0.12);
  color: #0e7490;
}

.app-main .device-empty {
  color: var(--ws-muted);
}

.app-main .device-empty svg {
  color: #94a3b8;
}

.app-main label {
  color: var(--ws-muted);
}

.app-main input[type='text'],
.app-main input[type='password'],
.app-main input[type='email'],
.app-main input[type='tel'] {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.55);
  color: #0f172a;
  font-size: 0.875rem;
}

.app-main select {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.55);
  color: #0f172a;
  font-size: 0.875rem;
}

.app-main input[type='text']:focus,
.app-main input[type='password']:focus,
.app-main input[type='email']:focus,
.app-main input[type='tel']:focus,
.app-main select:focus {
  outline: none;
  border-color: #3c8dbc;
  box-shadow: 0 0 0 3px rgba(60, 141, 188, 0.2);
}

.app-main .app-scroll input[type='text']:-webkit-autofill,
.app-main .app-scroll input[type='password']:-webkit-autofill,
.app-main .app-scroll input[type='email']:-webkit-autofill,
.app-main .app-scroll input[type='tel']:-webkit-autofill,
.app-main .app-scroll input[type='text']:-webkit-autofill:hover,
.app-main .app-scroll input[type='password']:-webkit-autofill:hover,
.app-main .app-scroll input[type='email']:-webkit-autofill:hover,
.app-main .app-scroll input[type='tel']:-webkit-autofill:hover,
.app-main .app-scroll input[type='text']:-webkit-autofill:focus,
.app-main .app-scroll input[type='password']:-webkit-autofill:focus,
.app-main .app-scroll input[type='email']:-webkit-autofill:focus,
.app-main .app-scroll input[type='tel']:-webkit-autofill:focus,
.app-main .app-scroll input[type='text']:-webkit-autofill:active,
.app-main .app-scroll input[type='password']:-webkit-autofill:active,
.app-main .app-scroll input[type='email']:-webkit-autofill:active,
.app-main .app-scroll input[type='tel']:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: var(--ws-text) !important;
  caret-color: var(--ws-text);
}

.app-main .dev-pill--on {
  color: #065f46;
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(5, 150, 105, 0.45);
  box-shadow: none;
}

.app-main .dev-pill--off {
  color: #475569;
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(100, 116, 139, 0.35);
}

.app-main .role-badge--user {
  color: #0e7490;
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.4);
}

.app-main .role-badge--admin {
  color: #6d28d9;
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: none;
}

.app-main .btn-outline {
  color: var(--ws-text);
  border-color: var(--ws-border-strong);
}

.app-main .btn-outline:hover {
  color: #0e7490;
  border-color: rgba(6, 182, 212, 0.5);
  background: rgba(6, 182, 212, 0.08);
  box-shadow: none;
}

.app-main .btn-ghost {
  color: var(--ws-muted);
  border-color: var(--ws-border-strong);
}

.app-main .btn-ghost:hover {
  color: var(--ws-text);
  background: rgba(15, 23, 42, 0.04);
}

.app-main .btn-danger {
  background: rgba(254, 226, 226, 0.85);
  color: #b91c1c;
  border-color: rgba(248, 113, 113, 0.45);
}

.app-main .btn-danger:hover {
  background: rgba(254, 202, 202, 0.95);
}

.app-main .card-divider {
  background: linear-gradient(90deg, transparent, var(--ws-border), transparent);
}

.app-main .err {
  background: rgba(254, 226, 226, 0.75);
  border-color: rgba(248, 113, 113, 0.35);
  color: #991b1b;
}

.app-main .ok-banner {
  background: rgba(209, 250, 229, 0.85);
  border-color: rgba(52, 211, 153, 0.35);
  color: #166534;
}

/* 控制台弹层（端口转发规则等） */
.mesh-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  overflow-y: auto;
}
.mesh-modal-overlay[hidden] {
  display: none !important;
}
.mesh-modal-overlay--static {
  /* 仅右上角 X 关闭，不响应遮罩点击 */
}
.mesh-modal-overlay--pf-rule {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.mesh-modal-panel--closable {
  position: relative;
  overflow: visible;
}
.mesh-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.mesh-modal__head .mesh-modal-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.mesh-modal-overlay .neo-login-close {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  padding: 0;
  z-index: 2;
  transition: background 0.3s;
}
.mesh-modal-overlay .neo-login-close:hover {
  background: rgba(0, 0, 0, 0.2);
}
.mesh-modal-overlay .neo-login-close .ll-otp-close-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.pf-rule-modal .mesh-modal__head {
  margin-bottom: 0;
}
.pf-rule-modal .neo-login-close {
  align-self: flex-start;
}
.mesh-modal-panel {
  width: 100%;
  max-width: min(40rem, 100%);
  max-height: min(90vh, 44rem);
  overflow: auto;
  margin: auto;
  padding: 1.35rem 1.5rem 1.5rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.2);
}
.mesh-modal-panel--sm {
  max-width: min(24rem, 100%);
  max-height: none;
}
.mesh-modal-title {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.mesh-modal-lead {
  margin: 0 0 1.1rem;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.5;
}
.mesh-password-modal {
  max-width: min(28rem, 100%);
}
.mesh-password-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.mesh-password-modal__head .mesh-modal-title {
  margin: 0;
}
.mesh-modal-panel .err {
  color: #991b1b;
  background: rgba(254, 226, 226, 0.95);
  border-color: rgba(248, 113, 113, 0.4);
}
.mesh-modal-panel .ok-banner {
  color: #166534;
  background: rgba(209, 250, 229, 0.95);
  border-color: rgba(52, 211, 153, 0.4);
}
.mesh-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
  padding-top: 0.25rem;
}
/* 白底弹窗内取消/次要按钮：勿沿用全站深色区的 ghost/outline，否则 hover 发灰看不清 */
.mesh-modal-panel .mesh-modal-actions .btn-ghost,
.mesh-modal-panel .mesh-modal-actions .btn-outline {
  color: #475569;
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: none;
  filter: none;
}
.mesh-modal-panel .mesh-modal-actions .btn-ghost:hover,
.mesh-modal-panel .mesh-modal-actions .btn-outline:hover {
  color: #0f172a;
  background: #e2e8f0;
  border-color: #94a3b8;
  box-shadow: none;
  filter: none;
}
.mesh-modal-panel label {
  color: #64748b;
}
.mesh-modal-panel input[type='text'],
.mesh-modal-panel input[type='password'],
.mesh-modal-panel input[type='email'],
.mesh-modal-panel input[type='tel'],
.mesh-modal-panel select {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.55);
  color: #0f172a;
  font-size: 0.875rem;
}

.mesh-modal-panel input[type='text']:focus,
.mesh-modal-panel input[type='password']:focus,
.mesh-modal-panel input[type='email']:focus,
.mesh-modal-panel input[type='tel']:focus,
.mesh-modal-panel select:focus {
  outline: none;
  border-color: #3c8dbc;
  box-shadow: 0 0 0 3px rgba(60, 141, 188, 0.2);
}

.mesh-modal-panel .console-input-wrap {
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: #ffffff;
}

.mesh-modal-panel .console-input-wrap:focus-within {
  border-color: #3c8dbc;
  box-shadow: 0 0 0 3px rgba(60, 141, 188, 0.2);
}
.mesh-modal-panel .console-field-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #3b4e62;
}
.mesh-modal-panel .console-summary-box {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #0f172a;
}
.mesh-modal-panel .console-summary-box .hl {
  background: rgba(6, 182, 212, 0.12);
  color: #0e7490;
}

/* —— 端口转发规则弹窗（大圆角卡片、双列网格、白名单、预览条、圆角主次按钮） —— */
@keyframes pf-rule-modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mesh-modal-panel.pf-rule-modal {
  width: 100%;
  max-width: min(55rem, 92vw);
  max-height: min(90vh, 52rem);
  padding: 0;
  border-radius: 28px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.02);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: auto;
  animation: pf-rule-modal-in 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.pf-rule-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  padding: 1.35rem 2rem 1.1rem;
  border-bottom: 1px solid #eef2f6;
  background: #fefefe;
}

.pf-rule-modal__head-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.pf-rule-modal__head-title h3 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #1e2b3c, #1f3e48);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pf-rule-modal__head-icon {
  display: flex;
  flex-shrink: 0;
  color: #2c6e9e;
}

.pf-rule-modal__close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 40px;
  background: #f1f5f9;
  color: #5f6c7a;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.pf-rule-modal__close:hover {
  background: #e6edf4;
  color: #1f2e3a;
  transform: rotate(90deg);
}

.pf-rule-modal__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem 2rem 0.5rem;
  scrollbar-width: thin;
}

.pf-rule-modal__scroll::-webkit-scrollbar {
  width: 6px;
}

.pf-rule-modal__scroll::-webkit-scrollbar-track {
  background: #eef2f8;
  border-radius: 8px;
}

.pf-rule-modal__scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}

.pf-rule-form {
  padding: 0;
  margin-bottom: 1.5rem;
}

.pf-rule-form.form-grid-2 {
  gap: 1.25rem 1.75rem;
}

@media (min-width: 640px) {
  .pf-rule-form.form-grid-2 .pf-field--target-port {
    grid-column: 1;
  }
}

.pf-rule-modal label.pf-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0;
  text-transform: none;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.pf-rule-modal .pf-field-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #3b4e62;
}

.pf-rule-modal .pf-field-ico {
  display: flex;
  color: #5b7c9c;
  opacity: 1;
}

.pf-rule-modal .console-input-wrap {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pf-rule-modal .console-input-wrap:focus-within {
  border-color: #3c8dbc;
  box-shadow: 0 0 0 3px rgba(60, 141, 188, 0.2);
}

.pf-rule-modal .console-input-wrap input {
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #0f172a;
}

.pf-rule-modal .pf-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  margin-top: 0;
  padding: 0.55rem 2.35rem 0.55rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.55);
  background-color: #ffffff;
  color: #0f172a;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.pf-rule-modal .pf-select:hover,
.pf-rule-modal .console-input-wrap:hover {
  border-color: #b9cfdf;
}

.pf-rule-modal .pf-select:focus {
  outline: none;
  border-color: #3c8dbc;
  box-shadow: 0 0 0 3px rgba(60, 141, 188, 0.2);
}

.pf-rule-modal__full {
  margin-top: 0.25rem;
  margin-bottom: 1.25rem;
}

.pf-whitelist-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pf-whitelist-block .pf-field--block {
  margin: 0;
}

.pf-whitelist-sub {
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0;
  text-transform: none;
  color: #5c7a94;
}

.pf-whitelist-block .console-input-wrap input {
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
  font-size: 0.85rem;
}

.pf-whitelist-hint {
  margin-top: 0.25rem;
  font-size: 0.7rem;
  color: #7890a8;
  letter-spacing: 0.2px;
}

.pf-whitelist-block .pf-field-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  line-height: 1.5;
}

.pf-whitelist-block .pf-field-hint-ico {
  flex-shrink: 0;
  margin-top: 0.08rem;
  color: #a8b0ba;
}

.pf-preview-card {
  margin: 1rem 0 1.25rem;
  padding: 0.9rem 1.3rem;
  border-radius: 20px;
  background: #f0f6fe;
  border: 1px solid rgba(44, 124, 182, 0.18);
  border-left: 4px solid #2c7cb6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  font-size: 0.85rem;
  line-height: 1.65;
  color: #1a465b;
}

.pf-preview-card__body {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pf-preview-card__ico {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.78);
  color: #1e6f9f;
}

.pf-preview-card__text {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-weight: 500;
  word-break: break-word;
}

.pf-preview-card .hl {
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 12px;
  background: #e2edf9;
  color: #1a5276;
}

.pf-rule-modal__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
  flex-shrink: 0;
  padding: 1rem 2rem 1.6rem;
  background: #ffffff;
  border-top: 1px solid #edf2f7;
}

.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 40px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.pf-btn--secondary {
  background: #f1f5f9;
  color: #2c3e50;
  border-color: #e2e8f0;
}

.pf-btn--secondary:hover {
  background: #e6edf4;
  transform: translateY(-1px);
}

.pf-btn--primary {
  background: linear-gradient(105deg, #1e6f9f, #2388b5);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(30, 111, 159, 0.25);
}

.pf-btn--primary:hover {
  background: linear-gradient(105deg, #155f89, #1c729b);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px -6px rgba(30, 111, 159, 0.4);
}

@media (max-width: 700px) {
  .pf-rule-modal__scroll {
    padding: 1rem 1.2rem 0.5rem;
  }
  .pf-rule-modal__foot {
    padding: 1rem 1.2rem 1.4rem;
  }
}

.pf-rule-status {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pf-rule-status--on {
  color: #065f46;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(5, 150, 105, 0.35);
}
.pf-rule-status--off {
  color: #475569;
  background: rgba(148, 163, 184, 0.22);
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.app-main .console-jump {
  color: var(--ws-muted);
}

.app-main .security-warn {
  border-color: rgba(234, 179, 8, 0.45);
  background: rgba(254, 252, 232, 0.95);
  color: #713f12;
}

.app-main .security-warn-title {
  color: #a16207;
}

.app-main .pw-strength-label {
  color: var(--ws-muted);
}

.app-main .console-field-label {
  color: var(--ws-muted);
}

.app-main .console-input-wrap {
  border-color: var(--ws-border-strong);
  background: #ffffff;
}

.app-main .console-input-wrap:focus-within {
  border-color: rgba(6, 182, 212, 0.55);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

.app-main .console-input-wrap input[type='text'],
.app-main .console-input-wrap input[type='password'],
.app-main .console-input-wrap input[type='email'],
.app-main .console-input-wrap input[type='tel'] {
  border: none;
  background: transparent;
  box-shadow: none;
  color: var(--ws-text);
}
.app-main .console-input-wrap input[type='text']:focus,
.app-main .console-input-wrap input[type='password']:focus,
.app-main .console-input-wrap input[type='email']:focus,
.app-main .console-input-wrap input[type='tel']:focus {
  border: none;
  box-shadow: none;
}

.app-main .console-input-toggle {
  color: var(--ws-muted);
}

.app-main .console-input-toggle:hover {
  color: #0e7490;
  background: rgba(6, 182, 212, 0.1);
}

.card-header {
  margin-bottom: 1rem;
}
.card-header .card-section-title {
  margin-bottom: 0.35rem;
}

.card-section-title {
  margin: 0 0 0.45rem;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.app-scroll .card h2.card-section-title:not(:first-child) {
  margin-top: 1.35rem;
}

.card-desc {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.card-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
}
.card-toolbar .btn {
  margin-top: 0;
  margin-right: 0;
}

.table-wrap {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.18);
}

.table-wrap table {
  margin-top: 0;
}

.table-wrap th:first-child,
.table-wrap td:first-child {
  padding-left: 1rem;
}

.table-wrap th:last-child,
.table-wrap td:last-child {
  padding-right: 1rem;
}

.app-scroll .table-wrap tbody tr:last-child td {
  border-bottom: none;
}

.table-wrap td.table-col-actions,
.table-wrap th.table-col-actions {
  white-space: nowrap;
  vertical-align: middle;
  width: 1%;
}

.table-wrap td.table-col-actions .btn {
  white-space: nowrap;
  margin-top: 0;
  margin-bottom: 0;
}
.table-wrap td.table-col-actions .btn + .btn {
  margin-left: 0.35rem;
}

.console-jump {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.console-jump a {
  color: var(--accent);
}
.console-summary-box {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}
.console-summary-box .hl {
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
  font-size: 0.84rem;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: rgba(34, 211, 238, 0.12);
  color: #a5f3fc;
}

.mono-cell {
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
  font-size: 0.8125rem;
  word-break: break-all;
}

.form-grid-2 {
  display: grid;
  gap: 1rem 1.25rem;
  grid-template-columns: 1fr;
}

.form-grid-2 > label {
  margin-top: 0;
}

@media (min-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid-2 .full-row {
    grid-column: 1 / -1;
  }
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 1.15rem;
}

.card-divider {
  border: none;
  height: 1px;
  margin: 1.35rem 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.btn-sm {
  padding: 0.38rem 0.72rem;
  font-size: 0.8125rem;
  margin-top: 0;
  margin-right: 0;
}

.dev-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.dev-pill--on {
  color: #ecfdf5;
  background: rgba(22, 163, 74, 0.35);
  border: 1px solid rgba(52, 211, 153, 0.55);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.15);
}
.dev-pill--off {
  color: rgba(226, 232, 240, 0.75);
  background: rgba(51, 65, 85, 0.55);
  border: 1px solid rgba(100, 116, 139, 0.45);
}

/* 用户管理：角色标签 user=青 admin=紫 */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.role-badge--user {
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.45);
}
.role-badge--admin {
  color: #d8b4fe;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.5);
  box-shadow: 0 0 14px rgba(167, 139, 250, 0.12);
}

/* Toast：右上角滑入（须高于 Mesh 邮箱/登录弹层 10050+） */
.toast-host {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  pointer-events: none;
  max-width: min(100vw - 2rem, 22rem);
}

body[data-shell='app'] .toast-host {
  z-index: 10200;
}

.toast {
  pointer-events: auto;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  color: #f1f5f9;
}
.toast--success {
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 24px rgba(52, 211, 153, 0.12);
}
.toast--error {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}
.toast--info {
  border-color: rgba(34, 211, 238, 0.35);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(110%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 修改密码：黄色安全提示框 */
.security-warn {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  margin-bottom: 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(250, 204, 21, 0.45);
  background: rgba(250, 204, 21, 0.08);
  color: #fef3c7;
  font-size: 0.875rem;
  line-height: 1.55;
}
.security-warn-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: #fde047;
  margin-bottom: 0.25rem;
}

/* 密码强度三色条 */
.pw-strength {
  margin-top: 0.5rem;
}
.pw-strength-track {
  display: flex;
  gap: 4px;
  height: 4px;
  border-radius: 4px;
  overflow: hidden;
}
.pw-strength-seg {
  flex: 1;
  border-radius: 2px;
  background: rgba(100, 116, 139, 0.45);
  transition: background 0.2s, box-shadow 0.2s;
}
.pw-strength--1 .pw-strength-seg:nth-child(1) {
  background: linear-gradient(90deg, #f87171, #ef4444);
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.35);
}
.pw-strength--2 .pw-strength-seg:nth-child(-n + 2) {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.25);
}
.pw-strength--3 .pw-strength-seg:nth-child(-n + 3) {
  background: linear-gradient(90deg, #22d3ee, #06b6d4);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.35);
}
.pw-strength-label {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* 控制台内表单：与登录页一致的输入包裹 */
.console-field {
  display: block;
  margin-top: 1rem;
}
.console-field:first-of-type,
form > .console-field:first-child {
  margin-top: 0;
}
.console-field-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(160, 175, 200, 0.95);
}
.console-input-wrap {
  display: flex;
  align-items: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 12, 20, 0.75);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.console-input-wrap:focus-within {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}
.console-input-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  margin-right: 0.1rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(148, 163, 184, 0.9);
  cursor: pointer;
}
.console-input-toggle:hover {
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.08);
}
.console-ico-eye-off {
  display: none;
}
.console-input-toggle.is-visible .console-ico-eye {
  display: none;
}
.console-input-toggle.is-visible .console-ico-eye-off {
  display: block;
}

/* 设备列表：空状态 */
.device-empty {
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
  color: var(--muted);
}
.device-empty svg {
  display: block;
  margin: 0 auto 1rem;
  opacity: 0.45;
  color: #64748b;
}
.device-empty p {
  margin: 0;
  font-size: 0.95rem;
}

.card-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}
.card-head-row .card-toolbar {
  margin-bottom: 0;
}

.subcard-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.subcard-desc {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.app-scroll .card form > label:first-of-type {
  margin-top: 0;
}

/* —— 卡片与表单 —— */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
}

.card h1,
.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.card h2 {
  font-size: 1.05rem;
  margin-top: 0;
}
.card h2:not(:first-child) {
  margin-top: 1.5rem;
}
.card p.sub {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.panel-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 56rem;
}

.panel-stack.panel-stack--narrow {
  max-width: 26rem;
  margin-left: 0;
  margin-right: 0;
}

.panel-stack.panel-stack--wide {
  max-width: none;
  width: 100%;
}

label {
  display: block;
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input,
button,
select {
  font-family: inherit;
  font-size: 1rem;
}

input[type='text'],
input[type='password'],
input[type='email'],
input[type='tel'] {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface2);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* 仅由 .console-input-wrap 画外框：内层 input 需高于全局 input[type]（0,1,1）的特异度，否则会叠出双边框 */
.console-input-wrap input[type='text'],
.console-input-wrap input[type='password'],
.console-input-wrap input[type='email'],
.console-input-wrap input[type='tel'] {
  flex: 1;
  min-width: 0;
  margin-top: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  padding: 0.65rem 0.75rem;
  color: var(--text);
  box-shadow: none;
}
.console-input-wrap input[type='text']:focus,
.console-input-wrap input[type='password']:focus,
.console-input-wrap input[type='email']:focus,
.console-input-wrap input[type='tel']:focus {
  outline: none;
  border: none;
  box-shadow: none;
}
.mesh-modal-panel .console-input-wrap input[type='text'],
.mesh-modal-panel .console-input-wrap input[type='password'],
.mesh-modal-panel .console-input-wrap input[type='email'],
.mesh-modal-panel .console-input-wrap input[type='tel'] {
  color: #0f172a;
}

/* 控制台表单：去掉 Chrome 自动填充黄底 */
.app-scroll input[type='text']:-webkit-autofill,
.app-scroll input[type='password']:-webkit-autofill,
.app-scroll input[type='email']:-webkit-autofill,
.app-scroll input[type='tel']:-webkit-autofill,
.app-scroll input[type='text']:-webkit-autofill:hover,
.app-scroll input[type='password']:-webkit-autofill:hover,
.app-scroll input[type='email']:-webkit-autofill:hover,
.app-scroll input[type='tel']:-webkit-autofill:hover,
.app-scroll input[type='text']:-webkit-autofill:focus,
.app-scroll input[type='password']:-webkit-autofill:focus,
.app-scroll input[type='email']:-webkit-autofill:focus,
.app-scroll input[type='tel']:-webkit-autofill:focus,
.app-scroll input[type='text']:-webkit-autofill:active,
.app-scroll input[type='password']:-webkit-autofill:active,
.app-scroll input[type='email']:-webkit-autofill:active,
.app-scroll input[type='tel']:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px rgba(26, 34, 52, 0.96) inset !important;
  box-shadow: 0 0 0 1000px rgba(26, 34, 52, 0.96) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  transition: background-color 99999s ease-out 0s;
}

select {
  margin-top: 0.4rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface2);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.5rem 0 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 1rem;
  margin-right: 0.5rem;
  transition: background 0.15s, transform 0.08s, box-shadow 0.15s;
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: #042f2e;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-primary:hover {
  filter: brightness(1.08);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.35);
}
.btn-danger:hover {
  background: rgba(248, 113, 113, 0.2);
}

/* 次要：描边按钮（刷新、编辑） */
.btn-outline {
  background: transparent;
  color: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
}
.btn-outline:hover {
  color: #fff;
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.1);
  background: rgba(34, 211, 238, 0.06);
}

.err {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: #fecaca;
  font-size: 0.9rem;
}
.ok-banner {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: #a7f3d0;
  font-size: 0.9rem;
}

.reg-client-token-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(99, 102, 241, 0.06));
}

.reg-client-token-lead {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: var(--text);
}

.reg-client-token-value {
  display: block;
  font-size: 0.8rem;
  word-break: break-all;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-strong);
  color: var(--success);
}

.reg-client-token-note {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-top: 0.75rem;
}
th,
td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
}
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0, 0, 0, 0.2);
}
tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* —— 营销首页 —— */
.marketing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0 2.5rem;
  gap: 1rem;
}
.marketing-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.marketing-nav a {
  color: var(--muted);
}
.marketing-nav a:hover {
  color: var(--accent);
}

.marketing-hero {
  text-align: center;
  padding: 2rem 0 2.5rem;
  max-width: 40rem;
  margin: 0 auto;
}
.marketing-hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0 0 1rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--muted) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.marketing-hero .lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 2rem;
  line-height: 1.65;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.feature-tile {
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--muted);
  transition: border-color 0.2s, transform 0.2s;
}
.feature-tile:hover {
  border-color: rgba(34, 211, 238, 0.25);
  transform: translateY(-2px);
}
.feature-tile strong {
  display: block;
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.5rem;
}

/* —— 登录 / 注册（设计稿：深色网格 + 双栏玻璃卡片） —— */
body.auth-page-body {
  background-color: #060b14;
}
body.auth-page-body::before {
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, rgba(34, 211, 238, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 100% 80% at 15% -10%, rgba(34, 211, 238, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 95% 20%, rgba(99, 102, 241, 0.06) 0%, transparent 45%),
    linear-gradient(180deg, #0a0f18 0%, #060b14 100%);
}
body.auth-page-body::after {
  opacity: 0.4;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
}

.auth-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem clamp(1rem, 4vw, 2rem) 2.5rem;
  gap: 0;
}

.auth-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background:
    radial-gradient(circle at 6% 14%, rgba(255, 255, 255, 0.45) 0 1px, transparent 2px),
    radial-gradient(circle at 14% 42%, rgba(34, 211, 238, 0.4) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.25) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 12%, rgba(255, 255, 255, 0.35) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 28%, rgba(34, 211, 238, 0.35) 0 1px, transparent 2px),
    radial-gradient(circle at 92% 62%, rgba(255, 255, 255, 0.3) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 48% 8%, rgba(255, 255, 255, 0.2) 0 1px, transparent 2px),
    radial-gradient(circle at 38% 55%, rgba(34, 211, 238, 0.25) 0 1px, transparent 2px),
    radial-gradient(circle at 18% 78%, rgba(255, 255, 255, 0.22) 0 1px, transparent 2px),
    radial-gradient(circle at 58% 72%, rgba(255, 255, 255, 0.28) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 88%, rgba(34, 211, 238, 0.2) 0 1px, transparent 2px),
    radial-gradient(circle at 8% 62%, rgba(255, 255, 255, 0.18) 0 1px, transparent 2px);
}

.auth-page-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(2.5rem, 6vw, 6.25rem);
  width: 100%;
  max-width: 1040px;
}

.auth-visual {
  position: relative;
  flex: 1 1 280px;
  max-width: 26rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.5rem 0;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  text-decoration: none;
  color: inherit;
}
.auth-brand:hover {
  color: inherit;
}
.auth-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: linear-gradient(145deg, #22d3ee 0%, #06b6d4 100%);
  box-shadow: 0 4px 20px rgba(34, 211, 238, 0.35);
  color: #fff;
  flex-shrink: 0;
}
.auth-brand-mark svg {
  display: block;
}
.auth-brand-text {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.auth-visual h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.65rem, 3.2vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f8fafc;
  line-height: 1.2;
}
.auth-visual .auth-lead {
  margin: 0;
  color: rgba(160, 175, 200, 0.95);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.auth-step-list {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.auth-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  transition: border-color 0.2s, background 0.2s, opacity 0.2s;
  opacity: 0.55;
}
.auth-step--active {
  opacity: 1;
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.06);
}
.auth-step--done {
  opacity: 0.85;
}
.auth-step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(148, 163, 184, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.auth-step--active .auth-step-num {
  background: linear-gradient(145deg, #22d3ee 0%, #06b6d4 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(34, 211, 238, 0.35);
}
.auth-step--done .auth-step-num {
  background: rgba(34, 211, 238, 0.15);
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.25);
}
.auth-step-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  padding-top: 0.1rem;
}
.auth-step-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
}
.auth-step-sub {
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.95);
  line-height: 1.4;
}

.auth-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.75rem;
}
.auth-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(34, 211, 238, 0.95);
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid rgba(34, 211, 238, 0.28);
}
.auth-tag svg {
  flex-shrink: 0;
  opacity: 0.9;
}

.auth-panel {
  flex: 1 1 320px;
  max-width: 26rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.auth-card {
  width: 100%;
  padding: 1.75rem 1.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.2) inset;
}

.auth-card-progress-line {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0 0 1rem;
  padding-bottom: 0.85rem;
}
.auth-card-progress-line::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}
.auth-progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}
.auth-progress-dot.is-active {
  width: 8px;
  height: 8px;
  background: #22d3ee;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.55);
}

.auth-card h1 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
}
.auth-card .sub {
  margin: 0 0 1.35rem;
  color: rgba(160, 175, 200, 0.95);
  font-size: 0.8125rem;
  line-height: 1.55;
}
.auth-card .sub code {
  font-size: 0.85em;
  padding: 0.12em 0.4em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  color: #7dd3fc;
}

.auth-card label:not(.auth-checkbox) {
  margin-top: 0;
}

.auth-field {
  display: block;
  margin-top: 1rem;
}
.auth-field:first-of-type,
.auth-card form > .auth-field:first-child {
  margin-top: 0;
}
.auth-field-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(160, 175, 200, 0.95);
  text-transform: none;
  letter-spacing: normal;
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 12, 20, 0.75);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-input-wrap:focus-within {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}
.auth-input-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.65rem;
  color: rgba(148, 163, 184, 0.85);
  pointer-events: none;
}
.auth-input-ico--at {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font);
  color: rgba(148, 163, 184, 0.75);
}
.auth-input-wrap input {
  flex: 1;
  min-width: 0;
  margin-top: 0;
  padding: 0.7rem 0.85rem 0.7rem 0;
  border: none;
  border-radius: 0 8px 8px 0;
  background: transparent;
  color: var(--text);
  font-size: 0.9375rem;
}
.auth-input-wrap input:focus {
  outline: none;
  box-shadow: none;
}
/* 覆盖 Chrome/Edge 自动填充的黄色底，与注册页深色输入一致 */
.auth-input-wrap input:-webkit-autofill,
.auth-input-wrap input:-webkit-autofill:hover,
.auth-input-wrap input:-webkit-autofill:focus,
.auth-input-wrap input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px rgba(8, 12, 20, 0.92) inset !important;
  box-shadow: 0 0 0 1000px rgba(8, 12, 20, 0.92) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  transition: background-color 99999s ease-out 0s;
}

.auth-input-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-right: 0.15rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(148, 163, 184, 0.9);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.auth-input-toggle:hover {
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.08);
}
.auth-input-toggle svg {
  display: block;
}
/* SVG 上 HTML hidden 在部分浏览器无效，用 class 切换互斥显示 */
.auth-input-toggle .auth-ico-eye-off {
  display: none;
}
.auth-input-toggle.is-password-visible .auth-ico-eye {
  display: none;
}
.auth-input-toggle.is-password-visible .auth-ico-eye-off {
  display: block;
}

.auth-card .btn-primary {
  width: 100%;
  margin-top: 1.25rem;
  margin-right: 0;
  padding: 0.72rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #030712;
  background: linear-gradient(135deg, #22d3ee 0%, #0ea5e9 100%);
  box-shadow: 0 8px 28px rgba(14, 165, 233, 0.28);
}
.auth-card .btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 10px 32px rgba(14, 165, 233, 0.38);
}
.auth-card .btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
}
.auth-card .btn-primary:disabled:hover {
  filter: none;
  box-shadow: none;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: rgba(160, 175, 200, 0.95);
}
.checkbox-row input[type='checkbox'] {
  width: 1rem;
  height: 1rem;
  accent-color: #22d3ee;
}
.checkbox-row label.auth-checkbox,
.checkbox-row label[for='rememberUser'] {
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  cursor: pointer;
  color: inherit;
}

.auth-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8125rem;
}
.auth-card-footer-hint {
  color: rgba(148, 163, 184, 0.95);
}
.auth-card-footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.auth-card-footer-actions a {
  color: #22d3ee;
  font-weight: 500;
}
.auth-card-footer-actions a:hover {
  color: #67e8f9;
}
.auth-card-footer-dot {
  color: rgba(148, 163, 184, 0.5);
  user-select: none;
}

.auth-trust-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 1.25rem 0 0;
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.85);
  line-height: 1.4;
  text-align: center;
}
.auth-trust-note svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.brand-inline {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  display: inline-block;
}
.brand-inline span {
  color: var(--accent);
}

@media (max-width: 900px) {
  .auth-page-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .auth-visual {
    max-width: none;
    padding-bottom: 0.5rem;
  }
  .auth-panel {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .app-shell {
    flex-direction: column;
  }
  .sidebar {
    flex: 0 0 auto;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .sidebar-brand {
    flex: 1;
    min-width: 0;
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1 1 100%;
    padding: 0.5rem;
  }
  .sidebar-foot {
    width: 100%;
    border-top: 1px solid var(--border);
  }
  .app-shell.is-sidebar-collapsed .sidebar {
    flex-basis: auto;
    width: 100%;
  }
  .app-shell.is-sidebar-collapsed .sidebar-label {
    display: inline;
  }
  .shell-user-meta {
    max-width: 100%;
  }
}

/* ========== 营销首页（与预览稿一致） ========== */
body.landing-page {
  background: #000510;
  min-height: 100vh;
}
body.landing-page::before,
body.landing-page::after {
  content: none;
}

.landing-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 80% at 50% -25%, rgba(0, 100, 180, 0.22) 0%, transparent 58%),
    radial-gradient(ellipse 70% 55% at 80% 40%, rgba(0, 212, 255, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse 55% 45% at 15% 60%, rgba(0, 153, 204, 0.06) 0%, transparent 45%),
    linear-gradient(180deg, #020814 0%, #000510 50%, #000308 100%);
}
.landing-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0, 212, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, black 15%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, black 15%, transparent 70%);
  opacity: 0.85;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  max-width: 1200px;
  margin: 0 auto;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}
.landing-nav.is-scrolled {
  background: rgba(5, 10, 18, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(0, 212, 255, 0.12);
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.landing-brand:hover {
  color: var(--text);
}
.landing-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.25);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.15);
}
.landing-brand-text {
  color: #f4f7fc;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.25rem;
  flex-wrap: wrap;
}
.landing-nav-link {
  color: rgba(238, 242, 248, 0.75);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.35rem 0;
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}
.landing-nav-link:hover {
  color: #00d4ff;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.35);
}
.landing-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1.1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.landing-nav-btn:hover {
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.12);
  color: #fff;
}

.landing-main {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem) 4rem;
}

.landing-hero {
  text-align: center;
  padding: 2.5rem 0 1.5rem;
}
.landing-hero-inner {
  max-width: 44rem;
  margin: 0 auto;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 1rem 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #00d4ff;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.28);
  box-shadow: 0 0 32px rgba(0, 212, 255, 0.08);
  margin: 0 0 1.35rem;
}
.landing-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00d4ff;
  box-shadow: 0 0 10px #00d4ff;
  animation: landing-pulse 2s ease-in-out infinite;
}
@keyframes landing-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(0.92);
  }
}

.landing-title {
  font-size: clamp(2rem, 5.5vw, 3.15rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.045em;
  margin: 0 0 1.1rem;
  color: #ffffff;
  text-shadow: 0 2px 40px rgba(0, 40, 80, 0.35);
}

.landing-lead {
  margin: 0 0 0.65rem;
  font-size: clamp(0.95rem, 2.2vw, 1.08rem);
  color: rgba(190, 200, 220, 0.9);
  line-height: 1.75;
}
.landing-lead--second {
  margin-bottom: 0.85rem;
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
}

.landing-tagline {
  margin: 0 0 1.85rem;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 700;
  color: #00d4ff;
  letter-spacing: 0.02em;
  text-shadow: 0 0 40px rgba(0, 212, 255, 0.25);
}

.landing-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  align-items: center;
}

.landing-btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.65rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0a1620;
  text-decoration: none;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s;
}
.landing-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 212, 255, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  filter: brightness(1.05);
  color: #031016;
}
.landing-btn-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-18deg);
  animation: landing-shimmer 3.2s ease-in-out infinite;
}
@keyframes landing-shimmer {
  0% {
    left: -120%;
  }
  40%,
  100% {
    left: 160%;
  }
}

.landing-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.72rem 1.35rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.92rem;
  color: rgba(238, 242, 248, 0.92);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s, transform 0.2s;
}
.landing-btn-secondary:hover {
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 0 28px rgba(0, 212, 255, 0.12);
  background: rgba(0, 212, 255, 0.06);
  color: #fff;
  transform: translateY(-2px);
}
.landing-btn-ico {
  opacity: 0.85;
}

.landing-btn-ghost {
  padding: 0.72rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(180, 195, 215, 0.9);
  text-decoration: none;
  border-radius: 10px;
  transition: color 0.2s;
}
.landing-btn-ghost:hover {
  color: #00d4ff;
}

.landing-arch-wrap {
  margin: 2.5rem 0 1rem;
  text-align: center;
}

.landing-arch-card {
  margin: 0 auto;
  max-width: 920px;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 3vw, 2rem);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 212, 255, 0.22);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 212, 255, 0.06) inset,
    0 0 80px rgba(0, 212, 255, 0.06);
}

.landing-arch-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.landing-arch-node {
  position: relative;
  flex: 1 1 160px;
  max-width: 220px;
  text-align: center;
  padding: 1.25rem 0.75rem;
  z-index: 1;
}

.landing-arch-glow {
  position: absolute;
  width: 100px;
  height: 100px;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  filter: blur(36px);
  opacity: 0.55;
  z-index: -1;
  pointer-events: none;
}
.landing-arch-glow--cyan {
  background: #00d4ff;
}
.landing-arch-glow--purple {
  background: #a78bfa;
}
.landing-arch-glow--green {
  background: #34d399;
}

.landing-arch-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.65rem;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  filter: drop-shadow(0 8px 20px rgba(0, 212, 255, 0.15));
}
.landing-arch-node--web .landing-arch-icon {
  color: #00d4ff;
  box-shadow: 0 0 32px rgba(0, 212, 255, 0.2);
}
.landing-arch-node--sig .landing-arch-icon {
  color: #c4b5fd;
  box-shadow: 0 0 28px rgba(167, 139, 250, 0.25);
}
.landing-arch-node--dev .landing-arch-icon {
  color: #6ee7b7;
  box-shadow: 0 0 28px rgba(52, 211, 153, 0.22);
}

.landing-arch-title {
  margin: 0 0 0.25rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
}
.landing-arch-sub {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(180, 195, 215, 0.85);
}

.landing-arch-connector {
  display: flex;
  align-items: center;
  flex: 0 1 48px;
  min-width: 32px;
  opacity: 0.65;
}
.landing-arch-line {
  flex: 1;
  height: 0;
  border-top: 1px dashed rgba(0, 212, 255, 0.35);
}
.landing-arch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.7);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
  flex-shrink: 0;
}

.landing-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 0.85rem;
  margin: 2rem 0 2.5rem;
}
.landing-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(220, 235, 250, 0.92);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.landing-trust-item svg {
  color: #00d4ff;
  flex-shrink: 0;
}

.landing-features {
  margin-bottom: 2.5rem;
}
.landing-section-head {
  text-align: center;
  margin-bottom: 1.75rem;
}
.landing-section-title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}
.landing-section-sub {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(160, 175, 200, 0.9);
  line-height: 1.55;
}
.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}
@media (max-width: 900px) {
  .landing-feature-grid {
    grid-template-columns: 1fr;
  }
  .landing-arch-connector {
    display: none;
  }
  .landing-arch-flow {
    flex-direction: column;
  }
}

.landing-feature-tile {
  position: relative;
  padding: 1.35rem 1.4rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.landing-feature-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: 0 16px 36px rgba(0, 212, 255, 0.12);
}
.landing-feature-tile--highlight {
  border-color: rgba(0, 212, 255, 0.32);
  background: linear-gradient(165deg, rgba(0, 212, 255, 0.09) 0%, rgba(255, 255, 255, 0.04) 50%);
  box-shadow: 0 0 48px rgba(0, 212, 255, 0.07);
}
.landing-feature-tile--highlight:hover {
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow: 0 20px 44px rgba(0, 212, 255, 0.14);
}

.landing-feature-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #001018;
  background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
  box-shadow: 0 2px 12px rgba(0, 212, 255, 0.35);
}

.landing-feature-ico {
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  filter: drop-shadow(0 4px 14px rgba(0, 212, 255, 0.2));
}
.landing-feature-ico svg {
  display: block;
}
.landing-feature-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.landing-feature-text {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(160, 175, 200, 0.95);
  line-height: 1.65;
}
.landing-feature-text code {
  font-size: 0.82em;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  color: #7dd3fc;
}

.landing-tip-wrap {
  display: inline-block;
  position: relative;
  margin-left: 0.15rem;
  vertical-align: baseline;
}
.landing-tip-trigger {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  color: #00d4ff;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.landing-tip-bubble {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: min(280px, 85vw);
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.45;
  color: rgba(230, 238, 250, 0.95);
  background: rgba(15, 25, 40, 0.96);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  z-index: 20;
  text-align: left;
}
.landing-tip-bubble.is-open {
  display: block;
}
@media (hover: hover) {
  .landing-tip-wrap:hover .landing-tip-bubble,
  .landing-tip-trigger:focus + .landing-tip-bubble {
    display: block;
  }
}

/* —— 首页页脚 —— */
.landing-footer {
  margin-top: 2.75rem;
  padding: 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(120, 135, 160, 0.65);
  letter-spacing: 0.02em;
}

.landing-reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: landing-reveal-in 0.75s ease forwards;
  animation-delay: var(--d, 0s);
}
@keyframes landing-reveal-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 设备表：管理员可见「所属用户」列 */
th.col-owner,
td.col-owner {
  display: none;
}
body.mesh-admin th.col-owner,
body.mesh-admin td.col-owner {
  display: table-cell;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .landing-reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .landing-btn-shimmer::after {
    animation: none;
    display: none;
  }
  .landing-badge-dot {
    animation: none;
  }
}

/* ========= MeshConsole：管理平台浅色侧栏（body.app-body[data-shell="app"]）========= */

body.app-body[data-shell='app'] {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(145deg, #eef2f8 0%, #e0e6ef 100%);
  color: #0f172a;
  --sidebar-w: 280px;
  --sidebar-w-collapsed: 88px;
}

body.app-body[data-shell='app']::before,
body.app-body[data-shell='app']::after {
  content: none !important;
  display: none !important;
}

body.app-body[data-shell='app'] .app-shell {
  min-height: 100vh;
}

body.app-body[data-shell='app'] .sidebar {
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-right: none;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.03), 1px 0 0 rgba(0, 0, 0, 0.05);
  border-radius: 0 24px 24px 0;
  transition: flex-basis 0.28s cubic-bezier(0.2, 0.9, 0.4, 1.1), width 0.28s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

body.app-body[data-shell='app'] .sidebar::-webkit-scrollbar {
  width: 4px;
}
body.app-body[data-shell='app'] .sidebar::-webkit-scrollbar-track {
  background: #eef2f8;
}
body.app-body[data-shell='app'] .sidebar::-webkit-scrollbar-thumb {
  background: #cbdae6;
  border-radius: 8px;
}

body.app-body[data-shell='app'] .sidebar-brand {
  padding: 1.5rem 1.15rem 1.15rem 1.5rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid #edf2f7;
  min-height: auto;
}

body.app-body[data-shell='app'] .sidebar-brand-mark {
  background: transparent;
  box-shadow: none;
  color: #2c6e9e;
  width: auto;
  min-width: 36px;
  height: auto;
  min-height: 36px;
  padding: 0.2rem;
  border-radius: 10px;
}

body.app-body[data-shell='app'] .sidebar-brand-text {
  font-family: "Quantico", "Segoe UI", sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #76b900;
}

body.app-body[data-shell='app'] .sidebar-brand-text .brand-loonglink {
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 600;
}

body.app-body[data-shell='app'] .sidebar-brand-text .brand-console {
  font-weight: 400;
}

body.app-body[data-shell='app'] .app-shell.is-sidebar-collapsed .sidebar-brand {
  justify-content: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

body.app-body[data-shell='app'] .app-shell.is-sidebar-collapsed .sidebar-brand-text {
  opacity: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  position: absolute;
  pointer-events: none;
}

body.app-body[data-shell='app'] .app-shell.is-sidebar-collapsed .sidebar-brand-mark {
  margin: 0 auto;
}

body.app-body[data-shell='app'] .sidebar-nav {
  padding: 0 0.8rem 0.75rem;
  gap: 0.5rem;
}

body.app-body[data-shell='app'] .sidebar-link {
  border-radius: 18px;
  padding: 0.7rem 1rem;
  gap: 0.875rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.02px;
  color: #5d7f9c;
}

body.app-body[data-shell='app'] .sidebar-link:hover {
  background: #eef3fc;
  color: #1f6e9e;
}

body.app-body[data-shell='app'] .sidebar-link.is-active {
  background: #e8f4fd;
  color: #17648d;
  box-shadow: none;
}

body.app-body[data-shell='app'] .sidebar-link.is-active::before {
  display: none;
}

body.app-body[data-shell='app'] .sidebar-link svg {
  stroke: #5d7f9c;
}

body.app-body[data-shell='app'] .sidebar-link:hover svg {
  stroke: #1f6e9e;
}

body.app-body[data-shell='app'] .sidebar-link.is-active svg {
  stroke: #1e6f9f;
  color: #1e6f9f;
}

body.app-body[data-shell='app'] .sidebar-ico {
  width: 24px;
  justify-content: center;
}

body.app-body[data-shell='app'] .sidebar-foot {
  padding: 1rem 0.8rem 1.35rem;
  margin-top: auto;
  border-top: 1px solid #edf2f7;
}

body.app-body[data-shell='app'] .sidebar-collapse-btn {
  width: 100%;
  justify-content: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  border-radius: 18px;
  border: none;
  background: #f9fbfe;
  color: #51758f;
  font-weight: 500;
  font-size: 0.85rem;
}

body.app-body[data-shell='app'] .sidebar-collapse-btn:hover {
  background: #ecf3fa;
  color: #1f6e9e;
}

body.app-body[data-shell='app'] .sidebar-collapse-ico {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.app-body[data-shell='app'] .sidebar-collapse-ico::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 2px;
}

body.app-body[data-shell='app'] .sidebar-collapse-ico.sidebar-collapse-ico--collapsed::before {
  transform: rotate(-135deg);
  margin-left: 0;
}

body.app-body[data-shell='app'] .app-shell.is-sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}

body.app-body[data-shell='app'] .app-shell.is-sidebar-collapsed .sidebar-collapse-btn {
  justify-content: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* 收起侧栏：悬停显示文字浮层（替代原生 title 闪现） */
body.app-body[data-shell='app'] .app-shell.is-sidebar-collapsed .sidebar {
  overflow: visible;
  z-index: 50;
}

body.app-body[data-shell='app'] .app-shell.is-sidebar-collapsed .sidebar-link {
  position: relative;
}

body.app-body[data-shell='app'] .app-shell.is-sidebar-collapsed .sidebar-link::after {
  content: attr(data-mesh-title);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  padding: 0.45rem 0.75rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e8edf5;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  color: #1f6e9e;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.14s ease, visibility 0.14s ease;
  z-index: 60;
}

body.app-body[data-shell='app'] .app-shell.is-sidebar-collapsed .sidebar-link:hover::after,
body.app-body[data-shell='app'] .app-shell.is-sidebar-collapsed .sidebar-link:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

body.app-body[data-shell='app'].mesh-sidebar-flyout-active {
  overflow: visible;
}

body.app-body[data-shell='app'].mesh-sidebar-flyout-active .app-shell {
  overflow: visible;
}

/* 主内容区卡片与侧栏统一的浅色面板 */
body.app-body[data-shell='app'] .app-scroll .card {
  background: #ffffff;
  border: 1px solid #e8edf5;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.app-body[data-shell='app'] .app-scroll .card:hover {
  border-color: #d7e4f2;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

@media (max-width: 768px) {
  body.app-body[data-shell='app'] .sidebar {
    background: #ffffff;
    border-right: 1px solid #edf2f7;
  }
  body.app-body[data-shell='app'] .sidebar-brand {
    border-right-color: #edf2f7;
  }
  body.app-body[data-shell='app'] .sidebar-foot {
    border-top-color: #edf2f7;
  }
}

/* Mesh 控制台：输入框 / 下拉框统一白底（覆盖全局深色 input、select、.console-input-wrap） */
body.app-body[data-shell='app'] .app-main input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='button']):not([type='submit']):not([type='reset']):not([type='file']):not([type='image']),
body.app-body[data-shell='app'] .app-main select,
body.app-body[data-shell='app'] .app-main textarea,
body.app-body[data-shell='app'] .mesh-modal-panel input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='button']):not([type='submit']):not([type='reset']):not([type='file']):not([type='image']),
body.app-body[data-shell='app'] .mesh-modal-panel select,
body.app-body[data-shell='app'] .mesh-modal-panel textarea {
  background-color: #ffffff;
  color: #0f172a;
}

body.app-body[data-shell='app'] .app-main input:focus,
body.app-body[data-shell='app'] .app-main select:focus,
body.app-body[data-shell='app'] .app-main textarea:focus,
body.app-body[data-shell='app'] .mesh-modal-panel input:focus,
body.app-body[data-shell='app'] .mesh-modal-panel select:focus,
body.app-body[data-shell='app'] .mesh-modal-panel textarea:focus {
  background-color: #ffffff;
}

body.app-body[data-shell='app'] .app-main input:disabled,
body.app-body[data-shell='app'] .app-main select:disabled,
body.app-body[data-shell='app'] .mesh-modal-panel input:disabled,
body.app-body[data-shell='app'] .mesh-modal-panel select:disabled {
  background-color: #f1f5f9;
  color: #64748b;
}

body.app-body[data-shell='app'] .app-main select option,
body.app-body[data-shell='app'] .mesh-modal-panel select option {
  background-color: #ffffff;
  color: #0f172a;
}

body.app-body[data-shell='app'] .console-input-wrap {
  background-color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.55);
}

body.app-body[data-shell='app'] .console-input-wrap:focus-within {
  border-color: #3c8dbc;
  box-shadow: 0 0 0 3px rgba(60, 141, 188, 0.2);
}

body.app-body[data-shell='app'] .console-input-wrap input {
  background-color: transparent;
  color: #0f172a;
}

body.app-body[data-shell='app'] .pf-select {
  background-color: #ffffff;
  color: #0f172a;
}

body.app-body[data-shell='app'] input:-webkit-autofill,
body.app-body[data-shell='app'] input:-webkit-autofill:hover,
body.app-body[data-shell='app'] input:-webkit-autofill:focus,
body.app-body[data-shell='app'] input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #0f172a !important;
  caret-color: #0f172a;
}

/* OTP 登录弹窗 */
body.app-body[data-shell='app'] #llOtpLoginModal .neo-login-dialog {
  background: #fff;
  color: #333;
}

body.app-body[data-shell='app'] #llOtpLoginModal .neo-form-item input[type='email'],
body.app-body[data-shell='app'] #llOtpLoginModal .neo-form-item input[type='text'] {
  background: #fff;
  color: #333;
  border: 1px solid #d9d9d9;
  margin-top: 0;
  box-shadow: none;
}

body.app-body[data-shell='app'] #llOtpLoginModal .neo-form-item input:focus {
  border-color: #0067b8;
  box-shadow: 0 0 0 2px rgba(0, 103, 184, 0.1);
}

body.app-body[data-shell='app'] #llOtpLoginModal .neo-login-close {
  margin-top: 0;
  margin-right: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.1);
  color: #666;
  box-shadow: none;
}

body.app-body[data-shell='app'] #llOtpLoginModal .neo-login-close:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: none;
  filter: none;
}
