/* 
================================================================
  WEBSCREATOR - CSS PRINCIPAL DE LA INTERFAZ DE CONTROL (SaaS)
  Estilo Premium, Glassmorphism, Micro-animaciones, Responsivo
================================================================
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Paleta de colores - Panel de Control (Dark Mode Premium) */
  --panel-bg: #0b0f19;
  --sidebar-bg: rgba(15, 23, 42, 0.95);
  --card-bg: rgba(30, 41, 59, 0.45);
  --card-hover: rgba(30, 41, 59, 0.7);
  --accent: #6366f1; /* Indigo */
  --accent-glow: rgba(99, 102, 241, 0.2);
  --accent-light: #818cf8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  
  --font-panel: 'Outfit', sans-serif;
  --font-sub: 'Plus Jakarta Sans', sans-serif;
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  --sidebar-width: 400px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-panel);
  background-color: var(--panel-bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 
=========================================
  ESTRUCTURA PRINCIPAL (LAYOUT)
=========================================
*/

#app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* 
=========================================
  BARRA LATERAL DE CONTROL (SIDEBAR)
=========================================
*/

aside.sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

aside.sidebar::-webkit-scrollbar {
  width: 4px;
}

aside.sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(255,255,255,0.1);
  border-radius: 4px;
}

/* Cabecera Sidebar */
.sidebar-header {
  padding: 1.75rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}
.brand-name {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.api-settings-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.api-settings-btn:hover {
  background: var(--card-hover);
  border-color: var(--accent);
}

/* Bloques de Configuración */
.sidebar-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex-grow: 1;
}

.config-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.config-section-title {
  font-family: var(--font-sub);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-light);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Componentes de Input */
.input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

label.input-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.search-container {
  position: relative;
  display: flex;
  width: 100%;
}

.search-input {
  width: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background-color: rgba(15, 23, 42, 0.9);
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

/* Sugerencias de Autocompletado */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-top: 0.5rem;
  max-height: 250px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: var(--shadow-lg);
  display: none;
}

.autocomplete-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background-color 0.2s;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background-color: rgba(99, 102, 241, 0.15);
}

.autocomplete-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #ffffff;
}

.autocomplete-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* Controles de Estilos */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.theme-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s ease;
}

.theme-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.6);
}

.theme-card.active {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

.theme-preview-box {
  height: 40px;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.theme-card span {
  font-size: 0.8rem;
  font-weight: 600;
}

/* Personalizar Controles */
select.panel-select {
  width: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

select.panel-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Selector de Color Integrado */
.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.color-input-custom {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 42px;
  height: 42px;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

.color-input-custom::-webkit-color-swatch {
  border-radius: 50%;
  border: 2px solid var(--border-color);
}

.color-presets {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.color-preset-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s;
}

.color-preset-dot:hover {
  transform: scale(1.15);
}

.color-preset-dot.active {
  border-color: #ffffff;
  box-shadow: 0 0 8px rgba(255,255,255,0.4);
}

/* Interruptores de Secciones (Toggles) */
.toggle-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.toggle-item:last-child {
  border-bottom: none;
}

.toggle-label {
  font-size: 0.9rem;
  color: var(--text-main);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

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

.slider-switch {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 34px;
}

.slider-switch:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

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

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

/* Área de Textos Editables */
.editable-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.editable-textarea {
  width: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
}

.editable-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* Botón Generar / Descargar */
.btn-generate {
  width: 100%;
  background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%);
  color: #ffffff;
  border: none;
  padding: 1rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, #4f46e5 0%, var(--accent) 100%);
}

.btn-generate:active {
  transform: translateY(0);
}

.btn-export-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.btn-secondary {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.65rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.btn-secondary:hover {
  background: var(--card-hover);
  border-color: var(--accent);
}

/* 
=========================================
  ÁREA DE PREVISUALIZACIÓN (PREVIEW WORKSPACE)
=========================================
*/

main.preview-area {
  flex-grow: 1;
  height: 100%;
  background-color: #0f131f;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Barra de Herramientas Vista Previa */
.preview-toolbar {
  height: 64px;
  background-color: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 5;
}

.viewport-controls {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.25rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.viewport-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.viewport-btn:hover {
  color: var(--text-main);
}

.viewport-btn.active {
  background-color: var(--accent);
  color: #ffffff;
}

.preview-actions {
  display: flex;
  gap: 0.75rem;
}

/* Canvas del iframe */
.preview-canvas {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  overflow: auto;
  position: relative;
}

/* Simulación de Marco de Dispositivo */
.device-wrapper {
  background-color: #1e293b;
  border-radius: 20px;
  padding: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  border: 4px solid #334155;
  position: relative;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

/* Estado de los dispositivos */
.device-wrapper.desktop {
  width: 100%;
  height: 100%;
  max-width: 1280px;
  max-height: 800px;
  border-radius: 12px;
  padding: 0;
  border: none;
}

.device-wrapper.tablet {
  width: 768px;
  height: 90%;
  max-height: 960px;
}

.device-wrapper.mobile {
  width: 375px;
  height: 80%;
  max-height: 740px;
  border-radius: 36px;
  padding: 20px 12px;
}

/* Botón home / altavoz ficticio para el móvil */
.device-wrapper.mobile::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: #475569;
  border-radius: 2px;
}

.device-wrapper.mobile::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border: 1px solid #475569;
  border-radius: 50%;
}

.preview-iframe {
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  border: none;
  border-radius: 8px;
}

.device-wrapper.desktop .preview-iframe {
  border-radius: 0px;
}

/* Pantalla de Bienvenida Inicial */
.welcome-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0b0f19;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 4;
  text-align: center;
  padding: 2rem;
  gap: 1.5rem;
}

.welcome-logo {
  font-size: 4rem;
  animation: pulseGlow 3s infinite alternate;
}

.welcome-title {
  font-size: 2.2rem;
  font-weight: 800;
  max-width: 600px;
}

.welcome-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 480px;
}

/* 
=========================================
  SKELETON / LOADING OVERLAY
=========================================
*/

#loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(11, 15, 25, 0.95);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  gap: 1.5rem;
}

.spinner {
  width: 64px;
  height: 64px;
  border: 4px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

.loading-text {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.loading-steps {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* 
=========================================
  MODALES DE DIÁLOGO (API KEY CONFIG)
=========================================
*/

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: #fff;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* 
=========================================
  ANIMACIONES
=========================================
*/

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

@keyframes pulseGlow {
  0% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.2)); }
  100% { transform: scale(1.05); filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.6)); }
}

/* Mensajes tipo Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #10B981;
  color: #ffffff;
  padding: 1rem 1.75rem;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  z-index: 500;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.active {
  transform: translateY(0);
  opacity: 1;
}

.toast.error {
  background-color: #EF4444;
}

/* Contenedor de Confeti */
.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}

/* 
=========================================
  MEJORAS CMS: ACORDEÓN COLAPSABLE
=========================================
*/

.cms-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.cms-accordion-item {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: rgba(15, 23, 42, 0.4);
  overflow: hidden;
  transition: all 0.3s ease;
}

.cms-accordion-item.active {
  border-color: var(--accent);
  background-color: rgba(15, 23, 42, 0.8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cms-accordion-header {
  padding: 0.85rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background-color 0.2s;
}

.cms-accordion-header:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.cms-accordion-header::after {
  content: '▼';
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.cms-accordion-item.active .cms-accordion-header::after {
  transform: rotate(180deg);
  color: var(--accent-light);
}

.cms-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cms-accordion-item.active .cms-accordion-content {
  max-height: 1200px; /* Suficiente para expandir contenidos */
  border-top: 1px solid var(--border-color);
}

.cms-accordion-inner {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Sub-ítems editables (Servicios/Opiniones) */
.cms-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cms-item-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.cms-row-inputs {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.btn-confirm-search {
  width: 100%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  padding: 0.75rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.btn-confirm-search:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(37, 99, 235, 0.45);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-confirm-search:disabled {
  background: #1e293b;
  color: #475569;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* 
=========================================
  BARRA DE PESTAÑAS MÓVIL (TABS)
=========================================
*/

.mobile-tab-bar {
  display: none;
  height: 60px;
  background-color: #0f172a;
  border-bottom: 1px solid var(--border-color);
  justify-content: space-around;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 150;
  width: 100%;
}

.mobile-tab {
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
}

.mobile-tab.active {
  color: var(--accent-light);
  border-bottom-color: var(--accent);
  background-color: rgba(99, 102, 241, 0.05);
}

/* 
=========================================
  RESPONSIVIDAD AVANZADA (MOBILE)
=========================================
*/

@media (max-width: 900px) {
  #app-container {
    flex-direction: column;
    overflow-y: auto;
  }

  .mobile-tab-bar {
    display: none !important; /* Ocultar barra de pestañas móvil */
  }

  aside.sidebar {
    width: 100%;
    height: auto;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    overflow-y: visible; /* Permitir scroll fluido del panel lateral */
  }

  main.preview-area {
    width: 100%;
    height: 700px; /* Altura dedicada premium para visualizar el simulador */
    border-top: 1px solid var(--border-color);
  }

  /* Mostrar ambos paneles secuencialmente en móvil en columna única */
  #app-container.tab-preview aside.sidebar,
  #app-container.tab-config aside.sidebar {
    display: flex !important;
  }

  #app-container.tab-preview main.preview-area,
  #app-container.tab-config main.preview-area {
    display: flex !important;
  }

  .preview-canvas {
    padding: 1.5rem;
  }

  .device-wrapper.tablet {
    width: 100%;
    height: 95%;
  }

  .device-wrapper.mobile {
    width: 100%;
    max-width: 375px;
    height: 95%;
  }

  .preview-toolbar {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .sidebar-header {
    padding: 1.25rem 1rem;
  }
  
  .sidebar-content {
    padding: 1rem;
    gap: 1.2rem;
  }

  .theme-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn-export-group {
    grid-template-columns: 1fr;
  }
}

