.app-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.app-header {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.brand-logos { display: flex; align-items: center; gap: .85rem; }
.brand-logos img { display: block; object-fit: contain; max-height: 42px; width: auto; }
.brand-logos img:first-child { max-width: 150px; }
.brand-logos img:last-child { max-width: 132px; }
.brand-copy { min-width: 0; }
.brand-copy h1 { margin: 0; font-size: 1.05rem; line-height: 1.2; }
.brand-copy p { margin: .2rem 0 0; color: var(--text-muted); font-size: .78rem; }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.main-content { min-height: 0; padding: clamp(.75rem, 2vw, 1.5rem); }
.workspace { width: min(1180px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; height: calc(100vh - var(--header-height) - 3rem); min-height: 560px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface) 96%, transparent); box-shadow: var(--shadow); overflow: hidden; }
.side-panel { padding: 1rem; overflow: auto; }
.side-panel h2 { margin: 0 0 .35rem; font-size: .96rem; }
.side-panel p { margin: 0; color: var(--text-muted); font-size: .84rem; line-height: 1.5; }
.status-card { margin-top: 1rem; padding: .9rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-soft); }
.status-row { display: flex; justify-content: space-between; gap: 1rem; margin-top: .55rem; font-size: .82rem; }
.status-value { font-weight: 700; }
.status-value[data-state="ready"] { color: var(--success); }
.status-value[data-state="error"] { color: var(--danger); }
.phase-list { margin: 1rem 0 0; padding-left: 1.1rem; color: var(--text-muted); font-size: .82rem; line-height: 1.7; }
.phase-list strong { color: var(--text); }

.side-section + .side-section { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.side-heading { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.side-heading h2 { margin: 0; }
.compact-status-card { margin-top: .7rem; padding: .65rem .75rem; }
.compact-status-card .status-row:first-child { margin-top: 0; }

/* v7.1.0-beta.18 · experiencia pública centrada en ciudadanía */
.workspace { width: min(1320px, 100%); grid-template-columns: minmax(0, 1fr) 320px; }
.language-control select {
  min-height: 40px;
  padding: .45rem 2rem .45rem .7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-weight: 750;
  cursor: pointer;
}
.display-actions { display: flex; gap: .4rem; }
.side-panel { display: flex; flex-direction: column; gap: 1rem; padding: 1rem; }
.side-section + .side-section { margin-top: 0; padding-top: 1rem; }
.side-highlight, .privacy-card { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; }
.side-highlight { padding: .9rem; border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border)); border-radius: 14px; background: var(--brand-soft); }
.privacy-card { padding: .85rem; border-radius: 14px; background: var(--surface-soft); }
.side-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: var(--surface); color: var(--brand-strong); font-weight: 900; }
.technical-details { margin-top: auto; }
.technical-details > summary { cursor: pointer; font-weight: 800; font-size: .82rem; color: var(--text-muted); }
.technical-details h3 { margin: 1rem 0 .4rem; font-size: .8rem; }
\n\n/* v7.1.0-hotfix.103 · el espacio de trabajo ocupa todo el ancho disponible */\n.main-content {\n  width: 100%;\n}\n.workspace {\n  width: 100%;\n  max-width: none;\n  margin-inline: 0;\n}\n
/* v7.1.0-hotfix.103 · workspace realmente fluido a todo el ancho */
.main-content {
  width: 100%;
  max-width: none;
  padding-inline: clamp(.55rem, 1vw, 1rem);
}
.workspace {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  grid-template-columns: minmax(0, 1fr) 320px;
}

/* v7.1.0-hotfix.123 · modo embebido con continuidad entre páginas del CMS */
html[data-embed-mode="true"],
html[data-embed-mode="true"] body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}
html[data-embed-mode="true"] .app-shell {
  width: 100%;
  height: var(--app-viewport-height, 100dvh);
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}
html[data-embed-mode="true"] .app-header,
html[data-embed-mode="true"] .side-panel {
  display: none !important;
}
html[data-embed-mode="true"] .main-content {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
html[data-embed-mode="true"] .workspace {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
html[data-embed-mode="true"] .chat-panel {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
