.db-wrapper {
  --db-radius: 18px;
  --db-gap: 24px;
  --db-accent: #5b8ef0;
  /* Blue from widget */
  --db-accent2: #38d9a9;
  /* Teal */
  --db-accent3: #a78bfa;
  /* Purple for additional accents */
  --db-border: rgba(255, 255, 255, 0.09);
  --db-surface: rgba(255, 255, 255, 0.035);
  --db-surface2: rgba(255, 255, 255, 0.06);
  --db-text: rgba(235, 241, 255, 0.92);
  --db-text-faint: rgba(255, 255, 255, 0.4);
  --db-muted: rgba(180, 195, 230, 0.6);
  --db-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Animations */
.db-animate-in {
  opacity: 0;
  animation: db-fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.db-delay-1 {
  animation-delay: 0.1s;
}

.db-delay-2 {
  animation-delay: 0.2s;
}

.db-delay-3 {
  animation-delay: 0.3s;
}

@keyframes db-fade-in {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.db-container {
  padding: 20px 28px 40px;
  color: var(--db-text);
  min-width: 0;
}

/* Header matching wp-header */
.db-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--db-border);
  margin-bottom: 24px;
  min-width: 0;
}

.db-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(91, 142, 240, 0.28), rgba(56, 217, 169, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 8px 28px rgba(2, 8, 20, 0.35);
}

.db-header-icon i {
  font-size: 22px;
  background: linear-gradient(135deg, var(--db-accent), var(--db-accent2));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.db-subtitle {
  color: var(--db-muted);
  font-size: 0.9rem;
  max-width: 660px;
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
}

.studio-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
  flex-shrink: 0;
}

.studio-header-actions .db-btn,
.studio-header-actions .btn-soft,
.studio-header-actions .btn-solid {
  min-height: 42px;
}

body.app-body.theme-carbon {
  --spect-top-border: rgba(255, 255, 255, 0.1);
  --spect-top-surface: rgba(255, 255, 255, 0.045);
  --spect-top-surface-strong: rgba(255, 255, 255, 0.07);
  --spect-top-text: rgba(235, 241, 255, 0.94);
  --spect-top-muted: rgba(180, 195, 230, 0.64);
  --spect-top-accent: #5b8ef0;
  --spect-top-accent-2: #38d9a9;
}

.spect-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.spect-usage-meter {
  display: none;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--spect-top-border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, var(--spect-top-surface-strong), rgba(255, 255, 255, 0.026));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 12px 24px rgba(0, 0, 0, 0.18);
  color: var(--spect-top-text);
}

.spect-usage-meter__icon,
.spect-upgrade-btn__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.spect-usage-meter__icon {
  border: 1px solid rgba(91, 142, 240, 0.24);
  background: rgba(91, 142, 240, 0.14);
  color: #8fb5ff;
}

.spect-usage-meter__body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 5px;
}

.spect-usage-meter__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  line-height: 1;
}

.spect-usage-meter__label {
  color: var(--spect-top-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.spect-usage-meter__value {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--spect-top-text);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.spect-usage-meter__value strong {
  color: #f8fbff;
  font-weight: 800;
}

.spect-usage-meter__value span {
  color: rgba(180, 195, 230, 0.5);
  font-weight: 700;
}

.spect-usage-meter__bar {
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.spect-usage-meter__bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--spect-top-accent), var(--spect-top-accent-2));
  transition: width 0.35s ease;
}

.spect-usage-meter.is-warning .spect-usage-meter__icon {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.12);
  color: #fbd38d;
}

.spect-usage-meter.is-warning .spect-usage-meter__bar-fill {
  background: linear-gradient(90deg, #fbbf24, #fb923c);
}

.spect-usage-meter.is-danger .spect-usage-meter__icon {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

.spect-usage-meter.is-danger .spect-usage-meter__bar-fill {
  background: linear-gradient(90deg, #ef4444, #fb7185);
}

.spect-upgrade-btn,
.spect-settings-btn {
  border: 1px solid var(--spect-top-border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, var(--spect-top-surface-strong), rgba(255, 255, 255, 0.026));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 12px 24px rgba(0, 0, 0, 0.18);
  color: var(--spect-top-text);
  text-decoration: none;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    color 0.18s ease;
}

.spect-upgrade-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 13px 7px 8px;
  border-color: rgba(91, 142, 240, 0.28);
  background:
    linear-gradient(180deg, rgba(91, 142, 240, 0.18), rgba(56, 217, 169, 0.07));
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.spect-upgrade-btn__icon {
  background: linear-gradient(135deg, var(--spect-top-accent), var(--spect-top-accent-2));
  color: #fff;
  box-shadow: 0 10px 20px rgba(56, 217, 169, 0.14);
}

.spect-upgrade-btn__icon i {
  font-size: 12px;
}

.spect-settings-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--spect-top-muted);
  font-size: 16px;
}

.spect-settings-btn i {
  transition: transform 0.24s ease;
}

.spect-upgrade-btn:hover,
.spect-settings-btn:hover,
.spect-upgrade-btn:focus-visible,
.spect-settings-btn:focus-visible {
  border-color: rgba(91, 142, 240, 0.42);
  background:
    linear-gradient(180deg, rgba(91, 142, 240, 0.2), rgba(56, 217, 169, 0.1));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 14px 28px rgba(4, 10, 22, 0.24);
  color: #fff;
  transform: translateY(-1px);
}

.spect-upgrade-btn:focus-visible,
.spect-settings-btn:focus-visible {
  outline: 2px solid rgba(91, 142, 240, 0.45);
  outline-offset: 2px;
}

.spect-settings-btn:hover i,
.spect-settings-btn:focus-visible i {
  transform: rotate(45deg);
}

@media (min-width: 640px) {
  .spect-usage-meter {
    display: flex;
  }
}

@media (max-width: 767px) {
  .spect-top-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 639px) {
  .spect-top-actions {
    gap: 8px;
  }

  .spect-upgrade-btn {
    min-height: 40px;
  }

  .spect-settings-btn {
    width: 40px;
    height: 40px;
  }
}

/* Base Card Style */
.db-card {
  border-radius: var(--db-radius);
  border: 1px solid var(--db-border);
  background: var(--db-surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.db-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--db-border);
  background: rgba(4, 10, 22, 0.3);
  min-width: 0;
}

.db-card-header > * {
  min-width: 0;
}

.db-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--db-text);
  margin-bottom: 4px;
}

.db-card-title i {
  color: var(--db-accent);
}

.db-card-desc {
  color: var(--db-muted);
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* Badges / Pills */
.db-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--db-border);
  background: var(--db-surface);
  color: var(--db-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.db-badge.accent {
  background: rgba(56, 217, 169, 0.12);
  border-color: rgba(56, 217, 169, 0.3);
  color: #6eecd5;
}

.db-badge i {
  font-size: 1rem;
}

/* Grid Layouts */
.db-grid {
  display: grid;
  gap: var(--db-gap);
  margin-bottom: var(--db-gap);
}

.db-grid-stats {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.db-card-stat {
  padding: 22px;
  background: linear-gradient(180deg, var(--db-surface), rgba(255, 255, 255, 0.015));
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.db-stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: #fff;
  line-height: 1;
}

.db-stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--db-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.db-stat-label i {
  font-size: 14px;
  color: var(--db-accent);
}

.db-grid-main {
  grid-template-columns: 1.2fr 0.8fr;
}

@media (max-width: 1080px) {
  .db-grid-main {
    grid-template-columns: 1fr;
  }
}

.db-grid-full {
  grid-template-columns: 1fr;
}

/* Onboarding Setup List */
.db-setup-list {
  display: flex;
  flex-direction: column;
}

.db-setup-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  text-decoration: none;
  border-bottom: 1px solid var(--db-border);
  transition: background 0.2s ease;
}

.db-setup-item:last-child {
  border-bottom: none;
}

.db-setup-item:hover {
  background: var(--db-surface2);
}

.db-setup-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  background: rgba(91, 142, 240, 0.12);
  border: 1px solid rgba(91, 142, 240, 0.25);
  color: #a0b8f8;
  transition: all 0.3s ease;
}

.db-setup-item.done .db-setup-icon {
  background: rgba(56, 217, 169, 0.12);
  border-color: rgba(56, 217, 169, 0.3);
  color: #6eecd5;
}

.db-setup-body {
  flex: 1;
  min-width: 0;
}

.db-setup-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--db-text);
  margin-bottom: 2px;
}

.db-setup-desc {
  font-size: 0.8rem;
  color: var(--db-muted);
  overflow-wrap: anywhere;
}

.db-setup-action {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--db-accent);
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(91, 142, 240, 0.08);
  transition: all 0.2s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.db-setup-item:hover .db-setup-action {
  background: rgba(91, 142, 240, 0.15);
}

.db-setup-item.done .db-setup-action {
  background: transparent;
  color: var(--db-muted);
}

/* Quick Actions Grid */
.db-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px;
  min-width: 0;
}

.db-qcard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--db-surface);
  border: 1px solid var(--db-border);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--db-text);
  transition: all 0.2s ease;
  min-width: 0;
}

.db-qcard:hover {
  background: var(--db-surface2);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.db-qcard-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.db-qcard-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--db-muted);
  transition: all 0.2s ease;
}

.db-qcard:hover .db-qcard-icon {
  background: rgba(255, 255, 255, 0.1);
  color: var(--db-text);
}

.db-qcard i.bi-arrow-right {
  color: var(--db-muted);
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.db-qcard:hover i.bi-arrow-right {
  transform: translateX(4px);
  color: var(--db-text);
}

/* Charts Controls */
.db-chart-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.db-select {
  padding: 6px 30px 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--db-border);
  background: rgba(4, 10, 22, 0.5) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,255,255,0.4)' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--db-text);
  font-size: 0.8rem;
  outline: none;
  appearance: none;
  transition: border-color 0.15s;
}

.db-select:focus {
  border-color: rgba(91, 142, 240, 0.5);
}

.db-select option {
  background: #0a0a0a;
  color: #fff;
}

/* ══════════════════════════════════════════
   Form fields — blends into dark card surfaces
   ══════════════════════════════════════════ */

/* Dark reset for every native field inside .db-wrapper */
.db-wrapper input,
.db-wrapper input[type="text"],
.db-wrapper input[type="email"],
.db-wrapper input[type="number"],
.db-wrapper input[type="search"],
.db-wrapper input[type="url"],
.db-wrapper input[type="password"],
.db-wrapper textarea,
.db-wrapper select {
  background-color: rgba(255, 255, 255, 0.04) !important;
  color: var(--db-text) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  outline: none;
  -webkit-text-fill-color: var(--db-text);
  caret-color: var(--db-text);
}

/* Focus — a hairline lift, never blue */
.db-wrapper input:focus,
.db-wrapper textarea:focus,
.db-wrapper select:focus {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow: none !important;
}

/* Chrome/Safari autofill */
.db-wrapper input:-webkit-autofill,
.db-wrapper textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #070d1a inset !important;
  -webkit-text-fill-color: var(--db-text) !important;
}

/* Placeholder */
.db-wrapper input::placeholder,
.db-wrapper textarea::placeholder {
  color: rgba(180, 195, 230, 0.35) !important;
  opacity: 1;
}

/* ─── Label ─── */
.db-label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(180, 195, 230, 0.5);
}

/* ─── Input wrapper (icon + field combo) ─── */
.db-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: border-color 0.2s;
  overflow: hidden;
}

.db-input-wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.18);
}

/* ─── Base input/textarea style ─── */
.db-input {
  width: 100%;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--db-text) !important;
  font-size: 0.88rem;
  line-height: 1.5;
  padding: 10px 14px;
  outline: none !important;
  font-family: inherit;
  -webkit-text-fill-color: var(--db-text);
  caret-color: var(--db-text);
}

.db-input::placeholder {
  color: rgba(180, 195, 230, 0.35) !important;
  opacity: 1;
}

textarea.db-input {
  resize: vertical;
  min-height: 80px;
}

/* Select inside an input-wrapper — strip its own border/bg */
.db-input-wrapper .db-select {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  width: 100%;
  padding-left: 14px;
  border-radius: 0;
}

/* Read-only fields */
.db-wrapper input[readonly] {
  cursor: default;
  opacity: 0.7;
  user-select: text;
}

/* Small number inputs inside table-style rows */
.db-wrapper td input[type="number"] {
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

/* Checkbox — custom dark */
.db-wrapper input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 4px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
  vertical-align: middle;
}

.db-wrapper input[type="checkbox"]:checked {
  background: var(--db-accent) !important;
  border-color: var(--db-accent) !important;
}

.db-wrapper input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.db-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid var(--db-border);
  background: var(--db-surface2);
  color: var(--db-text);
  white-space: nowrap;
}

.db-btn:hover {
  background: rgba(91, 142, 240, 0.14);
  border-color: rgba(91, 142, 240, 0.4);
}

.db-btn-primary {
  background: linear-gradient(135deg, #5b8ef0, #7c5ef5);
  border-color: transparent;
  color: #fff;
}

.db-btn-primary:hover {
  background: linear-gradient(135deg, #6f9ef8, #9070f8);
  border-color: transparent;
}

.studio-header-actions .db-btn {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.028));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 12px 24px rgba(0, 0, 0, 0.16);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.studio-header-actions .db-btn i {
  font-size: 0.9rem;
  color: rgba(235, 241, 255, 0.88);
}

.studio-header-actions .db-btn:hover {
  background:
    linear-gradient(180deg, rgba(91, 142, 240, 0.18), rgba(91, 142, 240, 0.12));
  border-color: rgba(91, 142, 240, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 14px 28px rgba(4, 10, 22, 0.22);
  transform: translateY(-1px);
}

.studio-header-actions .db-btn.db-btn-primary {
  background: linear-gradient(135deg, #6d86ff, #7b5cff);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 16px 30px rgba(72, 96, 255, 0.28);
  color: #fff;
}

.studio-header-actions .db-btn.db-btn-primary i {
  color: #fff;
}

.studio-header-actions .db-btn.db-btn-primary:hover {
  background: linear-gradient(135deg, #7c92ff, #8d6bff);
  border-color: rgba(255, 255, 255, 0.18);
}

.studio-header-actions .db-btn:disabled,
.studio-header-actions .db-btn[disabled],
.studio-header-actions .db-btn[aria-disabled="true"],
.studio-header-actions .db-btn.is-disabled {
  opacity: 1;
  cursor: not-allowed;
  pointer-events: none;
  color: rgba(235, 241, 255, 0.48);
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.035) 0 6px, rgba(255, 255, 255, 0.012) 6px 12px);
  box-shadow: none;
  transform: none;
}

.studio-header-actions .db-btn:disabled i,
.studio-header-actions .db-btn[disabled] i,
.studio-header-actions .db-btn[aria-disabled="true"] i,
.studio-header-actions .db-btn.is-disabled i {
  color: rgba(235, 241, 255, 0.42);
}

.db-btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .1);
  color: var(--db-muted);
}

.db-btn-ghost:hover {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .2);
  color: var(--db-text);
}

.db-btn-danger-ghost {
  background: transparent;
  border-color: rgba(244, 63, 94, .25);
  color: #fda4af;
}

.db-btn-danger-ghost:hover {
  background: rgba(244, 63, 94, .12);
  border-color: rgba(244, 63, 94, .45);
}

.db-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: var(--db-muted);
  white-space: nowrap;
}

.db-select {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--db-text);
  font-size: 0.88rem;
  padding: 0 4px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.db-select option {
  background: #111827;
  color: var(--db-text);
}

.db-table-wrap {
  overflow-x: auto;
}

.db-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.db-table thead tr {
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.db-table th {
  padding: 9px 12px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--db-muted);
  text-align: left;
}

.db-table td {
  padding: 10px 12px;
  color: var(--db-text);
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  vertical-align: middle;
}

.db-table tbody tr:last-child td {
  border-bottom: none;
}

.db-table tbody tr:hover td {
  background: rgba(255, 255, 255, .025);
}


/* Charts Wrapper */
.db-chart-wrapper {
  position: relative;
  width: 100%;
  padding: 20px 20px 10px;
  height: 280px;
  min-width: 0;
}

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

.db-summary {
  padding: 14px 20px;
  border-top: 1px solid var(--db-border);
  font-size: 0.8rem;
  color: var(--db-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(0, 0, 0, 0.1);
}

/* Tooltip */
.db-tip {
  position: absolute;
  display: none;
  background: rgba(4, 10, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--db-text);
  pointer-events: none;
  z-index: 10;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  line-height: 1.4;
  max-width: min(240px, calc(100vw - 32px));
}

.db-tip-label {
  font-size: 0.75rem;
  color: var(--db-muted);
  margin-bottom: 3px;
}

.db-tip-value {
  font-weight: 700;
  font-size: 0.95rem;
}

/* Locked Card overlay */
.db-locked-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.db-locked-box {
  background: rgba(10, 10, 12, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: db-fade-in 0.4s ease forwards;
}

.db-locked-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 20px;
  color: var(--db-text);
}

.db-locked-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--db-text);
  margin-bottom: 8px;
}

.db-locked-desc {
  font-size: 0.85rem;
  color: var(--db-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.dashboard-quality-card {
  position: relative;
}

/* Utils */
.flex-1 {
  flex: 1;
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-2 {
  gap: 8px;
}

.mb-4 {
  margin-bottom: 16px;
}

.blur-xl {
  filter: blur(24px);
}

.opacity-20 {
  opacity: 0.2;
}

.pointer-events-none {
  pointer-events: none;
}

.select-none {
  user-select: none;
}

.transition-all {
  transition-property: all;
}

.duration-700 {
  transition-duration: 700ms;
}

/* ════════════════════════════════════════════════════════════════════
   NUCLEAR DARK OVERRIDE — beats Bootstrap + browser autofill
   Targets EVERYTHING inside .db-wrapper that could be white
════════════════════════════════════════════════════════════════════ */

/* Force dark color-scheme so browser chrome (scrollbars, etc.) is dark */
.db-wrapper {
  color-scheme: dark;
}

/* ─── All native & Bootstrap form inputs ─── */
.db-wrapper input,
.db-wrapper input[type="text"],
.db-wrapper input[type="email"],
.db-wrapper input[type="password"],
.db-wrapper input[type="number"],
.db-wrapper input[type="search"],
.db-wrapper input[type="url"],
.db-wrapper input[type="tel"],
.db-wrapper input[type="date"],
.db-wrapper input[type="datetime-local"],
.db-wrapper input[type="time"],
.db-wrapper input[type="file"],
.db-wrapper textarea,
.db-wrapper select,
.db-wrapper .form-control,
.db-wrapper .form-select,
.db-wrapper .form-check-input {
  background: #111827 !important;
  background-color: #111827 !important;
  color: rgba(235, 241, 255, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  -webkit-text-fill-color: rgba(235, 241, 255, 0.92) !important;
  caret-color: rgba(235, 241, 255, 0.92) !important;
}

/* ─── Placeholder colour ─── */
.db-wrapper input::placeholder,
.db-wrapper textarea::placeholder,
.db-wrapper .form-control::placeholder {
  color: rgba(180, 195, 230, 0.35) !important;
  opacity: 1 !important;
}

/* ─── Focus ring ─── */
.db-wrapper input:focus,
.db-wrapper textarea:focus,
.db-wrapper select:focus,
.db-wrapper .form-control:focus,
.db-wrapper .form-select:focus {
  background: #111827 !important;
  background-color: #111827 !important;
  border-color: rgba(91, 142, 240, 0.5) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(91, 142, 240, 0.12) !important;
  color: rgba(235, 241, 255, 0.92) !important;
  -webkit-text-fill-color: rgba(235, 241, 255, 0.92) !important;
}

/* ─── Disabled / readonly ─── */
.db-wrapper input:disabled,
.db-wrapper input[readonly],
.db-wrapper textarea:disabled,
.db-wrapper textarea[readonly],
.db-wrapper select:disabled,
.db-wrapper .form-control:disabled,
.db-wrapper .form-control[readonly] {
  background: rgba(255, 255, 255, 0.03) !important;
  background-color: rgba(255, 255, 255, 0.03) !important;
  color: rgba(180, 195, 230, 0.55) !important;
  -webkit-text-fill-color: rgba(180, 195, 230, 0.55) !important;
  cursor: default;
}

/* ─── Autofill — Chrome/Edge/Safari nuke ─── */
.db-wrapper input:-webkit-autofill,
.db-wrapper input:-webkit-autofill:hover,
.db-wrapper input:-webkit-autofill:focus,
.db-wrapper input:-webkit-autofill:active,
.db-wrapper textarea:-webkit-autofill,
.db-wrapper select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 9999px #111827 inset !important;
  -webkit-text-fill-color: rgba(235, 241, 255, 0.92) !important;
  caret-color: rgba(235, 241, 255, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
}

/* ─── Select dropdown arrow — override Bootstrap white bg ─── */
.db-wrapper select option,
.db-wrapper .form-select option {
  background: #111827 !important;
  color: rgba(235, 241, 255, 0.92) !important;
}

/* ─── Bootstrap input-group addons ─── */
.db-wrapper .input-group-text {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  color: rgba(180, 195, 230, 0.7) !important;
}

/* ─── Bootstrap .card inside .db-wrapper ─── */
.db-wrapper .card {
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 18px !important;
  color: rgba(235, 241, 255, 0.92) !important;
}

.db-wrapper .card-header,
.db-wrapper .card-body,
.db-wrapper .card-footer {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  color: rgba(235, 241, 255, 0.92) !important;
}

/* ─── Bootstrap table inside .db-wrapper ─── */
.db-wrapper .table,
.db-wrapper table {
  color: rgba(235, 241, 255, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
}

.db-wrapper .table> :not(caption)>*>* {
  background-color: transparent !important;
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
  color: rgba(235, 241, 255, 0.92) !important;
}

.db-wrapper .table-striped>tbody>tr:nth-of-type(odd)>* {
  background-color: rgba(255, 255, 255, 0.02) !important;
}

/* ─── Bootstrap modal inside .db-wrapper ─── */
.db-wrapper .modal-content {
  background: #0d1117 !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  color: rgba(235, 241, 255, 0.92) !important;
}

.db-wrapper .modal-header,
.db-wrapper .modal-footer {
  border-color: rgba(255, 255, 255, 0.09) !important;
}

/* ─── Bootstrap badge / alert fallback ─── */
.db-wrapper .badge {
  font-weight: 500 !important;
}

/* ─── Range input ─── */
.db-wrapper input[type="range"] {
  background: transparent !important;
  border: none !important;
  accent-color: var(--db-accent);
}

/* ─── Checkbox / radio ─── */
.db-wrapper input[type="checkbox"],
.db-wrapper input[type="radio"] {
  accent-color: var(--db-accent);
  border-radius: 4px !important;
}

/* ─── Code / pre tags ─── */
.db-wrapper code,
.db-wrapper pre {
  background: rgba(0, 0, 0, 0.3) !important;
  color: rgba(235, 241, 255, 0.92) !important;
  border-radius: 6px;
}

/* ════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVENESS OVERRIDES
════════════════════════════════════════════════════════════════════ */
@media (max-width: 639px) {
  .db-container {
    padding: 16px 12px 32px;
  }

  .db-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .db-header>div:last-child {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .db-header-icon {
    width: 44px;
    height: 44px;
  }

  .db-title {
    font-size: 1.1rem;
  }

  .db-subtitle {
    font-size: 0.84rem;
  }

  .studio-header-actions {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .db-grid-stats {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  }

  .db-quick-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .db-chart-controls {
    flex-wrap: wrap;
    width: 100%;
  }

  .db-chart-controls .db-select,
  .db-chart-controls .db-btn {
    flex: 1 1 100%;
    width: 100%;
  }

  .db-card-header {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 14px 16px;
  }

  .db-card-stat {
    padding: 18px;
  }

  .db-stat-value {
    font-size: 1.9rem;
  }

  .db-setup-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: start;
    column-gap: 12px;
    row-gap: 10px;
    padding: 14px 16px;
  }

  .db-setup-action {
    grid-column: 2;
    justify-self: start;
  }

  .db-qcard {
    align-items: flex-start;
    padding: 13px 14px;
  }

  .db-qcard-left {
    align-items: flex-start;
  }

  .db-qcard i.bi-arrow-right {
    margin-top: 4px;
  }

  .db-chart-wrapper {
    height: 240px;
    padding: 16px 12px 8px;
  }

  .db-summary {
    padding: 12px 14px;
  }

  .db-locked-box {
    margin: 16px;
    padding: 22px 18px;
  }

  .db-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .db-grid-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  body.active-bots .db-wrapper,
  body.active-security .db-wrapper {
    overflow-x: clip;
  }

  body.active-bots .db-wrapper .db-container,
  body.active-bots .db-wrapper .db-grid,
  body.active-bots .db-wrapper .db-grid > *,
  body.active-bots .db-wrapper .db-card,
  body.active-bots .db-wrapper .db-card > *,
  body.active-bots .db-wrapper .db-card-header,
  body.active-bots .db-wrapper .db-card-header > *,
  body.active-security .db-wrapper .db-container,
  body.active-security .db-wrapper .db-grid,
  body.active-security .db-wrapper .db-grid > *,
  body.active-security .db-wrapper .db-card,
  body.active-security .db-wrapper .db-card > *,
  body.active-security .db-wrapper .db-card-header,
  body.active-security .db-wrapper .db-card-header > * {
    min-width: 0;
  }

  body.active-bots .db-wrapper .db-card,
  body.active-security .db-wrapper .db-card {
    overflow: hidden;
  }

  body.active-bots .db-wrapper .db-header,
  body.active-bots .db-wrapper .db-card-header,
  body.active-security .db-wrapper .db-header,
  body.active-security .db-wrapper .db-card-header {
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }

  body.active-bots .db-wrapper .db-header > :last-child,
  body.active-bots .db-wrapper .db-card-header > :last-child,
  body.active-security .db-wrapper .db-header > :last-child,
  body.active-security .db-wrapper .db-card-header > :last-child {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  body.active-bots .db-wrapper .db-btn,
  body.active-security .db-wrapper .db-btn {
    white-space: normal;
    text-align: center;
  }

  body.active-bots .db-wrapper [style*="display:flex"][style*="gap"],
  body.active-bots .db-wrapper [style*="display: flex"][style*="gap"],
  body.active-security .db-wrapper [style*="display:flex"][style*="gap"],
  body.active-security .db-wrapper [style*="display: flex"][style*="gap"] {
    flex-wrap: wrap !important;
  }

  body.active-bots .db-wrapper [style*="display:flex"][style*="justify-content:space-between"],
  body.active-bots .db-wrapper [style*="display:flex"][style*="justify-content: space-between"],
  body.active-bots .db-wrapper [style*="display: flex"][style*="justify-content:space-between"],
  body.active-bots .db-wrapper [style*="display: flex"][style*="justify-content: space-between"],
  body.active-security .db-wrapper [style*="display:flex"][style*="justify-content:space-between"],
  body.active-security .db-wrapper [style*="display:flex"][style*="justify-content: space-between"],
  body.active-security .db-wrapper [style*="display: flex"][style*="justify-content:space-between"],
  body.active-security .db-wrapper [style*="display: flex"][style*="justify-content: space-between"] {
    flex-direction: column;
    align-items: stretch !important;
  }

  body.active-bots .db-wrapper [style*="display:flex"][style*="justify-content:space-between"] > *,
  body.active-bots .db-wrapper [style*="display:flex"][style*="justify-content: space-between"] > *,
  body.active-bots .db-wrapper [style*="display: flex"][style*="justify-content:space-between"] > *,
  body.active-bots .db-wrapper [style*="display: flex"][style*="justify-content: space-between"] > *,
  body.active-security .db-wrapper [style*="display:flex"][style*="justify-content:space-between"] > *,
  body.active-security .db-wrapper [style*="display:flex"][style*="justify-content: space-between"] > *,
  body.active-security .db-wrapper [style*="display: flex"][style*="justify-content:space-between"] > *,
  body.active-security .db-wrapper [style*="display: flex"][style*="justify-content: space-between"] > * {
    width: 100%;
    min-width: 0;
  }

  body.active-bots .db-wrapper [style*="grid-template-columns:1fr 1fr"],
  body.active-bots .db-wrapper [style*="grid-template-columns: 1fr 1fr"],
  body.active-bots .db-wrapper [style*="grid-template-columns:1fr 260px"],
  body.active-bots .db-wrapper [style*="grid-template-columns: 1fr 260px"],
  body.active-bots .db-wrapper [style*="grid-template-columns:repeat(2,1fr)"],
  body.active-bots .db-wrapper [style*="grid-template-columns: repeat(2,1fr)"],
  body.active-bots .db-wrapper [style*="grid-template-columns:repeat(auto-fit"],
  body.active-bots .db-wrapper [style*="grid-template-columns: repeat(auto-fit"],
  body.active-bots .db-wrapper [style*="grid-template-columns:repeat(auto-fill"],
  body.active-bots .db-wrapper [style*="grid-template-columns: repeat(auto-fill"],
  body.active-security .db-wrapper [style*="grid-template-columns:1fr 1fr"],
  body.active-security .db-wrapper [style*="grid-template-columns: 1fr 1fr"],
  body.active-security .db-wrapper [style*="grid-template-columns:1fr 260px"],
  body.active-security .db-wrapper [style*="grid-template-columns: 1fr 260px"],
  body.active-security .db-wrapper [style*="grid-template-columns:repeat(2,1fr)"],
  body.active-security .db-wrapper [style*="grid-template-columns: repeat(2,1fr)"],
  body.active-security .db-wrapper [style*="grid-template-columns:repeat(auto-fit"],
  body.active-security .db-wrapper [style*="grid-template-columns: repeat(auto-fit"],
  body.active-security .db-wrapper [style*="grid-template-columns:repeat(auto-fill"],
  body.active-security .db-wrapper [style*="grid-template-columns: repeat(auto-fill"] {
    grid-template-columns: 1fr !important;
  }

  body.active-bots .db-wrapper .db-table-wrap,
  body.active-security .db-wrapper .db-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.active-bots .db-wrapper .db-table,
  body.active-bots .db-wrapper table[style],
  body.active-security .db-wrapper .db-table,
  body.active-security .db-wrapper table[style] {
    min-width: 620px;
  }

  body.active-bots .db-wrapper code,
  body.active-bots .db-wrapper pre,
  body.active-security .db-wrapper code,
  body.active-security .db-wrapper pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body.active-bots .db-wrapper .modal-dialog,
  body.active-security .db-wrapper .modal-dialog {
    margin-left: 12px;
    margin-right: 12px;
  }
}

@media (max-width: 767.98px) {
  body.active-bots .db-wrapper .db-container,
  body.active-security .db-wrapper .db-container {
    padding-left: 10px;
    padding-right: 10px;
  }

  body.active-bots .db-wrapper .db-card,
  body.active-security .db-wrapper .db-card {
    border-radius: 16px;
  }

  body.active-bots .db-wrapper .db-card-header,
  body.active-security .db-wrapper .db-card-header {
    padding: 14px 16px;
  }

  body.active-bots .db-wrapper .db-card-header > :last-child,
  body.active-bots .db-wrapper .db-header > :last-child,
  body.active-security .db-wrapper .db-card-header > :last-child,
  body.active-security .db-wrapper .db-header > :last-child {
    gap: 8px;
  }

  body.active-bots .db-wrapper [style*="margin-left:auto"],
  body.active-bots .db-wrapper [style*="margin-left: auto"],
  body.active-security .db-wrapper [style*="margin-left:auto"],
  body.active-security .db-wrapper [style*="margin-left: auto"] {
    margin-left: 0 !important;
  }

  body.active-bots .db-wrapper .db-card-header .db-btn,
  body.active-bots .db-wrapper .db-header .db-btn,
  body.active-bots .db-wrapper [style*="display:flex"][style*="gap"] > .db-btn,
  body.active-bots .db-wrapper [style*="display: flex"][style*="gap"] > .db-btn,
  body.active-bots .db-wrapper [style*="display:flex"][style*="gap"] > .btn,
  body.active-bots .db-wrapper [style*="display: flex"][style*="gap"] > .btn,
  body.active-security .db-wrapper .db-card-header .db-btn,
  body.active-security .db-wrapper .db-header .db-btn,
  body.active-security .db-wrapper [style*="display:flex"][style*="gap"] > .db-btn,
  body.active-security .db-wrapper [style*="display: flex"][style*="gap"] > .db-btn,
  body.active-security .db-wrapper [style*="display:flex"][style*="gap"] > .btn,
  body.active-security .db-wrapper [style*="display: flex"][style*="gap"] > .btn {
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
  }

  body.active-bots .db-wrapper .db-input-wrapper,
  body.active-bots .db-wrapper .db-input,
  body.active-bots .db-wrapper .db-select,
  body.active-bots .db-wrapper .form-control,
  body.active-bots .db-wrapper .form-select,
  body.active-bots .db-wrapper [style*="min-width:"],
  body.active-bots .db-wrapper [style*="max-width:"],
  body.active-bots .db-wrapper [style*="width:100px"],
  body.active-bots .db-wrapper [style*="width: 100px"],
  body.active-bots .db-wrapper [style*="width:110px"],
  body.active-bots .db-wrapper [style*="width: 110px"],
  body.active-bots .db-wrapper [style*="width:120px"],
  body.active-bots .db-wrapper [style*="width: 120px"],
  body.active-bots .db-wrapper [style*="width:130px"],
  body.active-bots .db-wrapper [style*="width: 130px"],
  body.active-bots .db-wrapper [style*="width:140px"],
  body.active-bots .db-wrapper [style*="width: 140px"],
  body.active-security .db-wrapper .db-input-wrapper,
  body.active-security .db-wrapper .db-input,
  body.active-security .db-wrapper .db-select,
  body.active-security .db-wrapper .form-control,
  body.active-security .db-wrapper .form-select,
  body.active-security .db-wrapper [style*="min-width:"],
  body.active-security .db-wrapper [style*="max-width:"],
  body.active-security .db-wrapper [style*="width:100px"],
  body.active-security .db-wrapper [style*="width: 100px"],
  body.active-security .db-wrapper [style*="width:110px"],
  body.active-security .db-wrapper [style*="width: 110px"],
  body.active-security .db-wrapper [style*="width:120px"],
  body.active-security .db-wrapper [style*="width: 120px"],
  body.active-security .db-wrapper [style*="width:130px"],
  body.active-security .db-wrapper [style*="width: 130px"],
  body.active-security .db-wrapper [style*="width:140px"],
  body.active-security .db-wrapper [style*="width: 140px"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  body.active-bots .db-wrapper .db-table,
  body.active-bots .db-wrapper table[style],
  body.active-security .db-wrapper .db-table,
  body.active-security .db-wrapper table[style] {
    min-width: 560px;
  }

  body.active-bots .db-wrapper .modal-dialog,
  body.active-security .db-wrapper .modal-dialog {
    margin-left: 8px;
    margin-right: 8px;
  }
}

/* =========================
   Studio responsive layer
   ========================= */
@media (max-width: 991.98px) {
  body.active-studio .db-wrapper {
    overflow-x: clip;
  }

  body.active-studio .db-wrapper .db-container,
  body.active-studio .db-wrapper .db-grid,
  body.active-studio .db-wrapper .db-grid > *,
  body.active-studio .db-wrapper .db-card,
  body.active-studio .db-wrapper .db-card > *,
  body.active-studio .db-wrapper .db-card-header,
  body.active-studio .db-wrapper .db-card-header > *,
  body.active-studio .db-wrapper .db-header,
  body.active-studio .db-wrapper .db-header > * {
    min-width: 0;
  }

  body.active-studio .db-wrapper .db-card {
    overflow: hidden;
  }

  body.active-studio .db-wrapper .db-header,
  body.active-studio .db-wrapper .db-card-header,
  body.active-studio .db-wrapper .studio-header-actions {
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }

  body.active-studio .db-wrapper .db-header > :last-child,
  body.active-studio .db-wrapper .db-card-header > :last-child {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  body.active-studio .db-wrapper .db-btn {
    white-space: normal;
    text-align: center;
  }

  body.active-studio .db-wrapper [style*="display:flex"][style*="gap"],
  body.active-studio .db-wrapper [style*="display: flex"][style*="gap"] {
    flex-wrap: wrap !important;
  }

  body.active-studio .db-wrapper [style*="display:flex"][style*="justify-content:space-between"],
  body.active-studio .db-wrapper [style*="display:flex"][style*="justify-content: space-between"],
  body.active-studio .db-wrapper [style*="display: flex"][style*="justify-content:space-between"],
  body.active-studio .db-wrapper [style*="display: flex"][style*="justify-content: space-between"] {
    flex-direction: column;
    align-items: stretch !important;
  }

  body.active-studio .db-wrapper [style*="display:flex"][style*="justify-content:space-between"] > *,
  body.active-studio .db-wrapper [style*="display:flex"][style*="justify-content: space-between"] > *,
  body.active-studio .db-wrapper [style*="display: flex"][style*="justify-content:space-between"] > *,
  body.active-studio .db-wrapper [style*="display: flex"][style*="justify-content: space-between"] > * {
    width: 100%;
    min-width: 0;
  }

  body.active-studio .db-wrapper [style*="grid-template-columns:1fr 1fr"],
  body.active-studio .db-wrapper [style*="grid-template-columns: 1fr 1fr"],
  body.active-studio .db-wrapper [style*="grid-template-columns:1.2fr 0.8fr"],
  body.active-studio .db-wrapper [style*="grid-template-columns: 1.2fr 0.8fr"],
  body.active-studio .db-wrapper [style*="grid-template-columns:1.3fr 0.7fr"],
  body.active-studio .db-wrapper [style*="grid-template-columns: 1.3fr 0.7fr"],
  body.active-studio .db-wrapper [style*="grid-template-columns:280px 1fr"],
  body.active-studio .db-wrapper [style*="grid-template-columns: 280px 1fr"],
  body.active-studio .db-wrapper [style*="grid-template-columns:340px 1fr"],
  body.active-studio .db-wrapper [style*="grid-template-columns: 340px 1fr"],
  body.active-studio .db-wrapper [style*="grid-template-columns:repeat(4, 1fr)"],
  body.active-studio .db-wrapper [style*="grid-template-columns: repeat(4, 1fr)"],
  body.active-studio .db-wrapper [style*="grid-template-columns:repeat(4,minmax(0, 1fr))"],
  body.active-studio .db-wrapper [style*="grid-template-columns: repeat(4,minmax(0, 1fr))"],
  body.active-studio .db-wrapper [style*="grid-template-columns:repeat(auto-fit"],
  body.active-studio .db-wrapper [style*="grid-template-columns: repeat(auto-fit"],
  body.active-studio .db-wrapper [style*="grid-template-columns:repeat(auto-fill"],
  body.active-studio .db-wrapper [style*="grid-template-columns: repeat(auto-fill"] {
    grid-template-columns: 1fr !important;
  }

  body.active-studio .db-wrapper .db-table-wrap,
  body.active-studio .db-wrapper .table-responsive,
  body.active-studio .db-wrapper [style*="overflow-x: auto"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.active-studio .db-wrapper .db-table,
  body.active-studio .db-wrapper table[style],
  body.active-studio .db-wrapper table.table {
    min-width: 620px;
  }

  body.active-studio .db-wrapper code,
  body.active-studio .db-wrapper pre,
  body.active-studio .db-wrapper .db-badge {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body.active-studio .db-wrapper .modal-dialog {
    margin-left: 12px;
    margin-right: 12px;
  }
}

@media (max-width: 767.98px) {
  body.active-studio .db-wrapper .db-container {
    padding-left: 10px;
    padding-right: 10px;
  }

  body.active-studio .db-wrapper .db-card {
    border-radius: 16px;
  }

  body.active-studio .db-wrapper .db-card-header {
    padding: 14px 16px;
  }

  body.active-studio .db-wrapper .db-card-header > :last-child,
  body.active-studio .db-wrapper .db-header > :last-child {
    gap: 8px;
  }

  body.active-studio .db-wrapper [style*="margin-left:auto"],
  body.active-studio .db-wrapper [style*="margin-left: auto"] {
    margin-left: 0 !important;
  }

  body.active-studio .db-wrapper .db-card-header .db-btn,
  body.active-studio .db-wrapper .db-header .db-btn,
  body.active-studio .db-wrapper .studio-header-actions > .db-btn,
  body.active-studio .db-wrapper .studio-header-actions > a,
  body.active-studio .db-wrapper .studio-header-actions > button,
  body.active-studio .db-wrapper [style*="display:flex"][style*="gap"] > .db-btn,
  body.active-studio .db-wrapper [style*="display: flex"][style*="gap"] > .db-btn,
  body.active-studio .db-wrapper [style*="display:flex"][style*="gap"] > .btn,
  body.active-studio .db-wrapper [style*="display: flex"][style*="gap"] > .btn {
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
  }

  body.active-studio .db-wrapper .db-input-wrapper,
  body.active-studio .db-wrapper .db-input,
  body.active-studio .db-wrapper .db-select,
  body.active-studio .db-wrapper .form-control,
  body.active-studio .db-wrapper .form-select,
  body.active-studio .db-wrapper [style*="min-width:"],
  body.active-studio .db-wrapper [style*="max-width:"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  body.active-studio .db-wrapper td[style*="text-align: right"],
  body.active-studio .db-wrapper th[style*="text-align: right"] {
    text-align: left !important;
  }

  body.active-studio .db-wrapper [style*="display:flex"][style*="justify-content:flex-end"],
  body.active-studio .db-wrapper [style*="display:flex"][style*="justify-content: flex-end"],
  body.active-studio .db-wrapper [style*="display: flex"][style*="justify-content:flex-end"],
  body.active-studio .db-wrapper [style*="display: flex"][style*="justify-content: flex-end"] {
    justify-content: flex-start !important;
  }

  body.active-studio .db-wrapper [style*="white-space:nowrap"][style*="overflow:hidden"],
  body.active-studio .db-wrapper [style*="white-space: nowrap"][style*="overflow:hidden"],
  body.active-studio .db-wrapper [style*="white-space:nowrap"][style*="text-overflow:ellipsis"],
  body.active-studio .db-wrapper [style*="white-space: nowrap"][style*="text-overflow:ellipsis"] {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: none !important;
  }

  body.active-studio .db-wrapper .db-table,
  body.active-studio .db-wrapper table[style],
  body.active-studio .db-wrapper table.table {
    min-width: 560px;
  }

  body.active-studio .db-wrapper .modal-dialog {
    margin-left: 8px;
    margin-right: 8px;
  }
}
