/*
 * ═══════════════════════════════════════════════════════════════
 * BLAMI COMPONENTS — v2.0
 * Glass + Neon UI components
 * ═══════════════════════════════════════════════════════════════
 * Depends on: shared/design-tokens.css (loaded first)
 * ═══════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════
   GLASS CARD
   ═══════════════════════════════════════════════════════════════ */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  transition:
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}

.glass-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 24px oklch(72% 0.22 155 / 0.06);
  transform: translateY(-2px);
}

.glass-card--accent {
  border-color: var(--border-active);
  box-shadow: 0 0 28px oklch(72% 0.22 155 / 0.08);
}

.glass-card--accent:hover {
  border-color: var(--accent);
  box-shadow:
    0 0 32px oklch(72% 0.22 155 / 0.15),
    0 0 64px oklch(72% 0.22 155 / 0.06);
}

/* ═══════════════════════════════════════════════════════════════
   GLASS PANEL (dashboard / admin panels)
   ═══════════════════════════════════════════════════════════════ */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
}

.glass-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--sp-sm);
  margin-bottom: var(--sp-md);
  border-bottom: 1px solid var(--border);
}

.glass-panel__title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  font-size: var(--text-sm);
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

/* Primary — Emerald Neon */
.btn--primary {
  background: var(--accent);
  color: #000;
  padding: 8px 20px;
  box-shadow: 0 0 16px oklch(72% 0.22 155 / 0.25);
}

.btn--primary:hover {
  background: oklch(78% 0.22 155);
  box-shadow:
    0 0 32px var(--accent-glow),
    0 0 64px oklch(72% 0.22 155 / 0.2);
}

/* Glass — subtle border + blur */
.btn--glass {
  background: var(--bg-glass);
  color: var(--text);
  border-color: var(--border);
  padding: 8px 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn--glass:hover {
  border-color: var(--border-hover);
  background: oklch(14% 0.003 155 / 0.7);
  color: var(--text);
}

/* Ghost — no background */
.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 14px;
}

.btn--ghost:hover {
  color: var(--text);
  background: oklch(100% 0 0 / 0.03);
}

/* Danger — minimal usage */
.btn--danger {
  background: transparent;
  color: var(--danger);
  border-color: oklch(60% 0.18 22 / 0.2);
  padding: 6px 14px;
}

.btn--danger:hover {
  background: var(--danger-soft);
  border-color: oklch(60% 0.18 22 / 0.4);
}

/* Sizes */
.btn--sm {
  padding: 4px 12px;
  font-size: var(--text-xs);
}

.btn--lg {
  padding: 12px 28px;
  font-size: var(--text-base);
}

.btn--xl {
  padding: 16px 36px;
  font-size: var(--text-lg);
}

.btn--block {
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   INPUTS
   ═══════════════════════════════════════════════════════════════ */
.input {
  width: 100%;
  padding: var(--sp-sm);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-sm);
  outline: none;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.input:focus {
  border-color: var(--border-active);
  box-shadow:
    0 0 0 3px var(--accent-soft),
    0 0 12px oklch(72% 0.22 155 / 0.08);
}

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

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

select.input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%237a7a8a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-sm);
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--accent {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid oklch(72% 0.22 155 / 0.15);
}

.badge--success {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid oklch(65% 0.15 150 / 0.12);
}

.badge--warning {
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid oklch(75% 0.12 85 / 0.12);
}

.badge--danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid oklch(60% 0.18 22 / 0.12);
}

.badge--info {
  background: var(--info-soft);
  color: var(--info);
  border: 1px solid oklch(70% 0.08 230 / 0.12);
}

/* ═══════════════════════════════════════════════════════════════
   MODAL — Glass overlay
   ═══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: oklch(3% 0.002 160 / 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: var(--bg-glass);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  width: 540px;
  max-width: 94vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow:
    var(--shadow-lg),
    0 0 60px oklch(72% 0.22 155 / 0.06);
  animation: modal-in var(--dur-base) var(--ease-out);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 768px) {
  .modal-overlay {
    align-items: flex-end;
  }
  .modal {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    padding: var(--sp-lg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 82vh;
    margin-top: auto;
  }
}

/* ═══════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  top: var(--sp-lg);
  right: var(--sp-lg);
  z-index: var(--z-toast);
  padding: var(--sp-sm) var(--sp-lg);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: var(--text-sm);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  color: var(--text);
  animation: toast-in var(--dur-base) var(--ease-out);
  pointer-events: none;
  max-width: 380px;
}

.toast--success {
  border-color: oklch(65% 0.15 150 / 0.3);
  color: var(--success);
}

.toast--error {
  border-color: oklch(60% 0.18 22 / 0.3);
  color: var(--danger);
}

.toast--info {
  border-color: oklch(70% 0.08 230 / 0.3);
  color: var(--info);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ═══════════════════════════════════════════════════════════════
   STATUS DOT
   ═══════════════════════════════════════════════════════════════ */
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot--online {
  background: var(--success);
  box-shadow: 0 0 8px oklch(65% 0.15 150 / 0.5);
}

.status-dot--offline {
  background: var(--text-muted);
}

.status-dot--warning {
  background: var(--warning);
  box-shadow: 0 0 8px oklch(75% 0.12 85 / 0.5);
}

.status-dot--error {
  background: var(--danger);
  box-shadow: 0 0 8px oklch(60% 0.18 22 / 0.5);
}

/* ═══════════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════════ */
.alert {
  border-radius: var(--radius-sm);
  padding: var(--sp-sm);
  font-size: var(--text-sm);
  line-height: 1.6;
  font-family: var(--font);
}

.alert--success {
  background: var(--success-soft);
  border: 1px solid oklch(65% 0.15 150 / 0.12);
  color: var(--success);
}

.alert--warning {
  background: var(--warning-soft);
  border: 1px solid oklch(75% 0.12 85 / 0.12);
  color: var(--warning);
}

.alert--danger {
  background: var(--danger-soft);
  border: 1px solid oklch(60% 0.18 22 / 0.12);
  color: var(--danger);
}

.alert--info {
  background: var(--info-soft);
  border: 1px solid oklch(70% 0.08 230 / 0.12);
  color: var(--info);
}

/* ═══════════════════════════════════════════════════════════════
   TOGGLE SWITCH
   ═══════════════════════════════════════════════════════════════ */
.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  cursor: pointer;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-hover);
  border-radius: 22px;
  transition: background var(--dur-fast) var(--ease-out);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: var(--text);
  border-radius: 50%;
  transition: transform var(--dur-fast) var(--ease-out);
}

.toggle input:checked + .toggle-slider {
  background: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* ═══════════════════════════════════════════════════════════════
   UPLOAD ZONE — drag & drop
   ═══════════════════════════════════════════════════════════════ */
.upload-zone {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-xl) var(--sp-md);
  text-align: center;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--border-active);
  background: var(--accent-soft);
}

.upload-zone__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.upload-zone__hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   TABLE (glass rows)
   ═══════════════════════════════════════════════════════════════ */
.table-glass {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table-glass th {
  padding: var(--sp-sm);
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.table-glass td {
  padding: var(--sp-sm);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  transition: background var(--dur-fast);
}

.table-glass tr:hover td {
  background: oklch(100% 0 0 / 0.02);
}

/* ═══════════════════════════════════════════════════════════════
   PROGRESS BAR
   ═══════════════════════════════════════════════════════════════ */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border-hover);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.5s var(--ease-out);
}

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: var(--sp-3xl) var(--sp-md);
}

.empty-state__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--sp-sm);
}

.empty-state__title {
  font-family: var(--font);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--sp-sm);
}

.empty-state__desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0 auto var(--sp-md);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════════
   GRID HELPERS
   ═══════════════════════════════════════════════════════════════ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-md);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-sm);
}

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

/* ═══════════════════════════════════════════════════════════════
   NEON BORDER — for highlighted elements
   ═══════════════════════════════════════════════════════════════ */
.neon-border {
  border-color: var(--border-active);
  box-shadow:
    inset 0 0 20px oklch(72% 0.22 155 / 0.05),
    0 0 16px oklch(72% 0.22 155 / 0.15);
}

/* ═══════════════════════════════════════════════════════════════
   SECTION BASE
   ═══════════════════════════════════════════════════════════════ */
.section {
  padding: var(--sp-3xl) 0;
}

.section__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}

.section__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-sm);
}

.section__title {
  font-family: var(--font);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-md);
}

.section__subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: var(--sp-xl);
}

.section--center {
  text-align: center;
}

.section--center .section__subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* ═══════════════════════════════════════════════════════════════
   SPLIT SECTION (two columns)
   ═══════════════════════════════════════════════════════════════ */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xl);
  align-items: center;
}

@media (max-width: 768px) {
  .split-section {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ACCENT BUTTON
   ═══════════════════════════════════════════════════════════════ */
.btn--accent {
  background: var(--accent);
  color: var(--text);
}

.btn--accent:hover {
  background: oklch(72% 0.28 155);
  box-shadow: var(--shadow-glow);
}

/* ═══════════════════════════════════════════════════════════════
   PANEL (dashboard reusable container)
   ═══════════════════════════════════════════════════════════════ */
.panel {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-lg);
  backdrop-filter: blur(12px);
}

.panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-md);
}

.panel__title {
  font-family: var(--font-display), sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════
   STAT CARD (dashboard metrics)
   ═══════════════════════════════════════════════════════════════ */
.stat-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-md);
  backdrop-filter: blur(10px);
  transition: border-color .2s;
}

.stat-card:hover { border-color: var(--border-active); }

.stat-card__value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-card__label {
  font-size: .8125rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   STATS GRID (dashboard metrics layout)
   ═══════════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-md);
}

/* ═══════════════════════════════════════════════════════════════
   BOT CARD (dashboard bot listing)
   ═══════════════════════════════════════════════════════════════ */
.bot-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-md);
  backdrop-filter: blur(10px);
  transition: border-color .2s, transform .2s;
  cursor: pointer;
}

.bot-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.bot-card__name {
  font-weight: 600;
  color: var(--text);
  font-size: .9375rem;
}

.bot-card__meta {
  font-size: .8125rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.bot-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   TAG / BADGE (status labels)
   ═══════════════════════════════════════════════════════════════ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-ambient);
}

/* ═══════════════════════════════════════════════════════════════
   TRIAL BAR (trial progress indicator)
   ═══════════════════════════════════════════════════════════════ */
.trial-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.trial-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  transition: width .4s ease;
}

/* ═══════════════════════════════════════════════════════════════
   LOGO IMAGE
   ═══════════════════════════════════════════════════════════════ */
.logo-img {
  height: 32px;
  width: auto;
}

.logo-img--lg {
  height: 48px;
}

/* ═══════════════════════════════════════════════════════════════
   NAV ITEM (sidebar navigation)
   ═══════════════════════════════════════════════════════════════ */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}

.nav-item:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-ambient);
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--bg-glass);
  border-right: 1px solid var(--border);
  padding: var(--sp-md);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 20px;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT (dashboard content area)
   ═══════════════════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  padding: var(--sp-lg);
  overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE NAV
   ═══════════════════════════════════════════════════════════════ */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform .3s ease;
  padding: var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.mobile-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.mobile-sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-item {
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: .875rem;
  cursor: pointer;
}

.mobile-nav-item.active {
  background: var(--accent-ambient);
  color: var(--accent);
}

@media (max-width: 860px) {
  .sidebar { display: none; }
  .mobile-toggle { display: block; }
}

/* ═══════════════════════════════════════════════════════════════
   CHAT DEMO (landing page WhatsApp simulation)
   ═══════════════════════════════════════════════════════════════ */
.chat-demo {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  backdrop-filter: blur(14px);
}

.chat-demo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px var(--sp-md);
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
}

.chat-demo-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--bg-abyss);
  font-size: .875rem;
}

.chat-demo-name {
  font-weight: 600;
  color: var(--text);
  font-size: .9375rem;
}

.chat-demo-status {
  font-size: .75rem;
  color: var(--success);
}

.chat-demo-body {
  padding: var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 280px;
  max-height: 400px;
  overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════════════
   CHAT BUBBLES
   ═══════════════════════════════════════════════════════════════ */
.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: .875rem;
  line-height: 1.4;
  word-break: break-word;
}

.chat-bubble-in {
  align-self: flex-end;
  background: var(--accent-ambient);
  border: 1px solid var(--accent-ambient);
  color: var(--text);
  border-bottom-right-radius: 4px;
}

.chat-bubble-out {
  align-self: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   TYPING DOTS (WhatsApp-style animation)
   ═══════════════════════════════════════════════════════════════ */
.typing-dots {
  display: flex;
  gap: 4px;
  padding: 8px 14px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing-blink 1.4s infinite both;
}

.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes typing-blink {
  0%, 80%, 100% { opacity: .3; }
  40% { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   CREATION OVERLAY (bot/agent creation animation)
   ═══════════════════════════════════════════════════════════════ */
.creation-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3,7,10,.85);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.creation-box {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-xl);
  text-align: center;
  max-width: 480px;
  width: 90vw;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-glow);
}

.creation-step {
  font-size: .9375rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.creation-step .highlight {
  color: var(--accent);
  font-weight: 600;
}

.creation-progress {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 20px;
}

.creation-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  transition: width .5s ease;
}

/* ═══════════════════════════════════════════════════════════════
   CTA SECTION (landing page)
   ═══════════════════════════════════════════════════════════════ */
.cta-section {
  text-align: center;
  padding: 80px var(--sp-md);
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, var(--accent-ambient), transparent 70%);
  pointer-events: none;
}

.cta-section__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  position: relative;
}

.cta-section__subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  position: relative;
}

/* ═══════════════════════════════════════════════════════════════
   LANDING FOOTER
   ═══════════════════════════════════════════════════════════════ */
.landing-footer {
  border-top: 1px solid var(--border);
  padding: 40px var(--sp-md) 20px;
  background: var(--bg-surface);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-brand__name {
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}

.footer-brand__desc {
  font-size: .8125rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   VERB LANDMARK (gradient heading text)
   ═══════════════════════════════════════════════════════════════ */
.verb-landmark {
  background: linear-gradient(135deg, var(--accent-glow), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════════════════════════════
   WHATSAPP FLOAT TOOLTIP
   ═══════════════════════════════════════════════════════════════ */
.wapp-float-tooltip {
  position: absolute;
  bottom: 110%;
  right: 0;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: .8125rem;
  color: var(--text);
  white-space: nowrap;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}

/* ═══════════════════════════════════════════════════════════════
   UTILITY ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}

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

.shake {
  animation: shake .4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.fade-in {
  animation: fadeIn .4s ease forwards;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE LAYOUT — Dashboard shell
   ═══════════════════════════════════════════════════════════════ */
.layout-dashboard {
  display: flex;
  min-height: 100vh;
}

/* Breakpoints */
@media (max-width: 860px) {
  .sidebar { display: none; }
  .mobile-toggle { display: flex; }
  .main-content { padding: var(--sp-md); }
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--sp-sm);
  }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .panel { padding: var(--sp-sm); }
  .bot-card { padding: var(--sp-sm); }
  .cta-section { padding: 48px var(--sp-sm); }
  .cta-section__title { font-size: 1.5rem; }
  .chat-demo { max-width: 100%; }
}
