:root {
  --bg-base: #090b10;
  --bg-surface: #11141c;
  --bg-surface-elevated: #161b26;
  --bg-surface-hover: #1d2332;
  --border-subtle: #1e2536;
  --border-strong: #2c364c;
  --border-focus: #3b82f6;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-primary-glow: rgba(59, 130, 246, 0.16);
  --accent-success: #3b82f6;
  --accent-success-bg: rgba(59, 130, 246, 0.12);
  --accent-warning: #38bdf8;
  --accent-warning-bg: rgba(56, 189, 248, 0.12);
  --accent-danger: #ef4444;
  --accent-danger-bg: rgba(239, 68, 68, 0.12);
  --accent-purple: #2563eb;
  --accent-purple-bg: rgba(37, 99, 235, 0.12);
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.45);
  --shadow-elevated: 0 16px 36px -4px rgba(0, 0, 0, 0.55);
  --transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --bg-surface-secondary: #161b26;
  --border-color: #1e2536;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f5f9;
    --bg-surface-hover: #e2e8f0;
    --border-subtle: #e2e8f0;
    --border-strong: #cbd5e1;
    --border-focus: #2563eb;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-primary: #2563eb;
    --accent-primary-hover: #1d4ed8;
    --accent-primary-glow: rgba(37, 99, 235, 0.12);
    --accent-success: #2563eb;
    --accent-success-bg: rgba(37, 99, 235, 0.1);
    --accent-warning: #0284c7;
    --accent-warning-bg: rgba(2, 132, 199, 0.1);
    --accent-danger: #ef4444;
    --accent-danger-bg: rgba(239, 68, 68, 0.1);
    --shadow-card: 0 4px 18px -2px rgba(0, 0, 0, 0.06);
    --shadow-elevated: 0 12px 30px -4px rgba(0, 0, 0, 0.12);
    --bg-surface-secondary: #f1f5f9;
    --border-color: #e2e8f0;
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  }
}
html[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #2563eb;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-primary: #2563eb;
  --accent-primary-hover: #1d4ed8;
  --accent-primary-glow: rgba(37, 99, 235, 0.12);
  --accent-success: #2563eb;
  --accent-success-bg: rgba(37, 99, 235, 0.1);
  --accent-warning: #0284c7;
  --accent-warning-bg: rgba(2, 132, 199, 0.1);
  --accent-danger: #ef4444;
  --accent-danger-bg: rgba(239, 68, 68, 0.1);
  --shadow-card: 0 4px 18px -2px rgba(0, 0, 0, 0.06);
  --shadow-elevated: 0 12px 30px -4px rgba(0, 0, 0, 0.12);
  --bg-surface-secondary: #f1f5f9;
  --border-color: #e2e8f0;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
html[data-theme="dark"] {
  --bg-base: #090b10;
  --bg-surface: #11141c;
  --bg-surface-elevated: #161b26;
  --bg-surface-hover: #1d2332;
  --border-subtle: #1e2536;
  --border-strong: #2c364c;
  --border-focus: #3b82f6;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-primary-glow: rgba(59, 130, 246, 0.16);
  --accent-success: #3b82f6;
  --accent-success-bg: rgba(59, 130, 246, 0.12);
  --accent-warning: #38bdf8;
  --accent-warning-bg: rgba(56, 189, 248, 0.12);
  --accent-danger: #ef4444;
  --accent-danger-bg: rgba(239, 68, 68, 0.12);
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.45);
  --shadow-elevated: 0 16px 36px -4px rgba(0, 0, 0, 0.55);
  --bg-surface-secondary: #161b26;
  --border-color: #1e2536;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
  -webkit-focus-ring-color: transparent !important;
  outline: none;
}
html, body {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
}
body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.app-container {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 260px;
  height: 100vh;
  max-height: 100vh;
  position: sticky;
  top: 0;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  user-select: none;
  z-index: 20;
  transition: var(--transition);
}
.sidebar-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.sidebar-logo-text {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.sidebar-logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sidebar-nav {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}
.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background-color: var(--border-subtle);
  border-radius: 4px;
}
.nav-category-title {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 9px 8px 5px 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6.5px 10px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}
.nav-item:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
}
.nav-item.active {
  background-color: var(--accent-primary-glow);
  color: var(--accent-primary);
  border-color: rgba(59, 130, 246, 0.25);
  font-weight: 600;
}
.nav-item svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  flex-shrink: 0;
}
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  flex-shrink: 0;
  margin-top: auto;
}
.user-profile-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.user-info-text {
  overflow: hidden;
}
.user-info-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.user-info-role {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--bg-base);
}
.top-bar {
  height: 64px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 15;
}
.page-title-group h1 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.page-title-group p {
  font-size: 12px;
  color: var(--text-muted);
}
.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.content-body {
  padding: 28px 32px 60px;
  flex: 1;
  overflow-y: auto;
}
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  width: 100%;
  box-sizing: border-box;
}
.card:hover {
  border-color: var(--border-strong);
}
div[style*="align-items: start"] > .card {
  height: fit-content;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.stat-item {
  padding: 20px 22px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}
.stat-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  font-family: var(--font-mono);
}
.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background-color: var(--bg-surface-elevated);
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 8px;
  display: flex;
}
.progress-bar-segment {
  height: 100%;
  transition: width 0.3s ease;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.badge-success {
  background-color: var(--accent-success-bg);
  color: var(--accent-success);
}
.badge-success .badge-dot {
  background-color: var(--accent-success);
}
.badge-warning {
  background-color: var(--accent-warning-bg);
  color: var(--accent-warning);
}
.badge-warning .badge-dot {
  background-color: var(--accent-warning);
}
.badge-danger {
  background-color: var(--accent-danger-bg);
  color: var(--accent-danger);
}
.badge-danger .badge-dot {
  background-color: var(--accent-danger);
}
.badge-neutral {
  background-color: rgba(148, 163, 184, 0.12);
  color: var(--text-secondary);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  outline: none;
  user-select: none;
  white-space: nowrap;
}
.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--accent-primary-hover);
  box-shadow: 0 2px 8px var(--accent-primary-glow);
}
.btn-secondary {
  background-color: var(--bg-surface-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--text-secondary);
}
.btn-danger-subtle {
  background-color: var(--accent-danger-bg);
  color: var(--accent-danger);
  border-color: rgba(239, 68, 68, 0.2);
}
.btn-danger-subtle:hover {
  background-color: rgba(239, 68, 68, 0.25);
}
.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}
.btn-icon-subtle {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.btn-icon-subtle:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-label-hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 11.5px;
  margin-left: 6px;
}
.form-control {
  width: 100%;
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--text-primary);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: none;
}
.security-card {
  width: 100%;
}
.price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}
@media (max-width: 600px) {
  .price-grid { grid-template-columns: 1fr; }
}
button, a, input, select, textarea, [onclick], [role="button"], [tabindex], .btn, .jump-item, .nav-item, .title-tip-btn {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
  -webkit-focus-ring-color: transparent !important;
  outline: none !important;
}
:focus, :focus-visible, :active {
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
}
button:focus, a:focus, input:focus, select:focus, textarea:focus,
button:active, a:active, input:active, select:active, textarea:active,
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
}
.form-control:focus {
  border-color: var(--border-focus) !important;
  box-shadow: none !important;
  outline: none !important;
}
textarea.form-control {
  font-family: var(--font-mono);
  font-size: 12.5px;
  resize: vertical;
  line-height: 1.6;
}
.form-control-mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.switch-label {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  cursor: pointer;
  user-select: none;
}
.switch-label .switch {
  order: 2 !important;
  margin-left: auto !important;
}
.switch-label > span:not(.switch) {
  order: 1 !important;
}
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.content-body, .card, .stat-item {
  animation: fadeInSlide 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-container {
  animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border-strong);
  transition: .2s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--accent-primary);
}
input:checked + .slider:before {
  transform: translateX(20px);
}
.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
}
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.table th {
  background-color: var(--bg-surface-elevated);
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap !important;
}
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  white-space: nowrap !important;
}
.table tr:last-child td {
  border-bottom: none;
}
.table tr:hover td {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
}
.tabs-nav {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab-btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.tab-btn:hover {
  color: var(--text-primary);
}
.tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}
.batch-toolbar {
  padding: 10px 16px;
  background-color: var(--accent-primary-glow);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-primary);
}
.mobile-menu-btn {
  display: none;
}
.sidebar-overlay {
  display: none;
}
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.5);
  }
  .sidebar-overlay.active {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    backdrop-filter: blur(3px);
  }
  .mobile-menu-btn {
    display: inline-flex;
    margin-right: 8px;
  }
  .top-bar {
    padding: 0 16px;
    height: 56px;
  }
  .content-body {
    padding: 16px 16px 40px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .grid-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .tabs-nav {
    gap: 2px;
  }
  .tab-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}
@media (max-width: 480px) {
  .grid-stats {
    grid-template-columns: 1fr;
  }
}
.code-box {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: auto;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal-container {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-elevated);
  transform: scale(0.96);
  transition: var(--transition);
}
.modal-overlay.active .modal-container {
  transform: scale(1);
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.modal-body {
  padding: 24px;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background-color: var(--bg-surface-elevated);
}
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: var(--bg-base);
}
.login-card {
  width: 100%;
  max-width: 420px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-elevated);
}
.login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 14px;
}
.login-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
  text-align: left;
}
.theme-toggle-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  margin-left: auto;
}
.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}
.login-notice {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  margin-bottom: 20px;
}
.auth-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  background: transparent;
  padding: 0;
  border-radius: 0;
}
.auth-tab {
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  user-select: none;
  margin-bottom: -1px;
}
.auth-tab:hover {
  color: var(--text-primary);
  background: transparent;
}
.auth-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  background: transparent;
  box-shadow: none;
}
.guide-flow-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
  position: relative;
}
.guide-step-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.guide-step-card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 6px 20px var(--accent-primary-glow);
  transform: translateY(-1px);
}
.guide-step-badge {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.guide-step-num {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16) 0%, rgba(37, 99, 235, 0.08) 100%);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  font-family: var(--font-mono);
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.12);
}
.guide-step-content {
  flex: 1;
  min-width: 0;
}
.guide-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}
.guide-step-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.guide-step-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background-color: var(--accent-primary-glow);
  color: var(--accent-primary);
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.guide-step-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.68;
}
.guide-code-box {
  margin-top: 14px;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.guide-code-box::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--accent-primary);
}
.guide-code-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.guide-code-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.guide-code-text {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-primary);
  word-break: break-all;
  user-select: all;
}
.guide-notice-card {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.guide-uid-banner {
  margin-bottom: 24px;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.04) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.guide-uid-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  color: var(--accent-primary);
  margin-top: 4px;
  letter-spacing: 0.03em;

  word-break: break-all;
}
@media (max-width: 768px) {
  .guide-uid-banner {
    padding: 16px 16px;
    gap: 12px;
  }
  .guide-uid-value {
    font-size: 21px;
  }
  .guide-uid-banner .btn {
    width: 100%;
    justify-content: center;
  }
  .guide-flow-container {
    gap: 14px;
    margin-top: 16px;
  }
  .guide-step-card {

    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 16px;
  }
  .guide-step-badge {

    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  .guide-step-num {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 13px;
  }
  .guide-step-title {
    font-size: 15px;
  }
  .guide-step-desc {
    font-size: 13px;
    line-height: 1.75;
  }
  .guide-step-header {

    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .guide-code-box {

    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }
  .guide-code-box .btn,
  .guide-code-box button {
    width: 100%;
    justify-content: center;
  }
  .guide-code-text {
    font-size: 12.5px;
    line-height: 1.6;
  }
  .guide-notice-card {
    padding: 14px 16px;
    gap: 10px;
  }
}
@media (max-width: 480px) {
  .guide-uid-banner {
    padding: 14px 13px;
  }
  .guide-uid-value {
    font-size: 19px;
  }
  .guide-step-card {
    padding: 14px 13px;
    border-radius: var(--radius-md);
  }
  .guide-step-num {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
  .guide-step-title {
    font-size: 14.5px;

    flex-wrap: wrap;
    word-break: break-word;
  }
  .guide-step-desc {
    font-size: 12.5px;
  }
  .guide-code-box {
    padding: 10px 12px;
  }
  .guide-code-text {
    font-size: 12px;
  }
  .guide-notice-card {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
  }
}
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-elevated);
  animation: slideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 260px;
}
.toast-success {
  border-color: rgba(16, 185, 129, 0.4);
}
.toast-success svg {
  color: var(--accent-success);
}
.toast-error {
  border-color: rgba(239, 68, 68, 0.4);
}
.toast-error svg {
  color: var(--accent-danger);
}
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 4px 8px;
  margin-top: 8px;
}
.pagination-info {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pagination-size-select {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.pagination-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition-fast);
}
.pagination-btn:hover:not(:disabled):not(.active) {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.pagination-btn.active {
  background-color: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  font-weight: 600;
}
.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pagination-ellipsis {
  padding: 0 4px;
  color: var(--text-muted);
  font-size: 13px;
}
.card-export-textarea {
  width: 100%;
  height: 220px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--accent-primary);
  resize: none;
  word-break: break-all;
  white-space: pre;
  outline: none;
  box-sizing: border-box;
}
.modal-header-relative {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-close-top-right {
  position: absolute;
  top: 16px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}
.modal-close-top-right:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
}
.siyox-alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.46);
}
.siyox-alert-overlay.active { display: flex; }
.siyox-alert-dialog {
  width: min(420px, 100%);
  padding: 22px 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-card), 0 18px 55px rgba(0, 0, 0, 0.24);
}
.siyox-alert-title { font-size: 16px; font-weight: 650; margin-bottom: 10px; }
.siyox-alert-message { font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; color: var(--text-secondary); }
.siyox-alert-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.title-tip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 2px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
  vertical-align: middle;
  flex-shrink: 0;
}
.card-title .title-tip-btn {
  margin-left: -4px;
}
.title-tip-btn:hover {
  color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.12);
  transform: scale(1.1);
}
.title-tip-popover {
  position: absolute;
  z-index: 2500;
  max-width: 290px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-focus);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.55;
  font-weight: normal;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.title-tip-popover.active {
  opacity: 1;
  transform: translateY(0);
}
.title-tip-popover::after {
  content: '';
  position: absolute;
  top: -6px;
  left: var(--arrow-left, 14px);
  width: 10px;
  height: 10px;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-focus);
  border-left: 1px solid var(--border-focus);
  transform: rotate(45deg);
}

.loading-center-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  width: 100%;
  padding: 40px 0;
  color: var(--text-muted);
}
.spinner-circle-dots {
  display: inline-block;
  position: relative;
  width: 44px;
  height: 44px;
}
.spinner-circle-dots div {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: spinner-circle-fade 1.2s linear infinite;
}
.spinner-circle-dots div:nth-child(1) { top: 6px; left: 19px; animation-delay: 0s; }
.spinner-circle-dots div:nth-child(2) { top: 10px; left: 29px; animation-delay: -0.15s; }
.spinner-circle-dots div:nth-child(3) { top: 19px; left: 33px; animation-delay: -0.3s; }
.spinner-circle-dots div:nth-child(4) { top: 29px; left: 29px; animation-delay: -0.45s; }
.spinner-circle-dots div:nth-child(5) { top: 33px; left: 19px; animation-delay: -0.6s; }
.spinner-circle-dots div:nth-child(6) { top: 29px; left: 10px; animation-delay: -0.75s; }
.spinner-circle-dots div:nth-child(7) { top: 19px; left: 6px; animation-delay: -0.9s; }
.spinner-circle-dots div:nth-child(8) { top: 10px; left: 10px; animation-delay: -1.05s; }

@keyframes spinner-circle-fade {
  0%, 20%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.2;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}
.chart-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
  align-items: stretch;
}
#chartTrendCard,
#chartDonutCard,
#chartDurationCard,
#chartAgentCard {
  height: 340px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#chartTrendCard .card-header,
#chartDonutCard .card-header,
#chartDurationCard .card-header,
#chartAgentCard .card-header {
  flex-shrink: 0;
}
#chartTrendCard .chart-canvas-wrap {
  flex: 1;
  min-height: 90px;
  height: auto;
}
#chartDonutCard .donut-row {
  flex: 1;
  align-content: center;
}
.chart-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-width: thin;
}
.chart-scroll::-webkit-scrollbar {
  width: 6px;
}
.chart-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.chart-scroll::-webkit-scrollbar-thumb {
  background-color: var(--border-strong);
  border-radius: 3px;
}
.chart-scroll::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-primary);
}
.chart-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}
.chart-switch-btn {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.chart-switch-btn.active {
  background-color: var(--accent-primary);
  color: #fff;
}
.chart-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background-color: var(--accent-primary-glow);
  border-radius: 10px;
}
.chart-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chart-metric-label {
  font-size: 11px;
  color: var(--text-muted);
}
.chart-metric-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.chart-metric-value.accent {
  color: var(--accent-primary);
}
.chart-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.chart-caption strong {
  color: var(--accent-primary);
  font-size: 12px;
}
.chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 150px;
}
.chart-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}
.chart-axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding: 0 4px;
  font-size: 10px;
  color: var(--text-muted);
}
.donut-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 20px;
  flex-wrap: wrap;
}
.donut-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}
.donut-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.donut-center-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.donut-center-label {
  font-size: 10px;
  color: var(--text-muted);
}
.legend-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-name {
  color: var(--text-muted);
}
.legend-value {
  font-weight: 600;
  color: var(--text-primary);
}
.bar-row {
  padding: 4px 0;
}
.bar-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 12px;
}
.bar-row-name {
  color: var(--text-primary);
}
.bar-row-count {
  color: var(--text-muted);
  font-size: 11px;
}
.bar-track {
  width: 100%;
  height: 7px;
  background-color: var(--bg-surface-elevated);
  border-radius: 4px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 4px;
  background-color: var(--accent-primary);
  transition: width 0.5s ease;
}
.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}
.rank-badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.rank-body {
  flex: 1;
  min-width: 0;
}
.rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}
.rank-name {
  font-size: 12px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-count {
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.rank-track {
  width: 100%;
  height: 5px;
  background-color: var(--bg-surface-elevated);
  border-radius: 3px;
  overflow: hidden;
}
.rank-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}
.chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
  font-size: 12px;
  color: var(--text-muted);
}
@media (max-width: 768px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }
  #chartTrendCard,
  #chartDonutCard,
  #chartDurationCard,
  #chartAgentCard {
    height: auto;
    max-height: 360px;
  }
  #chartTrendCard .chart-canvas-wrap {
    min-height: 120px;
  }
  .donut-row {
    gap: 14px;
  }
}
