:root {
  --bg-main: #0b0f19;
  --bg-card: #131b2e;
  --bg-card-hover: #19243d;
  --bg-input: #1b2640;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.25);

  --status-init-bg: rgba(234, 179, 8, 0.15);
  --status-init-text: #facc15;
  --status-init-border: rgba(234, 179, 8, 0.3);

  --status-process-bg: rgba(59, 130, 246, 0.15);
  --status-process-text: #60a5fa;
  --status-process-border: rgba(59, 130, 246, 0.3);

  --status-resolved-bg: rgba(16, 185, 129, 0.15);
  --status-resolved-text: #34d399;
  --status-resolved-border: rgba(16, 185, 129, 0.3);

  --status-rejected-bg: rgba(244, 63, 94, 0.15);
  --status-rejected-text: #fb7185;
  --status-rejected-border: rgba(244, 63, 94, 0.3);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ========================================================
   登录页面样式 (Login Page)
   ======================================================== */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, #172554 0%, var(--bg-main) 65%);
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 24px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  backdrop-filter: blur(12px);
}

.brand-header {
  text-align: center;
  margin-bottom: 28px;
}

.brand-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.35);
}

.brand-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.brand-header p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ========================================================
   后台管理布局 (Dashboard Layout)
   ======================================================== */
.dashboard-body {
  display: flex;
  flex-direction: column;
}

.navbar {
  height: 64px;
  background: rgba(19, 27, 46, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.nav-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.sound-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-color);
  color: #fff;
}

.sound-btn.muted {
  opacity: 0.6;
  border-style: dashed;
  color: var(--text-secondary);
}

/* 音频自动播放未授权醒目横幅 */
.audio-banner {
  background: linear-gradient(90deg, #1e3a8a, #2563eb);
  color: #fff;
  padding: 10px 24px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  animation: bannerSlideDown 0.3s ease;
  position: relative;
  z-index: 99;
}

.audio-banner-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.audio-banner-icon {
  font-size: 1.25rem;
  animation: pulseBell 1.5s infinite;
}

.audio-banner-text {
  flex: 1;
  font-size: 0.875rem;
  color: #eff6ff;
}

.audio-banner-text strong {
  color: #facc15;
}

@keyframes bannerSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes pulseBell {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  padding: 4px 12px 4px 6px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  width: 100%;
  flex: 1;
}

/* ========================================================
   统计数据卡片 (Stats Grid)
   ======================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.total-icon { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }
.init-icon { background: var(--status-init-bg); color: var(--status-init-text); }
.process-icon { background: var(--status-process-bg); color: var(--status-process-text); }
.review-icon { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.error-icon { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.resolved-icon { background: var(--status-resolved-bg); color: var(--status-resolved-text); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.stat-value {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

/* ========================================================
   通用卡片与筛选表单 (Filter & Table Cards)
   ======================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.filter-card {
  padding: 20px 24px;
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

.search-input-wrap {
  flex: 1;
  min-width: 240px;
}

.filter-item label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

/* ========================================================
   表单与输入框组件 (Form Controls)
   ======================================================== */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

input[type="text"],
input[type="password"],
textarea,
.select-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.2s ease;
  outline: none;
}

.input-wrap input {
  padding-left: 38px;
}

input:focus,
textarea:focus,
.select-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.input-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.04);
}

/* ========================================================
   按钮样式 (Buttons)
   ======================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fb7185;
}

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

.btn-warning {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.35);
  color: #facc15;
}

.btn-warning:hover:not(:disabled) {
  background: #eab308;
  color: #0b0f19;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.35);
}

.btn-resend {
  background: rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.35);
  color: #fb923c;
}

.btn-resend:hover:not(:disabled) {
  background: #f97316;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}

.btn-keypad-receipt {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

.btn-keypad-receipt:hover:not(:disabled) {
  background: #a855f7;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
}

.btn-secondary-action {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  color: #818cf8;
}

.btn-secondary-action:hover:not(:disabled) {
  background: #6366f1;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-resend-secondary {
  background: rgba(236, 72, 153, 0.15);
  border-color: rgba(236, 72, 153, 0.35);
  color: #f472b6;
}

.btn-resend-secondary:hover:not(:disabled) {
  background: #ec4899;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
}

.btn-complete {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.btn-complete:hover:not(:disabled) {
  background: #10b981;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-remind {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.35);
  color: #38bdf8;
}

.btn-remind:hover:not(:disabled) {
  background: #0ea5e9;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.receipt-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  font-size: 0.8125rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  display: inline-block;
  letter-spacing: 0.05em;
}

.secondary-msg-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  font-size: 0.8125rem;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.btn-icon {
  padding: 10px;
}

.btn-block {
  width: 100%;
}

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

/* ========================================================
   数据表格样式 (Data Table)
   ======================================================== */
.table-card {
  padding: 24px;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.table-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.table-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.record-data-row td {
  padding: 14px 16px 6px 16px;
  border-bottom: none;
}

.record-action-row td {
  padding: 4px 16px 16px 16px;
  border-bottom: 1px solid var(--border-color);
}

.action-row-cell {
  background: transparent;
}

.action-bar-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 14px;
}

.action-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  padding-right: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.action-bar-inner .action-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.data-table tbody tr.record-data-row:hover,
.data-table tbody tr.record-action-row:hover,
.data-table tbody tr.record-data-row:hover + tr.record-action-row {
  background: rgba(255, 255, 255, 0.025);
}

.phone-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  color: #38bdf8;
}

.user-cell {
  display: flex;
  flex-direction: column;
}

.user-handle {
  font-weight: 600;
  color: var(--text-primary);
}

.user-id-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 状态徽章 */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}

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

.status-init {
  background: var(--status-init-bg);
  color: var(--status-init-text);
  border-color: var(--status-init-border);
}
.status-init .badge-dot { background: var(--status-init-text); }

.status-processing {
  background: var(--status-process-bg);
  color: var(--status-process-text);
  border-color: var(--status-process-border);
}
.status-processing .badge-dot { background: var(--status-process-text); }

.status-resolved {
  background: var(--status-resolved-bg);
  color: var(--status-resolved-text);
  border-color: var(--status-resolved-border);
}
.status-resolved .badge-dot { background: var(--status-resolved-text); }

.status-rejected {
  background: var(--status-rejected-bg);
  color: var(--status-rejected-text);
  border-color: var(--status-rejected-border);
}
.status-rejected .badge-dot { background: var(--status-rejected-text); }

.status-receipt-review {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.35);
}
.status-receipt-review .badge-dot { background: #c084fc; }

.status-receipt-error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}
.status-receipt-error .badge-dot { background: #f87171; }

.status-secondary-notify {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.35);
}
.status-secondary-notify .badge-dot { background: #818cf8; }

.status-secondary-review {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.35);
}
.status-secondary-review .badge-dot { background: #22d3ee; }

.text-right { text-align: right; }
.text-center { text-align: center; }

.action-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* ========================================================
   分页栏 (Pagination)
   ======================================================== */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.pagination-info {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.pagination-buttons {
  display: flex;
  gap: 8px;
}

/* ========================================================
   模态框 (Modal)
   ======================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  z-index: 10;
  animation: modalEnter 0.2s ease-out;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* ========================================================
   提示框与 Toast (Alerts & Toasts)
   ======================================================== */
.alert-box {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.alert-box.hidden { display: none; }
.alert-success { background: var(--status-resolved-bg); color: var(--status-resolved-text); border-color: var(--status-resolved-border); }
.alert-error { background: var(--status-rejected-bg); color: var(--status-rejected-text); border-color: var(--status-rejected-border); }

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.25s ease-out;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-success { border-left: 4px solid #10b981; }
.toast-error { border-left: 4px solid #f43f5e; }
.toast-info { border-left: 4px solid #3b82f6; }

/* 旋转 Loading */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.spinner.hidden { display: none; }

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

/* ========================================================
   顶部标签导航 (Nav Tabs)
   ======================================================== */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 24px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  color: #fff;
  background: var(--bg-card);
  border-color: var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  background: var(--primary);
  color: #fff;
}

.tab-view.hidden {
  display: none !important;
}

.tab-view.active {
  display: block;
}

/* ========================================================
   机器人管理页面专属样式 (Bot Management View)
   ======================================================== */
.bots-header-card {
  padding: 24px;
}

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

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.bots-header-actions {
  display: flex;
  gap: 12px;
}

/* 机器人单元格 */
.bot-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  font-weight: 600;
  font-size: 0.8125rem;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.bot-info-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bot-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.bot-meta {
  display: flex;
  flex-direction: column;
}

.bot-username {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.bot-name {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Token 展示与操作 */
.token-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.token-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px 8px;
  border-radius: 4px;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.05);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-icon-sub {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-icon-sub:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* 机器人运行状态 */
.status-badge.status-running {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.status-badge.status-running .badge-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.status-badge.status-stopped {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.3);
}

.status-badge.status-stopped .badge-dot {
  background: #64748b;
}

.status-badge.status-error {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.3);
}

.status-badge.status-error .badge-dot {
  background: #f43f5e;
  box-shadow: 0 0 8px #f43f5e;
}

.btn-restart {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.btn-restart:hover {
  background: rgba(234, 179, 8, 0.25);
  color: #fef08a;
}

.btn-toggle-stop {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.btn-toggle-stop:hover {
  background: rgba(148, 163, 184, 0.25);
}

.btn-toggle-start {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-toggle-start:hover {
  background: rgba(16, 185, 129, 0.25);
}

.required-star {
  color: #f43f5e;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}
