/**
 * @file style.css
 * @description Relay Control 现代科技感深色视觉系统
 * 采用 Sleek Modern Dark Palette、毛玻璃微光质感与丝滑交互微动效
 */

:root {
  color-scheme: dark;

  /* 基础色彩系统 */
  --bg-canvas: #090c10;
  --bg-surface: #0f141c;
  --bg-surface-raised: #161d28;
  --bg-surface-hover: #1c2534;
  --bg-card: rgba(18, 24, 34, 0.85);

  /* 边框与微光 */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(56, 189, 248, 0.35);

  /* 文字系统 */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* 核心主题强调色 (Cyan / Blue) */
  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.25);
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;

  /* 语义化色彩 */
  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.12);
  --color-warning: #f59e0b;
  --color-warning-bg: rgba(245, 158, 11, 0.12);
  --color-danger: #f43f5e;
  --color-danger-bg: rgba(244, 63, 94, 0.14);

  /* 字体系统 */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* 阴影与微光 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.5), 0 2px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 28px -6px rgba(0, 0, 0, 0.65), 0 4px 12px -2px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 24px -4px var(--accent-cyan-glow);

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] { display: none !important; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-canvas);
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 189, 248, 0.12), transparent 70%),
    radial-gradient(circle at 90% 80%, rgba(37, 99, 235, 0.06), transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button, input[type="checkbox"] {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

.font-mono {
  font-family: var(--font-mono);
}

/* 主容器排版 */
.shell {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0 60px;
}

/* ==========================================
   顶部导航栏 (Header)
   ========================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-badge-wrap {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(37, 99, 235, 0.3));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.brand-badge {
  font-size: 20px;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-version {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.brand-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-icon-only.github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-icon-only.github-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.github-svg {
  display: block;
}

/* 状态药丸与退出 */
.service-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
}

.status-dot.online {
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

.status-dot.offline {
  background: var(--color-danger);
  box-shadow: 0 0 8px var(--color-danger);
}

.logout-form {
  display: inline-flex;
  margin-left: 6px;
  border-left: 1px solid var(--border-subtle);
  padding-left: 8px;
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  transition: color 0.15s ease;
}

.btn-logout:hover {
  color: var(--color-danger);
}

/* 按钮基础体系 */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 550;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.button.primary {
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  color: #04121f;
  font-weight: 650;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3);
}

.button.primary:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
}

.button.secondary {
  background: var(--bg-surface);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.button.secondary:hover:not(:disabled) {
  background: var(--bg-surface-raised);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.button.danger {
  background: var(--color-danger-bg);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--color-danger);
}

.button.danger:hover:not(:disabled) {
  background: var(--color-danger);
  color: #fff;
}

.btn-with-icon .btn-icon {
  font-size: 13px;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11.5px;
}

.btn-accent {
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--accent-cyan);
}

.mini-badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
}

.badge-success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ==========================================
   概览数据卡片 (Overview Grid)
   ========================================== */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
}

.metric-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.metric-label {
  font-size: 12px;
  font-weight: 550;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-icon {
  font-size: 16px;
  opacity: 0.7;
}

.metric-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.metric-footnote {
  font-size: 11.5px;
  color: var(--text-muted);
}

.text-success {
  color: var(--color-success) !important;
}

.endpoint-card .metric-value {
  font-size: 15px;
  word-break: break-all;
  color: var(--accent-cyan);
}

/* ==========================================
   工作台与工具栏 (Workspace & Toolbar)
   ========================================== */
.workspace {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.workspace-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.workspace-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

h2 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.selection-pill {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-raised);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.selection-pill.has-selection {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* 搜索过滤框 */
.search-filter-wrap {
  flex: 1;
  max-width: 380px;
  min-width: 220px;
}

.search-input {
  width: 100%;
  padding: 7px 12px;
  font-size: 12.5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar-divider {
  width: 1px;
  height: 18px;
  background: var(--border-subtle);
  margin: 0 2px;
}

/* ==========================================
   数据表格 (Nodes Table)
   ========================================== */
.table-wrap {
  overflow-x: auto;
}

.nodes-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.nodes-table th,
.nodes-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.nodes-table th {
  background: rgba(15, 20, 28, 0.7);
  font-weight: 600;
  font-size: 11.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.node-row {
  transition: background-color 0.15s ease;
}

.node-row:hover {
  background: var(--bg-surface-hover);
}

.disabled-row {
  opacity: 0.6;
  background: rgba(0, 0, 0, 0.18);
}

.disabled-row:hover {
  opacity: 0.85;
}

.col-select {
  width: 48px;
  padding: 0 !important;
  text-align: center;
}

.checkbox-hitbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 46px;
  cursor: pointer;
  padding: 8px;
}

.checkbox-hitbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent-cyan);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.checkbox-hitbox:hover input[type="checkbox"] {
  transform: scale(1.2);
  filter: drop-shadow(0 0 4px var(--accent-cyan));
}

.col-node {
  min-width: 200px;
}

.node-title-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.node-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13.5px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-target {
  font-size: 11px;
  color: var(--text-muted);
}

/* 协议芯片 */
.protocol-badge {
  display: inline-block;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.proto-vless {
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.proto-hysteria2 {
  background: rgba(244, 63, 94, 0.14);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.proto-trojan {
  background: rgba(168, 85, 247, 0.14);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

/* 出口与定位 */
.exit-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.exit-ip {
  font-size: 12px;
  color: #e2e8f0;
}

.exit-location {
  font-size: 11px;
  color: var(--text-muted);
}

/* 延迟显示 */
.latency-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.latency-low { color: var(--color-success); }
.latency-medium { color: var(--color-warning); }
.latency-high { color: var(--color-danger); }

.port-chip {
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: #93c5fd;
}

/* 状态芯片 */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 550;
  white-space: nowrap;
}

.status-dot-sm {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-chip.online {
  background: var(--color-success-bg);
  color: var(--color-success);
}
.status-chip.online .status-dot-sm {
  background: var(--color-success);
  box-shadow: 0 0 6px var(--color-success);
}

.status-chip.offline {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}
.status-chip.offline .status-dot-sm {
  background: var(--color-danger);
}

.status-chip.disabled {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}
.status-chip.disabled .status-dot-sm {
  background: var(--text-muted);
}

.status-chip.testing {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}
.status-chip.testing .status-dot-sm {
  background: var(--color-warning);
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

/* 行操作按钮 */
.actions-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-action {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.btn-action:hover:not(:disabled) {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-action.success:hover:not(:disabled) {
  border-color: var(--color-success);
  color: var(--color-success);
}

.btn-action.danger:hover:not(:disabled) {
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.empty-state {
  padding: 60px 20px !important;
  text-align: center;
}

.empty-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 32px;
}

/* ==========================================
   模态弹窗 (Modals & Dialogs)
   ========================================== */
.modal {
  border: none;
  background: transparent;
  padding: 0;
  margin: auto;
  max-width: 95vw;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal::backdrop {
  background: rgba(4, 7, 12, 0.75);
  backdrop-filter: blur(8px);
}

.modal-box {
  width: min(560px, 92vw);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  color: var(--text-primary);
}

.modal-box-totp {
  width: min(600px, 92vw);
}

.modal-box-relay {
  width: min(640px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
}

.dialog-feedback {
  margin: 6px 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.dialog-feedback.error { color: var(--color-danger); }
.dialog-feedback:empty { display: none; }

.logs-policy-dialog .dialog-feedback { display: block; min-height: 36px; margin: 0; }
.logs-policy-dialog h2 { font-size: 18px; letter-spacing: 0; }
.logs-policy-dialog .form-hint { margin: 0; }

.relay-list {
  margin-top: 18px;
}


.hy2-port-chip {
  display: block;
  width: max-content;
  margin-top: 4px;
}

.relay-row {
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding: 12px 0;
}

.relay-row-info {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.relay-row-info code {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.relay-actions {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

@media (max-width: 520px) {
  .relay-row { align-items: flex-start; flex-direction: column; }
  .relay-actions { align-self: flex-end; }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.modal-header > div { min-width: 0; overflow-wrap: anywhere; }
.modal-header .icon-button { flex-shrink: 0; }

.modal-kicker {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
}

.icon-button {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s, color 0.15s;
}

.icon-button:hover {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 550;
  color: var(--text-secondary);
}

.modal-form label[hidden] { display: none; }

.relay-mode {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.relay-mode label {
  flex-direction: row;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
}

.modal-form .relay-mode input { width: auto; }

.required { color: var(--color-danger); }
.optional { color: var(--text-muted); font-weight: normal; font-size: 11px; }

.modal-form input,
.modal-form select,
.modal-form textarea,
.totp-verify-form input {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

.input-readonly {
  background: rgba(255, 255, 255, 0.03) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.password-field {
  position: relative;
  display: flex;
}

.btn-toggle-pwd {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.btn-toggle-pwd:hover {
  color: var(--text-primary);
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.form-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

#proxyExternalCidrs { min-height: 84px; max-height: 84px; resize: none; font-family: var(--font-mono); }
#proxyExternalCidrs:disabled { color: var(--text-muted); cursor: not-allowed; }
#settingsDialog .dialog-feedback { display: block; min-height: 36px; margin: 0; }
.modal-form .proxy-public-control { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
#proxyPublicEnabled { appearance: none; position: relative; width: 34px; height: 20px; flex: 0 0 34px; padding: 0; margin: 0; border: 1px solid #657080; border-radius: 12px; background: #363c45; cursor: pointer; }
#proxyPublicEnabled::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
#proxyPublicEnabled:checked { border-color: #10b981; background: #087c58; }
#proxyPublicEnabled:checked::after { transform: translateX(14px); }
#proxyPublicEnabled:disabled { cursor: not-allowed; opacity: .5; }
#proxyPublicEnabled:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }

/* 内网订阅子卡片 */
.settings-subcard {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subcard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.subcard-header strong {
  font-size: 13px;
}

.subcard-header p {
  font-size: 11px;
  color: var(--text-muted);
}

.subscription-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-label {
  font-size: 11px;
  font-weight: 700;
  width: 55px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.input-action-row input { min-width: 0; flex: 1; }
.input-action-row button { flex-shrink: 0; }

/* ==========================================
   Google 身份验证器弹窗样式 (TOTP Dialog)
   ========================================== */
.totp-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
}

.status-banner.warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.06);
}

.status-banner.active {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.06);
}

.banner-icon {
  font-size: 24px;
}

.status-banner strong {
  font-size: 13.5px;
  display: block;
  margin-bottom: 2px;
}

.status-banner p {
  font-size: 11.5px;
  color: var(--text-muted);
}

.totp-setup-area {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #fff;
  padding: 12px;
  border-radius: var(--radius-md);
}

.qr-canvas,
.qr-svg-wrap {
  width: 176px;
  height: 176px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-svg-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-tip {
  font-size: 10px;
  color: #475569;
  text-align: center;
  line-height: 1.3;
}

.secret-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.secret-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.secret-copy-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-canvas);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-sm);
}

.secret-code {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-weight: 600;
  letter-spacing: 0.06em;
  min-width: 0;
  overflow-wrap: anywhere;
}

.secret-copy-box button { flex-shrink: 0; }

.totp-verify-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.totp-verify-form span {
  font-size: 12px;
  color: var(--text-secondary);
}

.verify-input-group {
  display: flex;
  gap: 8px;
}

.verify-input-group input {
  font-size: 18px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.25em;
  text-align: center;
  min-width: 0;
  flex: 1;
  padding: 6px 10px;
}

.totp-active-info {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
}

.totp-active-info .check-icon {
  font-size: 22px;
  color: var(--color-success);
  width: 36px;
  height: 36px;
  background: rgba(16, 185, 129, 0.15);
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.totp-active-info strong {
  font-size: 14px;
  color: var(--color-success);
}

.totp-active-info p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.totp-danger-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

/* ==========================================
   现代登录卡片系统 (Login Page)
   ========================================== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-bg-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: #0284c7;
  top: -100px;
  right: -50px;
}

.orb-2 {
  width: 350px;
  height: 350px;
  background: #4f46e5;
  bottom: -80px;
  left: -50px;
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: rgba(15, 20, 28, 0.88);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg), 0 0 35px rgba(56, 189, 248, 0.12);
}

.login-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.login-header > div:last-child { flex: 1; min-width: 0; }

.login-logo-wrap {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(37, 99, 235, 0.35));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
}

.login-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.login-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 登录 Tab 切换 */
.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--bg-surface-raised);
  color: var(--accent-cyan);
  box-shadow: var(--shadow-sm);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#totpSection,
#passwordSection {
  gap: 10px !important;
  height: 76px !important;
  min-height: 76px !important;
  max-height: 76px !important;
  box-sizing: border-box !important;
}

.form-group label,
.form-group .label-with-tip {
  height: 24px !important;
  line-height: 24px !important;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

.label-with-tip {
  justify-content: space-between !important;
}

.badge-hint {
  font-size: 11px;
  height: 20px;
  line-height: 20px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent-cyan);
  font-weight: 500;
  box-sizing: border-box;
}

.input-wrap {
  width: 100%;
}

.input-wrap input {
  width: 100%;
  height: 42px !important;
  padding: 0 14px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* 消除浏览器原生密码显隐眼睛，避免双眼睛重叠冲突 */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none !important;
}

/* 彻底禁止外扩变形 outline，确保聚焦与非聚焦高度 100% 绝对一致 */
.login-card input:focus,
.login-card input:focus-visible,
.login-card button:focus,
.login-card button:focus-visible {
  outline: none !important;
  outline-offset: 0 !important;
}

.login-card button:focus-visible { outline: 2px solid var(--accent-cyan) !important; outline-offset: 2px !important; }

.input-wrap input:focus,
.input-wrap input:focus-visible {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 0 1px var(--accent-cyan) !important;
}

/* 6 位独立数字方格容器 - 与单行输入框保持严格 42px 高度平齐 */
.otp-container {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  height: 42px !important;
  box-sizing: border-box;
}

.otp-cell {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 42px !important;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-sizing: border-box !important;
  padding: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.otp-cell:focus,
.otp-cell:focus-visible {
  outline: none !important;
  outline-offset: 0 !important;
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 0 1px var(--accent-cyan) !important;
  background: rgba(56, 189, 248, 0.08);
}

/* 密码输入框与纯矢量 SVG 眼睛按钮 */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-wrap input {
  padding-right: 44px;
}

.btn-toggle-pwd {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: color 0.2s ease, transform 0.15s ease;
}

.btn-toggle-pwd:hover {
  color: var(--accent-cyan);
  transform: translateY(-50%) scale(1.08);
}

.eye-svg {
  display: block;
}

.brand-svg {
  color: #fbbf24;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.45));
}

.tab-icon-svg {
  display: inline-block;
  vertical-align: middle;
  opacity: 0.85;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding: 2px 0;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.btn-login {
  width: 100%;
  height: 42px !important;
  padding: 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-top: 8px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box !important;
}

.login-error {
  padding: 11px 14px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: var(--radius-md);
  color: #fb7185;
  font-size: 12.5px;
  text-align: center;
  margin-top: 2px;
  animation: fadeIn 0.2s ease;
}

.login-error:empty {
  display: none !important;
}

/* ==========================================
   Toast 提示微卡片 (Toast Card)
   ========================================== */
.toast-card {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  background: rgba(15, 20, 28, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-medium);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  color: var(--text-primary);
  max-width: min(420px, calc(100vw - 32px));
  overflow-wrap: anywhere;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-card.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: none;
}

.toast-card.error {
  border-left-color: var(--color-danger);
}

/* 微转圈动画 (Spinner) */
.btn-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

.tool-icon { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tool-menu { position: relative; }
.menu-trigger:focus-visible, .node-toggle:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }
.menu-items {
  position: fixed; inset: auto; margin: 0; overflow: auto; overscroll-behavior: contain;
  width: min(224px, calc(100vw - 16px)); padding: 5px; background: #191d21;
  border: 1px solid var(--border-medium); border-radius: 6px; box-shadow: var(--shadow-lg);
}
.menu-items:popover-open:not([data-positioned]) { visibility: hidden; }
.menu-heading { display: block; padding: 6px 10px 3px; font-size: 11px; color: var(--text-muted); }
.menu-heading:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--border-subtle); }
.menu-items button, .menu-items a, .menu-note {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; padding: 8px 10px;
  background: transparent; border: 0; border-radius: 4px; text-align: left; text-decoration: none; color: var(--text-primary);
}
.menu-items button:hover:not(:disabled), .menu-items a:hover { background: #252b33; }
.menu-items .danger { color: #fb7185; }
.menu-danger { margin-top: 5px; border-top: 1px solid var(--border-subtle) !important; border-radius: 0 0 4px 4px !important; }
.node-menu-name { padding: 8px 10px; color: var(--text-primary); font-size: 12px; overflow-wrap: anywhere; border-bottom: 1px solid var(--border-subtle); margin-bottom: 4px; }
.menu-items button:disabled, .menu-note { color: var(--text-muted); }
.menu-note { font-size: 12px; }
.toolbar .docker-menu .docker-bubble { width: min(340px, calc(100vw - 16px)); padding: 14px; }
.docker-bubble-heading, .docker-code-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.docker-bubble-heading code { color: var(--accent-cyan); font-family: var(--font-mono); }
.docker-copy-actions { display: flex; gap: 6px; margin: 12px 0; }
.docker-copy-actions button { justify-content: center; border: 1px solid var(--border-medium); }
.docker-code-heading { color: var(--text-secondary); font-size: 12px; }
.docker-code-heading button { width: 34px; min-width: 34px; flex: 0 0 34px; }
.docker-bubble pre { margin: 6px 0 10px; padding: 10px 6px; background: #0b0f14; border-radius: 4px; font-family: var(--font-mono); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.docker-note { color: var(--text-secondary); font-size: 12px; line-height: 1.6; margin-top: 4px; }
.copy-actions { display: flex; flex-wrap: wrap; min-width: 0; gap: 3px; }
#realityForm .checkbox-label { flex-direction: row; justify-content: flex-start; }
#realityForm .modal-actions { flex-wrap: wrap; gap: 8px; }
.action-icon { display: inline-grid; place-items: center; width: 32px; min-width: 32px; padding: 0 !important; }
.node-toggle { display: grid; place-items: center; width: 32px; height: 34px; flex: 0 0 32px; padding: 0; border: 0; background: transparent; }
.node-toggle span { position: relative; display: block; width: 32px; height: 20px; border: 1px solid #657080; border-radius: 12px; background: #363c45; }
.node-toggle span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.node-toggle[aria-checked="true"] span { border-color: #10b981; background: #087c58; }
.node-toggle[aria-checked="true"] span::after { transform: translateX(12px); }
.node-check-time { display: block; color: var(--text-muted); font-size: 11px; margin-top: 4px; white-space: nowrap; }
.status-chip.stopped, .status-chip.unknown { background: var(--color-warning-bg); color: var(--color-warning); }
.status-chip.stopped .status-dot-sm, .status-chip.unknown .status-dot-sm { background: var(--color-warning); }
.port-inactive { color: var(--text-muted); background: transparent; }
.testing-action .tool-icon { animation: spin 1s linear infinite; }
.sync-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding: 8px 16px; font-size: 12px; color: var(--text-secondary); border-bottom: 1px solid var(--border-subtle); }
.sync-bar label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sync-bar input { accent-color: var(--accent-cyan); width: 16px; height: 16px; }
.sync-bar .visible-select { display: none; }
.copy-scope, .sync-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.sync-status { margin-left: auto; gap: 14px; }
.copy-scope select { min-height: 30px; padding: 3px 26px 3px 8px; border: 1px solid var(--border-medium); border-radius: 4px; background: #171b1f; color: var(--text-primary); }
.access-state { color: var(--text-secondary); font-size: 11px; }
.access-state.blocked { color: #c0a675; }
.access-state.restricted { color: #5bc49a; }
.node-settings-box { width: min(460px, calc(100vw - 24px)); }
.node-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 74px; padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
.node-setting-row > div:first-child { min-width: 0; }
.node-setting-controls { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.node-setting-row strong { font-size: 14px; }
.setting-meta { display: block; margin-top: 4px; font-size: 12px; color: var(--text-secondary); }
.node-danger-zone { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(244, 63, 94, .22); }
.node-danger-zone h3 { margin-bottom: 10px; font-size: 13px; color: #e4a3ad; }
.node-danger-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.node-settings-box h2 { overflow-wrap: anywhere; }
.dashboard-page { background-color: #0b0e10; background-image: none; --bg-surface-hover: #181d21; --text-muted: #8a959f; --text-secondary: #a4afb9; }
.dashboard-page h1, .dashboard-page h2, .dashboard-page .metric-label, .dashboard-page th { letter-spacing: 0; }
.dashboard-page h1 { background: none; -webkit-text-fill-color: currentColor; }
.dashboard-page .shell { padding-top: 16px; }
.dashboard-page .app-header { gap: 12px; margin-bottom: 8px; padding-bottom: 12px; }
.dashboard-page .header-actions { gap: 8px; }
.dashboard-page .overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(220px, 1.6fr); gap: 0; margin-bottom: 12px; border-bottom: 1px solid var(--border-subtle); }
.dashboard-page .metric-card { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 12px; background: none; backdrop-filter: none; border: 0; border-radius: 0; box-shadow: none; padding: 8px 16px 12px; min-width: 0; }
.dashboard-page .metric-card:hover { transform: none; }
.dashboard-page .metric-meta { margin-bottom: 0; }
.dashboard-page .metric-value { font-size: 22px; margin: 0; font-variant-numeric: tabular-nums; }
.dashboard-page .metric-footnote { grid-column: 1 / -1; font-size: 11px; }
.dashboard-page .endpoint-card .metric-value { font-size: 14px; }
.dashboard-page .metric-icon { display: none; }
.dashboard-page .workspace { overflow: visible; border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; background: #121619; backdrop-filter: none; }
.dashboard-page .workspace-bar { gap: 12px; padding: 10px 12px; }
.dashboard-page .search-filter-wrap { max-width: 340px; min-width: 180px; }
.dashboard-page .table-wrap { overflow: visible; }
.dashboard-page .nodes-table { table-layout: fixed; }
.dashboard-page .nodes-table th, .dashboard-page .nodes-table td { padding: 10px 8px; }
.dashboard-page .nodes-table th { font-size: 12px; padding-top: 8px; padding-bottom: 8px; background: #14191d; }
.dashboard-page .node-row { height: 76px; }
.dashboard-page .node-row:hover { background: #191f23; }
.dashboard-page .node-row.is-selected { background: #132b2e; }
.dashboard-page .node-row.is-selected:hover { background: #173135; }
.dashboard-page .node-row.is-selected .col-select { box-shadow: inset 2px 0 #38bdf8; }
.dashboard-page .col-select { width: 40px; }
.dashboard-page .col-node { width: 15%; min-width: 0; }
.dashboard-page .col-proto { width: 9%; }
.dashboard-page .col-exit { width: 17%; }
.dashboard-page .col-latency { width: 6%; }
.dashboard-page .col-port { width: 13%; }
.dashboard-page .col-status { width: 9%; }
.dashboard-page .col-actions { width: 27%; }
.dashboard-page .node-name { max-width: 100%; font-size: 14px; }
.dashboard-page .node-target, .dashboard-page .exit-location { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.dashboard-page .exit-ip { font-size: 13px; overflow-wrap: anywhere; }
.dashboard-page .protocol-badge { font-size: 11px; padding: 2px 6px; }
.dashboard-page .latency-val { font-size: 13px; font-variant-numeric: tabular-nums; }
.dashboard-page .node-target, .dashboard-page .exit-location, .dashboard-page .metric-footnote { color: #9ca7b6; }
.dashboard-page .port-chip { display: block; width: fit-content; white-space: nowrap; font-size: 12px; padding: 2px 6px; border-radius: 4px; background: #1b2226; color: #c1d5de; }
.dashboard-page .hy2-port-chip { margin-top: 0; }
.dashboard-page .reality-port-chip { margin-top: 4px; color: var(--accent-cyan); }
.dashboard-page .reality-port-chip.port-inactive { color: var(--text-muted); }
.dashboard-page .actions-group { gap: 5px; justify-content: flex-end; flex-wrap: wrap; }
.dashboard-page .copy-actions { flex: 0 0 auto; flex-wrap: nowrap; gap: 2px; }
.node-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 4px; }
.dashboard-page .password-field { gap: 6px; }
.dashboard-page .password-field input { min-width: 0; flex: 1; }
.dashboard-page .password-field .btn-toggle-pwd { position: static; transform: none; flex: 0 0 44px; border: 1px solid var(--border-medium); background: var(--bg-surface-raised); }
.dashboard-page .btn-action { min-height: 34px; padding: 5px; font-size: 12px; background: #161c20; color: #c1cbd2; border-radius: 4px; transition: background-color .15s, color .15s, border-color .15s; }
.dashboard-page .button { min-height: 36px; transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s; }
.dashboard-page .button.primary { background: #18a0c5; color: #061b21; border-color: #2eb1d4; box-shadow: none; }
.dashboard-page .button.danger { background: transparent; color: #f4a0ae; border-color: #63404a; box-shadow: none; }
.dashboard-page .btn-action:disabled { opacity: .4; cursor: not-allowed; }
.dashboard-page .disabled-row { opacity: 1; }
.dashboard-page .disabled-row .node-name, .dashboard-page .disabled-row .exit-ip { color: var(--text-secondary); }
.dashboard-page .button, .dashboard-page .icon-button { max-width: 100%; }
@media (max-width: 1100px) and (min-width: 901px) {
  .dashboard-page .col-node { width: 13%; }
  .dashboard-page .col-exit { width: 14%; }
  .dashboard-page .col-actions { width: 32%; }
  .dashboard-page .actions-group { gap: 4px; }
}
@media (max-width: 900px) {
  .dashboard-page .shell { width: calc(100% - 24px); padding-top: 12px; }
  .dashboard-page .app-header { flex-direction: column; align-items: stretch; gap: 10px; }
  .dashboard-page .brand-badge-wrap { width: 34px; height: 34px; }
  .dashboard-page .brand { gap: 10px; }
  .dashboard-page .brand-desc { display: none; }
  .dashboard-page .header-actions { width: 100%; gap: 6px; }
  .dashboard-page #githubRepoLink { display: none; }
  .dashboard-page .service-pill { flex: 1; padding: 5px 8px; min-height: 36px; }
  .dashboard-page .header-actions .button { padding: 6px 9px; }
  .dashboard-page .header-actions #openLogsBtn { font-size: 0; gap: 0; width: 36px; padding: 0; }
  .dashboard-page .header-actions #openLogsBtn .btn-icon { font-size: 14px; }
  .dashboard-page .overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 12px; }
  .dashboard-page .metric-card { padding: 8px 6px; column-gap: 6px; }
  .dashboard-page .metric-label { font-size: 11px; }
  .dashboard-page .metric-value { font-size: 20px; margin-bottom: 0; }
  .dashboard-page .metric-footnote { font-size: 11px; }
  .dashboard-page .metric-card:not(.endpoint-card) .metric-footnote { display: none; }
  .dashboard-page .endpoint-card { grid-column: 1 / -1; border-top: 1px solid var(--border-subtle); }
  .dashboard-page .endpoint-card .metric-meta { margin: 0; }
  .dashboard-page .endpoint-card .metric-value { font-size: 13px; margin: 0; }
  .dashboard-page .endpoint-card .metric-footnote { display: none; }
  .dashboard-page .workspace-bar { padding: 12px 8px; gap: 10px; }
  .dashboard-page .workspace-title { flex: 1; }
  .dashboard-page .search-filter-wrap { order: 2; flex: 0 0 100%; max-width: none; }
  .dashboard-page .search-input { min-height: 40px; }
  .dashboard-page .toolbar { position: relative; order: 3; width: 100%; gap: 6px; }
  .dashboard-page .docker-menu { position: static; }
  .dashboard-page .toolbar .docker-menu .docker-bubble { width: min(340px, calc(100vw - 16px)); }
  .dashboard-page .toolbar-divider { display: none !important; }
  .dashboard-page .toolbar .button { min-height: 38px; padding: 6px 9px; }
  .dashboard-page .sync-bar { padding: 8px; gap: 10px; }
  .dashboard-page .copy-scope { width: 100%; gap: 7px; }
  .dashboard-page .copy-scope select { min-height: 36px; max-width: 135px; padding-left: 6px; padding-right: 4px; }
  .dashboard-page .sync-status { width: 100%; gap: 8px; justify-content: space-between; }
  .dashboard-page .menu-items button, .dashboard-page .menu-items a { min-height: 44px; }
  .dashboard-page .sync-bar .visible-select { display: inline-flex; margin-right: auto; }
  .dashboard-page .sync-bar label { min-height: 28px; }
  .dashboard-page .nodes-table, .dashboard-page .nodes-table tbody { display: block; width: 100%; }
  .dashboard-page .nodes-table thead { display: none; }
  .dashboard-page .node-row { height: auto; display: grid; grid-template-columns: 26px minmax(0, 1fr) 88px; grid-template-areas: 'select node status' 'select exit exit' 'select proto latency' 'select port port' 'select actions actions'; gap: 6px 7px; padding: 12px 8px; border-bottom: 1px solid var(--border-subtle); }
  .dashboard-page .node-row td { width: auto; min-width: 0; padding: 0; border: 0; }
  .dashboard-page .node-row .col-select { grid-area: select; }
  .dashboard-page .node-row .col-node { grid-area: node; }
  .dashboard-page .node-row .col-status { grid-area: status; text-align: right; }
  .dashboard-page .node-row .col-exit { grid-area: exit; }
  .dashboard-page .node-row .col-proto { grid-area: proto; }
  .dashboard-page .node-row .col-proto::before { content: '上游 '; color: var(--text-muted); font-size: 11px; }
  .dashboard-page .node-row .col-latency { grid-area: latency; text-align: right; }
  .dashboard-page .node-row .col-port { grid-area: port; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .dashboard-page .node-row .col-actions { grid-area: actions; }
  .dashboard-page .node-name { white-space: normal; overflow-wrap: anywhere; }
  .dashboard-page .checkbox-hitbox { min-height: 40px; padding: 0; }
  .dashboard-page .exit-ip { font-size: 13px; }
  .dashboard-page .exit-location { font-size: 12px; }
  .dashboard-page .hy2-port-chip { margin: 0; }
  .dashboard-page .actions-group { justify-content: space-between; gap: 5px; }
  .dashboard-page .btn-action { min-height: 40px; padding: 6px 8px; }
  .dashboard-page .action-icon { width: 36px; min-width: 36px; }
  .dashboard-page .node-toggle { width: 32px; height: 40px; flex-basis: 32px; }
  .dashboard-page .node-traffic-cell { width: 100%; }
  .dashboard-page .empty-state { display: block; }
}
@media (max-width: 360px) {
  .dashboard-page .toolbar { gap: 4px; }
  .dashboard-page .toolbar .button { padding-left: 6px; padding-right: 6px; }
  .dashboard-page .settings-menu .menu-trigger { width: 36px; padding: 0; }
  .dashboard-page .settings-menu .menu-trigger span { display: none; }
  .dashboard-page #serviceText { white-space: nowrap; }
  .dashboard-page .sync-bar #syncTime { font-size: 11px; }
  .dashboard-page .btn-action { padding: 5px; font-size: 11px; }
  .dashboard-page .actions-group { gap: 3px; }
  .dashboard-page .action-icon { width: 30px; min-width: 30px; }
}

@media (max-width: 520px) {
  .modal-box { padding: 20px; }
  .form-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .dashboard-page .node-actions { margin-left: auto; }
  .toast-card { right: 16px; bottom: 16px; }
}

/* ==========================================
   响应式适配 (Responsive Media Queries)
   ========================================== */
@media (max-width: 840px) {
  .shell {
    width: calc(100% - 24px);
    padding: 14px 0 40px;
  }
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-actions {
    width: 100%;
  }
  .totp-setup-area {
    grid-template-columns: 1fr;
  }
  .qr-container {
    max-width: 220px;
  }
}

/* ==========================================
   美化通用确认弹窗 (Confirm Modal)
   ========================================== */
.confirm-modal .confirm-card {
  max-width: 440px;
  padding: 24px;
  background: rgba(20, 26, 38, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.08);
}

.confirm-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.confirm-icon-wrap {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.confirm-icon-wrap.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.25);
}

.confirm-content {
  flex: 1;
}

.confirm-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.confirm-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  word-break: break-word;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.button.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  border: 1px solid rgba(239, 68, 68, 0.5);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.button.danger:hover {
  background: linear-gradient(135deg, #f87171, #ef4444);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

/* ==========================================
   连接审计日志弹窗 (Logs Modal)
   ========================================== */
.logs-modal .logs-card {
  max-width: 1080px;
  width: 94vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.logs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.logs-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logs-title-icon {
  font-size: 24px;
}

.logs-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.logs-subtitle {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.logs-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.logs-select, .logs-search {
  padding: 6px 12px;
  font-size: 13px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
}

.logs-select:focus, .logs-search:focus {
  border-color: var(--accent-cyan);
}

.logs-search {
  width: 220px;
}

.logs-table-wrap {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: rgba(10, 14, 20, 0.6);
}

.logs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.logs-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(18, 24, 36, 0.96);
  backdrop-filter: blur(8px);
  padding: 10px 14px;
  color: var(--text-secondary);
  font-weight: 500;
  border-bottom: 1px solid var(--border-medium);
}

.logs-table td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-family: var(--font-mono);
  vertical-align: middle;
}

.logs-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.04);
}

.logs-empty {
  text-align: center;
  padding: 40px !important;
  color: var(--text-secondary);
}

.log-target {
  color: var(--accent-cyan);
  font-weight: 500;
  word-break: break-all;
}

.log-client {
  color: var(--text-secondary);
}

.traffic-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.traffic-tag .up {
  color: #10b981;
}

.traffic-tag .down {
  color: #38bdf8;
}

.node-traffic-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.traffic-mini-text {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================
 * 独立日志与流量监控大盘 (Logs Dashboard Page)
 * ========================================== */

.logs-page-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

html:has(.logs-page-body) { scrollbar-gutter: stable; scroll-behavior: auto; }

.logs-shell {
  width: min(1280px, calc(100% - 48px));
  max-width: none;
  margin: 0 auto;
  padding: 24px 20px 48px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.logs-header {
  margin-bottom: 24px;
}

.back-home-btn {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--radius-md);
  border-color: var(--border-medium);
  background: var(--bg-surface-raised);
}

.back-home-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.brand-divider {
  width: 1px;
  height: 28px;
  background: var(--border-medium);
  margin: 0 4px;
}

.pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 550;
}

.pulse-badge .status-dot {
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.paused-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #94a3b8;
  border-radius: var(--radius-full);
  font-size: 12px;
}

/* 通用暗黑下拉框样式 (彻底消除刺眼白底) */
.dark-select {
  appearance: auto;
  color-scheme: dark;
  background-color: var(--bg-surface-raised);
  padding: 6px 12px;
  font-size: 12.5px;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dark-select:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background-color: var(--bg-surface-hover);
}

.dark-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px var(--accent-cyan-glow);
}

.dark-select option {
  background-color: #121822;
  color: #f8fafc;
  padding: 6px 10px;
}

.polling-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  padding: 4px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.polling-control .control-label {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.mini-select {
  height: 32px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.filter-select {
  min-width: 170px;
}

/* 存储条 */
.storage-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  margin: 8px 0 6px;
  overflow: hidden;
}

.storage-bar-fill {
  width: 0;
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease, background-color 0.4s ease;
}

/* 工作台大盘样式 */
.logs-workspace {
  margin-top: 24px;
}

.logs-workspace-bar {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(160px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
}

.logs-search-wrap {
  max-width: 480px;
  width: 100%;
}

.logs-table-wrap {
  height: max(380px, calc(100svh - 420px));
  overflow-y: auto;
  scrollbar-gutter: stable;
  overflow-anchor: none;
}

.logs-table {
  font-size: 13px;
  table-layout: fixed;
  min-width: 1080px;
}

.logs-table col:nth-child(1) { width: 8%; }
.logs-table col:nth-child(2) { width: 23%; }
.logs-table col:nth-child(3) { width: 19%; }
.logs-table col:nth-child(4) { width: 22%; }
.logs-table col:nth-child(5) { width: 20%; }
.logs-table col:nth-child(6) { width: 8%; }

.logs-table .log-row { height: 52px; }
.logs-table td { overflow: hidden; }
.logs-page-body .metric-card:hover { transform: none; }
.logs-page-body .metric-value { font-family: var(--font-sans); line-height: 32px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logs-page-body .font-mono, .refresh-status { font-variant-numeric: tabular-nums; }
.logs-workspace-bar #nodeSelect { width: 210px; min-width: 0; }
.logs-workspace-bar #recordCounter { width: 132px; flex: 0 0 132px; justify-content: center; white-space: nowrap; }
.logs-page-body .overview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.logs-page-body .metric-card { min-width: 0; height: 144px; }
.logs-page-body .metric-footnote { line-height: 18px; }

.logs-table th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg-surface-raised);
}

.log-traffic-sort { display: flex; }
.log-traffic-sort .log-sort { width: 50%; }
.logs-table th:has(.log-sort) { padding-top: 0; padding-bottom: 0; }
.logs-table th:last-child { padding-left: 8px; padding-right: 8px; }
.log-sort { display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; white-space: nowrap; }
.log-sort .tool-icon { width: 12px; height: 12px; flex-basis: 12px; }
.log-sort:hover, .log-sort[aria-pressed="true"] { color: var(--accent-cyan); }
.log-sort:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }

.log-time-chip {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.log-node-cell {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}

.log-port-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

.log-direct-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  font-family: var(--font-mono);
}

.log-node-label {
  color: var(--text-secondary);
  font-size: 12px;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.log-client-pill {
  display: inline-block;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-target-cell {
  color: #7dd3fc;
  font-weight: 500;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-traffic-group {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12px;
  white-space: nowrap;
}

.log-traffic-group span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.log-traffic-group .up {
  color: #34d399;
}

.log-traffic-group .down {
  color: #38bdf8;
}

.log-duration-tag {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 2px 5px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

/* 空状态与加载态 */
.logs-empty-cell,
.logs-loading-cell {
  text-align: center !important;
  padding: 56px 20px !important;
}

.logs-empty-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0 auto;
  padding: 32px 48px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-lg);
}

.logs-empty-box .icon {
  font-size: 44px;
  margin-bottom: 14px;
  opacity: 0.85;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.logs-empty-box .title {
  font-size: 15.5px;
  font-weight: 650;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.logs-empty-box .desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.6;
}

.logs-footer {
  margin-top: auto;
  padding-top: 32px;
  text-align: center;
}

.refresh-status { color: var(--text-muted); font-size: 12px; white-space: nowrap; width: 112px; flex: 0 0 112px; overflow: hidden; text-overflow: ellipsis; }
.is-refreshing .tool-icon { animation: spin 1s linear infinite; }
.logs-workspace-bar > * { min-width: 0; }
.logs-page-body h1 { letter-spacing: 0; }
.logs-loading-cell .btn-spinner { display: inline-block; vertical-align: middle; margin-right: 8px; }
.logs-table .log-direct-node { color: var(--text-muted); }

.footer-tips {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 1200px) {
  .logs-page-body .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logs-workspace-bar { grid-template-columns: 300px minmax(0, 1fr); gap: 12px; }
  .logs-workspace-bar .toolbar { grid-column: 1 / -1; justify-content: flex-end; }
  .logs-search-wrap { max-width: 100%; }
}

@media (max-width: 600px) {
  .logs-workspace-bar {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .logs-search-wrap {
    max-width: 100%;
  }
  .logs-workspace-bar .toolbar { justify-content: flex-start; }
  .logs-shell { width: calc(100% - 24px); padding: 14px 0 32px; }
  .logs-header .brand { flex-wrap: wrap; width: 100%; gap: 10px; }
  .logs-header .brand-divider, .logs-header .brand-badge-wrap { display: none; }
  .logs-header .brand-title-row { flex-wrap: wrap; }
  .logs-header .brand > div:last-child { width: 100%; }
  .logs-page-body .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
  .logs-page-body .metric-card { padding: 12px; min-width: 0; }
  .logs-page-body .metric-label { letter-spacing: 0; }
  .logs-page-body .metric-value { font-size: 22px; }
  .logs-page-body .metric-icon { display: none; }
  .logs-page-body .logs-workspace { margin-top: 12px; }
  .logs-workspace-bar { padding: 12px; }
  .logs-workspace-bar .workspace-title { flex-wrap: wrap; }
  .logs-workspace-bar .filter-select { min-width: 0; max-width: 100%; }
  .logs-empty-box { max-width: 100%; padding: 24px 16px; }
}

