/* ==========================================================================
   Dimple Analytics — Dark Slate & Cyan UI Stylesheet
   Zero external CDN dependencies (100% CSP 'self' compliant)
   ========================================================================== */

:root {
  --bg-main: #181d20;
  --bg-elevated: #1e2428;
  --bg-card: #1b2125;
  --bg-input: #13171a;
  --bg-hover: rgba(255, 255, 255, 0.04);
  --border-subtle: #283137;
  --border-strong: #344048;

  --text-primary: #dce4e9;
  --text-bright: #f1f5f9;
  --text-muted: #82939e;
  --text-dim: #5c6c77;

  --cyan: #0fb5d5;
  --cyan-bright: #22d3ee;
  --cyan-bar: #169ab4;
  --cyan-bar-bg: rgba(15, 181, 213, 0.11);
  --cyan-glow: rgba(15, 181, 213, 0.24);

  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.14);
  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.14);
  --amber: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.14);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

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

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--cyan);
  text-decoration: none;
}
a:hover {
  color: var(--cyan-bright);
}

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

/* Top Navigation Header */
.top-nav {
  background: #14191c;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 24px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 60;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-bright);
  letter-spacing: -0.01em;
}
.brand-logo:hover {
  color: #fff;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, #0fb5d5 0%, #087f99 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0b1114;
  font-weight: 800;
  box-shadow: 0 0 14px rgba(15, 181, 213, 0.35);
}

.site-switcher-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
}

.site-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
}

.site-select {
  background: transparent;
  border: none;
  color: var(--text-bright);
  font-weight: 600;
  font-size: 13.5px;
  outline: none;
  cursor: pointer;
  padding-right: 6px;
}
.site-select option {
  background: var(--bg-elevated);
  color: var(--text-bright);
}

.nav-link {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-bright);
  background: var(--bg-hover);
}
.nav-link.active {
  color: var(--cyan-bright);
  background: rgba(15, 181, 213, 0.1);
}

/* Main Container */
.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 24px 26px 64px;
}

/* Period Preset Pills + Filter Toolbar */
.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.period-pills {
  display: inline-flex;
  flex-wrap: wrap;
  background: #14181b;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.period-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.period-pill:hover {
  color: var(--text-bright);
}
.period-pill.active {
  background: var(--bg-elevated);
  color: var(--cyan-bright);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

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

.filter-select {
  background: #14181b;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12.5px;
  outline: none;
}
.filter-select:focus {
  border-color: var(--cyan);
}

/* Active Filter Chips */
.active-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.active-filters-bar:empty {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 181, 213, 0.14);
  border: 1px solid rgba(15, 181, 213, 0.38);
  color: var(--text-bright);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
}
.filter-chip-dim {
  color: var(--cyan-bright);
  font-weight: 600;
  text-transform: capitalize;
}
.filter-chip-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 2px;
  font-size: 14px;
  line-height: 1;
}
.filter-chip-remove:hover {
  color: #fff;
}

.clear-filters-btn {
  background: transparent;
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  cursor: pointer;
}
.clear-filters-btn:hover {
  color: var(--text-bright);
  border-color: var(--text-muted);
}

/* Hero Metrics Row — Faithful to Simple Analytics Screenshot */
.metrics-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.kpi-group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 38px;
}

.kpi-item {
  position: relative;
}

.kpi-label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 400;
  margin-bottom: 2px;
}

.help-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--text-dim);
  color: var(--text-muted);
  font-size: 10px;
  cursor: help;
}

.kpi-value {
  font-size: 38px;
  font-weight: 500;
  line-height: 1.1;
  color: #d3dce2;
  letter-spacing: -0.02em;
}

/* Live Pageviews Indicator & Popover */
.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e04f5f;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(224, 79, 95, 0.7);
  animation: pulseLive 2s infinite;
}

@keyframes pulseLive {
  0% { box-shadow: 0 0 0 0 rgba(224, 79, 95, 0.65); }
  70% { box-shadow: 0 0 0 7px rgba(224, 79, 95, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 79, 95, 0); }
}

.live-trigger {
  background: none;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  cursor: pointer;
}
.live-chevron {
  font-size: 15px;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.live-trigger[aria-expanded="true"] .live-chevron {
  transform: rotate(180deg);
}

.live-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 340px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  z-index: 50;
  display: none;
}
.live-popover.open {
  display: block;
}

/* Top-Right Period Stepper (< 30d >) */
.period-stepper-box {
  text-align: right;
}

.period-date-span {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-bottom: 2px;
}

.period-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.step-arrow {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 4px;
}
.step-arrow:hover:not(:disabled) {
  color: var(--text-bright);
  background: var(--bg-hover);
}
.step-arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

.period-big-code {
  font-size: 38px;
  font-weight: 500;
  line-height: 1.1;
  color: #d3dce2;
  letter-spacing: -0.02em;
}

/* Main Area Chart Section */
.chart-section {
  position: relative;
  margin-bottom: 34px;
}

.chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 335px;
  user-select: none;
}

.chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(20, 25, 29, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12.5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 30;
  display: none;
  min-width: 155px;
}
.chart-tooltip-date {
  color: var(--text-muted);
  font-size: 11.5px;
  margin-bottom: 5px;
  font-weight: 600;
}
.chart-tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 2px;
}

.chart-toggles {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.chart-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.chart-check-label:hover {
  color: var(--text-bright);
}
.chart-check-label input[type="checkbox"] {
  accent-color: var(--cyan);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

/* 4-Column Breakdown Grid Matching Screenshot */
.breakdown-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.25fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 1100px) {
  .breakdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 680px) {
  .breakdown-grid {
    grid-template-columns: 1fr;
  }
  .kpi-value, .period-big-code {
    font-size: 30px;
  }
  .kpi-group {
    gap: 22px;
  }
}

.widget-block {
  margin-bottom: 28px;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  min-height: 28px;
}

.widget-title {
  font-size: 17.5px;
  font-weight: 500;
  color: #d6e0e6;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.widget-title-select {
  background: transparent;
  border: none;
  color: #d6e0e6;
  font-size: 17.5px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  padding-right: 4px;
}
.widget-title-select option {
  background: var(--bg-elevated);
  color: var(--text-bright);
  font-size: 14px;
}

.search-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}
.search-btn:hover, .search-btn.active {
  color: var(--cyan-bright);
}

.widget-search-box {
  display: none;
  margin-bottom: 10px;
}
.widget-search-box.open {
  display: block;
}
.widget-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--text-bright);
  outline: none;
}
.widget-search-input:focus {
  border-color: var(--cyan);
}

/* Text Metric List Rows (Referrals, Pages, Search Engines, AI Chatbots) */
.metric-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.metric-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px;
  margin: 0 -6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s;
}
.metric-row:hover {
  background: var(--bg-hover);
}
.metric-row.selected {
  background: rgba(15, 181, 213, 0.14);
}

.metric-count {
  color: var(--cyan);
  font-weight: 700;
  font-size: 14px;
  min-width: 44px;
  font-variant-numeric: tabular-nums;
}

.metric-name-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.metric-name {
  color: #c7d2d9;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.metric-name-wrap .metric-name {
  flex: 0 1 auto;
}

.metric-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 4px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.metric-row:hover .metric-open-link {
  color: var(--text-muted);
  border-color: var(--border-subtle);
}

.metric-open-link:hover {
  color: var(--cyan-bright) !important;
  background: rgba(15, 181, 213, 0.14);
  border-color: rgba(15, 181, 213, 0.35) !important;
}

.metric-meta {
  color: var(--text-dim);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* Horizontal Progress Bar Rows (Devices, Browsers, OS, Countries) */
.bar-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 5px 6px;
  margin: 0 -6px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s;
}
.bar-row:hover {
  background: var(--bg-hover);
}
.bar-row.selected {
  outline: 1px solid rgba(15, 181, 213, 0.5);
  background: rgba(15, 181, 213, 0.08);
}

.bar-icon {
  position: relative;
  width: 26px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--cyan);
}

.flag-hover-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bar-icon[data-tooltip]::after,
.flag-hover-wrap::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) translateY(3px);
  background: rgba(18, 23, 27, 0.96);
  color: var(--text-bright);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 40;
}

.flag-hover-wrap::after {
  content: attr(data-country);
}

.bar-icon[data-tooltip]:hover::after,
.flag-hover-wrap:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.bar-hover-label {
  opacity: 0;
  transition: opacity 0.14s ease;
}

.bar-row:hover .bar-hover-label,
.bar-icon:hover + .bar-track .bar-hover-label,
.flag-hover-wrap:hover + .bar-track .bar-hover-label {
  opacity: 1;
}

.flag-badge {
  width: 26px;
  height: 19px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: #253038;
  color: #dbe7ee;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  flex-shrink: 0;
}

.bar-track {
  position: relative;
  flex: 1;
  height: 27px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: linear-gradient(90deg, #1698b3 0%, #19a9c7 100%);
  border-radius: 5px;
  transition: width 0.35s ease;
}

.bar-label-overlay {
  position: relative;
  z-index: 2;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 13.5px;
  font-weight: 500;
  color: #e6eff4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.bar-item-title {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.empty-hint {
  color: var(--text-dim);
  font-size: 13px;
  padding: 8px 0;
  font-style: italic;
}

/* Secondary Dedicated Panels Row (AI Chatbots & Search Engines & OS Spotlight) */
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 22px;
  padding-top: 26px;
  border-top: 1px solid var(--border-subtle);
}
@media (max-width: 960px) {
  .spotlight-grid {
    grid-template-columns: 1fr;
  }
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

/* ==========================================================================
   Admin Panel, Auth, & Installation Wizard Components
   ========================================================================== */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.wizard-card {
  width: 100%;
  max-width: 680px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-bright);
  margin: 0 0 6px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 13.5px;
  margin: 0 0 22px;
}

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

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-bright);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--cyan);
}

.form-help {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 5px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--cyan);
  color: #071318;
}
.btn-primary:hover {
  background: var(--cyan-bright);
  color: #041014;
}
.btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text-bright);
}
.btn-secondary:hover {
  border-color: var(--cyan);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}
.btn-danger:hover {
  background: var(--red);
  color: #fff;
}
.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}
.btn-block {
  width: 100%;
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 13px;
  border: 1px solid transparent;
}
.alert-error {
  background: var(--red-bg);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fecaca;
}
.alert-success {
  background: var(--green-bg);
  border-color: rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}
.alert-info {
  background: rgba(15, 181, 213, 0.11);
  border-color: rgba(15, 181, 213, 0.32);
  color: #bae6fd;
}

/* Admin Tabs & Tables */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
  padding-bottom: 10px;
}

.admin-tab {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13.5px;
}
.admin-tab:hover {
  color: var(--text-bright);
  background: var(--bg-hover);
}
.admin-tab.active {
  background: rgba(15, 181, 213, 0.14);
  color: var(--cyan-bright);
  border: 1px solid rgba(15, 181, 213, 0.32);
}

.stat-cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
@media (max-width: 760px) {
  .stat-cards-3 {
    grid-template-columns: 1fr;
  }
}

.mini-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.mini-stat-label {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-bottom: 4px;
}
.mini-stat-val {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-bright);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th, .data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(0, 0, 0, 0.16);
}
.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.badge-success {
  background: var(--green-bg);
  color: #6ee7b7;
}
.badge-danger {
  background: var(--red-bg);
  color: #fca5a5;
}
.badge-warning {
  background: var(--amber-bg);
  color: #fcd34d;
}
.badge-cyan {
  background: rgba(15, 181, 213, 0.15);
  color: var(--cyan-bright);
}

.code-box {
  position: relative;
  background: #111518;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #a5f3fc;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.step-indicator {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.step-pill {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}
.step-pill.active {
  border-color: var(--cyan);
  color: var(--cyan-bright);
  background: rgba(15, 181, 213, 0.1);
}
.step-pill.done {
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}
