/* ==========================================================================
   JAI - Asistente Diabetes T1 - Estilos Principales
   ========================================================================== */

/* Variables CSS - Modo Claro (por defecto) */
:root {
  /* Colores principales */
  --bg: #f7f4ee;
  --bg-2: #f1f6f3;
  --surface: #ffffff;
  --surface-2: #f8faf8;
  --ink: #17212a;
  --muted: #5c6b75;
  --accent: #0f766e;
  --accent-light: #22c55e;
  --accent-2: #f97316;
  --accent-3: #2563eb;
  --danger: #dc2626;
  --warning: #f59e0b;
  --border: rgba(23, 33, 42, 0.12);
  --shadow: 0 22px 48px rgba(15, 23, 42, 0.12);
  --shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.08);

  /* Espaciado y bordes */
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 8px;

  /* Transiciones */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;

  /* Z-index layers */
  --z-sticky: 10;
  --z-modal: 100;
  --z-toast: 200;
}

/* Modo Oscuro */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --bg-2: #1e293b;
    --surface: #1e293b;
    --surface-2: #334155;
    --ink: #f1f5f9;
    --muted: #94a3b8;
    --border: rgba(148, 163, 184, 0.2);
    --shadow: 0 22px 48px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.3);
  }
}

/* Clase para forzar modo oscuro */
[data-theme="dark"] {
  --bg: #0f172a;
  --bg-2: #1e293b;
  --surface: #1e293b;
  --surface-2: #334155;
  --ink: #f1f5f9;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.2);
  --shadow: 0 22px 48px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.3);
}

/* Clase para forzar modo claro */
[data-theme="light"] {
  --bg: #f7f4ee;
  --bg-2: #f1f6f3;
  --surface: #ffffff;
  --surface-2: #f8faf8;
  --ink: #17212a;
  --muted: #5c6b75;
  --border: rgba(23, 33, 42, 0.12);
  --shadow: 0 22px 48px rgba(15, 23, 42, 0.12);
  --shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.08);
}

/* ==========================================================================
   Reset y Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 8% -10%, rgba(15, 118, 110, 0.18), transparent 60%),
    radial-gradient(900px 400px at 96% 0%, rgba(249, 115, 22, 0.18), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  padding: 24px;
  line-height: 1.5;
}

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

/* Focus visible para accesibilidad */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Screen reader only (accessibility) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link para accesibilidad */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  z-index: var(--z-modal);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 10px;
}

/* ==========================================================================
   Layout Principal
   ========================================================================== */
.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: riseIn 0.6s ease;
}

/* ==========================================================================
   Topbar / Header
   ========================================================================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.logo-circle {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: conic-gradient(from 120deg, #0f766e, #22c55e, #f97316, #0f766e);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 22px;
  color: #0f172a;
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.2);
  flex-shrink: 0;
}

.brand-name {
  font-family: "Fraunces", "Space Grotesk", serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.05;
}

.tagline {
  color: var(--muted);
  font-size: 14px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Status chip */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  transition: background var(--transition-fast);
}

.status-dot.ok { background: #22c55e; }
.status-dot.warn { background: #f59e0b; }
.status-dot.error { background: #f87171; }
.status-dot.idle { background: #94a3b8; }

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}

.theme-toggle button {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 16px;
  transition: background var(--transition-fast);
}

.theme-toggle button.active {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.theme-toggle button:hover:not(.active) {
  background: var(--border);
}

/* ==========================================================================
   Botones
   ========================================================================== */
.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #ffffff;
  box-shadow: 0 14px 24px rgba(15, 118, 110, 0.22);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--accent-2), #fb923c);
  color: #ffffff;
  box-shadow: 0 14px 24px rgba(249, 115, 22, 0.22);
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

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

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

/* Loading state para botones */
.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  flex-shrink: 0;
}

.icon-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--surface);
}

.icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

.hero-copy, .alert-banner {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.hero-copy {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), var(--surface));
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}

.hero-title {
  font-family: "Fraunces", "Space Grotesk", serif;
  font-size: 32px;
  margin: 8px 0 10px;
}

.hero-text {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tag {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  background: var(--surface);
}

.alert-banner {
  background: linear-gradient(145deg, rgba(249, 115, 22, 0.12), rgba(15, 118, 110, 0.12));
}

.alert-title {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--accent);
}

/* ==========================================================================
   Tabs
   ========================================================================== */
.tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tab-group {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  gap: 6px;
}

.tab-group[role="tablist"] {
  /* Accesibilidad */
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.tab-btn:hover:not(.active) {
  color: var(--ink);
}

.tab-btn.active,
.tab-btn[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.save-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.save-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* ==========================================================================
   Panel / Secciones
   ========================================================================== */
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  animation: floatIn 0.5s ease;
}

.panel[hidden] {
  display: none;
}

/* ==========================================================================
   Chat View
   ========================================================================== */
#chat-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 60vh;
}

#analysis-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.chat-actions {
  display: flex;
  gap: 8px;
}

.chat-log {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 320px;
  max-height: 520px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  scroll-behavior: smooth;
}

/* Scroll to bottom button */
.scroll-bottom-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  z-index: var(--z-sticky);
  transition: transform var(--transition-fast);
}

.scroll-bottom-btn.visible {
  display: flex;
}

.scroll-bottom-btn:hover {
  transform: scale(1.1);
}

/* Chat bubbles */
.bubble {
  padding: 12px 14px;
  border-radius: 16px;
  max-width: 78%;
  line-height: 1.5;
  white-space: pre-wrap;
  box-shadow: var(--shadow-sm);
  animation: bubbleIn 0.3s ease;
  word-wrap: break-word;
}

.bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #ffffff;
}

.bubble.assistant {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
}

/* Typing indicator */
.bubble.typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 16px 20px;
}

.bubble.typing .dot {
  width: 8px;
  height: 8px;
  background: var(--muted);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite;
}

.bubble.typing .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.bubble.typing .dot:nth-child(3) {
  animation-delay: 0.4s;
}

/* Composer */
.composer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  position: sticky;
  bottom: 0;
  z-index: var(--z-sticky);
}

.composer .field {
  flex: 0 0 auto;
}

.composer select {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 14px;
  height: 100%;
  min-height: 48px;
}

.input-bubble {
  flex: 1;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.input-bubble textarea {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink);
  min-height: 40px;
  max-height: 120px;
  resize: vertical;
  font-size: 15px;
  line-height: 1.4;
}

.input-bubble textarea:focus {
  outline: none;
}

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

.send-btn {
  min-width: 100px;
  align-self: stretch;
}

/* Chips / Attachments */
.chips-area {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  padding: 10px;
  border-radius: 12px;
  min-height: 44px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  color: var(--ink);
}

.chip button {
  background: transparent;
  border: none;
  color: var(--danger);
  font-weight: 800;
  cursor: pointer;
  padding: 0 4px;
}

.chip button:hover {
  transform: scale(1.2);
}

/* Status texts */
.audio-status,
.muted-text {
  color: var(--muted);
  font-size: 12px;
}

.error-text {
  color: var(--danger);
  font-size: 13px;
  min-height: 16px;
}

/* ==========================================================================
   Analysis View
   ========================================================================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field label {
  font-weight: 600;
  font-size: 13px;
  display: block;
}

.field select {
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}

.inline-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

/* Stat cards with skeleton loading */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  position: relative;
  overflow: hidden;
  animation: floatIn 0.5s ease;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 3px solid rgba(15, 118, 110, 0.4);
  pointer-events: none;
}

.stat-card.tir::after {
  border-top-color: var(--accent-light);
}

.stat-card.gmi::after {
  border-top-color: var(--accent-2);
}

.stat-card.media::after {
  border-top-color: var(--accent-3);
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface-2) 25%,
    var(--border) 50%,
    var(--surface-2) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-xs);
}

.skeleton-text {
  height: 1em;
  width: 80%;
}

.skeleton-value {
  height: 1.5em;
  width: 60%;
  margin-top: 4px;
}

/* Chart container */
.chart-container {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 12px 0;
  min-height: 300px;
  position: relative;
}

.chart-container canvas {
  max-height: 280px;
}

.chart-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.chart-tab {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chart-tab.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* List blocks */
.list-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.list-block h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.list-block ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Report box */
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.report-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  min-height: 90px;
  white-space: pre-wrap;
  margin-top: 8px;
}

.report-box.loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Modal
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: var(--z-modal);
  backdrop-filter: blur(4px);
}

.modal.open {
  display: flex;
}

.modal-card {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 18px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow);
  animation: floatIn 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.modal-header h3 {
  margin: 0;
  font-family: "Fraunces", "Space Grotesk", serif;
}

.modal-body p {
  margin: 8px 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

.toast.success {
  border-left: 4px solid var(--accent-light);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.warning {
  border-left: 4px solid var(--warning);
}

.toast.info {
  border-left: 4px solid var(--accent-3);
}

.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.toast-message {
  font-size: 13px;
  color: var(--muted);
}

.toast-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  font-size: 18px;
}

.toast.hiding {
  animation: slideOut 0.3s ease forwards;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.foot-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .composer {
    flex-direction: column;
  }

  .composer .field {
    width: 100%;
  }

  .composer select {
    width: 100%;
  }

  .input-bubble {
    min-width: 100%;
  }

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

@media (max-width: 720px) {
  body {
    padding: 0;
  }

  .app-shell {
    padding: 12px;
    border-radius: 0;
    min-height: 100dvh;
    gap: 10px;
  }

  .topbar {
    gap: 8px;
  }

  .logo-circle {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 18px;
  }

  .brand-name {
    font-size: 22px;
  }

  .tagline {
    display: none;
  }

  .theme-toggle {
    display: none;
  }

  .hero {
    display: none;
  }

  .tabs {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .tab-group {
    width: 100%;
    justify-content: space-between;
  }

  .panel {
    padding: 12px;
  }

  #chat-view {
    min-height: auto;
    gap: 8px;
  }

  .chat-header {
    display: none;
  }

  .chat-log {
    min-height: 22vh;
    max-height: 30vh;
    padding: 12px;
  }

  .composer {
    gap: 8px;
    padding: 10px;
  }

  .input-bubble {
    min-height: 56px;
  }

  .chips-area {
    min-height: 28px;
    padding: 8px;
  }

  #audio-status,
  #attach-status {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  #report-btn {
    width: 100%;
  }

  .toast-container {
    left: 10px;
    right: 10px;
    max-width: none;
  }

  .foot-note {
    display: none;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-4px);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  body {
    background: white;
    padding: 0;
  }

  .app-shell {
    box-shadow: none;
    border: none;
  }

  .topbar,
  .tabs,
  .composer,
  .toast-container,
  .modal {
    display: none !important;
  }

  .chat-log {
    max-height: none;
    overflow: visible;
  }
}
