/* ============================================================
   Prospector — paleta Sail Away
   Fuente: docs/mockup-onboarding-v5.html
   ============================================================ */

:root {
  --naranja: #f98452;
  --naranja-hover: #e57342;
  --naranja-claro: #fef6f1;
  --azul: #1c2c4a;
  --azul-hover: #142039;
  --arena: #cb9b82;
  --arena-claro: #f5ebe2;
  --gris-bg: #f7f7f5;
  --gris-borde: #e5e5e0;
  --gris-texto: #6b6b6b;
  --gris-texto-claro: #9a9a95;
  --blanco: #ffffff;
  --verde: #4ade80;
  --verde-claro: #f0fdf4;
  --rojo: #ef4444;
  --rojo-claro: #fef2f2;

  --radius-sm: 6px;
  --radius-md: 9px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(28, 44, 74, 0.06);
  --shadow-md: 0 4px 12px rgba(28, 44, 74, 0.08);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gris-bg);
  color: var(--azul);
  min-height: 100vh;
  line-height: 1.5;
  font-size: 15px;
}

a { color: var(--naranja); text-decoration: none; }
a:hover { color: var(--naranja-hover); text-decoration: underline; }

h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
h2 { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
p { margin-bottom: 12px; }
.muted { color: var(--gris-texto); }
.muted.small { font-size: 13px; }

/* ============================================================
   Botones
   ============================================================ */
.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
}
.btn-primary {
  background: var(--naranja);
  color: var(--blanco);
}
.btn-primary:hover:not(:disabled) {
  background: var(--naranja-hover);
  color: var(--blanco);
  text-decoration: none;
}
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-secondary {
  background: var(--blanco);
  color: var(--azul);
  border-color: var(--gris-borde);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--gris-bg);
}
.btn-ghost {
  background: transparent;
  color: var(--azul);
  font-weight: 500;
  padding: 8px 12px;
}
.btn-ghost:hover {
  background: var(--gris-bg);
  text-decoration: none;
}
.btn-primary:active,
.btn-secondary:active,
.btn-ghost:active { transform: translateY(1px); }

/* ============================================================
   Public layout (landing, login, etc.)
   ============================================================ */
.layout-public {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--gris-bg) 0%, var(--arena-claro) 100%);
  padding: 24px 16px;
}
.public-main {
  width: 100%;
  max-width: 480px;
}

.landing,
.auth-card {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
}
.landing { padding: 36px 32px; }

.landing-card { display: contents; }

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.brand-name {
  font-size: 16px;
  font-weight: 700;
}
.logo-dot {
  width: 26px;
  height: 26px;
  background: var(--naranja);
  color: var(--blanco);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}
.logo-dot--large {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

.landing h1,
.auth-card h1 {
  margin-bottom: 12px;
}
.landing .lead {
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--azul);
}
.landing-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
}
.landing-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--gris-texto-claro);
}

/* ============================================================
   Forms
   ============================================================ */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0;
}
.form-stack label {
  font-size: 13px;
  font-weight: 600;
  color: var(--azul);
}
.form-stack input[type="email"],
.form-stack input[type="text"],
.form-stack textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 11px 14px;
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius-md);
  background: var(--blanco);
  color: var(--azul);
  width: 100%;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-stack input:focus {
  border-color: var(--naranja);
  box-shadow: 0 0 0 3px var(--naranja-claro);
}
.form-stack button[type="submit"] {
  margin-top: 8px;
}

/* ============================================================
   Flash messages
   ============================================================ */
.flash-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.flash {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  border: 1px solid transparent;
}
.flash--success {
  background: var(--verde-claro);
  border-color: var(--verde);
  color: #166534;
}
.flash--error {
  background: var(--rojo-claro);
  border-color: var(--rojo);
  color: #991b1b;
}
.flash--info {
  background: var(--arena-claro);
  border-color: var(--arena);
  color: var(--azul);
}
.flash--warning {
  background: #fff7ed;
  border-color: #fb923c;
  color: #9a3412;
}

/* ============================================================
   App layout (autenticado)
   ============================================================ */
.layout-app { background: var(--gris-bg); }

.app-topbar {
  background: var(--blanco);
  border-bottom: 1px solid var(--gris-borde);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.app-topbar .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--gris-texto);
}
.app-topbar .user-email {
  display: none;
}
@media (min-width: 600px) {
  .app-topbar .user-email { display: inline; }
}
.app-topbar .user-avatar {
  width: 30px;
  height: 30px;
  background: var(--arena);
  color: var(--blanco);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}
.logout-form { margin: 0; }

.app-main { min-height: calc(100vh - 60px); }

/* ============================================================
   Workspace
   ============================================================ */
.workspace {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}
.ws-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.ws-header h1 { margin-bottom: 4px; }
.ws-header .ws-subtitle {
  font-size: 14px;
  color: var(--gris-texto);
}
.ws-actions { display: flex; gap: 10px; }

.empty-state {
  background: var(--blanco);
  border: 1px dashed var(--gris-borde);
  border-radius: var(--radius-lg);
  padding: 56px 32px;
  text-align: center;
}
.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.empty-state h2 {
  margin-bottom: 12px;
  font-weight: 600;
}
.empty-state p {
  max-width: 480px;
  margin: 0 auto 8px;
}
.empty-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ============================================================
   Productos y segmentos
   ============================================================ */
.workspace-productos {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-group {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.product-group:hover {
  box-shadow: var(--shadow-sm);
}

.product-header {
  padding: 16px 20px;
  background: linear-gradient(180deg, var(--blanco) 0%, var(--gris-bg) 100%);
  border-bottom: 1px solid var(--gris-borde);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.product-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.product-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  background: var(--arena-claro);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.product-nombre {
  font-size: 16px;
  font-weight: 600;
  color: var(--azul);
  margin: 0;
  line-height: 1.3;
}
.product-meta {
  font-size: 13px;
  color: var(--gris-texto);
  margin: 2px 0 0;
}
.product-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.product-body {
  padding: 12px 20px 16px;
}
.segmentos-empty {
  padding: 12px 0;
}
.segmentos-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.segmento-card {
  background: var(--gris-bg);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: transform 0.05s, box-shadow 0.15s, background 0.15s;
}
.segmento-card:hover {
  background: var(--blanco);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.segmento-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.segmento-nombre {
  font-size: 14px;
  font-weight: 600;
  color: var(--azul);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.segmento-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge--gris {
  background: var(--gris-bg);
  color: var(--gris-texto);
  border-color: var(--gris-borde);
}
.badge--verde {
  background: var(--verde-claro);
  color: #166534;
  border-color: var(--verde);
}
.badge--naranja {
  background: var(--naranja-claro);
  color: var(--naranja-hover);
  border-color: var(--naranja);
}

.btn-icon {
  background: transparent;
  border: 1px solid transparent;
  color: var(--gris-texto);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-icon:hover {
  background: var(--gris-bg);
  color: var(--azul);
  border-color: var(--gris-borde);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.add-segmento-btn {
  width: 100%;
  background: transparent;
  border: 1px dashed var(--gris-borde);
  border-radius: var(--radius-md);
  padding: 10px;
  color: var(--gris-texto);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.add-segmento-btn:hover {
  border-color: var(--naranja);
  color: var(--naranja);
  background: var(--naranja-claro);
}

.add-producto-card {
  width: 100%;
  background: transparent;
  border: 1px dashed var(--gris-borde);
  border-radius: var(--radius-lg);
  padding: 22px;
  color: var(--gris-texto);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.add-producto-card:hover {
  border-color: var(--naranja);
  color: var(--naranja);
  background: var(--naranja-claro);
}

/* ============================================================
   Modales (HTMX swap into #modal-container)
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 44, 74, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: overlayIn 0.15s ease-out;
}
@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--blanco);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  animation: modalIn 0.18s ease-out;
}
@keyframes modalIn {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gris-borde);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.modal-header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}
.modal-header .muted {
  margin: 4px 0 0;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--gris-texto);
  padding: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
}
.modal-close:hover {
  background: var(--gris-bg);
  color: var(--azul);
}

.modal-body {
  padding: 20px 24px 24px;
  overflow-y: auto;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.modal-actions-right {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.btn-danger-ghost {
  background: transparent;
  color: var(--rojo);
  border: 1px solid transparent;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.btn-danger-ghost:hover {
  background: var(--rojo-claro);
  border-color: var(--rojo);
}

textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 11px 14px;
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius-md);
  background: var(--blanco);
  color: var(--azul);
  width: 100%;
  outline: none;
  resize: vertical;
  min-height: 60px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea:focus {
  border-color: var(--naranja);
  box-shadow: 0 0 0 3px var(--naranja-claro);
}

input[type="file"] {
  font-family: inherit;
  font-size: 14px;
  padding: 8px;
  border: 1px dashed var(--gris-borde);
  border-radius: var(--radius-md);
  background: var(--gris-bg);
  color: var(--azul);
  width: 100%;
  cursor: pointer;
}
input[type="file"]:hover {
  border-color: var(--naranja);
  background: var(--naranja-claro);
}

/* ============================================================
   Tabs del modal Agregar producto
   ============================================================ */
.modo-tabs {
  display: flex;
  gap: 4px;
  background: var(--gris-bg);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}
.modo-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--gris-texto);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.modo-tab:hover:not(.modo-tab--active) {
  color: var(--azul);
}
.modo-tab--active {
  background: var(--blanco);
  color: var(--azul);
  box-shadow: var(--shadow-sm);
}

.modo-panel[hidden] { display: none; }

/* HTMX indicator (spinner) */
.htmx-indicator {
  display: none;
  font-size: 13px;
  color: var(--gris-texto);
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline;
}

/* ============================================================
   Preview de segmentos detectados desde XLSX
   ============================================================ */
.preview-segmentos {
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 4px 0;
}
.preview-segmentos legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--azul);
  padding: 0 6px;
}
.preview-segmento {
  padding: 10px 0;
  border-bottom: 1px solid var(--gris-borde);
}
.preview-segmento:last-child {
  border-bottom: none;
}
.preview-segmento-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.preview-segmento-row input[type="checkbox"] {
  margin-top: 6px;
  flex-shrink: 0;
}
.preview-segmento-info {
  flex: 1;
  min-width: 0;
}
.preview-segmento-nombre {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  padding: 6px 10px !important;
}
.preview-segmento-meta {
  font-size: 12px;
  color: var(--gris-texto);
  margin: 4px 0 6px;
  line-height: 1.4;
}

/* ============================================================
   Chat de refinamiento
   ============================================================ */
.layout-chat {
  height: 100vh;
  overflow: hidden;
}
.chat-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.chat-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: var(--blanco);
  border-bottom: 1px solid var(--gris-borde);
  flex-shrink: 0;
}
.chat-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  min-width: 0;
  text-align: center;
}
.chat-title strong {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40vw;
}
.chat-fase {
  font-size: 12px;
  font-weight: 600;
  color: var(--naranja-hover);
  background: var(--naranja-claro);
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.chat-fase--listo {
  color: #166534;
  background: var(--verde-claro);
}

/* ============================================================
   Exportación
   ============================================================ */
.export-opciones {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}
.export-opcion {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--azul);
  transition: border-color 0.15s, background 0.15s;
}
.export-opcion:hover {
  border-color: var(--naranja);
  background: var(--naranja-claro);
  text-decoration: none;
}
.export-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--azul);
  color: white;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.export-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.export-errores {
  text-align: left;
  margin: 16px auto;
  max-width: 520px;
  font-size: 13px;
  color: #991b1b;
  background: var(--rojo-claro);
  border: 1px solid var(--rojo);
  border-radius: var(--radius-md);
  padding: 12px 16px 12px 32px;
}
.md-preview {
  background: var(--gris-bg);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 55vh;
  overflow-y: auto;
  color: var(--azul);
}
.segmento-detalle { margin-bottom: 8px; }

.chat-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 340px;
  min-height: 0;
}

.chat-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--gris-borde);
}

.chat-mensajes {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
}

.msg {
  display: flex;
  gap: 10px;
  max-width: 88%;
}
.msg--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.msg--assistant {
  align-self: flex-start;
}
.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--naranja);
  color: white;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.msg-bubble {
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.55;
}
.msg--user .msg-bubble {
  background: var(--azul);
  color: white;
  border-bottom-right-radius: 4px;
}
.msg--assistant .msg-bubble {
  background: var(--gris-bg);
  color: var(--azul);
  border-bottom-left-radius: 4px;
}
.msg-bubble strong { font-weight: 700; }
.msg-cursor {
  display: inline-block;
  animation: blink 1s steps(2, start) infinite;
  color: var(--naranja);
  font-weight: 400;
}
@keyframes blink { to { visibility: hidden; } }

.chat-input-bar {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid var(--gris-borde);
  background: var(--blanco);
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
}
.chat-input-bar textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 160px;
  border-radius: 12px;
  font-size: 14.5px;
}
.btn-send {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 18px;
  padding: 0;
  flex-shrink: 0;
}
#chat-guardar {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Panel lateral */
.chat-panel {
  overflow-y: auto;
  background: var(--blanco);
  display: flex;
  flex-direction: column;
}
.panel-tabs {
  display: flex;
  position: sticky;
  top: 0;
  background: var(--blanco);
  border-bottom: 1px solid var(--gris-borde);
  z-index: 2;
}
.panel-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--gris-texto);
  cursor: pointer;
}
.panel-tab--active {
  color: var(--naranja-hover);
  border-bottom-color: var(--naranja);
}
.panel-content {
  padding: 16px;
}
.panel-section h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gris-texto-claro);
  margin: 16px 0 6px;
}
.panel-section h4:first-child { margin-top: 0; }
.panel-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  font-size: 13px;
}
.panel-dl dt {
  color: var(--gris-texto);
  font-weight: 500;
}
.panel-dl dd {
  color: var(--azul);
  word-break: break-word;
}
.panel-list {
  list-style: none;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.panel-list li {
  padding: 6px 8px;
  background: var(--gris-bg);
  border-radius: 6px;
}
.panel-pendiente {
  color: var(--gris-texto-claro);
  font-style: italic;
  font-size: 13px;
}

@media (max-width: 880px) {
  .chat-grid { grid-template-columns: 1fr; }
  .chat-panel { display: none; }
}

/* ============================================================
   Páginas de error
   ============================================================ */
.error-card { text-align: center; }
.error-codigo {
  font-size: 56px;
  font-weight: 800;
  color: var(--naranja);
  line-height: 1;
  margin: 8px 0 4px;
}
.error-card .landing-actions { justify-content: center; }
.error-detalle {
  text-align: left;
  background: var(--gris-bg);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius-md);
  padding: 12px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow-y: auto;
  margin: 12px 0;
}
