/* ===================================================================
   COMPONENTS — PromithicAI v1.1
   Reusable UI: Navbar, Buttons, Cards, Inputs, Badges, Modals, etc.
   =================================================================== */

/* ════════════════════════════════════════
   NAVBAR
   ════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: var(--z-nav);
  transition: background var(--transition-base), border-color var(--transition-base),
              box-shadow var(--transition-base);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--border-glow);
}

.navbar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 8px;
}

/* Logo */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--gradient-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow-cyan);
  flex-shrink: 0;
}

.navbar-logo-icon svg { width: 18px; height: 18px; color: #fff; }

.navbar-logo-text {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.navbar-logo-text span { color: var(--accent-cyan); }

/* Version badge */
.version-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  background: var(--glow-cyan);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-full);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* Nav links */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 32px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover { color: var(--text-primary); background: var(--bg-card); }
.nav-link.active {
  color: var(--accent-cyan);
  background: var(--glow-cyan);
}
.nav-link svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Navbar right actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Theme toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: color var(--transition-fast), background var(--transition-fast);
  background: transparent;
  border: 1px solid transparent;
}

.theme-toggle:hover {
  color: var(--accent-cyan);
  background: var(--glow-cyan);
  border-color: var(--border-glow);
}

.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: transparent;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.nav-hamburger:hover { color: var(--text-primary); background: var(--bg-card); }
.nav-hamburger svg { width: 20px; height: 20px; }

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 12px;
  z-index: var(--z-nav);
  flex-direction: column;
  gap: 4px;
  animation: fadeInDown 0.3s ease both;
}

.mobile-nav.open { display: flex; }
.mobile-nav .nav-link { width: 100%; }

@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .nav-hamburger { display: flex; }
}

/* ════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  line-height: 1;
  letter-spacing: 0.01em;
}

.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Primary — gradient */
.btn-primary {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.25);
}
.btn-primary:hover {
  background: var(--gradient-btn-hover);
  box-shadow: 0 6px 24px rgba(0, 212, 255, 0.4);
}

/* Secondary — outlined */
.btn-secondary {
  background: transparent;
  color: var(--accent-cyan);
  border-color: var(--border-glow);
}
.btn-secondary:hover {
  background: var(--glow-cyan);
  box-shadow: var(--shadow-glow-cyan);
}

/* Ghost — subtle */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Danger */
.btn-danger {
  background: transparent;
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.12);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.2);
}

/* Success */
.btn-success {
  background: var(--accent-green);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}
.btn-success:hover {
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.45);
}

/* Sizes */
.btn-sm { padding: 7px 14px; font-size: var(--text-xs); border-radius: var(--radius-sm); }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { padding: 14px 28px; font-size: var(--text-base); border-radius: var(--radius-lg); }
.btn-lg svg { width: 20px; height: 20px; }
.btn-xl { padding: 18px 36px; font-size: var(--text-lg); border-radius: var(--radius-xl); }
.btn-xl svg { width: 22px; height: 22px; }

/* Icon only */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}
.btn-icon.btn-sm { width: 30px; height: 30px; }
.btn-icon.btn-lg { width: 44px; height: 44px; }

/* Loading state */
.btn.loading { position: relative; pointer-events: none; }
.btn.loading .btn-text { opacity: 0; }
.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ════════════════════════════════════════
   CARDS
   ════════════════════════════════════════ */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-base);
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-glow:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow-cyan), var(--shadow-lg);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* Feature card with icon */
.feature-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-base);
  cursor: default;
}

.feature-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow-cyan), var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-card-icon.cyan   { background: var(--glow-cyan); color: var(--accent-cyan); }
.feature-card-icon.violet { background: var(--glow-violet); color: var(--accent-violet); }
.feature-card-icon.green  { background: var(--glow-green); color: var(--accent-green); }
.feature-card-icon.orange { background: var(--glow-orange); color: var(--accent-orange); }
.feature-card-icon svg    { width: 24px; height: 24px; }

/* ════════════════════════════════════════
   BADGES
   ════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-cyan   { color: var(--accent-cyan);   background: var(--glow-cyan);   border: 1px solid var(--border-glow); }
.badge-violet { color: var(--accent-violet); background: var(--glow-violet); border: 1px solid rgba(124,58,237,0.3); }
.badge-green  { color: var(--accent-green);  background: var(--glow-green);  border: 1px solid rgba(16,185,129,0.3); }
.badge-orange { color: var(--accent-orange); background: var(--glow-orange); border: 1px solid rgba(245,158,11,0.3); }
.badge-red    { color: var(--accent-red);    background: var(--glow-red);    border: 1px solid rgba(239,68,68,0.3); }
.badge-muted  { color: var(--text-secondary); background: var(--bg-card);     border: 1px solid var(--border); }

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge .dot-ping {
  position: relative;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}

.badge .dot-ping::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
}

.badge .dot-ping::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  animation: statusPing 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ════════════════════════════════════════
   INPUTS
   ════════════════════════════════════════ */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

.input-label.required::after {
  content: ' *';
  color: var(--accent-red);
}

.input {
  width: 100%;
  padding: 10px 14px;
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  line-height: var(--leading-normal);
}

.input::placeholder { color: var(--text-muted); }
.input:hover { border-color: var(--border-hover); }
.input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--glow-cyan);
}
.input.error { border-color: var(--accent-red); }
.input.error:focus { box-shadow: 0 0 0 3px var(--glow-red); }

.input-icon-wrapper {
  position: relative;
}
.input-icon-wrapper .input { padding-left: 38px; }
.input-icon-wrapper .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

.input-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
}

.input-error-msg {
  font-size: var(--text-xs);
  color: var(--accent-red);
  display: none;
}
.input.error + .input-error-msg { display: block; }

/* Textarea */
.textarea {
  resize: vertical;
  min-height: 100px;
}

/* Password input */
.input-password-wrapper { position: relative; }
.input-password-wrapper .input { padding-right: 42px; }
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  transition: color var(--transition-fast);
}
.password-toggle:hover { color: var(--text-primary); }
.password-toggle svg { width: 16px; height: 16px; }

/* Select */
.select {
  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='%238b9ab4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ════════════════════════════════════════
   TOGGLE SWITCH
   ════════════════════════════════════════ */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: transform var(--transition-base), background var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.toggle input:checked ~ .toggle-track { background: var(--accent-cyan); }
.toggle input:checked ~ .toggle-track .toggle-thumb {
  transform: translateX(20px);
  background: #fff;
}

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

.progress-fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

.progress-bar.indeterminate .progress-fill {
  width: 40% !important;
  animation: progressIndeterminate 1.5s ease-in-out infinite;
}

@keyframes progressIndeterminate {
  0%   { transform: translateX(-150%); }
  100% { transform: translateX(350%); }
}

/* ════════════════════════════════════════
   TABS
   ════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
  background: var(--bg-card);
  color: var(--accent-cyan);
  box-shadow: var(--shadow-sm);
}
.tab-btn svg { width: 14px; height: 14px; }

/* ════════════════════════════════════════
   MODAL
   ════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease both;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.25s cubic-bezier(0.34,1.56,0.64,1) both;
  position: relative;
}

.modal-lg { max-width: 720px; }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-card); }
.modal-close svg { width: 18px; height: 18px; }

.modal-header { margin-bottom: 24px; }
.modal-title { font-size: var(--text-2xl); font-weight: 700; margin-bottom: 6px; }
.modal-subtitle { font-size: var(--text-sm); color: var(--text-secondary); }

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ════════════════════════════════════════
   TOAST
   ════════════════════════════════════════ */
#toast-container {
  position: fixed;
  top: calc(var(--nav-height) + 12px);
  right: 16px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 380px;
  width: calc(100vw - 32px);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: toastSlideIn 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
}

.toast.removing { animation: toastSlideOut 0.3s ease both; }

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-body { flex: 1; }
.toast-title { font-size: var(--text-sm); font-weight: 600; margin-bottom: 2px; }
.toast-msg   { font-size: var(--text-xs); color: var(--text-secondary); }

.toast-close {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: 4px;
  flex-shrink: 0;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.toast-close:hover { color: var(--text-primary); background: var(--bg-card); }
.toast-close svg { width: 14px; height: 14px; }

.toast.success { border-left: 3px solid var(--accent-green); }
.toast.success .toast-icon { color: var(--accent-green); }
.toast.error   { border-left: 3px solid var(--accent-red); }
.toast.error   .toast-icon { color: var(--accent-red); }
.toast.info    { border-left: 3px solid var(--accent-cyan); }
.toast.info    .toast-icon { color: var(--accent-cyan); }
.toast.warning { border-left: 3px solid var(--accent-orange); }
.toast.warning .toast-icon { color: var(--accent-orange); }

/* ════════════════════════════════════════
   AGENT STEP INDICATOR
   ════════════════════════════════════════ */
.agent-pipeline {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 16px 0;
  width: 100%;
}

.agent-step {
  display: flex;
  align-items: center;
  flex: 1;
}

.agent-step-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.agent-step-bubble {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  transition: all var(--transition-base);
  position: relative;
  z-index: 1;
}

.agent-step-bubble svg { width: 20px; height: 20px; }

.agent-step.pending  .agent-step-bubble { border-color: var(--border); color: var(--text-muted); }
.agent-step.active   .agent-step-bubble {
  border-color: var(--accent-cyan);
  background: var(--glow-cyan);
  color: var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
  animation: glowPulse 2s ease-in-out infinite;
}
.agent-step.done     .agent-step-bubble {
  border-color: var(--accent-green);
  background: var(--glow-green);
  color: var(--accent-green);
  animation: stepCheck 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

.agent-step-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.agent-step.active .agent-step-label { color: var(--accent-cyan); }
.agent-step.done   .agent-step-label { color: var(--accent-green); }

.agent-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 4px;
  margin-bottom: 26px;
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
}

.agent-connector::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  transition: width 1.5s ease;
}

.agent-connector.flowing::after { width: 100%; }

/* ════════════════════════════════════════
   CODE DISPLAY
   ════════════════════════════════════════ */
.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.code-dots { display: flex; gap: 6px; }
.code-dot { width: 12px; height: 12px; border-radius: 50%; }
.code-dot:nth-child(1) { background: #ff5f57; }
.code-dot:nth-child(2) { background: #febc2e; }
.code-dot:nth-child(3) { background: #28c840; }

.code-lang {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.code-copy-btn {
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.code-copy-btn:hover { color: var(--accent-cyan); background: var(--glow-cyan); }
.code-copy-btn svg { width: 12px; height: 12px; }

.code-content {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.8;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: pre;
}

/* ════════════════════════════════════════
   STATUS INDICATOR
   ════════════════════════════════════════ */
.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 500;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.status-dot.online  { background: var(--accent-green); }
.status-dot.busy    { background: var(--accent-orange); }
.status-dot.offline { background: var(--text-muted); }
.status-dot.error   { background: var(--accent-red); }

.status-dot.pulse::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  animation: statusPing 1.5s cubic-bezier(0,0,0.2,1) infinite;
}

/* ════════════════════════════════════════
   AVATAR
   ════════════════════════════════════════ */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  background: var(--gradient-btn);
  flex-shrink: 0;
  user-select: none;
}

.avatar-sm { width: 28px; height: 28px; font-size: var(--text-xs); }
.avatar-lg { width: 48px; height: 48px; font-size: var(--text-lg); }

/* ════════════════════════════════════════
   TOOLTIP
   ════════════════════════════════════════ */
[data-tooltip] { position: relative; }

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: var(--text-xs);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
  box-shadow: var(--shadow-md);
  z-index: var(--z-tooltip);
}

[data-tooltip]:hover::after { opacity: 1; }

/* ════════════════════════════════════════
   SECTION HEADER
   ════════════════════════════════════════ */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  background: var(--glow-cyan);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}

.section-title {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
}

/* ════════════════════════════════════════
   GRADIENT DIVIDER
   ════════════════════════════════════════ */
.gradient-divider {
  width: 80px;
  height: 3px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  margin: 0 auto 24px;
}

/* ════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════ */
.footer {
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: var(--leading-relaxed);
  max-width: 280px;
}

.footer-col-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-link {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: 10px;
  transition: color var(--transition-fast);
}
.footer-link:hover { color: var(--accent-cyan); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--transition-fast);
}
.footer-links a:hover { color: var(--accent-cyan); }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
