/* ============================================================================
   Admin Area Styles
   ============================================================================ */

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */

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

:root {
  /* Layout */
  --admin-sidebar-width: 220px;
  --admin-content-padding: 24px;

  /* Colors */
  --admin-bg: #f9fafb;
  --admin-sidebar-bg: #111827;
  --admin-sidebar-text: #9ca3af;
  --admin-sidebar-text-hover: #f3f4f6;
  --admin-sidebar-active-bg: #1f2937;
  --admin-sidebar-active-text: #ffffff;
  --admin-card-bg: #ffffff;
  --admin-border: #e5e7eb;

  /* Primary */
  --admin-primary: #4f46e5;
  --admin-primary-hover: #4338ca;
  --admin-primary-light: #eef2ff;

  /* Status */
  --admin-success: #10b981;
  --admin-success-bg: #ecfdf5;
  --admin-warning: #f59e0b;
  --admin-warning-bg: #fffbeb;
  --admin-danger: #ef4444;
  --admin-danger-bg: #fef2f2;
  --admin-info: #3b82f6;
  --admin-info-bg: #eff6ff;

  /* Text */
  --admin-text-primary: #111827;
  --admin-text-secondary: #6b7280;
  --admin-text-muted: #9ca3af;

  /* Fonts */
  --admin-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --admin-font-mono: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
}

body {
  font-family: var(--admin-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--admin-text-primary);
  background: var(--admin-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--admin-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */

.admin-sidebar {
  width: var(--admin-sidebar-width);
  background: var(--admin-sidebar-bg);
  color: var(--admin-sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.admin-sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar-header h1 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.admin-sidebar-header .admin-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--admin-primary);
  background: rgba(79, 70, 229, 0.15);
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 8px;
  vertical-align: middle;
}

.admin-sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.admin-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: var(--admin-sidebar-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.1s, color 0.1s;
  border-left: 3px solid transparent;
}

.admin-sidebar-nav a:hover {
  color: var(--admin-sidebar-text-hover);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.admin-sidebar-nav a.active {
  color: var(--admin-sidebar-active-text);
  background: var(--admin-sidebar-active-bg);
  border-left-color: var(--admin-primary);
}

.admin-sidebar-nav .nav-icon {
  width: 18px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}

.admin-sidebar-nav .nav-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 8px 16px;
}

.admin-sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar-footer .admin-user-info {
  font-size: 12px;
  color: var(--admin-sidebar-text);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-sidebar-footer button {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--admin-sidebar-text);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  width: 100%;
  transition: background 0.1s, color 0.1s;
}

.admin-sidebar-footer button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--admin-sidebar-text-hover);
}

/* --------------------------------------------------------------------------
   Main Content Area
   -------------------------------------------------------------------------- */

.admin-main {
  flex: 1;
  margin-left: var(--admin-sidebar-width);
  padding: var(--admin-content-padding);
  min-height: 100vh;
}

.admin-page-header {
  margin-bottom: 24px;
}

.admin-page-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--admin-text-primary);
  margin: 0;
}

.admin-page-header p {
  font-size: 13px;
  color: var(--admin-text-secondary);
  margin: 4px 0 0;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.admin-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 20px;
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--admin-primary-hover);
  border-color: var(--admin-primary-hover);
}

.btn-secondary {
  background: #fff;
  color: var(--admin-text-primary);
  border-color: var(--admin-border);
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.btn-danger {
  background: var(--admin-danger);
  color: #fff;
  border-color: var(--admin-danger);
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--admin-text-primary);
  margin-bottom: 4px;
}

.form-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--admin-font);
  color: var(--admin-text-primary);
  background: #fff;
  transition: border-color 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
  color: var(--admin-text-muted);
}

.form-error {
  font-size: 12px;
  color: var(--admin-danger);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Login Page
   -------------------------------------------------------------------------- */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--admin-sidebar-bg);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--admin-card-bg);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.login-card h1 {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 4px;
}

.login-card .login-subtitle {
  font-size: 13px;
  color: var(--admin-text-secondary);
  text-align: center;
  margin-bottom: 24px;
}

.login-card .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 10px 16px;
  font-size: 14px;
}

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

/* TOTP setup */
.totp-secret {
  background: #f3f4f6;
  border-radius: 6px;
  padding: 12px;
  font-family: var(--admin-font-mono);
  font-size: 13px;
  word-break: break-all;
  text-align: center;
  margin-bottom: 16px;
  color: var(--admin-text-primary);
}

.backup-codes {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 16px;
  margin-top: 16px;
}

.backup-codes h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-warning);
  margin-bottom: 8px;
}

.backup-codes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  font-family: var(--admin-font-mono);
  font-size: 13px;
}

/* Alert messages */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-error {
  background: var(--admin-danger-bg);
  color: var(--admin-danger);
  border: 1px solid #fecaca;
}

.alert-success {
  background: var(--admin-success-bg);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-info {
  background: var(--admin-info-bg);
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* --------------------------------------------------------------------------
   Stat Cards
   -------------------------------------------------------------------------- */

.stat-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 16px;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-text-secondary);
  margin-bottom: 4px;
}

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

.stat-change {
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}

.stat-trend-up {
  color: var(--admin-success);
}

.stat-trend-down {
  color: var(--admin-danger);
}

.stat-sublabel {
  font-size: 11px;
  color: var(--admin-text-muted);
  margin-top: 2px;
}

.mini-chart-svg {
  display: block;
  margin-top: 6px;
}

/* Dashboard trend (signups bar strip) */
.dashboard-trends .trend-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trend-row {
  display: grid;
  grid-template-columns: 90px 1fr 40px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.trend-date {
  color: var(--admin-text-secondary);
}

.trend-bar-wrap {
  height: 18px;
  background: var(--admin-bg);
  border-radius: 4px;
  overflow: hidden;
}

.trend-bar {
  display: block;
  height: 100%;
  min-width: 2px;
  background: var(--admin-primary);
  border-radius: 4px;
  transition: width 0.2s;
}

.trend-value {
  font-weight: 600;
  text-align: right;
  color: var(--admin-text-primary);
}

/* --------------------------------------------------------------------------
   Tab Bar
   -------------------------------------------------------------------------- */

.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--admin-border);
}

.tab-btn {
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--admin-text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn:hover {
  color: var(--admin-text-primary);
}

.tab-btn.active {
  color: var(--admin-primary);
  border-bottom-color: var(--admin-primary);
}

/* --------------------------------------------------------------------------
   Text Utilities
   -------------------------------------------------------------------------- */

.text-success { color: var(--admin-success); }
.text-danger { color: var(--admin-danger); }
.text-muted { color: var(--admin-text-muted); }

/* --------------------------------------------------------------------------
   Admin Card
   -------------------------------------------------------------------------- */

.admin-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 16px;
}

/* Session timeout warning (admin shell) */
.admin-session-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--admin-warning, #f59e0b);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

.admin-session-warning .btn {
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

.badge-success {
  background: var(--admin-success-bg);
  color: #065f46;
}

.badge-danger {
  background: var(--admin-danger-bg);
  color: var(--admin-danger);
}

.badge-warning {
  background: var(--admin-warning-bg);
  color: #92400e;
}

.badge-muted {
  background: #f3f4f6;
  color: var(--admin-text-muted);
}

.badge-plan {
  background: var(--admin-primary-light);
  color: var(--admin-primary);
}

.badge-action {
  background: #f0fdf4;
  color: #166534;
}

.badge-admin {
  background: #fef3c7;
  color: #92400e;
}

/* --------------------------------------------------------------------------
   Data Table
   -------------------------------------------------------------------------- */

.data-table-wrapper {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead {
  background: #f9fafb;
  border-bottom: 1px solid var(--admin-border);
}

.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-text-secondary);
  white-space: nowrap;
  user-select: none;
}

.data-table th.sortable {
  cursor: pointer;
}

.data-table th.sortable:hover {
  color: var(--admin-text-primary);
}

.data-table th.sorted {
  color: var(--admin-primary);
}

.sort-indicator {
  font-size: 10px;
  margin-left: 4px;
  vertical-align: middle;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6;
  color: var(--admin-text-primary);
  vertical-align: middle;
}

.data-table .table-row {
  cursor: pointer;
  transition: background 0.1s;
}

.data-table .table-row:hover {
  background: #f9fafb;
}

.data-table .table-loading,
.data-table .table-empty {
  text-align: center;
  padding: 40px 14px;
  color: var(--admin-text-muted);
  font-style: italic;
}

.table-message {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--admin-border);
  background: #f9fafb;
}

.pagination-info {
  font-size: 12px;
  color: var(--admin-text-secondary);
}

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

/* --------------------------------------------------------------------------
   Detail Panel (Slide-out)
   -------------------------------------------------------------------------- */

.detail-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 200;
}

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  max-width: 90vw;
  height: 100vh;
  background: var(--admin-card-bg);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  z-index: 201;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--admin-border);
  flex-shrink: 0;
}

.panel-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.panel-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--admin-text-muted);
  padding: 0;
  line-height: 1;
}

.panel-close-btn:hover {
  color: var(--admin-text-primary);
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Detail panel content sections */
.detail-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f3f4f6;
}

.detail-section:last-child {
  border-bottom: none;
}

.detail-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 4px 0;
  gap: 12px;
}

.detail-label {
  font-size: 13px;
  color: var(--admin-text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.detail-value {
  font-size: 13px;
  color: var(--admin-text-primary);
  text-align: right;
  word-break: break-word;
}

.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Activity list in detail panel */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.activity-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.activity-action {
  font-weight: 600;
  color: var(--admin-text-primary);
  white-space: nowrap;
}

.activity-message {
  color: var(--admin-text-secondary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-time {
  color: var(--admin-text-muted);
  white-space: nowrap;
  font-size: 11px;
}

/* Metadata JSON display */
.metadata-json {
  background: #f3f4f6;
  border-radius: 6px;
  padding: 12px;
  font-family: var(--admin-font-mono);
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--admin-text-primary);
}

/* --------------------------------------------------------------------------
   Filter Bar
   -------------------------------------------------------------------------- */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-item {
  flex-shrink: 0;
}

.filter-search {
  flex: 1;
  min-width: 200px;
}

.filter-search .form-input {
  max-width: 320px;
}

.filter-bar select.form-input {
  width: auto;
  min-width: 140px;
}

.filter-clear {
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Confirm Dialog
   -------------------------------------------------------------------------- */

.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog-box {
  background: var(--admin-card-bg);
  border-radius: 12px;
  padding: 24px;
  max-width: 420px;
  width: 90vw;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.dialog-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.dialog-message {
  font-size: 14px;
  color: var(--admin-text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   Placeholder view styling
   -------------------------------------------------------------------------- */

.admin-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: var(--admin-text-muted);
  text-align: center;
}

.admin-placeholder .placeholder-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.admin-placeholder h3 {
  font-size: 16px;
  font-weight: 500;
  color: var(--admin-text-secondary);
  margin-bottom: 4px;
}

.admin-placeholder p {
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

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

.text-muted {
  color: var(--admin-text-muted);
}

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

.text-danger {
  color: var(--admin-danger);
}

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

.text-warning {
  color: var(--admin-warning);
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.hidden { display: none !important; }

/* --------------------------------------------------------------------------
   Alert Badge (sidebar)
   -------------------------------------------------------------------------- */

.admin-sidebar-nav .nav-link-with-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}

.alert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  border-radius: 9px;
  margin-left: auto;
}

.alert-badge-warning {
  background: var(--admin-warning);
  color: #fff;
}

.alert-badge-critical {
  background: var(--admin-danger);
  color: #fff;
}

/* Inline code in tables */
.table-id {
  font-size: 12px;
  font-family: var(--admin-font-mono);
  background: var(--admin-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Analytics: Grid Layouts
   -------------------------------------------------------------------------- */

.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.admin-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .admin-grid-2,
  .admin-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Analytics: Mini Table (ranked list with label + value)
   -------------------------------------------------------------------------- */

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mini-table tr + tr td {
  border-top: 1px solid var(--admin-border);
}

.mini-table td {
  padding: 7px 0;
}

.mini-table-label {
  color: var(--admin-text-primary);
  word-break: break-all;
  font-family: var(--admin-font-mono);
  font-size: 12px;
}

.mini-table-value {
  text-align: right;
  font-weight: 600;
  color: var(--admin-text-primary);
  white-space: nowrap;
  padding-left: 12px;
}

.mini-table-extra {
  text-align: right;
  color: var(--admin-text-secondary);
  white-space: nowrap;
  padding-left: 8px;
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   Analytics: Funnel Chart
   -------------------------------------------------------------------------- */

.funnel-step {
  margin-bottom: 12px;
}

.funnel-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 13px;
}

.funnel-stage-name {
  color: var(--admin-text-primary);
  font-weight: 500;
}

.funnel-count {
  font-weight: 600;
  color: var(--admin-text-primary);
}

.funnel-conversion {
  color: var(--admin-text-secondary);
  font-size: 12px;
  margin-left: auto;
}

.funnel-bar-wrap {
  height: 24px;
  background: var(--admin-bg);
  border-radius: 4px;
  overflow: hidden;
}

.funnel-bar {
  display: block;
  height: 100%;
  min-width: 2px;
  background: var(--admin-primary);
  border-radius: 4px;
  transition: width 0.3s;
}

/* Trend bars used outside of .dashboard-trends context */
.trend-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
