/* ==========================================================================
   Millisa AI Platform - Enterprise Design System
   Crafted for Tier-1 AI Infrastructure (Inspired by Stripe, Linear, Vercel)
   100% Mobile Adaptive & Responsive
   ========================================================================== */

:root {
  /* Surface & Background Hierarchy */
  --bg-canvas: #09090b;       /* Deepest obsidian black */
  --bg-subtle: #0e0e11;       /* Sidebar & header backdrop */
  --bg-surface: #141418;      /* Primary card & container surface */
  --bg-surface-hover: #1a1a20;/* Interactive surface hover state */
  --bg-surface-active: #22222a;
  --bg-input: #0c0c0f;        /* Inset field background */

  /* Border Tokens */
  --border-subtle: #1f1f26;   /* Hairline dividing lines */
  --border-medium: #2b2b35;   /* Card & container boundaries */
  --border-strong: #3f3f4e;   /* Active borders */
  --border-focus: #6366f1;    /* Input focus ring */

  /* Text & Content Tokens */
  --text-primary: #f4f4f6;    /* Crisp, high-contrast headings */
  --text-secondary: #a1a1aa;  /* Balanced body & subtitle copy */
  --text-tertiary: #71717a;   /* Captions, labels, timestamps */
  --text-disabled: #52525b;

  /* Accent & Status Colors */
  --accent-primary: #4f46e5;       /* Electric indigo */
  --accent-primary-hover: #4338ca;
  --accent-primary-subtle: rgba(79, 70, 229, 0.12);
  --accent-primary-border: rgba(99, 102, 241, 0.3);

  --accent-cyan: #06b6d4;
  --accent-cyan-subtle: rgba(6, 182, 212, 0.1);
  --accent-cyan-border: rgba(6, 182, 212, 0.25);

  --status-success: #10b981;
  --status-success-subtle: rgba(16, 185, 129, 0.1);
  --status-success-border: rgba(16, 185, 129, 0.25);

  --status-warning: #f59e0b;
  --status-warning-subtle: rgba(245, 158, 11, 0.1);
  --status-warning-border: rgba(245, 158, 11, 0.25);

  --status-error: #f43f5e;
  --status-error-subtle: rgba(244, 63, 94, 0.1);
  --status-error-border: rgba(244, 63, 94, 0.25);

  /* Layout Dimensions */
  --sidebar-width: 250px;
  --header-height: 56px;
  --bottom-nav-height: 60px;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows & Depth */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.75);

  /* Transition timing */
  --transition-fast: 120ms ease;
  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code, pre, .key-code, .font-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* App Master Layout */
.app-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: var(--bg-canvas);
  position: relative;
  overflow: hidden;
}

/* ──────────────────────────────────────────────────────────────────────────
   SIDEBAR (Desktop Navigation)
   ────────────────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-subtle);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform var(--transition);
  z-index: 40;
}

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #fff;
}

.brand-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  background: var(--accent-primary-subtle);
  color: #818cf8;
  border: 1px solid var(--accent-primary-border);
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav-menu {
  padding: 0.85rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex-grow: 1;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 0.75rem 0.6rem 0.35rem;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.86rem;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  text-align: left;
}

.nav-item:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-primary-subtle);
  color: #c7d2fe;
  border-color: var(--accent-primary-border);
  font-weight: 600;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke-width: 2;
  color: inherit;
}

.sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: #34d399;
  font-weight: 500;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--status-success);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

/* ──────────────────────────────────────────────────────────────────────────
   MAIN VIEWPORT & TOP HEADER
   ────────────────────────────────────────────────────────────────────────── */
.main-viewport {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  position: relative;
  background-color: var(--bg-canvas);
}

.top-header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 30;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.header-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
}

.breadcrumb-root {
  color: var(--text-tertiary);
  font-weight: 500;
}

.breadcrumb-sep {
  color: var(--text-disabled);
  font-size: 0.8rem;
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.env-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

/* User Profile Badge */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  padding: 0.25rem 0.65rem 0.25rem 0.35rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-primary);
}

.user-avatar-mini {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3f3f46;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
}

.role-badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.role-super-admin {
  background: var(--status-error-subtle);
  color: #fb7185;
  border: 1px solid var(--status-error-border);
}

.role-developer {
  background: var(--accent-cyan-subtle);
  color: #38bdf8;
  border: 1px solid var(--accent-cyan-border);
}

/* ──────────────────────────────────────────────────────────────────────────
   BUTTON SYSTEM (Refined & Human-Crafted)
   ────────────────────────────────────────────────────────────────────────── */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  border: 1px solid transparent;
  line-height: 1.25;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background-color: #f4f4f5;
  color: #09090b;
  font-weight: 600;
  border-color: #f4f4f5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.btn-primary:hover {
  background-color: #ffffff;
  border-color: #ffffff;
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

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

.btn-ghost:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
}

.btn-danger-outline {
  background: transparent;
  border-color: var(--status-error-border);
  color: #f87171;
}

.btn-danger-outline:hover {
  background: var(--status-error-subtle);
  border-color: var(--status-error);
}

/* ──────────────────────────────────────────────────────────────────────────
   FORM CONTROLS & INPUTS
   ────────────────────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.form-control::placeholder {
  color: var(--text-disabled);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* ──────────────────────────────────────────────────────────────────────────
   TAB CONTENT CONTAINERS
   ────────────────────────────────────────────────────────────────────────── */
.tab-content {
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
  padding: 1.5rem;
}

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

#tab-chat.active {
  display: flex;
  flex-direction: column;
}

.section-header {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

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

/* ──────────────────────────────────────────────────────────────────────────
   CARDS & CONTAINERS
   ────────────────────────────────────────────────────────────────────────── */
.panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.panel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Stats Metric Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
}

.stat-title {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.stat-value {
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.stat-subtext {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

/* ──────────────────────────────────────────────────────────────────────────
   DATA TABLES (Dense, Enterprise Grade)
   ────────────────────────────────────────────────────────────────────────── */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

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

.data-table thead tr {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
  padding: 0.65rem 0.95rem;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.data-table td {
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: middle;
}

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

.data-table tbody tr:hover td {
  background-color: var(--bg-surface-hover);
}

.key-code {
  font-size: 0.8rem;
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 500;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.badge-active {
  background: var(--status-success-subtle);
  color: #34d399;
  border: 1px solid var(--status-success-border);
}

.badge-revoked {
  background: var(--status-error-subtle);
  color: #fb7185;
  border: 1px solid var(--status-error-border);
}

.badge-tier {
  background: var(--accent-primary-subtle);
  color: #a5b4fc;
  border: 1px solid var(--accent-primary-border);
}

/* ──────────────────────────────────────────────────────────────────────────
   VIEW 1: AGENT CHAT INTERFACE
   ────────────────────────────────────────────────────────────────────────── */
#tab-chat {
  padding: 0;
  height: calc(100vh - var(--header-height));
  height: calc(100dvh - var(--header-height));
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem 1.25rem;
}

.chat-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
  gap: 0.75rem;
  flex-wrap: wrap;
}

.model-badge-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-primary);
  outline: none;
}

.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.message-row {
  display: flex;
  gap: 0.75rem;
  max-width: 82%;
  animation: fadeIn 150ms ease;
}

.message-row.user-message {
  margin-left: auto;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
}

.msg-avatar.assistant {
  background: #312e81;
  color: #c7d2fe;
  border: 1px solid #4338ca;
}

.msg-avatar.user {
  background: #27272a;
  color: #f4f4f5;
  border: 1px solid #3f3f46;
}

.message-bubble {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.user-message .message-bubble {
  background: #27272a;
  border-color: #3f3f46;
  color: #fff;
}

.message-bubble pre {
  background: #08080a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.95rem;
  margin: 0.65rem 0;
  overflow-x: auto;
  font-size: 0.8rem;
}

.quick-prompts {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding-bottom: 0.65rem;
}

.prompt-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.prompt-chip:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.chat-input-wrapper {
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.chat-input-wrapper:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.chat-textarea {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.45;
  resize: none;
  outline: none;
  max-height: 140px;
  padding: 0.25rem 0;
}

.btn-send {
  width: 32px;
  height: 32px;
  background: #f4f4f5;
  color: #09090b;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.btn-send:hover {
  background: #fff;
}

/* ──────────────────────────────────────────────────────────────────────────
   VIEW 2: API KEYS & QUOTA VISUALIZER
   ────────────────────────────────────────────────────────────────────────── */
.quota-gauge-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.quota-meter-bar {
  width: 100%;
  height: 6px;
  background: #27272a;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.5rem;
}

.quota-meter-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #6366f1 0%, #06b6d4 100%);
  transition: width 0.3s ease;
}

/* Scoped selector chips in Create Key Modal */
.scope-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.scope-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.scope-checkbox-label:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.scope-checkbox-label:has(input:checked) {
  background: var(--accent-primary-subtle);
  border-color: var(--accent-primary-border);
  color: #e0e7ff;
}

.scope-checkbox-label input {
  accent-color: var(--accent-primary);
}

/* ──────────────────────────────────────────────────────────────────────────
   VIEW: SYSTEM HEALTH & UPSTREAM COMMAND CENTER
   ────────────────────────────────────────────────────────────────────────── */
.provider-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.provider-health-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color var(--transition-fast);
}

.provider-health-card:hover {
  border-color: var(--border-strong);
}

.provider-health-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.provider-icon-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.provider-logo-frame {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.ping-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 500;
  font-family: var(--font-mono);
}

.ping-operational {
  background: var(--status-success-subtle);
  color: #34d399;
  border: 1px solid var(--status-success-border);
}

.ping-degraded {
  background: var(--status-warning-subtle);
  color: #fbbf24;
  border: 1px solid var(--status-warning-border);
}

.ping-error, .ping-auth_error {
  background: var(--status-error-subtle);
  color: #fb7185;
  border: 1px solid var(--status-error-border);
}

.ping-not_configured {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-tertiary);
  border: 1px solid var(--border-subtle);
}

.latency-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
}

/* Traffic Filters */
.traffic-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.traffic-chip {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.traffic-chip:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.traffic-chip.active {
  background: var(--accent-primary-subtle);
  color: #c7d2fe;
  border-color: var(--accent-primary-border);
}

/* Status Codes */
.status-code-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-xs);
}

.status-200 { background: var(--status-success-subtle); color: #34d399; border: 1px solid var(--status-success-border); }
.status-400 { background: var(--status-warning-subtle); color: #fbbf24; border: 1px solid var(--status-warning-border); }
.status-429 { background: rgba(249, 115, 22, 0.1); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.25); }
.status-500 { background: var(--status-error-subtle); color: #f87171; border: 1px solid var(--status-error-border); }

/* ──────────────────────────────────────────────────────────────────────────
   PLAYGROUND & DOCUMENTATION
   ────────────────────────────────────────────────────────────────────────── */
.doc-section-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  margin-bottom: 1.25rem;
}

.doc-nav-chips {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.doc-chip {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.doc-chip:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.doc-chip.active {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #34d399 !important;
  font-weight: 600 !important;
  border: 1px solid #10b981 !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.25) !important;
}

.key-code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: #090a0e;
  color: #38bdf8;
  border: 1px solid #232530;
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
}

.code-container {
  background: #09090c;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 0.75rem 0 1rem;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  background: #111115;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: #cbd5e1;
}

.copy-code-btn {
  background: #1c1d25;
  border: 1px solid #2e303f;
  border-radius: var(--radius-xs);
  padding: 0.25rem 0.65rem;
  color: #f4f4f6;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.copy-code-btn:hover {
  background: #272a38;
  border-color: #43475d;
  color: #ffffff;
}

.code-content {
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #e2e8f0;
  overflow-x: auto;
}

/* ==========================================================================
   cURL Quickstart & Interactive Reference (Dark Obsidian / FastAPI Inspired)
   ========================================================================== */
.curl-server-bar {
  background: #14151c;
  border: 1px solid #282a36;
  border-radius: 8px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.curl-server-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.curl-server-label {
  color: #f4f4f6;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.curl-server-pill {
  background: #090a0e;
  border: 1px solid #2e303f;
  border-radius: 6px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.curl-server-url {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #38bdf8;
}

.curl-server-tag {
  font-size: 11.5px;
  font-weight: 500;
  color: #a1a1aa;
  border-left: 1px solid #282a36;
  padding-left: 10px;
}

.curl-server-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}

.curl-auth-badge {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.curl-ref-card {
  background: #14151c;
  border: 1px solid #282a36;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s ease;
}

.curl-ref-card:hover {
  border-color: #3f4255;
}

.curl-ref-header {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #14151c;
  border-bottom: 1px solid #232530;
}

.curl-ref-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.curl-method-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  min-width: 65px;
  text-align: center;
  display: inline-block;
}

.curl-badge-post {
  background: #10b981;
}

.curl-badge-get {
  background: #0284c7;
}

.curl-endpoint-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.curl-endpoint-desc {
  font-size: 13px;
  color: #a1a1aa;
}

.curl-ref-body {
  background: #0e0f14;
  padding: 14px 18px;
}

.curl-tab-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.curl-tab-btn {
  background: #181922;
  border: 1px solid #282a36;
  border-radius: 5px;
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.curl-tab-btn:hover {
  background: #232532;
  color: #ffffff;
}

.curl-tab-btn.active {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: #38bdf8;
}

/* Playground Box */
.playground-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

/* ──────────────────────────────────────────────────────────────────────────
   MODALS & TOAST NOTIFICATIONS
   ────────────────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-lg);
  transform: scale(0.97);
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.show .modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
}

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

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

.modal-drag-handle {
  display: none;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.15rem;
}

.auth-tab-btn {
  flex: 1;
  padding: 0.55rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-tertiary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.auth-tab-btn.active {
  color: var(--text-primary);
  border-color: #f4f4f5;
  font-weight: 600;
}

.auth-error-banner {
  background: var(--status-error-subtle);
  border: 1px solid var(--status-error-border);
  color: #fda4af;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  margin-bottom: 1rem;
  display: none;
}

/* Toast Alerts */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 200;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: toastIn 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* ──────────────────────────────────────────────────────────────────────────
   100% MOBILE RESPONSIVENESS (Phones & Tablets)
   ────────────────────────────────────────────────────────────────────────── */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    width: 270px;
    z-index: 150;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 140;
    display: none;
  }
  .sidebar-backdrop.show { display: block; }

  .mobile-menu-btn {
    display: flex;
  }

  .tab-content {
    padding: 1rem;
    padding-bottom: calc(var(--bottom-nav-height) + 1.25rem);
  }

  #tab-chat {
    height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
    height: calc(100dvh - var(--header-height) - var(--bottom-nav-height));
    padding: 0 0.75rem 0.75rem;
  }

  /* Fixed Mobile Bottom Nav */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: rgba(14, 14, 17, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-subtle);
    z-index: 50;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mob-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.68rem;
    gap: 0.15rem;
    flex: 1;
    height: 100%;
    cursor: pointer;
    font-weight: 500;
  }

  .mob-nav-item.active {
    color: #f4f4f5;
  }

  .mob-nav-item svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
  }

  /* Responsive Table to Cards on Mobile */
  .data-table, .data-table thead, .data-table tbody, .data-table th, .data-table td, .data-table tr {
    display: block;
  }

  .data-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .data-table tr {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    padding: 0.75rem 0.95rem;
  }

  .data-table td {
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    text-align: right;
  }

  .data-table td:last-child {
    border-bottom: none;
    padding-top: 0.65rem;
    justify-content: flex-end;
  }

  .data-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 0.75rem;
    text-align: left;
    flex-shrink: 0;
  }

  /* Bottom-Sheet Modals on Mobile Phones */
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-card {
    max-width: 100% !important;
    width: 100% !important;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    max-height: 85vh;
    max-height: 85dvh;
    overflow-y: auto;
    padding: 1.25rem 1.25rem 2rem;
    transform: translateY(100%);
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .modal-backdrop.show .modal-card {
    transform: translateY(0);
  }

  .modal-drag-handle {
    display: block;
    width: 36px;
    height: 4px;
    background: #3f3f46;
    border-radius: 2px;
    margin: 0 auto 1rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .scope-selector {
    grid-template-columns: 1fr;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   PROVIDER VAULT & TEST CONNECTION STYLES
   ────────────────────────────────────────────────────────────────────────── */
.provider-vault-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
  transition: border-color var(--transition-fast);
}

.provider-vault-box:hover {
  border-color: var(--border-strong);
}

.provider-vault-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.provider-vault-label-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.provider-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.provider-vault-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.provider-vault-sub {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 0.1rem;
}

.provider-test-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-full);
  min-height: 22px;
}

.provider-test-pill.pill-operational {
  background: var(--status-success-subtle);
  color: #34d399;
  border: 1px solid var(--status-success-border);
}

.provider-test-pill.pill-auth-error {
  background: var(--status-error-subtle);
  color: #fb7185;
  border: 1px solid var(--status-error-border);
}

.provider-test-pill.pill-error {
  background: var(--status-error-subtle);
  color: #f87171;
  border: 1px solid var(--status-error-border);
}

.provider-test-pill.pill-not-configured {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-tertiary);
  border: 1px solid var(--border-subtle);
}

.provider-test-pill.pill-testing {
  background: var(--accent-primary-subtle);
  color: #a5b4fc;
  border: 1px solid var(--accent-primary-border);
}

.provider-input-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.provider-input-field-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.provider-input-field-wrap input {
  padding-right: 2.25rem;
}

.btn-eye-toggle {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.btn-eye-toggle:hover {
  color: var(--text-primary);
}

.btn-test-provider {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.btn-test-provider:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

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

.spin-icon {
  animation: spin 0.8s linear infinite;
}

@media (max-width: 640px) {
  .provider-input-row {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-test-provider {
    justify-content: center;
  }
}

/* ==========================================================================
   SWAGGER UI OPENAPI 3.1 INTERACTIVE SPECIFICATION VIEWER
   Sleek Dark Theme (Matching Millisa Obsidian & Vercel Design System)
   ========================================================================== */
.swagger-wrapper-card {
  background: #111216 !important;
  color: #e4e4e7 !important;
  border-radius: 8px !important;
  border: 1px solid #23252f !important;
  padding: 1.5rem !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5) !important;
  overflow: hidden !important;
  margin-bottom: 2rem !important;
}

/* Hide Swagger default top dark logo bar */
.swagger-ui .topbar {
  display: none !important;
}

/* Base text and icon colors */
.swagger-ui {
  color: #d4d4d8 !important;
}

.swagger-ui svg {
  fill: #9ca3af !important;
}

/* Info header */
.swagger-ui .info {
  margin: 10px 0 25px !important;
}

.swagger-ui .info .title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.swagger-ui .info .title small {
  background: #27272a !important;
  color: #a1a1aa !important;
  border: 1px solid #3f3f46 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 2px 8px !important;
  border-radius: 12px !important;
  vertical-align: middle !important;
  top: 0 !important;
}

.swagger-ui .info .title small.version-stamp {
  background: #059669 !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 700 !important;
}

.swagger-ui .info a {
  color: #38bdf8 !important;
  text-decoration: none !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 12px !important;
}

.swagger-ui .info a:hover {
  text-decoration: underline !important;
}

.swagger-ui .info .description {
  font-size: 13.5px !important;
  color: #9ca3af !important;
  margin-top: 6px !important;
  line-height: 1.55 !important;
}

.swagger-ui .info p,
.swagger-ui .info li,
.swagger-ui .info table {
  color: #9ca3af !important;
}

/* ==========================================================================
   Scheme Container (Servers Dropdown + Authorize Button Bar)
   ========================================================================== */
.swagger-ui .scheme-container {
  background: #14151c !important;
  background-color: #14151c !important;
  border: 1px solid #282a36 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45) !important;
  padding: 16px 22px !important;
  margin: 15px 0 25px 0 !important;
}

.swagger-ui .scheme-container .schemes {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 14px !important;
}

.swagger-ui .schemes-server {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin: 0 !important;
}

.swagger-ui .servers {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
}

/* Explicit high-contrast white text for "Servers" label */
.swagger-ui .servers-title,
.swagger-ui .servers > label,
.swagger-ui .scheme-container .schemes > label,
.swagger-ui .scheme-container label,
.swagger-ui label[for="servers"],
.swagger-ui .servers label {
  color: #f4f4f6 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  margin: 0 6px 0 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Server select dropdown */
.swagger-ui .servers select {
  background: #090a0e !important;
  background-color: #090a0e !important;
  color: #ffffff !important;
  border: 1px solid #2e303f !important;
  border-radius: 6px !important;
  padding: 8px 14px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  box-shadow: none !important;
  outline: none !important;
  cursor: pointer !important;
  transition: border-color 0.15s ease, background 0.15s ease !important;
}

.swagger-ui .servers select:hover,
.swagger-ui .servers select:focus {
  border-color: #4f46e5 !important;
  background-color: #0f1016 !important;
}

.swagger-ui .servers select option {
  background: #0f1015 !important;
  background-color: #0f1015 !important;
  color: #ffffff !important;
  padding: 6px 10px !important;
}

/* Authorize Button & Wrapper */
.swagger-ui .scheme-container .auth-wrapper,
.swagger-ui .auth-wrapper {
  justify-content: flex-end !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
}

.swagger-ui .btn.authorize {
  background: rgba(16, 185, 129, 0.12) !important;
  background-color: rgba(16, 185, 129, 0.12) !important;
  color: #34d399 !important;
  border: 1.5px solid #10b981 !important;
  border-radius: 6px !important;
  padding: 7px 18px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: all 0.15s ease !important;
  box-shadow: none !important;
}

.swagger-ui .btn.authorize:hover {
  background: rgba(16, 185, 129, 0.22) !important;
  background-color: rgba(16, 185, 129, 0.22) !important;
  border-color: #34d399 !important;
  color: #6ee7b7 !important;
}

.swagger-ui .btn.authorize svg {
  fill: #34d399 !important;
}

.swagger-ui .btn.authorize span {
  color: #34d399 !important;
  font-weight: 600 !important;
}

.swagger-ui .btn.authorize:hover span {
  color: #6ee7b7 !important;
}

.swagger-ui .btn.authorize.locked {
  background: rgba(59, 130, 246, 0.12) !important;
  background-color: rgba(59, 130, 246, 0.12) !important;
  border-color: #3b82f6 !important;
  color: #60a5fa !important;
}

.swagger-ui .btn.authorize.locked svg {
  fill: #60a5fa !important;
}

.swagger-ui .btn.authorize.locked span {
  color: #60a5fa !important;
}

.swagger-ui .authorization__btn {
  fill: #10b981 !important;
}

.swagger-ui .authorization__btn svg {
  fill: #10b981 !important;
}

/* Filter Input */
.swagger-ui .filter input {
  background: #181920 !important;
  background-color: #181920 !important;
  color: #f4f4f6 !important;
  border: 1px solid #2e303d !important;
  border-radius: 6px !important;
  padding: 7px 12px !important;
  box-shadow: none !important;
}

.swagger-ui input[type="text"],
.swagger-ui input[type="password"],
.swagger-ui input[type="search"] {
  background: #090a0e !important;
  background-color: #090a0e !important;
  color: #ffffff !important;
  border: 1px solid #2e303f !important;
  border-radius: 6px !important;
}

/* Tag Headers (Category Groups) */
.swagger-ui .opblock-tag-section {
  margin-bottom: 1.5rem !important;
}

.swagger-ui .opblock-tag {
  font-family: inherit !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  border-bottom: 1px solid #23252f !important;
  padding: 10px 0 !important;
  margin-bottom: 12px !important;
}

.swagger-ui .opblock-tag small {
  color: #71717a !important;
}

.swagger-ui .opblock-tag:hover {
  background: transparent !important;
}

/* Operations Blocks */
.swagger-ui .opblock {
  border-radius: 6px !important;
  box-shadow: none !important;
  margin-bottom: 10px !important;
  background: #14151b !important;
}

/* POST operation */
.swagger-ui .opblock.opblock-post {
  background: rgba(16, 185, 129, 0.05) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
}

.swagger-ui .opblock.opblock-post .opblock-summary-method {
  background: #10b981 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  border-radius: 4px !important;
  min-width: 76px !important;
  text-align: center !important;
}

.swagger-ui .opblock.opblock-post .opblock-summary-path {
  color: #ffffff !important;
}

.swagger-ui .opblock.opblock-post .opblock-summary-description {
  color: #9ca3af !important;
}

.swagger-ui .opblock.opblock-post .opblock-body {
  background: #0e0f14 !important;
  border-top: 1px solid rgba(16, 185, 129, 0.2) !important;
}

/* GET operation */
.swagger-ui .opblock.opblock-get {
  background: rgba(56, 189, 248, 0.05) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

.swagger-ui .opblock.opblock-get .opblock-summary-method {
  background: #0284c7 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  border-radius: 4px !important;
  min-width: 76px !important;
  text-align: center !important;
}

.swagger-ui .opblock.opblock-get .opblock-summary-path {
  color: #ffffff !important;
}

.swagger-ui .opblock.opblock-get .opblock-summary-description {
  color: #9ca3af !important;
}

.swagger-ui .opblock.opblock-get .opblock-body {
  background: #0e0f14 !important;
  border-top: 1px solid rgba(56, 189, 248, 0.2) !important;
}

/* PATCH operation */
.swagger-ui .opblock.opblock-patch {
  background: rgba(20, 184, 166, 0.05) !important;
  border: 1px solid rgba(20, 184, 166, 0.35) !important;
}

.swagger-ui .opblock.opblock-patch .opblock-summary-method {
  background: #0d9488 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  border-radius: 4px !important;
  min-width: 76px !important;
  text-align: center !important;
}

.swagger-ui .opblock.opblock-patch .opblock-summary-path {
  color: #ffffff !important;
}

.swagger-ui .opblock.opblock-patch .opblock-summary-description {
  color: #9ca3af !important;
}

.swagger-ui .opblock.opblock-patch .opblock-body {
  background: #0e0f14 !important;
}

/* DELETE operation */
.swagger-ui .opblock.opblock-delete {
  background: rgba(239, 68, 68, 0.05) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
}

.swagger-ui .opblock.opblock-delete .opblock-summary-method {
  background: #dc2626 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  border-radius: 4px !important;
  min-width: 76px !important;
  text-align: center !important;
}

.swagger-ui .opblock.opblock-delete .opblock-summary-path {
  color: #ffffff !important;
}

.swagger-ui .opblock.opblock-delete .opblock-summary-description {
  color: #9ca3af !important;
}

.swagger-ui .opblock.opblock-delete .opblock-body {
  background: #0e0f14 !important;
}

.swagger-ui .opblock-summary-path {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
}

.swagger-ui .opblock-summary-description {
  font-size: 13px !important;
  color: #9ca3af !important;
}

/* Inside Operation Details */
.swagger-ui .opblock-description-wrapper p {
  color: #d4d4d8 !important;
  font-size: 13.5px !important;
  line-height: 1.55 !important;
}

.swagger-ui .opblock-section-header {
  background: #14151b !important;
  color: #f4f4f6 !important;
  border-bottom: 1px solid #23252f !important;
  padding: 8px 12px !important;
}

.swagger-ui .opblock-section-header h4 {
  color: #f4f4f6 !important;
  font-weight: 700 !important;
}

/* Try it out button */
.swagger-ui .btn.try-out__btn {
  border: 1px solid #363847 !important;
  border-radius: 4px !important;
  padding: 4px 14px !important;
  color: #f4f4f6 !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  background: #1e2029 !important;
}

.swagger-ui .btn.try-out__btn:hover {
  background: #272a36 !important;
  border-color: #4b4e61 !important;
}

.swagger-ui .btn.execute {
  background: #10b981 !important;
  color: #ffffff !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
}

.swagger-ui .btn.cancel {
  background: #27272a !important;
  border: 1px solid #3f3f46 !important;
  color: #f87171 !important;
  border-radius: 4px !important;
}

/* Tables (Parameters, Responses) */
.swagger-ui table thead tr th {
  color: #a1a1aa !important;
  border-bottom: 1px solid #23252f !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.swagger-ui table tbody tr td {
  color: #d4d4d8 !important;
  border-bottom: 1px solid #1a1b22 !important;
  padding: 10px 8px !important;
}

.swagger-ui .parameter__name {
  color: #f4f4f6 !important;
  font-weight: 600 !important;
}

.swagger-ui .parameter__type {
  color: #818cf8 !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 12px !important;
}

.swagger-ui .parameter__in {
  color: #71717a !important;
  font-size: 11px !important;
}

/* Request body options & controls */
.swagger-ui .body-param-options label {
  color: #d4d4d8 !important;
}

.swagger-ui select {
  background: #181920 !important;
  color: #f4f4f6 !important;
  border: 1px solid #2e303d !important;
  border-radius: 4px !important;
}

.swagger-ui textarea {
  background: #09090d !important;
  color: #e2e8f0 !important;
  border: 1px solid #2e303d !important;
  border-radius: 6px !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 12.5px !important;
  padding: 10px !important;
}

.swagger-ui textarea:focus {
  border-color: #6366f1 !important;
  outline: none !important;
}

/* Dark code blocks for JSON examples */
.swagger-ui .highlight-code,
.swagger-ui pre.microlight,
.swagger-ui .example-value pre {
  background: #07070a !important;
  color: #abb2bf !important;
  border: 1px solid #20222a !important;
  border-radius: 6px !important;
  padding: 12px 16px !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 12.5px !important;
  line-height: 1.5 !important;
}

/* Tabs (Example Value | Schema) */
.swagger-ui .tabli button {
  color: #a1a1aa !important;
  font-weight: 600 !important;
}

.swagger-ui .tabli.active button {
  color: #38bdf8 !important;
  border-bottom: 2px solid #38bdf8 !important;
}

/* Response status codes */
.swagger-ui .response-col_status {
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 700 !important;
  color: #34d399 !important;
}

.swagger-ui .response-col_description {
  color: #d4d4d8 !important;
}

/* Schemas / Models Accordion */
.swagger-ui section.models {
  background: #101116 !important;
  border: 1px solid #23252f !important;
  border-radius: 6px !important;
}

.swagger-ui section.models h4 {
  color: #f4f4f6 !important;
  border-bottom: 1px solid #23252f !important;
}

.swagger-ui section.models h4 svg {
  fill: #a1a1aa !important;
}

.swagger-ui .model-box {
  background: #0b0c0f !important;
  border-radius: 4px !important;
}

.swagger-ui .model {
  color: #d4d4d8 !important;
}

.swagger-ui .model-title {
  color: #f4f4f6 !important;
}

.swagger-ui .property {
  color: #38bdf8 !important;
}

.swagger-ui .prop-type {
  color: #a78bfa !important;
}

.swagger-ui .prop-format {
  color: #94a3b8 !important;
}

/* Authorize Bearer Modal Dialog */
.swagger-ui .dialog-ux .backdrop-ux {
  background: rgba(0, 0, 0, 0.8) !important;
  backdrop-filter: blur(4px) !important;
}

.swagger-ui .dialog-ux .modal-ux {
  background: #141418 !important;
  border: 1px solid #2b2b35 !important;
  color: #f4f4f6 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85) !important;
  border-radius: 8px !important;
}

.swagger-ui .dialog-ux .modal-ux-header {
  border-bottom: 1px solid #2b2b35 !important;
  padding: 14px 20px !important;
}

.swagger-ui .dialog-ux .modal-ux-header h3 {
  color: #f4f4f6 !important;
  font-weight: 700 !important;
}

.swagger-ui .dialog-ux .modal-ux-content {
  color: #d4d4d8 !important;
  padding: 20px !important;
}

.swagger-ui .dialog-ux .modal-ux-content p {
  color: #a1a1aa !important;
}

.swagger-ui .dialog-ux .modal-ux-content h4 {
  color: #f4f4f6 !important;
}

.swagger-ui .dialog-ux input {
  background: #09090c !important;
  border: 1px solid #2b2b35 !important;
  color: #f4f4f6 !important;
  border-radius: 5px !important;
  padding: 8px 12px !important;
}

.swagger-ui .dialog-ux input:focus {
  border-color: #6366f1 !important;
  outline: none !important;
}

.swagger-ui .dialog-ux .btn.modal-btn.auth {
  background: #10b981 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 5px !important;
  font-weight: 600 !important;
}

.swagger-ui .dialog-ux .btn.modal-btn.btn-done {
  background: #27272a !important;
  color: #f4f4f6 !important;
  border: 1px solid #3f3f46 !important;
  border-radius: 5px !important;
}

/* ==========================================================================
   DEVELOPER INTEGRATION HUB & SDK REFERENCE STYLES (OpenAI / Gemini Standard)
   Obsidian Dark Palette with Emerald, Sky Blue & Violet Accents
   ========================================================================== */

/* 1. Hero Quickstart Card */
.docs-hero-card {
  position: relative;
  background: linear-gradient(135deg, rgba(20, 21, 28, 0.95) 0%, rgba(13, 14, 20, 0.98) 100%);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.65rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.docs-hero-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.docs-hero-header {
  margin-bottom: 1.15rem;
}

.docs-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 0.65rem;
}

.docs-hero-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0.2rem 0 0.5rem 0;
  letter-spacing: -0.02em;
}

.docs-hero-desc {
  font-size: 0.88rem;
  color: #a1a1aa;
  line-height: 1.6;
  margin: 0;
  max-width: 900px;
}

.docs-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.85rem;
  margin-top: 1.15rem;
}

.docs-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.95rem 1.05rem;
  transition: all 0.18s ease;
}

.docs-step-item:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.docs-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.docs-step-body h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.25rem 0;
}

.docs-step-body p {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
}

/* 2. Chip Navigation Bar */
.doc-nav-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #1e2029;
}

.doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #a1a1aa;
  background: #14151b;
  border: 1px solid #232530;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.doc-chip:hover {
  color: #ffffff;
  background: #1a1c24;
  border-color: #383b4a;
}

.doc-chip.active {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #34d399 !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25) !important;
}

.doc-chip svg {
  flex-shrink: 0;
}

/* 3. SDK Hero Banner */
.sdk-hero-banner {
  background: #13141a;
  border: 1px solid #22242f;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

/* 4. SDK Reference Cards */
.sdk-ref-card {
  background: #0e0f14;
  border: 1px solid #20222c;
  border-radius: 8px;
  margin-bottom: 1.35rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.sdk-ref-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  background: #14151c;
  border-bottom: 1px solid #20222c;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.sdk-ref-body {
  position: relative;
  background: #090a0e;
}

/* 5. Server Environment Bar (Swagger / cURL) */
.curl-server-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #14151c;
  border: 1px solid #282a36;
  border-radius: 8px;
  padding: 12px 18px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 12px;
}

.curl-server-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.curl-server-label {
  color: #f4f4f6;
  font-weight: 700;
  font-size: 0.85rem;
}

.curl-server-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #090a0e;
  border: 1px solid #2e303f;
  padding: 5px 12px;
  border-radius: 6px;
}

.curl-server-url {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: #38bdf8;
  font-weight: 600;
}

.curl-server-tag {
  font-size: 0.7rem;
  color: #a1a1aa;
  background: #1c1d25;
  padding: 2px 7px;
  border-radius: 4px;
}

.curl-server-auth {
  display: flex;
  align-items: center;
}

.curl-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid #10b981;
  color: #34d399;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
}

/* 6. cURL Reference Cards */
.curl-ref-card {
  background: #111217;
  border: 1px solid #22242f;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.curl-ref-header {
  padding: 0.85rem 1.15rem;
  background: #14151b;
  border-bottom: 1px solid #22242f;
}

.curl-ref-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.curl-method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 4px;
  color: #ffffff;
  min-width: 60px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.curl-badge-post {
  background: #10b981;
}

.curl-badge-get {
  background: #0284c7;
}

.curl-endpoint-path {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.92rem;
  color: #ffffff;
}

.curl-endpoint-desc {
  font-size: 0.8rem;
  color: #9ca3af;
}

.curl-ref-body {
  padding: 0.85rem 1.15rem 1.15rem 1.15rem;
  background: #0d0e12;
}

.curl-tab-bar {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #1e2029;
  padding-bottom: 0.4rem;
}

.curl-tab-btn {
  background: transparent;
  border: none;
  color: #a1a1aa;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.curl-tab-btn:hover {
  color: #ffffff;
  background: #1a1c24;
}

.curl-tab-btn.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* 7. Code Container & High-Contrast Code Content */
.code-container {
  background: #08090c;
  border: 1px solid #1f212a;
  border-radius: 6px;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.95rem;
  background: #121319;
  border-bottom: 1px solid #1f212a;
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

.code-content {
  margin: 0;
  padding: 1rem 1.15rem;
  font-family: 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #e2e8f0;
  background: #08090c;
  overflow-x: auto;
  white-space: pre;
}

.copy-code-btn {
  background: #1e202a;
  border: 1px solid #323545;
  color: #e4e4e7;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.copy-code-btn:hover {
  background: #282c3c;
  border-color: #484d63;
  color: #ffffff;
}

/* 8. Status Code Badges (Errors Reference) */
.status-code-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.status-code-badge.status-200 {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.status-code-badge.status-400 {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.35);
}

.status-code-badge.status-401 {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.status-code-badge.status-403 {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.status-code-badge.status-404 {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.status-code-badge.status-413 {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.status-code-badge.status-422 {
  background: rgba(217, 70, 239, 0.15);
  color: #e879f9;
  border: 1px solid rgba(217, 70, 239, 0.35);
}

.status-code-badge.status-429 {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.status-code-badge.status-500 {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.status-code-badge.status-502,
.status-code-badge.status-503,
.status-code-badge.status-504 {
  background: rgba(225, 29, 72, 0.15);
  color: #fda4af;
  border: 1px solid rgba(225, 29, 72, 0.35);
}

/* Error Catalog Deep-Dive Cards */
.error-card {
  background: #0f1016;
  border: 1px solid #20222e;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s ease;
}

.error-card:hover {
  border-color: #383c50;
}

.error-card-header {
  padding: 0.85rem 1.15rem;
  background: #14151d;
  border-bottom: 1px solid #20222e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.error-card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.error-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
}

.error-card-body {
  padding: 1.15rem;
  background: #0a0b0f;
}

.error-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.error-meta-item {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 0.55rem 0.85rem;
}

.error-meta-label {
  font-size: 0.68rem;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.error-meta-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: #e4e4e7;
}

.retry-pill-yes {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 700;
}

.retry-pill-no {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 700;
}

.error-resolution-box {
  background: rgba(56, 189, 248, 0.04);
  border-left: 3px solid #38bdf8;
  padding: 0.75rem 1rem;
  border-radius: 0 6px 6px 0;
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.55;
}

.error-resolution-box strong {
  color: #38bdf8;
}

.err-filter-chips {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.err-chip {
  background: #14151b;
  border: 1px solid #232530;
  color: #a1a1aa;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.err-chip:hover {
  color: #ffffff;
  background: #1a1c24;
}

.err-chip.active {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: #ef4444;
}

.key-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82em;
  background: #171821;
  border: 1px solid #282a36;
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .docs-hero-card {
    padding: 1.15rem 1rem;
  }
  .docs-steps-grid {
    grid-template-columns: 1fr;
  }
  .curl-server-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .doc-chip {
    font-size: 0.78rem;
    padding: 6px 10px;
  }
}

/* ==========================================================================
   MILLISA TOKEN WALLET & DEVELOPER BILLING STYLES
   ========================================================================== */
.wallet-badge-pill {
  font-size: 0.68rem;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-family: var(--font-mono);
}

.header-wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-family: var(--font-mono);
  transition: all 0.15s ease;
}

.header-wallet-chip:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.wallet-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.wallet-hero-card {
  border-color: rgba(16, 185, 129, 0.35) !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(20, 20, 24, 0.95) 100%) !important;
  box-shadow: 0 4px 20px -2px rgba(16, 185, 129, 0.12);
  position: relative;
  overflow: hidden;
}

.wallet-pill-live {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #10b981;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.wallet-balance-row {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  margin: 0.4rem 0 0.2rem;
}

.wallet-huge-number {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #34d399 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-mono);
}

.wallet-currency-unit {
  font-size: 1.15rem;
  font-weight: 700;
  color: #34d399;
}

.wallet-banner-alert {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.15rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  color: #fef3c7;
  font-size: 0.85rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.wallet-alert-icon {
  font-size: 1.25rem;
}

.wallet-section-container {
  margin-bottom: 2rem;
}

/* Token Packs Pricing Cards */
.token-packs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 1.5rem;
  max-width: 920px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .token-packs-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

.token-pack-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.token-pack-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.45);
}

.token-pack-card.popular {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-surface) 60%);
  box-shadow: 0 8px 24px -4px rgba(16, 185, 129, 0.15);
}

.token-pack-badge {
  position: absolute;
  top: -10px;
  right: 14px;
  background: #10b981;
  color: #09090b;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.token-pack-badge.badge-green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #062419;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5);
}

.token-pack-badge.badge-blue {
  background: #3b82f6;
  color: #ffffff;
}

.token-pack-badge.badge-purple {
  background: #8b5cf6;
  color: #ffffff;
}

.token-pack-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.token-pack-pricing {
  margin: 0.75rem 0 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.token-pack-price {
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.token-pack-tokens-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: #34d399;
  font-family: var(--font-mono);
  margin-top: 0.2rem;
}

.token-pack-tokens-sub {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

.token-pack-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.token-pack-features li {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  line-height: 1.4;
}

.token-pack-features li svg {
  color: #10b981;
  flex-shrink: 0;
  margin-top: 2px;
}

.token-pack-btn {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sandbox-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
}

/* Ledger Transaction Badges */
.txn-badge-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.12);
}

.txn-badge-debit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.08);
}

/* ══════════════════════════════════════════════════════════════════
   ENTERPRISE WALLET & PRICING TABLE DESIGN SYSTEM
   ══════════════════════════════════════════════════════════════════ */
.wallet-pro-card {
  background: linear-gradient(180deg, rgba(22, 22, 28, 0.85) 0%, rgba(13, 13, 17, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  overflow: hidden;
  backdrop-filter: blur(14px);
  position: relative;
  margin-bottom: 2rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wallet-pro-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.wallet-pro-header {
  padding: 1.15rem 1.4rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.005) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.wallet-pro-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wallet-title-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  flex-shrink: 0;
}

.wallet-title-icon-box.purple {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.25);
  color: #c084fc;
}

.wallet-title-icon-box.blue {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
}

.wallet-pro-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.2rem 0;
  letter-spacing: -0.01em;
}

.wallet-pro-subtitle {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin: 0;
  line-height: 1.4;
}

.wallet-pro-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.wallet-filter-group {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.wallet-filter-pill {
  padding: 0.32rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.wallet-filter-pill:hover {
  color: #ffffff;
}

.wallet-filter-pill.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.wallet-filter-pill.active.emerald {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

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

.wallet-search-input-wrap svg {
  position: absolute;
  left: 10px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.wallet-search-input {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.38rem 0.75rem 0.38rem 2.1rem;
  font-size: 0.78rem;
  color: #ffffff;
  outline: none;
  transition: all 0.15s ease;
  width: 175px;
}

.wallet-search-input:focus {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
  width: 210px;
}

.wallet-search-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

/* Metric Ribbon Bar */
.ledger-metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  padding: 1rem 1.4rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ledger-metric-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ledger-metric-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ledger-metric-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}

.ledger-metric-val {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #ffffff;
  letter-spacing: -0.01em;
}

/* Professional Table Container & Rows */
.wallet-pro-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.84rem;
}

.wallet-pro-table thead tr th {
  background: rgba(18, 18, 23, 0.95);
  padding: 0.85rem 1.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a1a1aa;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.wallet-pro-table tbody tr {
  transition: background 0.15s ease;
}

.wallet-pro-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.wallet-pro-table tbody tr td {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  color: var(--text-secondary);
}

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

/* Model Identity Cell */
.model-cell-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.model-code-chip {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.model-copy-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.model-copy-btn:hover {
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
}

/* Provider Brand Tags */
.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
}

.brand-pill.google {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.28);
}

.brand-pill.openai {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.brand-pill.anthropic {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.brand-pill.xai {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.28);
}

.brand-pill.dynamic {
  background: rgba(6, 182, 212, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.28);
}

/* Tier Pills */
.tier-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tier-tag.economy {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.tier-tag.standard {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.tier-tag.premium {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.tier-tag.advanced {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.tier-tag.autoroute {
  background: rgba(14, 165, 233, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

/* Rate & Cost Highlights */
.cost-highlight-box {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.cost-mt-strong {
  font-size: 0.88rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.cost-inr-sub {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

/* Action Button inside Table */
.btn-table-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 0.28rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}

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

/* Ledger Reference Code Pill */
.ref-id-pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.45rem;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
}

.ref-id-pill:hover {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.08);
}

/* Table Footer / Pagination Bar */
.wallet-pro-footer {
  padding: 0.85rem 1.4rem;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.wallet-footer-info {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.wallet-pagination-btns {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-page-nav {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-radius: 6px;
  padding: 0.28rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
}

.btn-page-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-page-nav:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-export-csv {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
  border-radius: 6px;
  padding: 0.32rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.btn-export-csv:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

/* Pulsing Status Dot */
.status-pill-completed {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  display: inline-block;
}

/* ══════════════════════════════════════════════════════════════════
   EXECUTIVE WALLETS & REVENUE DASHBOARD STYLES
   ══════════════════════════════════════════════════════════════════ */
.executive-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 1200px) {
  .executive-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .executive-stats-grid {
    grid-template-columns: 1fr;
  }
}

.executive-stat-card {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.85), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.35rem 1.45rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.executive-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.6);
}

.card-glow-emerald::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle at 100% 0%, rgba(16, 185, 129, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.card-glow-cyan::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.card-glow-purple::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle at 100% 0%, rgba(168, 85, 247, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.card-glow-amber::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.card-icon-frame {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.frame-emerald {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #10b981;
}

.frame-cyan {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #38bdf8;
}

.frame-purple {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.28);
  color: #c084fc;
}

.frame-amber {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #fbbf24;
}

.executive-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.executive-stat-val {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0.55rem 0 0.35rem;
  font-family: var(--font-mono);
}

.executive-stat-sub {
  font-size: 0.76rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Executive Panels */
.executive-panel {
  background: #0d121d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  margin-bottom: 1.75rem;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.35);
  overflow: visible;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.executive-panel .table-responsive {
  border: none !important;
  border-radius: 0 !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  width: 100% !important;
  min-height: 80px !important;
  background: transparent !important;
  -webkit-overflow-scrolling: touch;
}

.executive-panel-header {
  padding: 1.15rem 1.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.015);
}

.executive-title-flex {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.executive-title-flex h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.01em;
}

.controls-cluster {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Search Input with Icon */
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper svg {
  position: absolute;
  left: 0.75rem;
  color: #64748b;
  pointer-events: none;
}

.search-input-wrapper input {
  padding-left: 2.2rem !important;
  font-size: 0.82rem !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 8px !important;
  color: #f8fafc !important;
  width: 270px;
  transition: all 0.15s ease;
}

.search-input-wrapper input:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

.custom-filter-select {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #f8fafc;
  font-size: 0.82rem;
  padding: 0.42rem 0.85rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.custom-filter-select:focus {
  border-color: #10b981;
}

/* Order ID Monospace Copyable Pill */
.order-id-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.65rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: #38bdf8;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.order-id-badge:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
  transform: translateY(-1px);
}

.order-id-badge svg {
  opacity: 0.65;
  transition: opacity 0.15s;
}

.order-id-badge:hover svg {
  opacity: 1;
}

/* Professional Data Table */
.pro-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.pro-data-table th {
  background: rgba(15, 23, 42, 0.85);
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.pro-data-table td {
  padding: 1.05rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  vertical-align: middle;
  font-size: 0.85rem;
}

.pro-data-table tbody tr {
  transition: background 0.15s ease;
}

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

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

/* User Avatar Disc */
.user-cell-flex {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar-disc {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.user-avatar-disc.avatar-admin {
  background: linear-gradient(135deg, #f43f5e, #ec4899);
}

/* Status Pills */
.status-pill-paid {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.32);
}

.status-pill-pending {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.32);
}

.status-dot-amber {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
  display: inline-block;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Button Approve Order */
.btn-approve-order {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.38rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
  transition: all 0.15s ease;
}

.btn-approve-order:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

/* Monospace Balance Display */
.balance-cell-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.balance-cell-sub {
  font-size: 0.73rem;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.35;
}

/* ──────────────────────────────────────────────────────────────────────────
   ENTERPRISE DEVELOPER CONSOLE & WALLET MOBILE OPTIMIZATIONS
   ────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .wallet-pro-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.85rem !important;
    padding: 1rem 1rem 0.85rem !important;
  }

  .wallet-pro-controls {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.6rem !important;
  }

  .wallet-filter-group {
    width: 100% !important;
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 4px !important;
    box-sizing: border-box !important;
    justify-content: flex-start !important;
    gap: 4px !important;
  }

  .wallet-filter-pill {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  .wallet-search-input-wrap {
    width: 100% !important;
  }

  .wallet-search-input {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .ledger-metrics-strip {
    grid-template-columns: repeat(2, 1fr) !important;
    padding: 0.75rem 0.85rem !important;
    gap: 0.5rem !important;
  }

  .ledger-metric-item {
    padding: 0.5rem 0.65rem !important;
  }

  .ledger-metric-val {
    font-size: 0.92rem !important;
  }

  .wallet-pro-table {
    font-size: 0.78rem !important;
  }

  .wallet-pro-table thead tr th,
  .wallet-pro-table tbody tr td {
    padding: 0.65rem 0.8rem !important;
    white-space: nowrap !important;
  }

  .token-packs-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    max-width: 100% !important;
  }

  .token-pack-card {
    padding: 1.15rem 1rem !important;
  }

  .token-pack-price {
    font-size: 1.65rem !important;
  }

  .doc-nav-chips {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
    padding-bottom: 6px !important;
  }

  .doc-chip {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  .api-console-topbar {
    padding: 0.5rem 0.75rem !important;
    gap: 0.5rem !important;
  }
}

@media (max-width: 480px) {
  .ledger-metrics-strip {
    grid-template-columns: 1fr !important;
  }

  .wallet-pro-title {
    font-size: 0.95rem !important;
  }

  .wallet-pro-subtitle {
    font-size: 0.75rem !important;
  }

  .token-pack-pricing {
    margin: 0.5rem 0 0.75rem !important;
    padding-bottom: 0.65rem !important;
  }

  .token-pack-price {
    font-size: 1.5rem !important;
  }

  .token-pack-tokens-val {
    font-size: 0.88rem !important;
  }

  .wallet-pro-card {
    border-radius: 12px !important;
    margin-bottom: 1rem !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   GEMINI-STYLE TOKEN USAGE & ANALYTICS DASHBOARD
   ═══════════════════════════════════════════════════════════════════════════ */
.usage-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.25);
}

.usage-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.usage-chart-container {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.usage-histogram-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 180px;
  min-width: 600px;
  padding: 1rem 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.usage-histogram-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
  cursor: pointer;
}

.usage-histogram-col:hover .usage-bar-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
  pointer-events: auto;
}

.usage-histogram-bar {
  width: 100%;
  max-width: 28px;
  min-height: 4px;
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  border-radius: 4px 4px 0 0;
  transition: all 0.25s ease;
}

.usage-histogram-col:hover .usage-histogram-bar {
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
  filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.4));
}

.usage-histogram-label {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.usage-bar-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font-size: 0.72rem;
  color: #f8fafc;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  z-index: 20;
}

.usage-bar-tooltip strong {
  color: #38bdf8;
  display: block;
  margin-bottom: 2px;
}

.usage-model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.usage-model-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.usage-model-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.3);
}

.usage-model-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.usage-model-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.usage-model-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.usage-model-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.6rem;
}

.usage-model-tokens-val {
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.usage-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.usage-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8 0%, #34d399 100%);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.token-split-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   GOOGLE AI STUDIO (GEMINI API USAGE) DASHBOARD THEME
   ═══════════════════════════════════════════════════════════════════════════ */
.ai-studio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.ai-studio-title {
  font-size: 1.65rem;
  font-weight: 600;
  color: #e3e3e3;
  letter-spacing: -0.02em;
  margin: 0;
}

.ai-studio-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  color: #c4c7c5;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-studio-tier-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.ai-studio-controls {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.ai-studio-ctrl-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.ai-studio-ctrl-label {
  font-size: 0.82rem;
  color: #8e918f;
  font-weight: 500;
}

.ai-studio-select {
  background: #1e1f20;
  border: 1px solid #444746;
  border-radius: 8px;
  color: #e3e3e3;
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.ai-studio-select:focus {
  border-color: #38bdf8;
}

.ai-studio-btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #1e1f20;
  border: 1px solid #444746;
  color: #c4c7c5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-studio-btn-icon:hover {
  background: #2a2b2e;
  color: #fff;
  border-color: #5e6063;
}

.ai-studio-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  margin-top: 1.5rem;
}

.ai-studio-section-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #e3e3e3;
  margin: 0;
  letter-spacing: -0.01em;
}

.ai-studio-info-icon {
  color: #8e918f;
  font-size: 0.85rem;
  cursor: help;
  margin-left: 0.35rem;
}

.ai-studio-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .ai-studio-cards-row {
    grid-template-columns: 1fr;
  }
}

.ai-studio-card {
  background: #18191b;
  border: 1px solid #2d2f31;
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3);
}

.ai-studio-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.ai-studio-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e3e3e3;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ai-studio-mini-select {
  background: #1e1f20;
  border: 1px solid #3c4043;
  border-radius: 6px;
  color: #c4c7c5;
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  outline: none;
  cursor: pointer;
}

.ai-studio-chart-wrapper {
  width: 100%;
  height: 220px;
  position: relative;
  margin-bottom: 0.5rem;
}

.ai-studio-chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ai-studio-legend {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  font-size: 0.74rem;
  color: #8e918f;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-box {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
}

.legend-line {
  width: 14px;
  height: 2.5px;
  border-radius: 1px;
  display: inline-block;
  position: relative;
}

.legend-line::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: inherit;
}

@media (max-width: 600px) {
  .ai-studio-title {
    font-size: 1.35rem;
  }
  .ai-studio-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .ai-studio-controls {
    width: 100%;
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .ai-studio-card {
    padding: 1rem 0.75rem;
  }
  .ai-studio-chart-wrapper {
    height: 180px;
  }
  .ai-studio-legend {
    gap: 0.65rem;
    font-size: 0.7rem;
  }
}


