/* 🎨 DESIGN KIT - Modern Shell Styles */
/* Namespace: [data-ui-skin="app"] */

/* ==========================================
   🎯 MODERN SHELL WRAPPER
   ========================================== */
[data-ui-skin="app"] .modern-shell-wrapper {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ==========================================
   📱 SIDEBAR - Nav-rail vertical
   ========================================== */
[data-ui-skin="app"] .modern-sidebar {
  width: 80px;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
  transition: width 0.3s ease;
}

/* 🔝 Logo superior */
[data-ui-skin="app"] .sidebar-header {
  margin-bottom: 40px;
}

[data-ui-skin="app"] .sidebar-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-ui-skin="app"] .sidebar-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

[data-ui-skin="app"] .logo-text {
  font-size: 18px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.5px;
}

/* 🎯 Nav items */
[data-ui-skin="app"] .sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 0 16px;
}

[data-ui-skin="app"] .sidebar-nav-item {
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

[data-ui-skin="app"] .sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateX(4px);
}

[data-ui-skin="app"] .sidebar-nav-item:active {
  transform: scale(0.95);
}

/* 👤 Avatar inferior */
[data-ui-skin="app"] .sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
}

[data-ui-skin="app"] .sidebar-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-ui-skin="app"] .sidebar-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

/* ==========================================
   🔝 TOPBAR - Barra superior
   ========================================== */
[data-ui-skin="app"] .modern-topbar {
  height: 70px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  z-index: 90;
}

[data-ui-skin="app"] .topbar-title h1 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
  letter-spacing: -0.5px;
}

/* 🔍 Buscador visual */
[data-ui-skin="app"] .topbar-search {
  flex: 1;
  max-width: 500px;
}

[data-ui-skin="app"] .search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 0 12px;
  transition: all 0.2s ease;
}

[data-ui-skin="app"] .search-input-wrapper:focus-within {
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

[data-ui-skin="app"] .search-icon {
  color: #9ca3af;
  flex-shrink: 0;
}

[data-ui-skin="app"] .search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 8px;
  font-size: 14px;
  color: #1a1a2e;
  outline: none;
}

[data-ui-skin="app"] .search-input::placeholder {
  color: #9ca3af;
}

[data-ui-skin="app"] .search-clear {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

[data-ui-skin="app"] .search-clear:hover {
  color: #1a1a2e;
}

/* 📝 Placeholder cuando buscador está desactivado */
[data-ui-skin="app"] .topbar-search-placeholder {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

[data-ui-skin="app"] .search-disabled-hint {
  font-size: 12px;
  color: #9ca3af;
  background: #fef3c7;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 500;
}

/* ==========================================
   📄 CONTENT AREA - Área principal
   ========================================== */
[data-ui-skin="app"] .modern-content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: #f9fafb;
}

[data-ui-skin="app"] .content-wrapper {
  min-height: 100%;
  /* La app del usuario se renderiza aquí sin restricciones */
}

/* ==========================================
   📱 RESPONSIVE - Mobile & Tablet
   ========================================== */

/* 📱 Mobile (< 768px) */
@media (max-width: 767px) {
  /* Sidebar se oculta o se convierte en bottom nav */
  [data-ui-skin="app"] .modern-sidebar {
    display: none; /* Se puede convertir en bottom nav después */
  }

  /* Topbar más compacto */
  [data-ui-skin="app"] .modern-topbar {
    height: 60px;
    padding: 0 16px;
  }

  [data-ui-skin="app"] .topbar-title h1 {
    font-size: 18px;
  }

  /* Ocultar hint del buscador en móvil */
  [data-ui-skin="app"] .search-disabled-hint {
    display: none;
  }

  /* Search más pequeño */
  [data-ui-skin="app"] .topbar-search {
    max-width: 100%;
  }
}

/* 💻 Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  [data-ui-skin="app"] .modern-sidebar {
    width: 70px;
  }

  [data-ui-skin="app"] .sidebar-logo {
    width: 40px;
    height: 40px;
  }

  [data-ui-skin="app"] .logo-text {
    font-size: 16px;
  }

  [data-ui-skin="app"] .sidebar-nav-item,
  [data-ui-skin="app"] .sidebar-avatar {
    width: 40px;
    height: 40px;
  }
}

/* 🖥️ Desktop (> 1024px) */
/* Opcional: Sidebar expandible al hover - Descomentar para activar
@media (min-width: 1024px) {
  [data-ui-skin="app"] .modern-sidebar:hover {
    width: 240px;
  }
}
*/

/* ==========================================
   🎨 SCROLLBAR PERSONALIZADO
   ========================================== */
[data-ui-skin="app"] .modern-content-area::-webkit-scrollbar {
  width: 8px;
}

[data-ui-skin="app"] .modern-content-area::-webkit-scrollbar-track {
  background: transparent;
}

[data-ui-skin="app"] .modern-content-area::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

[data-ui-skin="app"] .modern-content-area::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* ==========================================
   🌙 DARK MODE (opcional para después)
   ========================================== */
/* [data-ui-skin="app"][data-theme="dark"] .modern-topbar {
  background: #1a1a2e;
  border-bottom-color: #2d3748;
}

[data-ui-skin="app"][data-theme="dark"] .topbar-title h1 {
  color: white;
} */

/* ==========================================
   🌟 HERO SECTION - Sprint 2
   ========================================== */
[data-ui-skin="app"] .hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  overflow: hidden;
  min-height: 400px;
}

/* Glow Orbs - Efectos de fondo */
[data-ui-skin="app"] .glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  pointer-events: none;
  animation: float 20s ease-in-out infinite;
}

[data-ui-skin="app"] .glow-orb-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #A07CFE 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

[data-ui-skin="app"] .glow-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #FE8FB5 0%, transparent 70%);
  top: 50%;
  right: -150px;
  animation-delay: 5s;
}

[data-ui-skin="app"] .glow-orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #FFBE7B 0%, transparent 70%);
  bottom: -100px;
  left: 50%;
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Hero Content */
[data-ui-skin="app"] .hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
}

[data-ui-skin="app"] .hero-logo {
  width: 104px;
  height: 104px;
  margin: 0 auto 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

[data-ui-skin="app"] .hero-logo-text {
  font-size: 48px;
  font-weight: 700;
  color: white;
  letter-spacing: -2px;
}

[data-ui-skin="app"] .hero-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

[data-ui-skin="app"] .hero-title {
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1.2;
  color: #111827;
  margin: 0;
}

[data-ui-skin="app"] .hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.6;
  color: #6b7280;
  margin: 0;
}

/* ==========================================
   💬 PROMPT BOX - Sprint 2
   ========================================== */
[data-ui-skin="app"] .prompt-box-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* Prompt Pill */
[data-ui-skin="app"] .prompt-pill {
  width: 100%;
  border-radius: 12px;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

[data-ui-skin="app"] .prompt-pill-inner {
  position: relative;
  border-radius: 12px;
  background: transparent;
}

/* Textarea */
[data-ui-skin="app"] .prompt-textarea {
  width: 100%;
  max-height: 200px;
  min-height: 48px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  font-size: 14px;
  line-height: 1.5;
  color: #111827;
  resize: none;
  outline: none;
  font-family: inherit;
}

[data-ui-skin="app"] .prompt-textarea::placeholder {
  color: #9ca3af;
}

/* Controles */
[data-ui-skin="app"] .prompt-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  gap: 8px;
}

[data-ui-skin="app"] .prompt-controls-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Botón adjuntar */
[data-ui-skin="app"] .prompt-attach-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6b7280;
}

[data-ui-skin="app"] .prompt-attach-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

/* FAB - Botón enviar */
[data-ui-skin="app"] .prompt-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

[data-ui-skin="app"] .prompt-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

[data-ui-skin="app"] .prompt-fab:active {
  transform: scale(0.95);
}

[data-ui-skin="app"] .prompt-fab:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Loader del FAB */
[data-ui-skin="app"] .prompt-loader {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Archivos adjuntos */
[data-ui-skin="app"] .prompt-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

[data-ui-skin="app"] .prompt-file-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f3f4f6;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: #111827;
}

[data-ui-skin="app"] .prompt-file-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-ui-skin="app"] .prompt-file-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s ease;
}

[data-ui-skin="app"] .prompt-file-remove:hover {
  background: #e5e7eb;
  color: #111827;
}

/* Sugerencias (Chips) */
[data-ui-skin="app"] .prompt-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

[data-ui-skin="app"] .suggestion-chip {
  gap: 8px;
  padding: 0 20px;
  font-weight: 400;
  color: #6b7280;
}

/* ==========================================
   🔘 BUTTONS - Sprint 2
   ========================================== */
[data-ui-skin="app"] .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  border-radius: 9999px;
}

[data-ui-skin="app"] .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Variantes */
[data-ui-skin="app"] .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

[data-ui-skin="app"] .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

[data-ui-skin="app"] .btn-ghost {
  background: transparent;
  color: #6b7280;
}

[data-ui-skin="app"] .btn-ghost:hover {
  background: #f3f4f6;
  color: #111827;
}

[data-ui-skin="app"] .btn-outline {
  background: white;
  color: #6b7280;
  border: 2px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-ui-skin="app"] .btn-outline:hover {
  background: #f9fafb;
  color: #111827;
  border-color: #d1d5db;
}

[data-ui-skin="app"] .btn-secondary {
  background: #f3f4f6;
  color: #111827;
}

[data-ui-skin="app"] .btn-secondary:hover {
  background: #e5e7eb;
}

/* Tamaños */
[data-ui-skin="app"] .btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

[data-ui-skin="app"] .btn-default {
  height: 40px;
  padding: 0 16px;
}

[data-ui-skin="app"] .btn-lg {
  height: 44px;
  padding: 0 24px;
  font-size: 16px;
}

[data-ui-skin="app"] .btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
}

/* ==========================================
   🏷️ CHIPS - Sprint 2
   ========================================== */
[data-ui-skin="app"] .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

[data-ui-skin="app"] .chip-clickable {
  cursor: pointer;
}

[data-ui-skin="app"] .chip-clickable:hover {
  transform: translateY(-1px);
}

/* Variantes */
[data-ui-skin="app"] .chip-default {
  background: #f3f4f6;
  color: #6b7280;
}

[data-ui-skin="app"] .chip-primary {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

[data-ui-skin="app"] .chip-secondary {
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
}

[data-ui-skin="app"] .chip-outline {
  background: white;
  border: 1px solid #e5e7eb;
  color: #6b7280;
}

/* Tamaños */
[data-ui-skin="app"] .chip-sm {
  padding: 4px 8px;
  font-size: 11px;
}

[data-ui-skin="app"] .chip-default {
  padding: 6px 12px;
  font-size: 13px;
}

[data-ui-skin="app"] .chip-lg {
  padding: 8px 16px;
  font-size: 14px;
}

[data-ui-skin="app"] .chip-icon {
  display: flex;
  align-items: center;
}

[data-ui-skin="app"] .chip-text {
  line-height: 1;
}

/* ==========================================
   📱 RESPONSIVE - Sprint 2
   ========================================== */
@media (max-width: 767px) {
  [data-ui-skin="app"] .hero-title {
    font-size: 2rem;
  }

  [data-ui-skin="app"] .hero-subtitle {
    font-size: 1rem;
  }

  [data-ui-skin="app"] .hero-logo {
    width: 80px;
    height: 80px;
  }

  [data-ui-skin="app"] .hero-logo-text {
    font-size: 36px;
  }

  [data-ui-skin="app"] .prompt-suggestions {
    gap: 6px;
  }

  [data-ui-skin="app"] .suggestion-chip {
    font-size: 12px;
    padding: 0 12px;
  }
}

/* ==========================================
   ✨ ANIMATIONS - Sprint 2
   ========================================== */
@keyframes shine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

[data-ui-skin="app"] .motion-safe\:animate-shine {
  animation: shine var(--duration, 14s) linear infinite;
}


/* ========================================
   🎨 SPRINT 3 - TRIP CARDS MODERN
   ======================================== */

[data-ui-skin="app"] .trip-card-modern {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

[data-ui-skin="app"] .trip-card-modern:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

/* Stack Images - Efecto Polaroid */
[data-ui-skin="app"] .stack-image {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid;
}

[data-ui-skin="app"] .stack-image-1 {
  transform: rotate(-6deg);
  z-index: 20;
  opacity: 0.5;
  border-color: #e5e7eb;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

[data-ui-skin="app"] .stack-image-2 {
  transform: rotate(-3deg);
  z-index: 30;
  opacity: 0.7;
  border-color: #e5e7eb;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

[data-ui-skin="app"] .stack-image-3 {
  transform: rotate(0deg);
  z-index: 40;
  border-color: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Tags pastel */
[data-ui-skin="app"] .tag-pastel {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 9999px;
  display: inline-block;
}

[data-ui-skin="app"] .tag-fuchsia {
  background-color: #fce7f3;
  color: #831843;
}

[data-ui-skin="app"] .tag-indigo {
  background-color: #e0e7ff;
  color: #3730a3;
}

[data-ui-skin="app"] .tag-emerald {
  background-color: #d1fae5;
  color: #065f46;
}

[data-ui-skin="app"] .tag-blue {
  background-color: #dbeafe;
  color: #1e40af;
}

[data-ui-skin="app"] .tag-amber {
  background-color: #fef3c7;
  color: #78350f;
}

[data-ui-skin="app"] .tag-sky {
  background-color: #e0f2fe;
  color: #075985;
}