.cgm-app, .cgm-auth-shell {
  --cgm-bg: #fbfcff;
  --cgm-card: rgba(255, 255, 255, 0.86);
  --cgm-card2: rgba(255, 255, 255, 0.92);
  --cgm-border: rgba(15, 23, 42, 0.12);
  --cgm-text: #0f172a;
  --cgm-muted: rgba(15, 23, 42, 0.65);
  --cgm-primary: #1d4ed8;
  --cgm-danger: #dc2626;
  --cgm-success: #16a34a;

  color: var(--cgm-text);
  max-width: 980px;
  margin: 32px auto;
  padding: 0 16px;
  font-family: Poppins, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

.cgm-login {
  --cgm-login-bg1: #1a1033;
  --cgm-login-bg2: #2a1a52;
  --cgm-login-accent1: #ff2d95;
  --cgm-login-accent2: #4b7bff;
  --cgm-login-panel: rgba(255, 255, 255, 0.06);
  --cgm-login-border: rgba(255, 255, 255, 0.14);
  --cgm-login-text: rgba(255, 255, 255, 0.92);
  --cgm-login-muted: rgba(255, 255, 255, 0.68);

  color: var(--cgm-login-text);
  padding: 0;
  max-width: none;
  margin: 0;
}

html, body.cgm-shell {
  height: 100%;
}

html:has(body.cgm-shell) {
  overscroll-behavior-x: none;
  overscroll-behavior-y: none;
}

body.cgm-shell {
  margin: 0;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  overscroll-behavior-y: none;
  background:
    radial-gradient(900px 600px at 18% 70%, rgba(255, 45, 149, 0.22), transparent 55%),
    radial-gradient(900px 600px at 55% 15%, rgba(75, 123, 255, 0.18), transparent 55%),
    linear-gradient(135deg, var(--cgm-login-bg1, #1a1033) 0%, var(--cgm-login-bg2, #2a1a52) 55%, #1b1336 100%);
}

/* Dashboard: body anclado al viewport (evita cortes con barra de tareas / UI del navegador) */
html:has(body.cgm-shell .cgm-workspace) {
  height: 100%;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: #fbfcff;
  /* admin-bar.css asigna scroll-padding al html aun sin barra visible */
  scroll-padding-top: 0;
}

/* Por si algún plugin imprime #wpadminbar igualmente: no mostrar borde/fondo residual */
body.cgm-shell:has(.cgm-workspace) #wpadminbar {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

body.cgm-shell:has(.cgm-workspace) {
  position: fixed;
  inset: 0;
  width: 100%;
  /* % respecto al ICB a veces descuadra con barras del SO / navegador; vh encaja mejor con el área útil */
  height: 100%;
  height: 100svh;
  height: 100dvh;
  max-height: 100svh;
  max-height: 100dvh;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #fbfcff;
  box-sizing: border-box;
}

.cgm-login {
  min-height: 100vh;
}

.cgm-login__wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  border-radius: 0;
  overflow: hidden;
  background:
    radial-gradient(900px 600px at 18% 70%, rgba(255, 45, 149, 0.22), transparent 55%),
    radial-gradient(900px 600px at 55% 15%, rgba(75, 123, 255, 0.18), transparent 55%),
    linear-gradient(135deg, var(--cgm-login-bg1) 0%, var(--cgm-login-bg2) 55%, #1b1336 100%);
  box-shadow: none;
}

.cgm-login__hero {
  position: relative;
  padding: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.cgm-login__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(500px 500px at 0% 85%, rgba(255, 45, 149, 0.35), transparent 60%),
    radial-gradient(650px 520px at 30% 20%, rgba(75, 123, 255, 0.25), transparent 62%);
  pointer-events: none;
}

.cgm-login__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cgm-hero-image, none);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: 14% 85%;
  opacity: 0.92;
  mix-blend-mode: screen;
  pointer-events: none;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,0.35));
}

.cgm-login__brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(8px);
}

.cgm-login__brandmark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.6px;
  background: linear-gradient(135deg, rgba(75,123,255,0.95), rgba(255,45,149,0.85));
  box-shadow: 0 14px 35px rgba(0,0,0,0.35);
}

.cgm-login__brandtext {
  font-weight: 800;
  letter-spacing: 0.3px;
  opacity: 0.95;
}

.cgm-login__panel {
  display: grid;
  place-items: center;
  padding: 28px 22px;
  background: rgba(0, 0, 0, 0.14);
  border-left: 1px solid rgba(255,255,255,0.10);
}

.cgm-login__panelInner {
  width: 100%;
  max-width: 360px;
  padding: 22px;
  border-radius: 18px;
  background: var(--cgm-login-panel);
  border: 1px solid var(--cgm-login-border);
  backdrop-filter: blur(12px);
}

.cgm-login__title {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0.6px;
  font-weight: 900;
}

.cgm-login__subtitle {
  margin: 10px 0 18px;
  color: var(--cgm-login-muted);
}

.cgm-login__form {
  display: grid;
  gap: 12px;
}

.cgm-login__label span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--cgm-login-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.cgm-login__input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.92);
  outline: none;
}

.cgm-login__input:focus {
  border-color: rgba(75, 123, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(75, 123, 255, 0.18);
}

.cgm-login__submit {
  margin-top: 6px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: linear-gradient(180deg, rgba(75,123,255,0.92), rgba(60,96,210,0.96));
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.7px;
  cursor: pointer;
}

.cgm-login__submit:hover {
  filter: brightness(1.05);
}

.cgm-login__links {
  margin-top: 14px;
  display: grid;
  gap: 8px;
  text-align: center;
}

.cgm-login__link {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  font-weight: 700;
}

.cgm-login__link:hover {
  text-decoration: underline;
}

.cgm-login__link--muted {
  color: rgba(255,255,255,0.68);
  font-weight: 600;
}

/* Login Fantime / Elementor: formulario mínimo + avisos */
.cgm-loginFlash {
  box-sizing: border-box;
  max-width: 720px;
  margin: 0 auto 1rem;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
}
.cgm-loginFlash--error {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #7f1d1d;
}

.cgm-fantime-login {
  display: grid;
  gap: 12px;
  max-width: 420px;
}
.cgm-fantime-login__label span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  opacity: 0.85;
}
.cgm-fantime-login__input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  font-size: 15px;
}
.cgm-fantime-login__submit {
  margin-top: 4px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.cgm-fantime-login__submit:hover {
  filter: brightness(1.05);
}

/* Reutiliza estilos de alert */
.cgm-login .cgm-alert {
  background: rgba(0,0,0,0.22);
  border-color: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.92);
}
.cgm-login .cgm-alert--error { border-color: rgba(255, 107, 107, 0.62); }
.cgm-login .cgm-alert--success { border-color: rgba(46, 204, 113, 0.62); }

@media (max-width: 900px) {
  .cgm-login__wrap {
    grid-template-columns: 1fr;
  }
  .cgm-login__hero {
    min-height: 220px;
  }
  .cgm-login__panel {
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,0.10);
  }
  .cgm-login__hero::after {
    background-position: 50% 85%;
    opacity: 0.65;
  }
}

/* Dashboard estilo “workspace” (referencia) */
.cgm-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;
}

.cgm-workspace {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  /* Con tema normal (sin body.cgm-shell fijo) el % no llega al viewport: la barra lateral quedaba “corta”. */
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100%;
  max-height: 100svh;
  max-height: 100dvh;
  overflow: hidden;
  background: #fbfcff;
  color: #0f172a;
  font-family: Poppins, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

/* Hijos del grid: min-height 0 evita que el contenido “empuje” y recorte el rail inferior */
.cgm-workspace > aside.cgm-sidebar,
.cgm-workspace > .cgm-main {
  min-height: 0;
}

.cgm-main--designerPanel {
  padding: 20px 22px 32px;
  overflow-y: auto;
}

.cgm-designerPanel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.cgm-designerPanel__title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 900;
}

.cgm-designerPanel__sub {
  margin: 0;
  color: rgba(15, 23, 42, 0.65);
  font-size: 14px;
}

.cgm-designerPanel__who {
  font-size: 14px;
  font-weight: 700;
}

.cgm-designerPanel__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 18px;
  margin-bottom: 10px;
}

.cgm-designerPanel__toolbarField {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.cgm-designerPanel__toolbarLbl {
  font-size: 12px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.55);
}

.cgm-designerPanel__sortSelect {
  min-width: 220px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  font-weight: 600;
  background: #fff;
}

.cgm-designerPanel__toolbarBtn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(29, 78, 216, 0.35);
  background: rgba(29, 78, 216, 0.08);
  color: rgba(30, 58, 138, 0.96);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.cgm-designerPanel__toolbarBtn:hover {
  background: rgba(29, 78, 216, 0.14);
}

.cgm-designerPanel__toolbarHint {
  margin: 0 0 14px;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.58);
  line-height: 1.45;
}

.cgm-designerPanel__th--drag {
  width: 40px;
  text-align: center;
}

.cgm-designerPanel__dragHead {
  opacity: 0.85;
  letter-spacing: -2px;
}

.cgm-designerPanel__cell--drag {
  width: 40px;
  text-align: center;
  vertical-align: middle;
  cursor: grab;
  user-select: none;
  touch-action: none;
  color: rgba(15, 23, 42, 0.45);
}

.cgm-designerPanel__row.is-dragging {
  opacity: 0.55;
}

.cgm-designerPanel__row.is-drag-over {
  outline: 2px dashed rgba(29, 78, 216, 0.65);
  outline-offset: -2px;
}

.cgm-designerPanel__dragHandle {
  letter-spacing: -2px;
  font-weight: 900;
  cursor: grab;
}

.cgm-designerPanel__dates--edit {
  padding: 8px 10px;
}

.cgm-designerPanel__dateInp {
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  font-size: 12px;
  font-weight: 600;
}

.cgm-designer-dlg__panel--reason {
  max-width: 440px;
}

.cgm-designer-reason__hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.68);
}

.cgm-designer-reason__textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 88px;
}

.cgm-designer-reason__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.cgm-designer-reason__btn {
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
}

.cgm-designer-reason__btn--ghost {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.14);
  color: rgba(15, 23, 42, 0.75);
}

.cgm-designer-reason__btn--primary {
  background: #1d4ed8;
  color: #fff;
  border-color: rgba(29, 78, 216, 0.5);
}

.cgm-designer-detail-changelog {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.cgm-designer-detail-changelog__h {
  margin: 0 0 12px;
  font-size: 15px;
}

.cgm-designer-detail-changelog__row {
  padding: 10px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 13px;
}

.cgm-designer-detail-changelog__meta {
  font-size: 11px;
  color: rgba(15, 23, 42, 0.5);
  margin-bottom: 4px;
}

.cgm-designer-detail-changelog__type {
  display: block;
  margin-bottom: 4px;
}

.cgm-designer-detail-changelog__detail {
  color: rgba(15, 23, 42, 0.78);
  margin-bottom: 4px;
}

.cgm-designer-detail-changelog__reason {
  color: rgba(15, 23, 42, 0.65);
  font-style: italic;
}

.cgm-designer-detail-changelog__empty {
  margin: 8px 0 0;
  color: rgba(15, 23, 42, 0.55);
  font-size: 13px;
}

.cgm-designerPanel__tableWrap {
  overflow-x: auto;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.cgm-designerPanel__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cgm-designerPanel__table th {
  text-align: left;
  padding: 12px 14px;
  background: #1d4ed8;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
}

.cgm-designerPanel__table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  vertical-align: top;
}

.cgm-designerPanel__id {
  font-weight: 800;
  color: rgba(15, 23, 42, 0.55);
  white-space: nowrap;
}

.cgm-designerPanel__status {
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  font-weight: 700;
}

.cgm-designerPanel__dates {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.75);
  line-height: 1.45;
}

.cgm-designerPanel__desc {
  max-width: 280px;
}

.cgm-designerPanel__refs {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(15, 23, 42, 0.75);
  word-break: break-word;
}

.cgm-designerPanel__refs a {
  font-weight: 600;
  color: #1d4ed8;
  text-decoration: none;
}

.cgm-designerPanel__refs a:hover {
  text-decoration: underline;
}

.cgm-designerPanel__fileList {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}

.cgm-designerPanel__fileList li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 4px;
}

.cgm-designerPanel__fileList a {
  font-weight: 600;
  color: #1d4ed8;
  text-decoration: none;
  word-break: break-word;
}

.cgm-designerPanel__fileList a:hover {
  text-decoration: underline;
}

.cgm-designerPanel__removeFile {
  flex-shrink: 0;
  border: none;
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  border-radius: 6px;
  width: 22px;
  height: 22px;
  line-height: 1;
  cursor: pointer;
  font-size: 14px;
}

.cgm-designerPanel__uploadLbl {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.cgm-designerPanel__fileInput {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.cgm-designerPanel__uploadBtn {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(29, 78, 216, 0.1);
  color: #1d4ed8;
  font-weight: 800;
  font-size: 12px;
}

.cgm-designerPanel__uploadMsg {
  display: block;
  font-size: 12px;
  color: #b91c1c;
  margin-top: 4px;
}

.cgm-designerPanel__empty {
  padding: 24px;
}

.cgm-designerPanel__cell--org {
  min-width: 120px;
  max-width: 160px;
  word-break: break-word;
}

.cgm-designerPanel__cell--sub {
  min-width: 140px;
  max-width: 200px;
  font-size: 12px;
  line-height: 1.4;
}

.cgm-designerPanel__cell--sub strong {
  display: block;
}

.cgm-designerPanel__mailto {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}

.cgm-designerPanel__mailto:hover {
  text-decoration: underline;
}

.cgm-designerPanel__cell--received {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cgm-designerPanel__cal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.75);
}

.cgm-designerPanel__cell--urg .cgm-reqUrg {
  max-width: 120px;
}

.cgm-designerPanel__cell--type {
  min-width: 140px;
  max-width: 200px;
}

.cgm-designerPanel__typeMain--underline {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cgm-designerPanel__cell--title {
  min-width: 180px;
  max-width: 260px;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.35;
}

.cgm-designerPanel__openDetail {
  display: block;
  margin-top: 8px;
  padding: 6px 10px;
  border: none;
  border-radius: 8px;
  background: rgba(29, 78, 216, 0.12);
  color: #1d4ed8;
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
}

.cgm-designerPanel__openDetail:hover {
  background: rgba(29, 78, 216, 0.2);
}

.cgm-designerPanel__desc {
  min-width: 220px;
  max-width: 380px;
}

.cgm-designerPanel__descFull {
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(15, 23, 42, 0.9);
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.04);
  border-radius: 10px;
}

.cgm-designerPanel__cell--refs {
  min-width: 100px;
  max-width: 180px;
}

.cgm-designerPanel__refBtns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cgm-designerPanel__refBtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border: 1px solid rgba(29, 78, 216, 0.35);
  border-radius: 8px;
  background: #fff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.cgm-designerPanel__refBtn:hover {
  background: rgba(29, 78, 216, 0.08);
}

.cgm-designerPanel__refBtnIcon {
  opacity: 0.85;
}

.cgm-designerPanel__refBtnTxt {
  white-space: nowrap;
}

.cgm-designerPanel__noRefs {
  color: rgba(15, 23, 42, 0.4);
  font-size: 12px;
}

/* Modales panel producción (detalle pedido + referencia) */
.cgm-designer-dlg {
  position: fixed;
  inset: 0;
  z-index: 100005;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.cgm-designer-dlg[hidden] {
  display: none !important;
}

.cgm-designer-dlg__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.5);
}

.cgm-designer-dlg__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 720px);
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  padding: 20px 22px 22px;
  z-index: 1;
}

.cgm-designer-dlg__panel--ref {
  width: min(920px, 100%);
}

.cgm-designer-dlg__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cgm-designer-dlg__title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.35;
  word-break: break-word;
}

.cgm-designer-dlg__close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.cgm-designer-dlg__body {
  font-size: 13px;
  color: rgba(15, 23, 42, 0.88);
}

.cgm-designer-detail-piece {
  padding: 14px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.cgm-designer-detail-piece:last-child {
  border-bottom: none;
}

.cgm-designer-detail-piece h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 900;
  color: #1d4ed8;
}

.cgm-designer-detail-row {
  display: grid;
  grid-template-columns: minmax(100px, 130px) 1fr;
  gap: 8px 14px;
  margin-bottom: 6px;
  align-items: start;
}

.cgm-designer-detail-label {
  font-weight: 800;
  color: rgba(15, 23, 42, 0.55);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cgm-designer-detail-val {
  word-break: break-word;
}

.cgm-designer-detail-desc {
  margin-top: 8px;
}

.cgm-designer-detail-desc .cgm-designer-detail-label {
  font-weight: 900;
  color: rgba(15, 23, 42, 0.82);
}

.cgm-designer-detail-descText {
  margin-top: 6px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.04);
  border-radius: 10px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}

.cgm-designer-detail-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.cgm-designer-ref-frameWrap {
  min-height: 120px;
  background: rgba(15, 23, 42, 0.04);
  border-radius: 12px;
  overflow: hidden;
}

.cgm-designer-ref-iframe {
  width: 100%;
  min-height: min(70vh, 620px);
  height: min(70vh, 620px);
  border: 0;
  display: block;
  background: #fff;
}

.cgm-designer-ref-img {
  display: block;
  max-width: 100%;
  max-height: min(70vh, 620px);
  margin: 0 auto;
  object-fit: contain;
}

.cgm-designer-ref-dlg__nopv {
  margin: 0;
  padding: 16px;
  color: rgba(15, 23, 42, 0.65);
  text-align: center;
}

.cgm-designer-ref-dlg__actions {
  margin: 12px 0 0;
  text-align: center;
}

.cgm-designer-ref-dlg__dl {
  font-weight: 800;
  color: #1d4ed8;
  text-decoration: none;
}

.cgm-designer-ref-dlg__dl:hover {
  text-decoration: underline;
}

.cgm-sidebar {
  background: #111b3a;
  color: rgba(255,255,255,0.92);
  padding: 14px 10px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
}

/* Barra lateral: marca | herramientas | orgs scroll | rail abajo */
.cgm-sidebar--slim {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  row-gap: 10px;
  align-content: stretch;
  justify-items: stretch;
  padding: 14px 16px 10px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  height: 100%;
  min-height: 0;
  min-height: 100%;
  max-height: 100%;
  overflow: hidden;
  box-sizing: border-box;
  align-self: stretch;
}

.cgm-sidebar__brand--slim {
  grid-row: 1;
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 4px 0 14px;
  border-radius: 0;
  background: transparent;
  border: none;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.95);
  box-sizing: border-box;
}

.cgm-sidebar__brandImg {
  display: block;
  width: min(160px, 100%);
  height: auto;
  max-height: 44px;
  object-fit: contain;
  object-position: left center;
}

.cgm-sidebar__tools {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  flex-shrink: 0;
}

.cgm-sidebar__tool {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  max-width: none;
  padding: 10px 10px;
  margin: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  box-sizing: border-box;
  transition: background 0.12s ease, color 0.12s ease;
}

.cgm-sidebar__tool:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.cgm-sidebar__tool:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.9);
  outline-offset: 2px;
}

.cgm-sidebar__tool--disabled,
.cgm-sidebar__tool:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cgm-sidebar__toolIco {
  display: block;
  flex-shrink: 0;
}

.cgm-sidebar__toolLbl {
  display: block;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  text-align: left;
  letter-spacing: 0.02em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  hyphens: none;
  white-space: nowrap;
  word-break: normal;
}

/* Hueco flexible cuando no hay lista de orgs (una sola org): sustituye al nav vacío */
.cgm-sidebar__spacer {
  grid-row: 3;
  align-self: stretch;
  width: 100%;
  min-height: 0;
}

.cgm-workspace .cgm-sidebar__spacer {
  pointer-events: none;
}

.cgm-sidebar__nav--slim {
  grid-row: 3;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.cgm-sidebar__orgAv {
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 900;
  font-size: 15px;
  flex-shrink: 0;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.cgm-sidebar__orgAv:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.18);
}

.cgm-sidebar__orgAv.is-active {
  background: rgba(75, 123, 255, 0.35);
  border-color: rgba(75, 123, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(75, 123, 255, 0.35);
}

.cgm-sidebar__orgAvLetter {
  line-height: 1;
  pointer-events: none;
}

.cgm-sidebar__empty--slim {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.2);
  font-size: 16px;
  font-weight: 800;
  color: rgba(255,255,255,0.35);
  flex-shrink: 0;
}

.cgm-sidebar__rail {
  grid-row: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding-top: 10px;
  /* Reserva extra bajo el rail por taskbar / overlays (safe-area ayuda en móvil; en escritorio suma mínimo) */
  padding-bottom: max(4px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
  min-height: min-content;
}

.cgm-sidebar__iconBtn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.cgm-sidebar__iconBtn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}

.cgm-sidebar__iconBtn:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.85);
  outline-offset: 2px;
}

.cgm-sidebar__iconBtn--logout {
  color: rgba(255,255,255,0.78);
}

.cgm-sidebar__ico {
  display: block;
  flex-shrink: 0;
}

body.cgm-dash-settings-open {
  overflow: hidden;
}

/* Modal configuración (admin): orgs, perfiles, Gemini */
.cgm-settings-dlg {
  position: fixed;
  inset: 0;
  z-index: 100200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 16px;
  box-sizing: border-box;
}

.cgm-settings-dlg[hidden] {
  display: none !important;
}

.cgm-settings-dlg__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.5);
}

.cgm-settings-dlg__panel {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  max-height: min(90vh, 760px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.cgm-settings-dlg__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

.cgm-settings-dlg__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.25;
}

.cgm-settings-dlg__x {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #0f172a;
}

.cgm-settings-dlg__x:hover {
  background: rgba(15, 23, 42, 0.1);
}

.cgm-settings-dlg__body {
  padding: 16px 20px 22px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cgm-settings-dlg__section {
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.cgm-settings-dlg__section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.cgm-settings-dlg__h {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 900;
  color: #0f172a;
}

.cgm-settings-dlg__p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(15, 23, 42, 0.68);
}

.cgm-settings-dlg__p--small {
  font-size: 12px;
}

.cgm-settings-dlg__warn {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #92400e;
}

.cgm-settings-dlg__ol {
  margin: 0 0 14px;
  padding-left: 1.2rem;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(15, 23, 42, 0.72);
}

.cgm-settings-dlg__a {
  color: #1d4ed8;
  font-weight: 650;
}

.cgm-settings-dlg__code {
  display: inline;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.cgm-settings-dlg__note {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(15, 23, 42, 0.65);
}

.cgm-settings-dlg__note--warn {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(253, 224, 71, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #854d0e;
}

.cgm-settings-dlg__form {
  display: grid;
  gap: 10px;
}

.cgm-settings-dlg__form.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.cgm-settings-dlg__hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(15, 23, 42, 0.55);
}

.cgm-settings-dlg__label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.55);
}

.cgm-settings-dlg__input,
.cgm-settings-dlg__select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.cgm-settings-dlg__textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  resize: vertical;
  min-height: 90px;
}

.cgm-settings-dlg__textarea:focus {
  border-color: rgba(29, 78, 216, 0.45);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.cgm-settings-dlg__input:focus,
.cgm-settings-dlg__select:focus {
  border-color: rgba(29, 78, 216, 0.45);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.cgm-settings-dlg__btn {
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.04);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  color: #0f172a;
}

.cgm-settings-dlg__btn--primary {
  background: #1d4ed8;
  border-color: rgba(29, 78, 216, 0.5);
  color: #fff;
}

.cgm-settings-dlg__btn--primary:hover {
  background: #1e40af;
}

.cgm-settings-dlg__check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

.cgm-settings-dlg__check input {
  margin-top: 2px;
}

.cgm-sidebar__brand {
  font-weight: 900;
  letter-spacing: 0.8px;
  font-size: 14px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}

.cgm-sidebar__nav {
  display: grid;
  gap: 8px;
}

.cgm-sidebar__sectionTitle {
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  padding: 0 12px;
}

.cgm-sidebar__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration: none;
  color: rgba(255,255,255,0.88);
  border: 1px solid transparent;
}

.cgm-sidebar__item:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
}

.cgm-sidebar__item.is-active {
  background: rgba(75, 123, 255, 0.18);
  border-color: rgba(75, 123, 255, 0.35);
}

.cgm-sidebar__dot {
  width: 10px;
  height: 10px;
  border-radius: 4px;
  background: rgba(255,255,255,0.7);
  flex: 0 0 auto;
}

.cgm-sidebar__label {
  font-size: 13px;
  text-align: left;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cgm-sidebar__empty {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  padding: 8px 12px;
}

.cgm-sidebar__footer {
  display: grid;
  gap: 10px;
}

.cgm-sidebar__createOrg {
  display: grid;
  gap: 8px;
}

.cgm-sidebar__input {
  width: 100%;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.92);
  outline: none;
  font-size: 12px;
}

.cgm-sidebar__btn {
  width: 100%;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  font-weight: 800;
}

.cgm-sidebar__logout {
  text-align: center;
  padding: 10px 10px;
  border-radius: 14px;
  text-decoration: none;
  color: rgba(255,255,255,0.78);
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}

.cgm-sidebar__hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255,255,255,0.65);
  padding: 0 4px;
}

.cgm-sidebar__profiles {
  display: grid;
  gap: 8px;
  margin-bottom: 4px;
}

.cgm-sidebar__profilesHint {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(255,255,255,0.62);
  padding: 0 12px;
}

.cgm-sidebar__profilesDisabled {
  margin: 0;
  font-size: 12px;
  color: rgba(255,255,255,0.62);
  padding: 4px 12px;
}

.cgm-sidebar__profilesForm {
  display: grid;
  gap: 8px;
  padding: 0 4px 8px;
}

.cgm-sidebar__profilesLabel {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.65);
  padding: 0 4px;
}

.cgm-sidebar__select {
  width: 100%;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: rgba(255,255,255,0.92);
  outline: none;
  font-size: 13px;
}

.cgm-sidebar__btn--profiles {
  background: rgba(75, 123, 255, 0.28);
  border-color: rgba(75, 123, 255, 0.4);
}

.cgm-sidebar__ai {
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
  padding: 12px 10px 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cgm-sidebar__link {
  color: rgba(147, 197, 253, 0.95);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cgm-sidebar__aiSteps {
  margin: 0;
  padding: 0 12px 0 24px;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}

.cgm-sidebar__aiSteps a {
  color: rgba(147, 197, 253, 0.95);
}

.cgm-sidebar__aiSteps code {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
}

.cgm-sidebar__aiNote {
  margin: 0;
  padding: 0 8px;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.68);
}

.cgm-sidebar__aiNote--warn {
  color: rgba(253, 224, 71, 0.92);
}

.cgm-sidebar__profilesForm.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.cgm-sidebar__aiClear {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 4px;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.cgm-sidebar__aiClear input {
  margin-top: 2px;
}

.cgm-badge-admin {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  background: rgba(29, 78, 216, 0.14);
  color: rgba(29, 78, 216, 0.95);
  border: 1px solid rgba(29, 78, 216, 0.25);
  vertical-align: middle;
}

.cgm-adminAssign {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
  background: #fafbff;
}

.cgm-adminAssign__form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.cgm-adminAssign__label {
  flex: 1 1 220px;
  display: grid;
  gap: 6px;
}

.cgm-adminAssign__label span {
  font-size: 12px;
  font-weight: 700;
  color: rgba(15,23,42,0.62);
}

.cgm-adminAssign__input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.12);
  background: #fff;
  outline: none;
}

.cgm-adminAssign__btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.12);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.cgm-main {
  padding: 24px 26px 34px;
  padding-bottom: calc(34px + env(safe-area-inset-bottom, 0px));
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.cgm-topbar2 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-top: 6px;
  margin-bottom: 14px;
}

.cgm-topbar2__left {
  flex: 1;
  min-width: 0;
}

.cgm-topbar2__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

/* Logo horizontal arriba; título y subtítulo debajo */
.cgm-topbar2__brand--stacked {
  flex-direction: column;
  align-items: flex-start;
  align-self: flex-start;
  gap: 10px;
  max-width: 100%;
}

.cgm-topbar2__text {
  min-width: 0;
}

.cgm-orgBrand__logoWrap {
  position: relative;
  flex-shrink: 0;
}

.cgm-orgBrand__logoWrap--header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  max-width: min(560px, 100%);
  min-height: 36px;
  padding: 0;
  background: transparent;
  border: none;
  overflow: visible;
  box-sizing: border-box;
}

.cgm-orgBrand__logo--header {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 56px;
  object-fit: contain;
  object-position: left center;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.cgm-orgBrand__logoAbbr--header {
  position: static;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.08);
  pointer-events: none;
}

.cgm-orgBrand__logoAbbr--header:not([hidden]) {
  display: inline-flex;
}

.cgm-sidebar__orgAbbr {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  pointer-events: none;
}

.cgm-users-tableWrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  margin-bottom: 18px;
}

.cgm-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cgm-users-table th,
.cgm-users-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.cgm-users-table th {
  font-weight: 800;
  color: rgba(15, 23, 42, 0.55);
  background: #fafbff;
}

.cgm-users-table tr:last-child td {
  border-bottom: none;
}

.cgm-users-table__empty {
  color: rgba(15, 23, 42, 0.55);
  text-align: center;
  padding: 20px !important;
}

.cgm-users-dlg__add {
  margin-top: 8px;
  padding-top: 20px !important;
  border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.cgm-sidebar__orgImg {
  width: 44px;
  height: 44px;
  object-fit: cover;
  display: block;
}

.cgm-sidebar__orgAv:has(.cgm-sidebar__orgImg) {
  padding: 0;
  overflow: hidden;
}

.cgm-topbar2__right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.cgm-topbar2__users {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  color: #0f172a;
  flex-shrink: 0;
  white-space: nowrap;
  font-family: inherit;
}

.cgm-topbar2__users:hover {
  background: rgba(15, 23, 42, 0.04);
}

.cgm-topbar2__title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 900;
}

.cgm-topbar2__subtitle {
  color: rgba(15, 23, 42, 0.65);
  margin-top: 4px;
  font-size: 12px;
}

.cgm-topbar2__subtitle--portal {
  font-size: 13.5px;
}

.cgm-orgSwitch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.cgm-orgSwitch__select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font: inherit;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  padding: 8px 34px 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #0f172a;
  max-width: min(520px, 70vw);
  cursor: pointer;
}

.cgm-orgSwitch__select:focus {
  outline: none;
  border-color: rgba(29, 78, 216, 0.45);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.cgm-orgSwitch__danger {
  font: inherit;
  font-weight: 900;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.08);
  color: rgba(185, 28, 28, 0.98);
  cursor: pointer;
  white-space: nowrap;
}

.cgm-orgSwitch__danger:hover {
  background: rgba(220, 38, 38, 0.14);
  border-color: rgba(220, 38, 38, 0.32);
}

.cgm-topbar2__createGrid {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cgm-topbar2__search {
  width: 200px;
  max-width: 32vw;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  outline: none;
  font: inherit;
}

.cgm-topbar2__search:focus {
  border-color: rgba(29, 78, 216, 0.45);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.cgm-topbar2__input {
  width: 260px;
  max-width: 44vw;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.12);
  background: #fff;
  outline: none;
}

.cgm-topbar2__btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(29,78,216,0.35);
  background: rgba(29,78,216,0.92);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cgm-viewToggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255,255,255,0.8);
}

.cgm-viewToggle__link {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 750;
  font-size: 12px;
  color: rgba(15,23,42,0.75);
}

.cgm-viewToggle__link.is-active {
  background: rgba(29,78,216,0.10);
  color: rgba(29,78,216,0.98);
  border: 1px solid rgba(29,78,216,0.20);
}

.cgm-card--tasks {
  background: #fff;
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.06);
}

.cgm-tasksHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.cgm-tasksHead__scope {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cgm-tasksHead__pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.86);
  text-decoration: none;
  font-weight: 850;
  font-size: 12px;
  color: rgba(15,23,42,0.86);
}
.cgm-tasksHead__pill.is-active {
  background: rgba(29,78,216,0.14);
  border-color: rgba(29,78,216,0.30);
  color: #0f172a;
}
.cgm-tasksHead__teamSel {
  border: 1px solid rgba(15,23,42,0.14);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
  background: rgba(255,255,255,0.92);
}

.cgm-teamBox {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.60);
}
.cgm-teamBox__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.cgm-teamBox__name {
  font-weight: 900;
}
.cgm-teamBox__meta {
  color: rgba(15,23,42,0.62);
  font-size: 12px;
}
.cgm-teamBox__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.cgm-teamBox__chk {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(15,23,42,0.14);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  background: rgba(255,255,255,0.92);
}

.cgm-settings-dlg__divider {
  height: 1px;
  background: rgba(15, 23, 42, 0.10);
  margin: 14px 0;
}
.cgm-permBox {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.60);
}
.cgm-permBox__title {
  font-weight: 900;
  margin-bottom: 8px;
}
.cgm-permBox__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cgm-permBox__chk {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(15,23,42,0.14);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  background: rgba(255,255,255,0.92);
}

.cgm-schemaRow {
  display: grid;
  grid-template-columns: 140px 1fr 140px auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
@media (max-width: 980px) {
  .cgm-schemaRow {
    grid-template-columns: 1fr;
  }
}

.cgm-tasksHead__h {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}

.cgm-tasksHead__form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cgm-tasksHead__select,
.cgm-tasksHead__input,
.cgm-tasksHead__date {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.12);
  background: #fff;
  font: inherit;
}

.cgm-tasksHead__input {
  width: min(360px, 60vw);
}

.cgm-tasksHead__hours {
  width: 110px;
}

.cgm-load {
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.65);
  overflow: hidden;
}
.cgm-load__thead, .cgm-load__row {
  display: grid;
  grid-template-columns: 240px repeat(6, 1fr);
}
.cgm-load__th, .cgm-load__cell, .cgm-load__person {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}
.cgm-load__thead .cgm-load__th {
  font-weight: 900;
  font-size: 12px;
  color: rgba(15,23,42,0.70);
  background: rgba(248,250,252,0.9);
}
.cgm-load__th--person {
  position: sticky;
  left: 0;
  z-index: 2;
}
.cgm-load__person {
  position: sticky;
  left: 0;
  background: rgba(255,255,255,0.92);
  z-index: 1;
}
.cgm-load__name {
  font-weight: 900;
}
.cgm-load__meta {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(15,23,42,0.60);
}
.cgm-load__cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cgm-load__dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(37,99,235,0.25);
  border: 2px solid rgba(37,99,235,0.25);
  box-shadow: inset 0 0 0 calc(max(2px, (var(--p) * 0.12px))) rgba(37,99,235,0.85);
}
.cgm-load__hours {
  font-weight: 850;
  font-size: 12px;
  color: rgba(15,23,42,0.78);
}
@media (max-width: 1100px) {
  .cgm-load {
    overflow: auto;
  }
  .cgm-load__thead, .cgm-load__row {
    min-width: 920px;
  }
}

.cgm-tasksTableWrap {
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.08);
}

.cgm-tasksTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 680px;
}

.cgm-tasksTable thead th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(15,23,42,0.55);
  padding: 12px 14px;
  background: rgba(248, 250, 252, 0.9);
  border-bottom: 1px solid rgba(15,23,42,0.08);
}

.cgm-tasksTable tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15,23,42,0.06);
}

.cgm-tasksTable__title {
  font-weight: 800;
}

.cgm-taskTitleLv {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cgm-taskTitleLv__txt {
  display: inline-block;
}
.cgm-taskTitleLv--2 .cgm-taskTitleLv__txt { padding-left: 18px; }
.cgm-taskTitleLv--3 .cgm-taskTitleLv__txt { padding-left: 34px; }
.cgm-taskTitleLv--4 .cgm-taskTitleLv__txt { padding-left: 50px; }
.cgm-taskTitleLv--5 .cgm-taskTitleLv__txt { padding-left: 66px; }

/* ——— Tareas: editor “Personalizar items” horizontal ——— */
.cgm-inlineChk {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 14px;
  color: var(--cgm-muted);
  font-size: 13px;
}
.cgm-inlineChk input { transform: translateY(1px); }

.cgm-schemaGrid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--cgm-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
}
.cgm-schemaGrid__row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  align-items: start;
}
.cgm-schemaGrid__lv {
  font-size: 12px;
  font-weight: 600;
  color: var(--cgm-muted);
  padding-top: 10px;
}
.cgm-schemaGrid__cols {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 6px;
}
.cgm-schemaCol {
  flex: 0 0 auto;
  display: flex !important;
  gap: 8px;
  align-items: center;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  padding: 8px;
  border: 1px solid var(--cgm-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
}
.cgm-schemaCol .cgm-settings-dlg__input {
  width: auto !important;
  display: inline-block !important;
  max-width: none !important;
  margin: 0;
}
.cgm-schemaCol__label {
  width: 170px !important;
  flex: 0 0 170px !important;
}
.cgm-schemaCol__type {
  width: 150px !important;
  flex: 0 0 150px !important;
}
.cgm-schemaCol__rm {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex: 0 0 34px !important;
}

.cgm-schemaCol__load {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--cgm-border);
  background: rgba(29, 78, 216, 0.06);
  color: var(--cgm-muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.cgm-schemaCol__load input { transform: translateY(1px); }

.cgm-rolePick {
  position: relative;
  flex: 0 0 auto;
}
.cgm-rolePick__btn {
  padding: 10px 12px;
  min-width: 210px;
  text-align: left;
  font-weight: 800;
}
.cgm-rolePick__txt {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cgm-rolePick__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 10;
  width: 260px;
  max-height: 240px;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--cgm-border);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 18px 44px rgba(15,23,42,0.18);
  padding: 10px;
}
.cgm-rolePick__opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--cgm-text);
}
.cgm-rolePick__opt:hover { background: rgba(29, 78, 216, 0.06); }
.cgm-rolePick__actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.cgm-rolePick__actions .cgm-settings-dlg__btn {
  padding: 9px 10px;
  font-size: 13px;
  border-radius: 12px;
}
.cgm-schemaGrid__add {
  padding: 8px 12px;
  border-radius: 12px;
  white-space: nowrap;
}

.cgm-schemaActions {
  display: flex;
  justify-content: flex-start;
  margin: 10px 0 0;
}

/* ——— Tareas: columnas custom (vista tabla) ——— */
.cgm-tasksTable__custom {
  color: var(--cgm-muted);
  font-size: 13px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cgm-tasksTable__newRow td {
  background: rgba(29, 78, 216, 0.03);
}
.cgm-tasksCellInput {
  width: 100%;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  font-size: 13px;
  box-sizing: border-box;
}
.cgm-tasksCellInput--date { max-width: 170px; }
.cgm-tasksCellChk { width: 18px; height: 18px; }
.cgm-taskInlineNew__btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(29, 78, 216, 0.45);
  background: rgba(29, 78, 216, 0.1);
  color: #1d4ed8;
  font-weight: 800;
  cursor: pointer;
}

.cgm-taskEdit {
  width: 100%;
  padding: 7px 9px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255,255,255,0.92);
  font-size: 13px;
  box-sizing: border-box;
}
.cgm-taskEdit[type="checkbox"] { width: 18px; height: 18px; padding: 0; }

.cgm-rowMenu {
  position: relative;
  display: inline-flex;
  margin-left: 6px;
  opacity: 0;
  pointer-events: none;
}
tr:hover .cgm-rowMenu {
  opacity: 1;
  pointer-events: auto;
}
.cgm-rowMenu__btn {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(15,23,42,0.04);
  cursor: pointer;
  font-weight: 900;
}
.cgm-rowMenu__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: 190px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 18px 44px rgba(15,23,42,0.18);
  padding: 8px;
}
.cgm-rowMenu__item {
  width: 100%;
  text-align: left;
  padding: 10px 10px;
  border: 0;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
}
.cgm-rowMenu__item:hover { background: rgba(29,78,216,0.06); }

/* ——— Panel de actualizaciones (derecha) ——— */
.cgm-updPanel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(520px, 92vw);
  height: 100vh;
  z-index: 100300;
  background: rgba(255,255,255,0.98);
  border-left: 1px solid rgba(15,23,42,0.12);
  box-shadow: -24px 0 60px rgba(15,23,42,0.16);
  display: flex;
  flex-direction: column;
}
.cgm-updPanel[hidden] { display: none !important; }
.cgm-updPanel__head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.cgm-updPanel__title { margin: 0; font-size: 1.05rem; font-weight: 900; }
.cgm-updPanel__x {
  width: 34px; height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(15,23,42,0.04);
  cursor: pointer;
  font-weight: 900;
}
.cgm-updPanel__body {
  padding: 14px 18px 16px;
  overflow: auto;
  display: grid;
  gap: 12px;
  flex: 1;
}
.cgm-updItem {
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.9);
}
.cgm-updItem__meta { font-size: 12px; color: rgba(15,23,42,0.55); font-weight: 800; margin-bottom: 6px; }
.cgm-updItem__txt { font-size: 13px; color: #0f172a; white-space: pre-wrap; }
.cgm-updPanel__composer {
  padding: 12px 18px 16px;
  border-top: 1px solid rgba(15,23,42,0.08);
  display: grid;
  gap: 10px;
}
.cgm-updTa {
  width: 100%;
  min-height: 90px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.14);
  padding: 10px 12px;
  font-size: 14px;
  resize: vertical;
  box-sizing: border-box;
}
.cgm-updActions { display: flex; justify-content: flex-end; gap: 10px; }
.cgm-updSend {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(29,78,216,0.45);
  background: rgba(29,78,216,0.1);
  color: #1d4ed8;
  font-weight: 900;
  cursor: pointer;
}
.cgm-mentionMenu2 {
  position: absolute;
  z-index: 100400;
  width: min(360px, calc(100vw - 40px));
  max-height: 260px;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 16px 40px rgba(15,23,42,0.16);
  padding: 6px;
}
.cgm-mentionMenu2__item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.cgm-mentionMenu2__item:hover { background: rgba(29,78,216,0.08); }

/* ——— Brief (panel derecho) ——— */
.cgm-briefPanel { position: fixed; top: 0; right: 0; width: min(560px, 92vw); height: 100vh; z-index: 100350; background: rgba(255,255,255,0.98); border-left: 1px solid rgba(15,23,42,0.12); box-shadow: -24px 0 60px rgba(15,23,42,0.16); display:flex; flex-direction:column; }
.cgm-briefPanel[hidden]{ display:none !important; }
.cgm-briefPanel__head{ padding:16px 18px 12px; border-bottom:1px solid rgba(15,23,42,0.08); display:flex; justify-content:space-between; gap:10px; }
.cgm-briefPanel__title{ margin:0; font-size:1.05rem; font-weight: 900; }
.cgm-briefPanel__sub{ font-size:12px; color: rgba(15,23,42,0.55); font-weight:800; margin-top: 2px; }
.cgm-briefPanel__x{ width:34px; height:34px; border-radius:12px; border:1px solid rgba(15,23,42,0.14); background: rgba(15,23,42,0.04); cursor:pointer; font-weight:900; }
.cgm-briefPanel__body{ padding:14px 18px 18px; overflow:auto; flex:1; }
.cgm-briefForm{ display:grid; gap: 12px; }
.cgm-briefField label{ display:block; font-size:12px; font-weight:900; color: rgba(15,23,42,0.7); margin-bottom: 6px; }
.cgm-briefField input,.cgm-briefField textarea,.cgm-briefField select{ width:100%; border-radius: 14px; border:1px solid rgba(15,23,42,0.14); padding: 10px 12px; font-size: 14px; box-sizing: border-box; background: rgba(255,255,255,0.95); }
.cgm-briefField textarea{ min-height: 110px; resize: vertical; }
.cgm-briefActions{ display:flex; justify-content:flex-end; gap:10px; margin-top: 12px; }
.cgm-briefSave{ padding:10px 12px; border-radius:12px; border:1px solid rgba(29,78,216,0.45); background: rgba(29,78,216,0.1); color:#1d4ed8; font-weight:900; cursor:pointer; }

/* ——— Tareas globales: 2 tablas (todas + filtrada) ——— */
.cgm-tasksSplit {
  display: grid;
  gap: 18px;
}
.cgm-tasksSplit__title {
  font-weight: 900;
  margin: 0 0 10px;
  color: #0f172a;
}
.cgm-tasksSplit__sel {
  width: min(360px, 100%);
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  font-size: 14px;
}

.cgm-itemView {
  display: grid;
  gap: 10px;
}
.cgm-itemView__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.9);
}
.cgm-itemView__k {
  font-size: 12px;
  font-weight: 900;
  color: rgba(15,23,42,0.55);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cgm-itemView__v {
  font-size: 14px;
  color: #0f172a;
  word-break: break-word;
}

.cgm-taskSubForm {
  display: flex;
  gap: 8px;
  align-items: center;
}
.cgm-taskSubForm__input {
  flex: 1 1 auto;
  min-width: 160px;
  border: 1px solid rgba(15,23,42,0.12);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.92);
  font: inherit;
  font-size: 13px;
}
.cgm-taskSubForm__btn {
  border: 1px solid rgba(15,23,42,0.14);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.92);
  font-weight: 850;
  font-size: 12px;
  cursor: pointer;
}
.cgm-taskSubForm__btn:hover {
  background: rgba(15,23,42,0.04);
}

.cgm-tasksTable__empty {
  color: rgba(15,23,42,0.65);
  padding: 18px 14px;
}

.cgm-kanban {
  display: grid;
  gap: 12px;
}

.cgm-kanbanCol {
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(248, 250, 252, 0.9);
  padding: 14px;
}

.cgm-kanbanCol__title {
  font-weight: 900;
  margin-bottom: 10px;
}

.cgm-kanbanCol__cards {
  display: grid;
  gap: 10px;
}

.cgm-taskCard {
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.10);
  background: #fff;
  padding: 12px 12px;
}

.cgm-taskCard__title {
  font-weight: 850;
}

.cgm-taskCard__meta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(15,23,42,0.55);
  font-size: 12px;
}

.cgm-taskCard__due {
  white-space: nowrap;
}

.cgm-sidebar__tool.is-active {
  background: rgba(75, 123, 255, 0.28);
  color: #fff;
  border: 1px solid rgba(147, 197, 253, 0.45);
}

.cgm-topbar2__backGrids {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  font-weight: 800;
  font-size: 13px;
  color: #0f172a;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.cgm-topbar2__backGrids:hover {
  background: rgba(15, 23, 42, 0.04);
}

/* Client Map (Mapa del Cliente) */
.cgm-card--clientMap {
  padding: 16px;
}
.cgm-clientMap__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 14px;
}
@media (max-width: 980px) {
  .cgm-clientMap__grid {
    grid-template-columns: 1fr;
  }
}
.cgm-clientMap__sec {
  background: var(--cgm-card2);
  border: 1px solid var(--cgm-border);
  border-radius: 16px;
  padding: 14px;
}
.cgm-clientMap__secHead {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.cgm-clientMap__h {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.cgm-clientMap__sub {
  margin: 0;
  color: var(--cgm-muted);
  font-size: 13px;
}
.cgm-clientMap__people {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cgm-clientMap__person {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.70);
}
.cgm-clientMap__avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.16), rgba(99, 102, 241, 0.12));
}
.cgm-clientMap__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.cgm-clientMap__who {
  min-width: 0;
}
.cgm-clientMap__name {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.25;
}
.cgm-clientMap__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
  color: rgba(15, 23, 42, 0.66);
  font-size: 12px;
}
.cgm-clientMap__role {
  flex: 0 0 auto;
}
.cgm-clientMap__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 420px;
}
.cgm-clientMap__chk {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  user-select: none;
}
.cgm-clientMap__chk input {
  width: 14px;
  height: 14px;
}
@media (max-width: 520px) {
  .cgm-clientMap__row {
    flex-direction: column;
  }
  .cgm-clientMap__checks {
    justify-content: flex-start;
    max-width: none;
  }
}
.cgm-clientMap__roleCard {
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.85);
}
.cgm-clientMap__roleTitle {
  font-weight: 850;
  font-size: 13px;
}
.cgm-clientMap__roleResp {
  margin-top: 4px;
  color: rgba(15, 23, 42, 0.68);
  font-size: 12px;
  white-space: pre-line;
}
.cgm-clientMap__roleResp--muted {
  color: rgba(15, 23, 42, 0.55);
}
.cgm-clientMap__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cgm-clientMap__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cgm-clientMap__two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 980px) {
  .cgm-clientMap__two {
    grid-template-columns: 1fr;
  }
}
.cgm-clientMap__lbl {
  font-size: 12px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.74);
}
.cgm-clientMap__ta {
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.92);
  resize: vertical;
}
.cgm-clientMap__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}
.cgm-clientMap__hint {
  color: rgba(15, 23, 42, 0.62);
  font-size: 12px;
}

.cgm-clientMap__newRole {
  margin: 10px 0 12px;
  padding: 10px;
  border-radius: 14px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.55);
}
.cgm-clientMap__newRoleHead {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.cgm-clientMap__newRoleTitle {
  font-weight: 850;
  font-size: 13px;
}
.cgm-clientMap__newRoleSub {
  color: rgba(15, 23, 42, 0.62);
  font-size: 12px;
}
.cgm-clientMap__newRoleForm {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap: 8px;
}
.cgm-clientMap__input {
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.92);
}
@media (max-width: 980px) {
  .cgm-clientMap__newRoleForm {
    grid-template-columns: 1fr;
  }
}

/* Client portal config (inside Mapa del Cliente) */
.cgm-clientPortalCfg__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 10px;
}
.cgm-clientPortalCfg__lbl {
  font-size: 12px;
  font-weight: 850;
  color: rgba(15, 23, 42, 0.74);
  padding-top: 10px;
}
.cgm-clientPortalCfg__input {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.92);
}
.cgm-clientPortalCfg__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cgm-clientPortalCfg__chk {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.92);
  user-select: none;
}
.cgm-clientPortalCfg__actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 520px) {
  .cgm-clientPortalCfg__row {
    grid-template-columns: 1fr;
  }
  .cgm-clientPortalCfg__lbl {
    padding-top: 0;
  }
}

/* Public client portal page */
.cgm-clientPortal {
  max-width: 980px;
  margin: 24px auto;
  padding: 0 16px;
}
.cgm-clientPortal__card {
  padding: 16px;
}
.cgm-clientPortal__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}
.cgm-clientPortal__title {
  font-weight: 900;
  font-size: 18px;
}
.cgm-clientPortal__sub {
  color: rgba(15, 23, 42, 0.62);
  font-size: 13px;
}
.cgm-clientPortal__login {
  display: grid;
  gap: 10px;
  max-width: 420px;
}
.cgm-clientPortal__lbl {
  font-size: 12px;
  font-weight: 850;
  color: rgba(15, 23, 42, 0.74);
}
.cgm-clientPortal__input {
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 14px;
  padding: 12px 12px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.96);
}
.cgm-clientPortal__err {
  color: #b91c1c;
  font-size: 13px;
  font-weight: 700;
}
.cgm-tile--disabled {
  opacity: 0.92;
  cursor: default;
}
.cgm-clientPortal__note {
  margin-top: 12px;
  color: rgba(15, 23, 42, 0.62);
  font-size: 12px;
}

.cgm-clientPortal__who {
  margin: 10px 0 14px;
  font-size: 13px;
  font-weight: 850;
  color: rgba(15, 23, 42, 0.78);
}

.cgm-clientPortalCfg__hr {
  height: 1px;
  background: rgba(15, 23, 42, 0.10);
  margin: 14px 0;
}
.cgm-clientPortalCfg__secTitle {
  font-weight: 900;
  font-size: 14px;
}
.cgm-clientPortalCfg__help {
  margin: 6px 0 10px;
  color: rgba(15, 23, 42, 0.62);
  font-size: 12px;
}
.cgm-clientPortalCfg__newUser {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}
@media (max-width: 980px) {
  .cgm-clientPortalCfg__newUser {
    grid-template-columns: 1fr;
  }
}
.cgm-clientPortalCfg__list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.cgm-clientPortalCfg__item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.70);
}
.cgm-clientPortalCfg__itemName {
  font-weight: 900;
}
.cgm-clientPortalCfg__itemMeta {
  color: rgba(15, 23, 42, 0.62);
  font-size: 12px;
  white-space: nowrap;
}

.cgm-card--repo {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  padding: 20px 22px 22px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.cgm-repo__intro {
  margin-bottom: 16px;
}

.cgm-repo__h {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 900;
  color: #0f172a;
}

.cgm-repo__hint {
  margin: 0;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
  line-height: 1.45;
}

.cgm-repo__upload {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: 14px;
  border: 1px dashed rgba(29, 78, 216, 0.28);
  background: rgba(29, 78, 216, 0.04);
}

.cgm-repo__lbl {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.cgm-repo__lbl--grow {
  flex: 1 1 220px;
}

.cgm-repo__lblTxt {
  font-size: 11px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cgm-repo__textarea {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  font: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 44px;
  box-sizing: border-box;
}

.cgm-repo__textarea--sm {
  min-height: 52px;
  font-size: 13px;
}

.cgm-repo__btn {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  color: #0f172a;
}

.cgm-repo__btn--primary {
  border-color: rgba(29, 78, 216, 0.4);
  background: rgba(29, 78, 216, 0.92);
  color: #fff;
}

.cgm-repo__btn--primary:hover {
  filter: brightness(1.05);
}

.cgm-repo__btn--ghost {
  margin-top: 6px;
  padding: 6px 10px;
  font-size: 12px;
}

.cgm-repo__btn--danger {
  border-color: rgba(220, 38, 38, 0.35);
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.35);
}

.cgm-repo__btn--danger:hover {
  background: rgba(254, 202, 202, 0.5);
}

.cgm-repo__table {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  overflow: hidden;
}

.cgm-repo__thead {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) minmax(180px, 2fr) minmax(100px, 0.75fr) minmax(160px, 1fr);
  gap: 12px;
  padding: 12px 16px;
  background: #fafbff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.cgm-repo__th {
  font-size: 11px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cgm-repo__tr {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) minmax(180px, 2fr) minmax(100px, 0.75fr) minmax(160px, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  align-items: start;
}

.cgm-repo__tr:last-child {
  border-bottom: none;
}

.cgm-repo__fileCell {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.cgm-fileIcon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
  color: #475569;
}

.cgm-fileIcon--pdf {
  background: rgba(229, 57, 53, 0.12);
  border-color: rgba(229, 57, 53, 0.35);
  color: #c62828;
}

.cgm-fileIcon--excel {
  background: rgba(33, 115, 70, 0.14);
  border-color: rgba(33, 115, 70, 0.38);
  color: #1b5e20;
}

.cgm-fileIcon--word {
  background: rgba(24, 90, 189, 0.12);
  border-color: rgba(24, 90, 189, 0.35);
  color: #1565c0;
}

.cgm-fileIcon--ppt {
  background: rgba(210, 71, 38, 0.12);
  border-color: rgba(210, 71, 38, 0.35);
  color: #d84315;
}

.cgm-fileIcon--image {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.32);
  color: #6d28d9;
}

.cgm-fileIcon--video {
  background: rgba(8, 145, 178, 0.12);
  border-color: rgba(8, 145, 178, 0.35);
  color: #0e7490;
}

.cgm-fileIcon--audio {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.35);
  color: #b45309;
}

.cgm-fileIcon--zip {
  background: rgba(100, 116, 139, 0.12);
  border-color: rgba(100, 116, 139, 0.3);
  color: #475569;
}

.cgm-fileIcon--text {
  background: rgba(71, 85, 105, 0.1);
  border-color: rgba(71, 85, 105, 0.25);
  color: #334155;
}

.cgm-repo__fname {
  font-weight: 800;
  font-size: 14px;
  color: #0f172a;
  word-break: break-word;
  line-height: 1.35;
  padding-top: 2px;
}

.cgm-repo__descRead {
  font-size: 14px;
  line-height: 1.5;
  color: #0f172a;
  margin-bottom: 8px;
  word-break: break-word;
}

.cgm-repo__editDesc {
  font-size: 12px;
  font-weight: 800;
  color: rgba(29, 78, 216, 0.95);
  text-decoration: none;
}

.cgm-repo__editDesc:hover {
  text-decoration: underline;
}

.cgm-repo__descActions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cgm-repo__cancelDesc {
  font-size: 12px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.55);
  text-decoration: none;
}

.cgm-repo__cancelDesc:hover {
  color: #0f172a;
  text-decoration: underline;
}

.cgm-repo__descForm {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.cgm-repo__metaSize {
  font-weight: 800;
  font-size: 13px;
  color: #0f172a;
}

.cgm-repo__metaDate {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.5);
  margin-top: 4px;
}

.cgm-repo__td--act {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.cgm-repo__pv {
  font-weight: 800;
  font-size: 13px;
  color: #0f766e;
  text-decoration: none;
}

.cgm-repo__pv:hover {
  text-decoration: underline;
}

.cgm-repo__dl {
  font-weight: 800;
  font-size: 13px;
  color: rgba(29, 78, 216, 0.95);
  text-decoration: none;
}

.cgm-repo__dl:hover {
  text-decoration: underline;
}

.cgm-repo__delForm {
  margin: 0;
}

.cgm-repo__empty {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

@media (max-width: 900px) {
  .cgm-repo__thead {
    display: none;
  }
  .cgm-repo__tr {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .cgm-repo__td--act {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

.cgm-sectionBack {
  margin: 0 0 14px;
}

.cgm-sectionBack__btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: rgba(29, 78, 216, 0.95);
  background: rgba(29, 78, 216, 0.08);
  border: 1px solid rgba(29, 78, 216, 0.22);
  transition: background 0.15s ease, color 0.15s ease;
}

.cgm-sectionBack__btn:hover {
  background: rgba(29, 78, 216, 0.14);
  color: #1e3a8a;
}

.cgm-card--repo .cgm-sectionBack,
.cgm-card--reqEdit .cgm-sectionBack {
  padding: 0 2px;
  margin-bottom: 16px;
}

.cgm-global-grid-shell .cgm-sectionBack {
  margin-bottom: 12px;
}

.cgm-main--designerPanel > .cgm-sectionBack {
  margin: 0 0 16px;
}

.cgm-card--tiles {
  background: #fff;
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 16px;
  padding: 18px;
  overflow: visible;
  box-shadow: 0 10px 30px rgba(15,23,42,0.06);
}

.cgm-emptyState {
  padding: 22px 18px;
  color: rgba(15,23,42,0.65);
}

.cgm-tileGrid.cgm-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cgm-tileWrap {
  list-style: none;
}

.cgm-portal {
  display: grid;
  gap: 16px;
}

.cgm-portal__h {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cgm-portal__hIco {
  flex-shrink: 0;
  color: rgba(29, 78, 216, 0.95);
}

.cgm-portal__recent {
  margin-top: 14px;
}

.cgm-portalRecent {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.cgm-portalRecent__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(248, 250, 252, 0.9);
  text-decoration: none;
  color: #0f172a;
}

.cgm-portalRecent__link:hover {
  background: rgba(241, 245, 255, 0.95);
}

.cgm-portalRecent__name {
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cgm-portalRecent__org {
  color: rgba(15, 23, 42, 0.55);
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Portal: las tarjetas de organizaciones no deben forzar cuadrado (evita hueco grande). */
.cgm-portal .cgm-tileGrid.cgm-list .cgm-tile {
  aspect-ratio: auto;
  padding: 18px 12px 16px;
}

.cgm-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  aspect-ratio: 1;
  min-height: 0;
  min-width: 0;
  padding: 16px 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,0.10);
  text-decoration: none;
  color: #0f172a;
  background: #fff;
  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.cgm-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(15,23,42,0.12);
}

.cgm-tile:focus-visible {
  outline: 2px solid rgba(29, 78, 216, 0.55);
  outline-offset: 2px;
}

.cgm-tile__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 10px;
}

.cgm-tile__icon svg {
  flex-shrink: 0;
}

.cgm-tile__icon--folder {
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(217, 119, 6, 0.35);
  color: #b45309;
}

.cgm-tile__icon--req {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(79, 70, 229, 0.35);
  color: #4338ca;
}

.cgm-tile__icon--grid {
  background: rgba(29, 78, 216, 0.14);
  border: 1px solid rgba(29, 78, 216, 0.28);
  color: #1d4ed8;
}

.cgm-tile--repo {
  background: rgba(245, 158, 11, 0.07);
  border-color: rgba(217, 119, 6, 0.22);
}

.cgm-tile--repo:hover {
  background: rgba(245, 158, 11, 0.12);
}

.cgm-tile--req {
  background: rgba(99, 102, 241, 0.07);
  border-color: rgba(79, 70, 229, 0.22);
}

.cgm-tile--req:hover {
  background: rgba(99, 102, 241, 0.11);
}

.cgm-tile--grid {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(15, 23, 42, 0.10);
}

.cgm-tile--grid:hover {
  background: rgba(255, 255, 255, 1);
}

.cgm-tile__title {
  font-weight: 800;
  font-size: 13px;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  max-width: 100%;
}

.cgm-tile__meta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(15,23,42,0.58);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}

.cgm-tile__meta--muted {
  font-style: italic;
  color: rgba(15,23,42,0.48);
}

.cgm-tileGrid .cgm-emptyState--inList {
  grid-column: 1 / -1;
  border-radius: 12px;
  border: 1px dashed rgba(15,23,42,0.12);
  background: rgba(248, 250, 252, 0.85);
  text-align: left;
}

@media (max-width: 900px) {
  .cgm-workspace {
    grid-template-columns: 200px 1fr;
  }
  .cgm-topbar2__input {
    width: 180px;
  }
  .cgm-topbar2__search {
    width: 160px;
    max-width: 100%;
  }
  .cgm-tileGrid.cgm-list {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 12px;
  }
}

/* Móvil: barra ya es estrecha; un poco más compacta */
@media (max-width: 560px) {
  .cgm-workspace {
    grid-template-columns: 180px 1fr;
  }
  .cgm-sidebar--slim {
    padding: 12px 16px 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    row-gap: 8px;
    padding-top: 10px;
  }
  .cgm-sidebar__tool {
    padding: 8px 10px;
  }
  .cgm-sidebar__toolLbl {
    font-size: 12px;
  }
  .cgm-sidebar__brand--slim {
    width: auto;
    height: auto;
    padding: 0;
  }

  .cgm-sidebar__brandImg {
    width: 28px;
    max-height: 32px;
  }

  .cgm-sidebar__orgAv,
  .cgm-sidebar__empty--slim,
  .cgm-sidebar__iconBtn {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .cgm-sidebar__rail {
    gap: 6px;
    padding-top: 8px;
  }

  .cgm-main {
    padding: 18px 18px 22px;
    padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  }
  .cgm-topbar2 {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .cgm-orgBrand__logo--header {
    max-height: 44px;
  }
  .cgm-orgBrand__logoWrap--header {
    max-width: 100%;
  }
  .cgm-topbar2__createGrid {
    width: 100%;
  }
  .cgm-topbar2__input {
    width: 100%;
    max-width: none;
  }
  .cgm-topbar2__search {
    width: 100%;
    max-width: none;
  }
  .cgm-topbar2__btn {
    white-space: nowrap;
  }
}

/* Ventana baja (muchas orgs + iconos): compactar barra para que el rail no quede fuera del área útil */
@media (max-height: 720px) {
  .cgm-sidebar--slim {
    row-gap: 6px;
    padding-top: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .cgm-sidebar__brand--slim {
    width: auto;
    height: auto;
    padding: 0;
  }

  .cgm-sidebar__brandImg {
    width: 28px;
    max-height: 32px;
  }

  .cgm-sidebar__orgAv,
  .cgm-sidebar__empty--slim,
  .cgm-sidebar__iconBtn {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }
  .cgm-sidebar__nav--slim {
    gap: 6px;
  }
  .cgm-sidebar__rail {
    gap: 6px;
    padding-top: 6px;
  }
}

.cgm-auth-shell {
  max-width: none;
  margin: 0;
  padding: 32px 16px;
  min-height: 70vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1200px 600px at 20% 20%, rgba(99, 102, 241, 0.18), transparent 55%),
    radial-gradient(1000px 500px at 80% 30%, rgba(59, 130, 246, 0.16), transparent 55%),
    radial-gradient(800px 500px at 60% 90%, rgba(236, 72, 153, 0.10), transparent 55%),
    linear-gradient(180deg, #f3f6ff 0%, #eef2ff 100%);
  border-radius: 20px;
}

.cgm-auth {
  width: 100%;
  max-width: 560px;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.cgm-auth__logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--cgm-border);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
  user-select: none;
}

.cgm-auth__card {
  width: 100%;
  background: var(--cgm-card);
  border: 1px solid var(--cgm-border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
}

.cgm-card {
  background: var(--cgm-card);
  border: 1px solid var(--cgm-border);
  border-radius: 16px;
  padding: 18px;
  backdrop-filter: blur(10px);
}

.cgm-card + .cgm-card {
  margin-top: 16px;
}

.cgm-card__header {
  margin-bottom: 14px;
}

.cgm-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.cgm-subtitle {
  margin: 6px 0 0;
  color: var(--cgm-muted);
}

.cgm-h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.cgm-muted {
  color: var(--cgm-muted);
}

.cgm-form {
  display: grid;
  gap: 12px;
}

.cgm-form--inline {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.cgm-label span {
  display: block;
  font-size: 12px;
  color: var(--cgm-muted);
  margin-bottom: 6px;
}

.cgm-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--cgm-border);
  background: #ffffff;
  color: var(--cgm-text);
  outline: none;
}

.cgm-input:focus {
  border-color: rgba(29, 78, 216, 0.55);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.cgm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--cgm-border);
  background: rgba(255, 255, 255, 0.8);
  color: var(--cgm-text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.cgm-btn--primary {
  border-color: rgba(29, 78, 216, 0.65);
  background: rgba(29, 78, 216, 0.92);
  color: #ffffff;
}

.cgm-btn--primary:hover {
  background: rgba(29, 78, 216, 1);
}

.cgm-btn--block {
  width: 100%;
}

.cgm-btn--small {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.cgm-alert {
  margin: 14px 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--cgm-border);
  background: rgba(255, 255, 255, 0.04);
}
.cgm-alert--error { border-color: rgba(255, 107, 107, 0.6); }
.cgm-alert--success { border-color: rgba(46, 204, 113, 0.6); }

.cgm-footer-links {
  margin-top: 14px;
  text-align: center;
}

.cgm-link {
  color: var(--cgm-primary);
  text-decoration: none;
  font-weight: 600;
}

.cgm-link:hover {
  text-decoration: underline;
}

.cgm-auth__meta {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--cgm-muted);
}

.cgm-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.cgm-topbar__actions {
  display: flex;
  gap: 10px;
}

.cgm-grid-list {
  display: grid;
  gap: 10px;
}

.cgm-grid-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--cgm-border);
  background: rgba(255, 255, 255, 0.03);
}

.cgm-grid-list__name {
  font-weight: 700;
}

.cgm-grid-list__date {
  font-size: 12px;
  color: var(--cgm-muted);
  margin-top: 4px;
}

@media (max-width: 640px) {
  .cgm-form--inline {
    grid-template-columns: 1fr;
  }
  .cgm-grid-list__item {
    flex-direction: column;
    align-items: stretch;
  }
  .cgm-grid-list__actions {
    display: flex;
    justify-content: flex-end;
  }
}

/* ---------- Parrilla modular (tarjetas) ---------- */
/*
 * Rompe max-width del tema (p. ej. .entry-content): el shell usa todo el ancho del viewport
 * para que la lista / scroll horizontal no queden en una franja estrecha con márgenes grises.
 * Sin transform: no altera position:fixed del panel lateral y modales.
 */
.cgm-grid-shell {
  min-height: 100vh;
  width: 100vw;
  max-width: 100%;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-sizing: border-box;
  background: linear-gradient(180deg, #f3f5fb 0%, #eef1f8 40%, #f6f7fb 100%);
  color: #0f172a;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  /* Respiro lateral (full-bleed se veía pegado al borde del navegador) */
  padding: 0 clamp(14px, 3vw, 28px) 48px;
  overscroll-behavior-x: none;
  overscroll-behavior-y: none;
}

/* Parrilla con barra lateral (workspace): el shell va en .cgm-main, sin full-bleed 100vw */
.cgm-workspace--with-grid .cgm-main--gridEmbed {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.cgm-workspace--with-grid .cgm-main--gridEmbed .cgm-grid-shell {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  min-height: 100%;
  flex: 1 1 auto;
}

/* Evita rebote / “tirón” del trackpad en la página cuando hay parrilla embebida */
html:has(.cgm-grid-shell),
body:has(.cgm-grid-shell) {
  overscroll-behavior-x: none;
  overscroll-behavior-y: none;
}

.admin-bar .cgm-grid-shell {
  padding-top: 12px;
}

.cgm-grid-header {
  max-width: min(98vw, 1720px);
  margin: 0 auto;
  padding: 24px 20px 8px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cgm-grid-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cgm-grid-viewtoggle {
  display: inline-flex;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.10);
  background: #fff;
  overflow: hidden;
}

.cgm-viewbtn {
  border: none;
  background: transparent;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 900;
  color: rgba(15,23,42,0.65);
}

.cgm-viewbtn.is-active {
  background: rgba(29,78,216,0.10);
  color: rgba(29,78,216,0.95);
}

.cgm-viewbtn--wrap {
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.10);
  background: #fff;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cgm-viewbtn--wrap.is-active {
  background: rgba(29,78,216,0.10);
  color: rgba(29,78,216,0.95);
  border-color: rgba(29,78,216,0.28);
}

.cgm-wrap-ico {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
}

.cgm-grid-header__left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.cgm-grid-back {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.10);
  background: #fff;
  text-decoration: none;
  color: rgba(29,78,216,0.95);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.cgm-grid-header__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.cgm-grid-header__sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: rgba(15,23,42,0.55);
}

.cgm-grid-header__cta {
  padding: 12px 18px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #3b5bdb 0%, #5b21b6 100%);
  box-shadow: 0 10px 28px rgba(59, 91, 219, 0.35);
}

.cgm-grid-header__cta:hover {
  filter: brightness(1.05);
}

.cgm-grid-header__team {
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.cgm-grid-header__team:hover {
  background: rgba(37, 99, 235, 0.14);
}

.cgm-grid-monthbar {
  max-width: min(98vw, 1720px);
  margin: 0 auto;
  padding: 8px 20px 4px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px 16px;
  box-sizing: border-box;
}

.cgm-grid-monthbar__view {
  justify-self: start;
  min-width: 0;
}

.cgm-grid-monthbar__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  justify-self: center;
}

.cgm-grid-monthbar__spacer {
  min-width: 0;
}

.cgm-monthbtn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.10);
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  color: rgba(15,23,42,0.75);
}

.cgm-monthbar__label {
  min-width: 220px;
  text-align: center;
  font-weight: 900;
  color: rgba(15,23,42,0.75);
}

.cgm-grid-board-wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px 0 32px;
  box-sizing: border-box;
  min-width: 0;
}

/* Calendario: mismo ancho que cabecera/mes; la lista va a ancho completo */
.cgm-grid-board__sections > .cgm-grid-cal {
  max-width: min(98vw, 1720px);
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.cgm-grid-board__loading {
  padding: 24px;
  text-align: center;
  color: rgba(15,23,42,0.5);
}

.cgm-grid-empty {
  padding: 40px 20px;
  text-align: center;
  color: rgba(15,23,42,0.55);
  background: rgba(255,255,255,0.72);
  border-radius: 16px;
  border: 1px dashed rgba(15,23,42,0.12);
}

.cgm-grid-cal__dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-bottom: 10px;
  color: rgba(15,23,42,0.55);
  font-size: 12px;
  font-weight: 800;
}

.cgm-grid-cal__dow > div {
  padding: 0 6px;
}

.cgm-grid-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.cgm-day {
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 16px;
  min-height: 140px;
  padding: 10px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
}

.cgm-day--blank {
  background: transparent;
  border: none;
  box-shadow: none;
}

.cgm-day__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cgm-day__dow {
  font-size: 11px;
  font-weight: 800;
  color: rgba(15,23,42,0.45);
  margin-left: 8px;
  margin-right: auto;
  padding-left: 10px;
}

.cgm-day__num {
  font-weight: 900;
  color: rgba(15,23,42,0.75);
}

.cgm-day__count {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(29,78,216,0.10);
  border: 1px solid rgba(29,78,216,0.16);
  color: rgba(29,78,216,0.95);
  font-weight: 900;
  font-size: 12px;
}

.cgm-day__items {
  display: grid;
  gap: 8px;
  align-content: start;
}

.cgm-day__add {
  width: 100%;
  padding: 6px 8px;
  margin-top: 6px;
  border-radius: 12px;
  border: 1px dashed rgba(15,23,42,0.16);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  color: rgba(15,23,42,0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  box-sizing: border-box;
}

.cgm-day__add .cgm-ico {
  display: block;
}

.cgm-mini {
  text-align: left;
  border: 1px solid rgba(15,23,42,0.10);
  background: #fff;
  border-radius: 14px;
  padding: 8px 10px;
  cursor: pointer;
}

.cgm-mini.is-published { border-color: rgba(22,163,74,0.28); }
.cgm-mini.is-draft { border-color: rgba(100,116,139,0.28); }
.cgm-mini.is-pending { border-color: rgba(59,130,246,0.22); }

.cgm-mini__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.cgm-mini__status {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: rgba(15,23,42,0.55);
}

.cgm-mini__time {
  font-size: 11px;
  color: rgba(15,23,42,0.45);
  font-weight: 800;
}

.cgm-mini__tail {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cgm-mini__title {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: rgba(15,23,42,0.72);
  line-height: 1.25;
}

.cgm-grid-board,
.cgm-grid-board__sections {
  width: 100%;
  box-sizing: border-box;
}

/* Lista: borde/sombra en exterior; scroll horizontal solo en __hscroll (la rueda mueve la página, no queda atrapada). */
.cgm-listview {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  overflow: visible;
}

.cgm-listview__hscroll {
  overflow-x: auto;
  overflow-y: clip;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: none;
  border-radius: 13px;
  min-width: 0;
}

/* Vista lista global (admin): columna Organización tras Acciones */
.cgm-listview--global .cgm-listview__head,
.cgm-listview--global .cgm-listrow:not(.cgm-listrow--dayheader) {
  grid-template-columns:
    172px
    minmax(120px, 160px)
    minmax(74px, 86px)
    minmax(104px, 128px)
    156px
    minmax(100px, 120px)
    minmax(200px, 1.45fr)
    minmax(230px, 1.75fr)
    minmax(140px, 1.12fr)
    minmax(100px, 118px)
    minmax(108px, 128px)
    minmax(108px, 132px)
    minmax(72px, 88px)
    minmax(72px, 88px);
  min-width: 2040px;
}

.cgm-listview__headOrg {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  padding: 0 4px;
}

/* Misma cabecera que el resto de columnas (menú ▾ de filtro/orden) */
.cgm-listview__headOrg.cgm-listHeadCell {
  align-items: stretch;
  justify-content: center;
  min-width: 0;
}

.cgm-listcell--org {
  border-left: 4px solid var(--cgm-org-accent, rgba(15, 23, 42, 0.12));
  padding-left: 10px !important;
}

.cgm-listcell--orgEmpty {
  border-left-color: rgba(15, 23, 42, 0.12);
  background: transparent;
}

.cgm-orgcell__name {
  display: block;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.cgm-orgcell__grid {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.5);
  line-height: 1.2;
}

.cgm-global-grid-shell {
  margin: 0 -16px;
  padding: 0 8px 16px;
  max-width: none;
}

.cgm-global-grid-shell .cgm-grid-monthbar {
  margin-top: 0;
}

.cgm-global-grid-shell__hint {
  margin: 0 8px 12px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.65);
}

.cgm-listview__head {
  display: grid;
  align-items: stretch;
  grid-template-columns:
    172px
    minmax(74px, 86px)
    minmax(104px, 128px)
    156px
    minmax(100px, 120px)
    minmax(200px, 1.45fr)
    minmax(230px, 1.75fr)
    minmax(140px, 1.12fr)
    minmax(100px, 118px)
    minmax(108px, 128px)
    minmax(108px, 132px)
    minmax(72px, 88px)
    minmax(72px, 88px);
  gap: 12px 18px;
  padding: 12px 16px;
  background: #1d4ed8;
  border-bottom: 1px solid rgba(15, 23, 42, 0.2);
  font-size: 12px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.95);
  /* ≥ suma de mins del grid + 11×gap + padding; si es menor, el borde/hover no llega a Aprob./Activo */
  min-width: 1888px;
}

.cgm-listview__headActions {
  position: sticky;
  left: 0;
  z-index: 4;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin-left: -16px;
  margin-top: -12px;
  margin-bottom: -12px;
  padding: 12px 10px 12px 18px;
  width: calc(100% + 16px);
  min-width: 0;
  max-width: none;
  background: #1d4ed8;
  color: rgba(255, 255, 255, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  border-top-left-radius: 13px;
  box-shadow: none;
  text-align: center;
}

.cgm-listrow .cgm-listcell--actions {
  position: sticky;
  left: 0;
  z-index: 2;
  margin-left: -16px;
  margin-top: -10px;
  margin-bottom: -10px;
  padding: 14px 8px 14px 24px;
  width: calc(100% + 16px);
  max-width: none;
  box-sizing: border-box;
  background: #fff;
  box-shadow: none;
  border-right: 1px solid rgba(15, 23, 42, 0.1);
}

.cgm-listrow--emptyday .cgm-listcell--actions {
  background: #fff;
}

.cgm-listrow--emptyday:hover .cgm-listcell--actions {
  background: #fff;
}

.cgm-listrow--underday .cgm-listcell--actions {
  background: #fff;
  margin-top: -12px;
  margin-bottom: -12px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.cgm-listrow:hover .cgm-listcell--actions {
  background: #fff;
}

.cgm-listrow--underday:hover .cgm-listcell--actions {
  background: #fff;
}

.cgm-listview__rows {
  display: flex;
  flex-direction: column;
}

.cgm-listview__day--grouped {
  margin-bottom: 6px;
  background: #fff;
}

.cgm-listrow--dayheader {
  display: block;
  padding: 0;
  min-width: 1772px;
  border-bottom: none;
  background: transparent;
}

.cgm-listview--global .cgm-listrow--dayheader {
  min-width: 1920px;
}

.cgm-listrow--dayheader:hover {
  background: transparent;
}

/*
 * Cabecera de día: degradado en todo el ancho. Sin hover con inset box-shadow (en flex/wrap + overflow
 * del listado algunos navegadores recortan mal el velo y aparece un “cuadro” a la izquierda).
 */
.cgm-listrow--dayheader__bar {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  min-height: 56px;
  padding: 13px 18px;
  background: linear-gradient(
    90deg,
    #e9eef6 0%,
    #eef2f7 18%,
    #f3f6fa 40%,
    #f7f9fc 62%,
    #fbfcfd 82%,
    #ffffff 100%
  );
  border: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 0;
}

.cgm-dayheader__main {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px 12px;
  flex: 1 1 280px;
  min-width: min(100%, 280px);
  background: transparent;
}

.cgm-dayheader__dow {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.1;
  background: transparent;
  flex-shrink: 0;
}

/* Antes: línea 1px = corte duro entre “martes” y la fecha; ahora punto suave */
.cgm-dayheader__sep {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.75rem;
  min-height: 1rem;
  margin: 0;
  background: none;
  pointer-events: none;
}

.cgm-dayheader__sep::before {
  content: "·";
  color: rgba(15, 23, 42, 0.22);
  font-weight: 900;
  font-size: 1.35rem;
  line-height: 1;
  transform: translateY(-1px);
}

.cgm-dayheader__iso {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.45);
  line-height: 1.2;
  background: transparent;
  flex-shrink: 0;
  white-space: nowrap;
}

.cgm-dayheader__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  flex: 0 0 auto;
  background: transparent;
}

.cgm-dayheader__badge {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: rgba(237, 242, 250, 0.95);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  box-shadow: none;
  flex-shrink: 0;
}

.cgm-dayheader__add {
  flex-shrink: 0;
  padding: 8px 16px;
}

.cgm-listrow--underday {
  background: #fff;
  padding-top: 12px;
  padding-bottom: 12px;
}

.cgm-listrow--underday:hover {
  background: rgba(241, 245, 250, 0.95);
}

.cgm-listcell--underday {
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding-top: 6px;
  padding-bottom: 4px;
}

.cgm-underday__rail {
  width: 4px;
  align-self: stretch;
  min-height: 2.25rem;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.55) 0%, rgba(99, 102, 241, 0.35) 100%);
}

.cgm-listrow {
  display: grid;
  grid-template-columns:
    172px
    minmax(74px, 86px)
    minmax(104px, 128px)
    156px
    minmax(100px, 120px)
    minmax(200px, 1.45fr)
    minmax(230px, 1.75fr)
    minmax(140px, 1.12fr)
    minmax(100px, 118px)
    minmax(108px, 128px)
    minmax(108px, 132px)
    minmax(72px, 88px)
    minmax(72px, 88px);
  gap: 12px 18px;
  padding: 10px 16px;
  align-items: start;
  min-width: 1888px;
  background: #fff;
}

/* Una sola línea por fila en todo el ancho (incluye columna Acciones) */
.cgm-listrow:not(.cgm-listrow--dayheader) {
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.cgm-listrow:hover:not(.cgm-listrow--dayheader) {
  background: rgba(241, 245, 250, 0.95);
}

.cgm-listrow--emptyday {
  background: #fff;
}

.cgm-listrow--emptyday:hover {
  background: #fff;
}

/* Refuerzo: cabecera y filas deben compartir exactamente 14 columnas (Org + 12 campos de lista). */
.cgm-listview.cgm-listview--global .cgm-listview__head,
.cgm-listview.cgm-listview--global .cgm-listrow:not(.cgm-listrow--dayheader) {
  grid-template-columns:
    172px
    minmax(120px, 160px)
    minmax(74px, 86px)
    minmax(104px, 128px)
    156px
    minmax(100px, 120px)
    minmax(200px, 1.45fr)
    minmax(230px, 1.75fr)
    minmax(140px, 1.12fr)
    minmax(100px, 118px)
    minmax(108px, 128px)
    minmax(108px, 132px)
    minmax(72px, 88px)
    minmax(72px, 88px);
}

.cgm-listcell {
  font-size: 13px;
  color: rgba(15,23,42,0.75);
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
}

/* —— Edición en línea (vista lista) —— */
.cgm-list-edit {
  position: relative;
  display: block;
  min-height: 1.35em;
  padding: 2px 22px 2px 4px;
  margin: -2px -4px;
  border-radius: 8px;
}

.cgm-listcell:has(.cgm-list-edit--time) {
  overflow: visible;
}

.cgm-list-edit--strong .cgm-list-edit__text {
  font-weight: 800;
  color: rgba(15, 23, 42, 0.92);
}

.cgm-list-edit__text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cgm-list-edit--multi .cgm-list-edit__text {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.cgm-list-edit--time .cgm-list-edit__text {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: rgba(15, 23, 42, 0.88);
}

.cgm-list-edit__pen {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(15, 23, 42, 0.4);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.cgm-list-edit:hover .cgm-list-edit__pen,
.cgm-list-drop:hover .cgm-list-edit__pen {
  opacity: 1;
}

.cgm-list-edit__pen:hover {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.65);
}

.cgm-list-edit__penSvg {
  display: block;
  margin: 0 auto;
}

/* Emojis en copy / novedades (vista lista): solo al abrir el campo para editar */
.cgm-list-edit--multi.is-editing {
  padding-bottom: 34px;
}
.cgm-list-edit--multi.is-editing .cgm-list-edit__emoji {
  position: absolute;
  bottom: 4px;
  right: 5px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  opacity: 1;
  transition: background 0.15s ease;
}
.cgm-list-edit--multi.is-editing .cgm-list-edit__emoji:hover {
  background: rgba(15, 23, 42, 0.06);
}

.cgm-list-edit__input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font: inherit;
  color: rgba(15, 23, 42, 0.92);
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: #fff;
  min-height: 2em;
}

.cgm-list-edit__input:focus {
  outline: none;
  border-color: rgba(15, 23, 42, 0.32);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.06);
}

.cgm-list-edit--multi .cgm-list-edit__input {
  min-height: 4.5rem;
  resize: vertical;
}

.cgm-list-edit__input--time {
  width: auto;
  min-width: 8.25rem; /* que quepa 10:00 + icono reloj */
  max-width: 100%;
  font-variant-numeric: tabular-nums;
  padding-right: 2.2rem;
}

.cgm-list-drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 1.35em;
  padding: 2px 22px 2px 4px;
  margin: -2px -4px;
  border-radius: 8px;
  cursor: pointer;
}

.cgm-list-drop__face {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cgm-list-drop .cgm-social-cell {
  pointer-events: none;
}

.cgm-list-drop__face .cgm-yn {
  pointer-events: none;
}

.cgm-list-drop__face .cgm-pill {
  pointer-events: none;
}

.cgm-list-bool--btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  vertical-align: middle;
}

.cgm-list-bool--btn:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.5);
  outline-offset: 2px;
}

.cgm-list-bool-pillBtn {
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}

.cgm-list-bool-pillBtn:focus-visible {
  outline: 2px solid rgba(15, 23, 42, 0.22);
  outline-offset: 2px;
  border-radius: 10px;
}

.cgm-list-pop {
  position: relative;
}

.cgm-list-pop__panel {
  padding: 0;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 16px 48px rgba(2, 6, 23, 0.2);
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  /* Tope por defecto: el JS ajusta max-height al espacio libre bajo el viewport */
  max-height: calc(100vh - 24px);
}

.cgm-list-pop__inner {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 12px 14px 0;
  /* La altura la limita .cgm-list-pop__panel (max-height + JS al abrir) */
}

/* Solo el cuerpo hace scroll; título, hint y pie (Analizar / Guardar) permanecen visibles */
.cgm-list-pop__title,
.cgm-list-pop__hint {
  flex-shrink: 0;
}

.cgm-list-pop__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.cgm-list-pop__title {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(15, 23, 42, 0.45);
  margin-bottom: 10px;
}

.cgm-list-pop__hint {
  margin: -4px 0 10px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(15, 23, 42, 0.52);
}

.cgm-list-pop__hint--tight {
  margin-top: 0;
  margin-bottom: 12px;
}

.cgm-list-pop__select--multi {
  min-height: 7.5rem;
  padding: 6px 8px;
}

.cgm-list-pop__checks {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cgm-list-pop__opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
  color: rgba(15, 23, 42, 0.85);
  padding: 8px 10px;
  margin: 0 -6px;
  border-radius: 10px;
  transition: background 0.12s ease;
}

.cgm-list-pop__opt:hover {
  background: rgba(15, 23, 42, 0.04);
}

.cgm-list-pop__opt input {
  margin-top: 2px;
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  accent-color: #3b5bdb;
  cursor: pointer;
}

.cgm-list-pop__opt span {
  line-height: 1.35;
  user-select: none;
}

.cgm-list-pop__select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  font: inherit;
}

.cgm-list-pop__foot {
  flex-shrink: 0;
  margin-top: 8px;
  padding: 10px 0 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
}

.cgm-list-pop__ok {
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #3b5bdb 0%, #5b21b6 100%);
  color: #fff;
}

.cgm-list-pop__ok:hover {
  filter: brightness(1.05);
}

.cgm-social-pick--pop {
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
}

.cgm-social-pick--pop .cgm-social-pick__lbl {
  padding: 6px 8px;
  border-radius: 10px;
}

.cgm-social-pick--pop .cgm-social-pick__lbl:hover {
  background: rgba(15, 23, 42, 0.04);
}

@media (hover: none) {
  .cgm-list-edit__pen,
  .cgm-list-drop .cgm-list-edit__pen {
    opacity: 0.5;
  }
}

.cgm-listcell--datecol {
  align-self: stretch;
}

.cgm-dateblock {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.2;
}

.cgm-dateblock__iso {
  font-size: 12px;
  font-weight: 800;
  color: rgba(15,23,42,0.48);
  letter-spacing: 0.02em;
}

.cgm-dateblock__dow {
  font-size: 15px;
  font-weight: 900;
  color: rgba(15,23,42,0.92);
  letter-spacing: -0.01em;
}

.cgm-dateblock--list {
  display: grid;
  /* ~“Miércoles” a 14px/800; gap mínimo sin perder alineación de números */
  grid-template-columns: 6.05rem 2.05rem;
  align-items: center;
  column-gap: 2px;
  width: fit-content;
  max-width: 100%;
}

.cgm-dateblock--list .cgm-dateblock__dow {
  font-size: 14px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.88);
  min-width: 0;
  white-space: nowrap;
}

.cgm-dateblock--list .cgm-dateblock__day {
  justify-self: end;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 1.35rem;
  font-weight: 900;
  color: #1d4ed8;
  letter-spacing: -0.03em;
  line-height: 1.1;
  transform: translateY(0.1em);
}

.cgm-listcell--muted {
  color: rgba(15,23,42,0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.cgm-wrap-on .cgm-listcell--muted,
body.cgm-wrap-on .cgm-listcell--strong,
body.cgm-wrap-on .cgm-listcell {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

body.cgm-wrap-on .cgm-listrow {
  align-items: stretch;
}

body.cgm-wrap-on .cgm-listcell {
  word-break: break-word;
}

.cgm-listcell--strong {
  font-weight: 800;
}

.cgm-yn {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 6px;
}

.cgm-yn--yes {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
}

.cgm-yn--no {
  background: rgba(148, 163, 184, 0.2);
  color: #64748b;
}

.cgm-list-bool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.cgm-list-bool__ui {
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(15, 23, 42, 0.38);
  border-radius: 4px;
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.06);
  flex-shrink: 0;
}

.cgm-list-bool.is-on .cgm-list-bool__ui {
  position: relative;
  border-color: #15803d;
  background: #16a34a;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Canal: redes sociales (tipo "social") */
.cgm-social-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.cgm-social-pick__lbl {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  color: rgba(15, 23, 42, 0.88);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cgm-social-pick__lbl:has(input:checked) {
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(59, 130, 246, 0.08);
}

.cgm-social-pick__lbl input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cgm-social-pick__ico {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cgm-social-pick__ico .cgm-social-svg {
  display: block;
}

.cgm-social-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cgm-social-cell__icos {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.10);
}

.cgm-social-cell__icos .cgm-social-svg {
  width: 18px;
  height: 18px;
  display: block;
}

.cgm-social-cell__ico {
  display: flex;
  flex-shrink: 0;
}

.cgm-social-cell--raw {
  color: rgba(15, 23, 42, 0.6);
  font-size: 13px;
}

.cgm-social-cell__ico .cgm-social-svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Texto oculto: dejamos el aria-label para accesibilidad. */
.cgm-social-cell__txt { display: none; }

.cgm-listcell--arts {
  display: flex;
  align-items: center;
}

.cgm-arts-cell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  aspect-ratio: 4 / 5; /* 1080×1350 */
  height: auto;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.03);
  cursor: pointer;
  overflow: hidden;
}

/* Miniatura en fila: vídeo vertical más alto que 4:5 */
.cgm-arts-cell--video {
  aspect-ratio: 9 / 16;
}

.cgm-arts-cell:hover {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.18);
}

.cgm-arts-cell__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.cgm-arts-cell__count {
  position: absolute;
  right: 6px;
  bottom: 6px;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
}

.cgm-arts-cell--empty {
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
  color: rgba(15, 23, 42, 0.55);
  background: rgba(15, 23, 42, 0.02);
}

/* Revisado por: formato contacto */
.cgm-contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cgm-contact__avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 950;
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, 0.22);
  flex-shrink: 0;
}
.cgm-contact__text { display: grid; min-width: 0; }
.cgm-contact__name {
  font-size: 13px;
  font-weight: 850;
  color: rgba(15, 23, 42, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cgm-contact__email {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cgm-art__bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.cgm-art__file {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cgm-art__btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.cgm-art__btn:hover { background: rgba(15, 23, 42, 0.04); }

.cgm-art__hint {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
}

.cgm-art__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}

.cgm-art__empty {
  font-size: 13px;
  color: rgba(15, 23, 42, 0.55);
  padding: 10px 0;
}

.cgm-art__item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.03);
  cursor: grab;
}

.cgm-art__idx {
  position: absolute;
  left: 8px;
  top: 8px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 950;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-sizing: border-box;
  pointer-events: none;
}

.cgm-art__item.is-dragging { opacity: 0.65; }

.cgm-art__thumb {
  width: 100%;
  aspect-ratio: 4 / 5; /* 1080×1350 */
  object-fit: cover;
  display: block;
}

.cgm-art__thumb--video {
  aspect-ratio: 9 / 16;
  background: #0f172a;
}

.cgm-art__itemBtns {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 6px;
}

.cgm-art__iconBtn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 14px;
}

.cgm-art__iconBtn:hover {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.2);
}

.cgm-list-bool.is-on .cgm-list-bool__ui::after {
  content: '';
  box-sizing: content-box;
  width: 3px;
  height: 8px;
  margin-left: 0.5px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.cgm-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15,23,42,0.06);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  color: rgba(15,23,42,0.65);
}

.cgm-listrow.is-published .cgm-pill { background: rgba(22, 163, 74, 0.12); color: #15803d; }
.cgm-listrow.is-draft .cgm-pill { background: rgba(100,116,139,0.12); color: #475569; }
.cgm-listrow.is-pending .cgm-pill { background: rgba(59,130,246,0.12); color: #1d4ed8; }

/* Pills para revisión IA (independientes del estado de publicación) */
.cgm-pill.cgm-pill--ai { text-transform: none; }
.cgm-pill.cgm-pill--ai-ok { background: rgba(22, 163, 74, 0.12); color: #15803d; }
.cgm-pill.cgm-pill--ai-review {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #dc2626;
  color: #fff;
  border: 1px solid #991b1b;
  font-weight: 800;
}

.cgm-pill__ai-warn-ico {
  flex-shrink: 0;
  display: block;
}

/* El estado de la fila (pendiente/borrador…) no debe teñir el pill «Revisar» de revisión IA */
.cgm-listrow.is-published .cgm-pill.cgm-pill--ai-review,
.cgm-listrow.is-draft .cgm-pill.cgm-pill--ai-review,
.cgm-listrow.is-pending .cgm-pill.cgm-pill--ai-review {
  background: #dc2626;
  color: #fff;
  border-color: #991b1b;
}
.cgm-pill.cgm-pill--ai-error { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.cgm-pill.cgm-pill--ai-none { background: rgba(100,116,139,0.10); color: #475569; }
.cgm-pill.cgm-pill--ai-running { background: rgba(59,130,246,0.12); color: #1d4ed8; }

.cgm-listrow--copywarn,
.cgm-listrow--artwarn {
  box-shadow: inset 3px 0 0 0 #dc2626;
}

.cgm-copy-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  min-width: 0;
}

.cgm-copy-issue-badge,
.cgm-art-issue-badge {
  align-self: flex-start;
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  font-family: inherit;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.28);
  max-width: 100%;
  cursor: pointer;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}

.cgm-copy-issue-badge:focus-visible,
.cgm-art-issue-badge:focus-visible {
  outline: 2px solid rgba(220, 38, 38, 0.55);
  outline-offset: 2px;
}

.cgm-copy-issue-badge.is-open,
.cgm-art-issue-badge.is-open {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(185, 28, 28, 0.45);
}


/* Tooltip flotante al pasar el ratón sobre la chapa de faltas en el copy (lista) */
.cgm-copy-issues-tip-float {
  position: fixed;
  z-index: 100080;
  box-sizing: border-box;
  min-width: 220px;
  max-width: min(400px, calc(100vw - 20px));
  max-height: min(320px, 55vh);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 14px;
  margin: 0;
  background: #fff;
  color: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: 12px;
  box-shadow:
    0 12px 40px rgba(15, 23, 42, 0.18),
    0 2px 10px rgba(185, 28, 28, 0.12);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.cgm-copy-issues-tip-float.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cgm-copy-issues-tip-float__title {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b91c1c;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.cgm-copy-issues-tip-float__list {
  margin: 0;
  padding: 0 0 0 1.1em;
  list-style: decimal;
  font-size: 13px;
  line-height: 1.45;
}

.cgm-copy-issues-tip-float__item {
  margin: 0 0 10px;
  padding: 0;
}

.cgm-copy-issues-tip-float__item:last-child {
  margin-bottom: 0;
}

.cgm-copy-issues-tip-float__type {
  display: block;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(15, 23, 42, 0.45);
  margin-bottom: 2px;
}

.cgm-copy-issues-tip-float__msg {
  display: block;
  color: rgba(15, 23, 42, 0.82);
}

.cgm-copy-issues-tip-float__sug {
  font-weight: 650;
  color: #15803d;
}

.cgm-mini--copywarn {
  border-color: rgba(220, 38, 38, 0.45) !important;
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.18);
}

.cgm-mini__copywarn {
  margin-left: auto;
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
}

.cgm-grid-form__labelRow {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.cgm-form-copy-warn {
  font-size: 12px;
  font-weight: 700;
  color: #b91c1c;
  cursor: help;
}

.cgm-listrow__img {
  width: 96px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(15,23,42,0.10);
}

.cgm-listrow__imgEmpty {
  color: rgba(15,23,42,0.35);
}

.cgm-listcell--actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  box-sizing: border-box;
  padding: 4px 8px;
  min-width: 0;
  overflow: visible;
}

.cgm-listcell--afterActions {
  padding-left: 2px;
  min-width: 0;
}

/* Estado (pill) arriba; chapa de texto en imagen debajo */
.cgm-after-actions-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.cgm-listcell--actions .cgm-btn-mini {
  flex: 0 0 auto;
}

/* Sin “tarjeta” blanca: el tema o .cgm-btn-mini (más abajo) puede pisar fondo/sombra */
.cgm-listcell--actions > button.cgm-btn-mini.cgm-btn-mini--icon {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.cgm-listcell--actions > button.cgm-btn-mini.cgm-btn-mini--icon:focus-visible {
  outline: 2px solid rgba(29, 78, 216, 0.45);
  outline-offset: 2px;
}

.cgm-listcell--actions > button.cgm-btn-mini.cgm-btn-mini--icon:hover {
  background: rgba(29, 78, 216, 0.1) !important;
  border-color: rgba(29, 78, 216, 0.22) !important;
  box-shadow: none !important;
}

.cgm-listcell--actions > button.cgm-btn-mini.cgm-btn-mini--icon.cgm-btn-mini--danger:hover {
  background: rgba(220, 38, 38, 0.08) !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
  box-shadow: none !important;
}

.cgm-btn-mini--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  color: rgba(15, 23, 42, 0.72);
}

.cgm-btn-mini--icon:hover {
  background: rgba(29, 78, 216, 0.08);
  border-color: rgba(29, 78, 216, 0.28);
  color: #1d4ed8;
}

.cgm-btn-mini--icon .cgm-ico {
  display: block;
  pointer-events: none;
}

.cgm-btn-mini--icon.cgm-btn-mini--danger {
  color: #b91c1c;
}

.cgm-btn-mini--icon.cgm-btn-mini--danger:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.35);
  color: #991b1b;
}

.cgm-btn-mini--comments {
  position: relative;
}

/* Misma chapa que comentarios: sin esto el contador de adjuntos se posiciona mal */
.cgm-btn-mini--attach {
  position: relative;
}

.cgm-comment-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  background: #1d4ed8;
  color: #fff;
  border: 2px solid #fff;
  box-sizing: border-box;
  pointer-events: none;
}

.cgm-dayheader__add.cgm-btn-mini--icon {
  width: 38px;
  height: 38px;
}

.cgm-comments-dlg {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.cgm-comments-dlg[hidden] {
  display: none !important;
}

.cgm-comments-dlg__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.45);
}

.cgm-comments-dlg__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 720px);
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
  padding: 20px 22px 22px;
  z-index: 1;
}

.cgm-comments-dlg__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.cgm-comments-dlg__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.3;
}

.cgm-comments-dlg__close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.cgm-comments-dlg__hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.55);
  line-height: 1.45;
}

.cgm-comments-dlg__field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.cgm-comments-dlg__field span {
  font-size: 12px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.55);
}

.cgm-comments-dlg__field select,
.cgm-comments-dlg__field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.cgm-comments-dlg__submit {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 14px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #3b5bdb 0%, #5b21b6 100%);
  margin-bottom: 20px;
}

.cgm-comments-dlg__listwrap {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 16px;
}

.cgm-comments-dlg__listTitle {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(15, 23, 42, 0.45);
  margin-bottom: 10px;
}

.cgm-comments-dlg__empty {
  margin: 0;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.45);
}

.cgm-comments-dlg__item {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(248, 250, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.06);
  margin-bottom: 10px;
}

.cgm-comments-dlg__itemCol {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1d4ed8;
  margin-right: 10px;
}

.cgm-comments-dlg__itemTime {
  font-size: 11px;
  color: rgba(15, 23, 42, 0.42);
}

.cgm-comments-dlg__itemText {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(15, 23, 42, 0.85);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Modal adjuntos (archivos; distinto de artes) */
.cgm-attach-dlg {
  position: fixed;
  inset: 0;
  z-index: 100003;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}
.cgm-attach-dlg[hidden] {
  display: none !important;
}
.cgm-attach-dlg__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.45);
}
.cgm-attach-dlg__panel {
  position: relative;
  width: min(520px, 100%);
  max-height: min(88vh, 640px);
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
  padding: 20px 22px 22px;
  z-index: 1;
}
.cgm-attach-dlg__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.cgm-attach-dlg__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.3;
}
.cgm-attach-dlg__close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.cgm-attach-dlg__hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.55);
  line-height: 1.45;
}
.cgm-attach__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.cgm-attach__empty {
  font-size: 13px;
  color: rgba(15, 23, 42, 0.55);
  padding: 10px 0 4px;
}
.cgm-attach__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(15, 23, 42, 0.02);
}
.cgm-attach__link {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: #1d4ed8;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cgm-attach__link:hover {
  text-decoration: underline;
}
.cgm-attach__del {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

/* Modal artes / vídeo */
.cgm-art-dlg {
  position: fixed;
  inset: 0;
  z-index: 100004;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.cgm-art-dlg[hidden] { display: none !important; }
.cgm-art-dlg__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
}
.cgm-art-dlg__panel {
  position: relative;
  width: min(1120px, 96vw);
  max-height: min(84vh, 900px);
  overflow: auto;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.35);
  padding: 16px 16px 18px;
  z-index: 1;
}
.cgm-art-dlg__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cgm-art-dlg__title {
  margin: 0;
  font-size: 18px;
  font-weight: 950;
  color: rgba(15, 23, 42, 0.92);
}
.cgm-art-dlg__close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.cgm-art-dlg__hint {
  margin: 10px 0 12px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.62);
}

/* Modal Artes: layout 2 columnas + preview */
.cgm-art-dlg__body {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 16px;
  align-items: start;
  margin-top: 10px;
}

.cgm-art-dlg__left {
  min-width: 0;
}

.cgm-art-dlg__right {
  position: sticky;
  top: 10px;
  align-self: start;
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  padding-left: 16px;
  min-width: 0;
}

.cgm-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.cgm-preview__title {
  font-weight: 950;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.85);
}

.cgm-preview__devices {
  display: inline-flex;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  overflow: hidden;
  background: #fff;
}

.cgm-preview__dev {
  width: 40px;
  height: 34px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.cgm-preview__dev.is-active {
  background: rgba(29, 78, 216, 0.10);
  color: rgba(29, 78, 216, 0.95);
}

.cgm-preview__controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.cgm-preview__field {
  display: grid;
  gap: 6px;
}
.cgm-preview__field span {
  font-size: 11px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.55);
}
.cgm-preview__field select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  font-size: 13px;
}

.cgm-preview__stage {
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 16px;
  background: rgba(248, 250, 255, 0.9);
  padding: 12px;
  min-height: 360px;
}

.cgm-preview__device {
  margin: 0 auto;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
.cgm-preview__device.is-desktop { width: 100%; }
.cgm-preview__device.is-mobile { width: 320px; }

/* “Facebook feed” simple */
.cgm-fb {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.cgm-fb__top {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 12px 10px;
}
.cgm-fb__avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(24, 119, 242, 0.16);
  border: 1px solid rgba(24, 119, 242, 0.22);
  display: grid;
  place-items: center;
  font-weight: 950;
  color: rgba(24, 119, 242, 0.95);
  flex: 0 0 auto;
}
.cgm-fb__meta { min-width: 0; }
.cgm-fb__name {
  font-weight: 900;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.9);
  line-height: 1.15;
}
.cgm-fb__time {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
}
.cgm-fb__copy {
  padding: 0 12px 10px;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.85);
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}
.cgm-fb__media {
  background: #0b1220;
}
.cgm-fb__media img,
.cgm-fb__media video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Facebook: mosaico de imágenes (cuando Post tiene varias) */
.cgm-fb__grid {
  display: grid;
  gap: 2px;
  background: #0b1220;
}
.cgm-fb__grid--2 {
  grid-template-columns: 1fr 1fr;
}
.cgm-fb__grid--3,
.cgm-fb__grid--4 {
  grid-template-columns: 1fr 1fr;
}
.cgm-fb__gridCell {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #0b1220;
}
.cgm-fb__gridCell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cgm-fb__more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.42);
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0.02em;
}
.cgm-fb__carouselBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.04);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}
.cgm-fb__nav {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  cursor: pointer;
  font-weight: 900;
}
.cgm-fb__dots {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  flex: 1;
}
.cgm-fb__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.25);
}
.cgm-fb__dot.is-on {
  background: rgba(29, 78, 216, 0.95);
}

/* “Instagram feed / story” simple */
.cgm-ig {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #fff;
}

.cgm-ig__top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.cgm-ig__avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #ffdc80 0%, #f77737 20%, #fd1d1d 45%, #c13584 70%, #5851db 100%);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.10);
  flex: 0 0 auto;
}

.cgm-ig__meta { min-width: 0; }
.cgm-ig__user {
  font-weight: 900;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.92);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.cgm-ig__sub {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
}
.cgm-ig__more {
  margin-left: auto;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.55);
}

.cgm-ig__media {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #0b1220;
  overflow: hidden;
}
.cgm-ig__media img,
.cgm-ig__media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.cgm-ig.cgm-ig--feed45 .cgm-ig__media {
  /* Instagram feed 1080×1350 (4:5) */
  aspect-ratio: 4 / 5;
}

/* Video en feed: caja más alta (9:16 típico) y sin marcos negros; prevalece sobre 4:5 */
.cgm-ig.cgm-ig--feed45.cgm-ig--videoar .cgm-ig__media {
  aspect-ratio: var(--cgm-media-ar, 9 / 16);
}

/* Instagram: carrusel con slide (track) */
.cgm-ig__carousel {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.cgm-ig__track {
  display: flex;
  width: 100%;
  height: 100%;
  will-change: transform;
  transition: transform 950ms ease-in-out;
}

.cgm-ig__slide {
  flex: 0 0 100%;
  height: 100%;
}

.cgm-ig__slide img,
.cgm-ig__slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cgm-ig__empty {
  color: rgba(255,255,255,0.70);
  font-size: 12px;
  padding: 18px;
}

.cgm-ig__copy {
  padding: 10px 12px 14px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.86);
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.cgm-ig__carouselBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.04);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}
.cgm-ig__nav {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  cursor: pointer;
  font-weight: 900;
}
.cgm-ig__dots {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  flex: 1;
}
.cgm-ig__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.25);
}
.cgm-ig__dot.is-on {
  background: rgba(236, 72, 153, 0.95);
}

.cgm-ig--story {
  background: #000;
}
.cgm-ig__storyTop {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  padding: 10px 10px 8px;
  color: #fff;
  display: grid;
  gap: 8px;
  background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0));
  z-index: 2;
}
.cgm-ig__bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.cgm-ig__bar {
  height: 3px;
  border-radius: 99px;
  background: rgba(255,255,255,0.35);
}
.cgm-ig__bar.is-on {
  background: rgba(255,255,255,0.92);
}
.cgm-ig__storyMeta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
}
.cgm-ig__storyMeta .cgm-ig__avatar {
  width: 28px;
  height: 28px;
  border-width: 1px;
  box-shadow: none;
}
.cgm-ig__time {
  margin-left: 8px;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
}
.cgm-ig__storyMedia {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #000;
  overflow: hidden;
}
.cgm-ig__storyMedia img,
.cgm-ig__storyMedia video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cgm-ig--reel {
  background: #000;
  position: relative;
}

.cgm-ig__reelMedia {
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #000;
  overflow: hidden;
}

.cgm-ig__reelMedia img,
.cgm-ig__reelMedia video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cgm-ig__reelMedia,
.cgm-ig__media {
  /* Default; JS puede setear --cgm-media-ar desde metadata del video */
  aspect-ratio: var(--cgm-media-ar, 4 / 5);
}

.cgm-ig--reel .cgm-ig__reelMedia {
  aspect-ratio: var(--cgm-media-ar, 9 / 16);
}

.cgm-ig--videoar .cgm-ig__media {
  /* Video vertical típico; JS refina con --cgm-media-ar */
  aspect-ratio: var(--cgm-media-ar, 9 / 16);
}

.cgm-ig__reelOverlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 10px 12px;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0) 30%),
    linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0) 45%);
}

.cgm-ig__reelTop {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.cgm-ig--reel .cgm-ig__user {
  color: rgba(255, 255, 255, 0.95);
}

.cgm-ig__reelTop .cgm-ig__avatar {
  width: 28px;
  height: 28px;
  border-width: 1px;
  box-shadow: none;
}

.cgm-ig__reelBadge {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.92);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.cgm-ig__reelCopy {
  color: rgba(255,255,255,0.92);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 92%;
}

@media (max-width: 920px) {
  .cgm-art-dlg__panel { width: min(980px, 96vw); }
  .cgm-art-dlg__body { grid-template-columns: 1fr; }
  .cgm-art-dlg__right {
    position: relative;
    top: auto;
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 14px;
  }
  .cgm-preview__device.is-mobile { width: min(360px, 100%); }
}

body.cgm-comments-open {
  overflow: hidden;
}

body.cgm-art-open {
  overflow: hidden;
}

.cgm-post-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 14px 40px rgba(15,23,42,0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cgm-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(15,23,42,0.10);
}

.cgm-post-card.is-published {
  border-color: rgba(22, 163, 74, 0.35);
}

.cgm-post-card.is-draft {
  border-color: rgba(100, 116, 139, 0.35);
}

.cgm-post-card.is-pending {
  border-color: rgba(59, 130, 246, 0.28);
}

.cgm-post-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 0;
}

.cgm-post-card__date {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: rgba(15,23,42,0.65);
}

.cgm-post-card__date strong {
  color: #0f172a;
  font-weight: 800;
}

.cgm-post-card__time {
  font-size: 12px;
  color: rgba(15,23,42,0.5);
}

.cgm-post-card__status {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15,23,42,0.06);
  color: rgba(15,23,42,0.65);
}

.cgm-post-card.is-published .cgm-post-card__status {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.cgm-post-card__thumb {
  margin: 12px 14px 0;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}

.cgm-post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cgm-post-card__thumb--empty {
  display: grid;
  place-items: center;
  font-size: 12px;
  color: rgba(15,23,42,0.38);
}

.cgm-post-card__body {
  padding: 12px 14px 4px;
  flex: 1;
}

.cgm-post-card__meta {
  margin-bottom: 6px;
}

.cgm-post-card__channel {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(91, 33, 182, 0.08);
  color: #5b21b6;
}

.cgm-post-card__title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
}

.cgm-post-card__copy,
.cgm-post-card__notes {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(15,23,42,0.68);
}

.cgm-post-card__notes {
  font-size: 12px;
  color: rgba(15,23,42,0.5);
}

.cgm-post-card__actions {
  display: flex;
  gap: 8px;
  padding: 10px 14px 14px;
  margin-top: auto;
}

.cgm-btn-mini {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.12);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.cgm-btn-mini--danger {
  border-color: rgba(220, 38, 38, 0.25);
  color: #b91c1c;
}

.cgm-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100001;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #0f172a;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.cgm-toast--success { background: #15803d; }
.cgm-toast--error { background: #b91c1c; }
.cgm-toast--info { background: #1d4ed8; }

.cgm-grid-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(440px, 100%);
  height: 100%;
  background: #fff;
  z-index: 100000;
  box-shadow: -16px 0 48px rgba(15,23,42,0.12);
  overflow-y: auto;
  padding-bottom: 32px;
}

body.cgm-panel-open {
  overflow: hidden;
}

.cgm-grid-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.cgm-grid-panel__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 900;
}

.cgm-grid-panel__close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(15,23,42,0.06);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.cgm-grid-form {
  padding: 16px 18px;
  display: grid;
  gap: 14px;
}

.cgm-grid-form__field {
  display: grid;
  gap: 6px;
}

.cgm-fieldbar {
  display: flex;
  justify-content: flex-end;
  margin-top: -2px;
}

.cgm-emoji-btn {
  width: 44px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.cgm-emoji-btn:hover {
  background: rgba(15, 23, 42, 0.04);
}

.cgm-grid-form__field--inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.cgm-grid-form__field--inline input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.cgm-grid-form__field--inline span {
  font-size: 14px;
  font-weight: 700;
  color: rgba(15,23,42,0.82);
}

.cgm-grid-form__field span {
  font-size: 12px;
  font-weight: 700;
  color: rgba(15,23,42,0.55);
}

.cgm-grid-form__field input,
.cgm-grid-form__field select,
.cgm-grid-form__field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.12);
  font-size: 14px;
  outline: none;
}

.cgm-grid-form__field textarea {
  resize: vertical;
}

/* Emoji popover (junto al campo; sin pantalla opaca) */
.cgm-emoji-dlg.cgm-emoji-dlg--popover {
  position: fixed;
  inset: 0;
  z-index: 100060;
  display: block;
  padding: 0;
  margin: 0;
  pointer-events: none;
  background: transparent;
  box-sizing: border-box;
}
.cgm-emoji-dlg[hidden] { display: none !important; }
.cgm-emoji-dlg__backdrop {
  display: none !important;
}
.cgm-emoji-dlg--popover .cgm-emoji-dlg__panel {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(300px, calc(100vw - 16px));
  max-height: min(360px, calc(100vh - 16px));
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  box-shadow:
    0 4px 24px rgba(2, 6, 23, 0.12),
    0 16px 48px rgba(2, 6, 23, 0.08);
  padding: 10px 10px 12px;
  box-sizing: border-box;
  pointer-events: auto;
}
.cgm-emoji-dlg__panel {
  /* Legado: si no hay --popover, valores por defecto */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
.cgm-emoji-dlg__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.cgm-emoji-dlg__search {
  flex-shrink: 0;
  margin-bottom: 6px;
}
.cgm-emoji-dlg__search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  font-size: 13px;
  font: inherit;
  outline: none;
}
.cgm-emoji-dlg__search-input:focus {
  border-color: rgba(59, 91, 219, 0.45);
  box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.12);
}
.cgm-emoji-dlg__tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
}
.cgm-emoji-tab {
  flex: 0 0 auto;
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.04);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.cgm-emoji-tab:hover {
  background: rgba(15, 23, 42, 0.07);
}
.cgm-emoji-tab.is-active {
  background: #fff;
  border-color: rgba(59, 91, 219, 0.35);
  box-shadow: 0 1px 0 rgba(59, 91, 219, 0.25);
}
.cgm-emoji-tab__icon {
  display: grid;
  place-items: center;
  pointer-events: none;
}
.cgm-emoji-dlg__grid-scroll {
  flex: 1;
  min-height: 140px;
  overflow-y: auto;
  overflow-x: hidden;
  margin-right: -4px;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}
.cgm-emoji-dlg__title {
  font-size: 13px;
  font-weight: 950;
  color: rgba(15, 23, 42, 0.9);
}
.cgm-emoji-dlg__close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.cgm-emoji-dlg__grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
}
.cgm-emoji {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  display: grid;
  place-items: center;
}
.cgm-emoji:hover {
  background: rgba(29, 78, 216, 0.06);
  border-color: rgba(29, 78, 216, 0.22);
}

/* Multi-select con checklist (evita Ctrl+click) */
.cgm-multi-pick {
  position: relative;
}
.cgm-multi-pick__btn {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.12);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  font-weight: 650;
}
.cgm-multi-pick__btn:after {
  content: "▾";
  float: right;
  color: rgba(15,23,42,0.55);
  font-weight: 900;
}
.cgm-multi-pick__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 10010;
  background: #fff;
  border: 1px solid rgba(15,23,42,0.12);
  border-radius: 14px;
  box-shadow: 0 18px 46px rgba(15,23,42,0.14);
  padding: 8px;
  max-height: 260px;
  overflow: auto;
  display: none;
}
.cgm-multi-pick.is-open .cgm-multi-pick__panel {
  display: block;
}
.cgm-multi-pick__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
}
.cgm-multi-pick__opt:hover {
  background: rgba(29, 78, 216, 0.06);
}
.cgm-multi-pick__opt input {
  width: auto;
  margin: 0;
}
.cgm-multi-pick__opt span {
  font-size: 14px;
  font-weight: 650;
  color: rgba(15,23,42,0.86);
}

.cgm-grid-form__actions {
  padding-top: 8px;
}

.cgm-grid-form__submit {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 14px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #3b5bdb 0%, #5b21b6 100%);
}

@media (max-width: 560px) {
  .cgm-grid-header {
    flex-direction: column;
    align-items: stretch;
  }
  .cgm-grid-header__cta {
    width: 100%;
  }
  .cgm-grid-header__right {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
  }
  .cgm-grid-header__team {
    flex: 1 1 auto;
    min-width: 0;
  }
  .cgm-grid-monthbar {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .cgm-grid-monthbar__view {
    justify-self: stretch;
    order: 2;
  }
  .cgm-grid-monthbar__nav {
    order: 1;
    justify-self: center;
  }
  .cgm-grid-monthbar__spacer {
    display: none;
  }
  .cgm-grid-viewtoggle {
    width: 100%;
  }
  .cgm-viewbtn {
    flex: 1;
    text-align: center;
  }
  .cgm-grid-cal__dow {
    gap: 6px;
  }
  .cgm-grid-cal__grid {
    gap: 6px;
  }
  .cgm-day {
    min-height: 120px;
    padding: 8px;
  }
}

/* Cabecera lista: etiqueta legible + menú (overlay) para no robar ancho en columnas estrechas */
.cgm-listHeadCell {
  position: relative;
  box-sizing: border-box;
  min-width: 0;
  padding-top: 2px;
  padding-right: 2px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.cgm-listHeadCell--hasMenu {
  padding-right: 26px;
}

.cgm-listHeadCell__label {
  display: block;
  width: 100%;
  line-height: 1.3;
  white-space: normal;
  word-break: break-word;
  hyphens: auto;
  overflow: visible;
  color: rgba(255, 255, 255, 0.95);
}

.cgm-listHeadCell__menuBtn {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cgm-listHeadCell__menuBtn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.cgm-listHeadCell__menuBtn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 1px;
}

/* Menú flotante columnas */
.cgm-col-menu {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.15);
  padding: 6px 0;
  max-width: calc(100vw - 16px);
}

.cgm-col-menu__inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 6px;
}

.cgm-col-menu__btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
}

.cgm-col-menu__btn:hover {
  background: rgba(241, 245, 255, 0.95);
}

.cgm-col-menu__btn--primary {
  color: #1d4ed8;
}

.cgm-col-menu__hint {
  margin: 4px 8px 2px;
  font-size: 11px;
  color: rgba(15, 23, 42, 0.55);
  font-weight: 600;
}

.cgm-col-menu__filterLbl {
  margin: 4px 8px 2px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.75);
}

.cgm-col-menu__filterSel {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 8px 10px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  color: #0f172a;
}

/* Modal propiedades columna */
.cgm-col-props[hidden] {
  display: none !important;
}

.cgm-col-props {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cgm-col-props__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.cgm-col-props__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 20px 22px 22px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
}

.cgm-col-props__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.cgm-col-props__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.cgm-col-props__close {
  border: none;
  background: rgba(15, 23, 42, 0.06);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #0f172a;
}

.cgm-col-props__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.75);
}

.cgm-col-props__field input,
.cgm-col-props__field select,
.cgm-col-props__field textarea {
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.cgm-col-props__field--inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.cgm-col-props__save {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb 0%, #5b21b6 100%);
}

.cgm-team-dlg {
  position: fixed;
  inset: 0;
  z-index: 100003;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.cgm-team-dlg[hidden] {
  display: none !important;
}

.cgm-team-dlg__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.45);
}

.cgm-team-dlg__panel {
  position: relative;
  width: min(480px, 100%);
  max-height: min(90vh, 680px);
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  padding: 22px 24px 20px;
  z-index: 1;
  box-sizing: border-box;
}

.cgm-team-dlg__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.cgm-team-dlg__headText {
  min-width: 0;
}

.cgm-team-dlg__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cgm-team-dlg__subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.5);
}

.cgm-team-dlg__close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: rgba(15, 23, 42, 0.7);
}

.cgm-team-dlg__close:hover {
  background: rgba(15, 23, 42, 0.1);
}

.cgm-team-dlg__hint {
  margin: 0 0 18px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.62);
  line-height: 1.5;
}

.cgm-team-dlg__fieldLabel {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.72);
  margin-bottom: 8px;
}

.cgm-team-dlg__addRow {
  margin-bottom: 20px;
}

.cgm-team-dlg__listHead {
  font-size: 12px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.72);
  margin-bottom: 8px;
}

.cgm-team-dlg__list {
  margin: 0 0 20px;
  padding-left: 18px;
  max-height: min(220px, 40vh);
  overflow-y: auto;
}

.cgm-team-dlg__footer {
  display: flex;
  justify-content: flex-end;
  margin: 0 -4px 0;
  padding: 16px 4px 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.cgm-team-dlg__done {
  padding: 10px 28px;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  background: #1d4ed8;
  box-shadow: 0 8px 24px rgba(29, 78, 216, 0.35);
}

.cgm-team-dlg__done:hover {
  filter: brightness(1.06);
}

.cgm-grid-teambar__hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.65);
  line-height: 1.45;
}

.cgm-grid-teambar__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cgm-grid-teambar__input {
  flex: 1 1 200px;
  min-width: 160px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  font-size: 14px;
}

.cgm-grid-teambar__select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  font-size: 14px;
  font-weight: 600;
}

.cgm-grid-teambar__add {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: #1d4ed8;
}

.cgm-grid-teambar__list {
  margin: 12px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.8);
}

.cgm-grid-teambar__item {
  margin-bottom: 4px;
}

.cgm-grid-form__field.is-field-locked {
  opacity: 0.72;
}

.cgm-grid-form__field.is-field-locked::after {
  content: "Bloqueado";
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.45);
  margin-top: 4px;
}

/* Tras .cgm-btn-mini: columna Acciones plana (solo +/iconos, sin caja blanca) */
.cgm-listview .cgm-listcell--actions > button.cgm-btn-mini.cgm-btn-mini--icon {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  filter: none;
  -webkit-appearance: none;
  appearance: none;
}

.cgm-listview .cgm-listcell--actions > button.cgm-btn-mini.cgm-btn-mini--icon:hover {
  background: rgba(29, 78, 216, 0.1) !important;
  border-color: rgba(29, 78, 216, 0.22) !important;
  box-shadow: none !important;
}

.cgm-listview .cgm-listcell--actions > button.cgm-btn-mini.cgm-btn-mini--icon.cgm-btn-mini--danger:hover {
  background: rgba(220, 38, 38, 0.08) !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
  box-shadow: none !important;
}

/* ——— Formulario público de solicitudes (cgm-solicitud) ——— */
.cgm-public-req {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px 48px;
  box-sizing: border-box;
}

.cgm-public-req__card {
  width: 100%;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

.cgm-public-req__title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  color: #0f172a;
}

.cgm-public-req__org {
  margin: 0 0 20px;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.6);
}

.cgm-public-req__muted {
  margin: 0;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.55);
}

.cgm-public-req__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cgm-public-req__label span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: rgba(15, 23, 42, 0.55);
}

.cgm-public-req__input,
.cgm-public-req__textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.cgm-public-req__input--narrow {
  max-width: 120px;
}

.cgm-public-req__fieldset {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
}

.cgm-public-req__fieldset legend {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.55);
}

.cgm-public-req__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.cgm-public-req__check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.cgm-public-req__row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .cgm-public-req__row2 {
    grid-template-columns: 1fr;
  }
}

.cgm-public-req__submit {
  margin-top: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #4b7bff, #ff2d95);
}

.cgm-public-req__submit:hover {
  filter: brightness(1.05);
}

.cgm-public-req__piecesHint,
.cgm-reqManual__piecesHint {
  margin: 0 0 12px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.62);
  line-height: 1.45;
}

.cgm-reqPieces {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 12px;
}

.cgm-reqPiece {
  padding: 16px 18px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
}

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

.cgm-reqPiece__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.cgm-reqPiece__remove {
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 8px;
  background: rgba(254, 242, 242, 0.9);
  color: #b91c1c;
  cursor: pointer;
}

.cgm-reqPieces__add,
.cgm-reqManual__addPiece {
  margin-bottom: 16px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  border: 1px dashed rgba(29, 78, 216, 0.45);
  border-radius: 10px;
  background: rgba(29, 78, 216, 0.06);
  color: #1d4ed8;
  cursor: pointer;
}

.cgm-reqEdit__pieces {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.5;
}

.cgm-reqEdit__piece {
  margin-bottom: 10px;
}

.cgm-reqEdit__pieceFmt,
.cgm-reqEdit__pieceMeta {
  color: rgba(15, 23, 42, 0.75);
  font-size: 13px;
}

.cgm-reqEdit__pieceQty {
  font-weight: 700;
  margin-left: 4px;
}

.cgm-reqEdit__pieceDesc {
  margin-top: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(15, 23, 42, 0.88);
  background: rgba(15, 23, 42, 0.04);
  border-radius: 8px;
  white-space: pre-wrap;
}

.cgm-reqEdit__pieceDates {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.7);
}

.cgm-reqEdit__pieceRef {
  margin-top: 8px;
  font-size: 12px;
}

.cgm-reqEdit__refDl,
.cgm-reqEdit__refPv {
  margin-right: 10px;
}

.cgm-reqEdit__refLink {
  margin: 0 0 8px;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.75);
}

.cgm-reqPiece__dates {
  margin-top: 4px;
}

/* ——— Panel: lista y edición de solicitudes ——— */
.cgm-card--reqPublicLink {
  margin-bottom: 16px;
  padding: 18px 20px 20px;
}

.cgm-card--reqPublicLink--hint {
  padding: 14px 18px;
}

.cgm-reqPublic__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: #0f172a;
}

.cgm-reqPublic__hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.58);
  line-height: 1.45;
}

.cgm-reqPublic__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.cgm-reqPublic__input {
  flex: 1;
  min-width: 200px;
  box-sizing: border-box;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  background: rgba(15, 23, 42, 0.03);
}

.cgm-reqPublic__copy {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  cursor: pointer;
  background: #1d4ed8;
  white-space: nowrap;
}

.cgm-reqPublic__copy:hover {
  filter: brightness(1.06);
}

.cgm-reqManual-wrap {
  margin-bottom: 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  overflow: hidden;
}

.cgm-reqManual__summary {
  list-style: none;
  padding: 14px 18px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-left: 40px;
}

.cgm-reqManual__summary::-webkit-details-marker {
  display: none;
}

.cgm-reqManual__summary::before {
  content: "+";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  color: #4f46e5;
  font-size: 1.2rem;
  line-height: 1;
}

.cgm-reqManual-wrap[open] .cgm-reqManual__summary::before {
  content: "−";
}

.cgm-reqManual-wrap[open] .cgm-reqManual__summary {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.cgm-reqManual__panel {
  padding: 0 20px 20px;
}

.cgm-reqManual__panel > .cgm-reqManual__hint {
  margin: 4px 0 16px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.58);
  line-height: 1.45;
}

.cgm-reqManual__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cgm-reqManual__label span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: rgba(15, 23, 42, 0.55);
}

.cgm-reqManual__input,
.cgm-reqManual__textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 14px;
}

.cgm-reqManual__input--narrow {
  max-width: 120px;
}

.cgm-reqManual__row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .cgm-reqManual__row2 {
    grid-template-columns: 1fr;
  }
}

.cgm-reqManual__fieldset {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
}

.cgm-reqManual__fieldset legend {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.55);
}

.cgm-reqManual__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.cgm-reqManual__check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.cgm-reqManual__submit {
  align-self: flex-start;
  margin-top: 4px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  background: #4f46e5;
}

.cgm-reqManual__submit:hover {
  filter: brightness(1.06);
}

/* Listado de solicitudes: aspecto “parrilla” (hoja blanca sobre el fondo del panel) */
.cgm-card--reqList {
  overflow: auto;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  padding: 0;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 12px 32px rgba(15, 23, 42, 0.08);
}

.cgm-reqList__table {
  min-width: 980px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}

.cgm-reqList__thead {
  display: grid;
  grid-template-columns:
    64px
    100px
    minmax(92px, 1fr)
    minmax(128px, 1.2fr)
    minmax(150px, 1.2fr)
    minmax(76px, 0.9fr)
    40px
    minmax(140px, 1.35fr)
    102px
    102px
    92px
    56px;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(15, 23, 42, 0.55);
  background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 55%, #dbeafe 100%);
  border-bottom: 1px solid rgba(29, 78, 216, 0.18);
}

.cgm-reqList__table--global .cgm-reqList__thead {
  grid-template-columns:
    64px
    100px
    minmax(80px, 0.95fr)
    minmax(92px, 1fr)
    minmax(128px, 1.15fr)
    minmax(150px, 1.2fr)
    minmax(76px, 0.9fr)
    40px
    minmax(130px, 1.3fr)
    102px
    102px
    92px
    56px;
}

.cgm-reqList__tr {
  display: grid;
  grid-template-columns:
    64px
    100px
    minmax(92px, 1fr)
    minmax(128px, 1.2fr)
    minmax(150px, 1.2fr)
    minmax(76px, 0.9fr)
    40px
    minmax(140px, 1.35fr)
    102px
    102px
    92px
    56px;
  gap: 8px;
  align-items: start;
  padding: 12px 14px;
  font-size: 13px;
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  transition: background 0.12s ease;
}

.cgm-reqList__table > .cgm-reqList__tr:nth-child(2n + 2) {
  background: #f8fafc;
}

.cgm-reqList__table > .cgm-reqList__tr:nth-child(2n + 3) {
  background: #ffffff;
}

.cgm-reqList__tr:hover {
  background: rgba(29, 78, 216, 0.05) !important;
}

.cgm-reqList__tr:last-child {
  border-bottom: none;
}

.cgm-reqList__table--global .cgm-reqList__tr {
  grid-template-columns:
    64px
    100px
    minmax(80px, 0.95fr)
    minmax(92px, 1fr)
    minmax(128px, 1.15fr)
    minmax(150px, 1.2fr)
    minmax(76px, 0.9fr)
    40px
    minmax(130px, 1.3fr)
    102px
    102px
    92px
    56px;
}

.cgm-reqList__td--plats,
.cgm-reqList__td--fmt {
  font-size: 12px;
  line-height: 1.35;
  color: rgba(15, 23, 42, 0.88);
  word-break: break-word;
}

.cgm-reqList__td--qty {
  text-align: center;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.75);
}

.cgm-reqList__typeMain {
  font-weight: 700;
}

.cgm-reqList__typeMain--underline {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cgm-reqList__td--title {
  font-size: 12px;
  line-height: 1.25;
  color: rgba(15, 23, 42, 0.9);
  word-break: break-word;
}

.cgm-reqUrg {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cgm-reqUrg--none {
  color: rgba(15, 23, 42, 0.35);
  font-weight: 500;
}

.cgm-reqUrg--ok {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.cgm-reqUrg--overdue {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.cgm-reqUrg--soon {
  background: rgba(234, 179, 8, 0.18);
  color: #a16207;
}

.cgm-reqUrg--delivery {
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
}

.cgm-reqList__edit {
  font-size: 13px;
  font-weight: 600;
  color: #1d4ed8;
  text-decoration: none;
}

.cgm-reqList__edit:hover {
  text-decoration: underline;
}

.cgm-card--reqEdit {
  max-width: 720px;
}

.cgm-reqEdit__h {
  margin: 0 0 16px;
  font-size: 1.1rem;
}

.cgm-reqEdit__meta {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  margin: 0 0 24px;
  font-size: 13px;
}

.cgm-reqEdit__meta dt {
  margin: 0;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.5);
}

.cgm-reqEdit__meta dd {
  margin: 0;
  color: #0f172a;
}

.cgm-reqEdit__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cgm-reqEdit__label span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: rgba(15, 23, 42, 0.65);
}

.cgm-reqEdit__input,
.cgm-reqEdit__textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.cgm-reqEdit__row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .cgm-reqEdit__row2 {
    grid-template-columns: 1fr;
  }

  .cgm-reqEdit__meta {
    grid-template-columns: 1fr;
  }
}

/* Vista global (admin): pestañas y tabla de contenido */
.cgm-globalTabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.cgm-globalTabs__link {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.65);
  text-decoration: none;
  white-space: nowrap;
}

.cgm-globalTabs__link:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.7);
}

.cgm-globalTabs__link.is-active {
  color: #0f172a;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* —— Panel producción: arrastre por asa —— */
body.cgm-designer-dragging {
  user-select: none;
  cursor: grabbing;
}

body.cgm-designer-dragging .cgm-designerPanel__dragHandle {
  cursor: grabbing;
}

/* —— Reuniones —— */
.cgm-meetings__h {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.cgm-meetings__intro,
.cgm-meetings__meta {
  margin: 0 0 16px;
  color: rgba(15, 23, 42, 0.62);
  font-size: 14px;
  line-height: 1.5;
}

.cgm-meetings__backList {
  display: inline-block;
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 14px;
  color: #2563eb;
  text-decoration: none;
}

.cgm-meetings__backList:hover {
  text-decoration: underline;
}

.cgm-meetings__new {
  display: grid;
  gap: 14px;
  max-width: 520px;
  margin-bottom: 28px;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.06), rgba(15, 23, 42, 0.03));
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.cgm-meetings__attPicker {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
@media (max-width: 520px) {
  .cgm-meetings__attPicker {
    grid-template-columns: 1fr;
  }
}

.cgm-meetings__field span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.55);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cgm-meetings__input,
.cgm-meetings__textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.cgm-meetings__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.cgm-meetings__itemLink {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  text-decoration: none;
  color: #0f172a;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cgm-meetings__itemLink:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.cgm-meetings__itemMeta {
  font-size: 13px;
  color: rgba(15, 23, 42, 0.5);
  font-weight: 600;
}

.cgm-meeting-live {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .cgm-meeting-live {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}

.cgm-meeting-live__panel {
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.cgm-meeting-live__label {
  display: block;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 10px;
  color: #0f172a;
}

.cgm-meeting-live__labelRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.cgm-meeting-live__labelRow .cgm-meeting-live__label {
  margin-bottom: 0;
}
.cgm-meeting-live__notes[readonly] {
  background: rgba(255, 255, 255, 0.65);
}

.cgm-mentionMenu {
  position: absolute;
  z-index: 50;
  width: min(360px, calc(100vw - 40px));
  max-height: 260px;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 16px 40px rgba(15,23,42,0.16);
  padding: 6px;
}
.cgm-mentionMenu__item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.cgm-mentionMenu__item:hover,
.cgm-mentionMenu__item:focus {
  background: rgba(37, 99, 235, 0.08);
  outline: none;
}

.cgm-meeting-live__notes {
  width: 100%;
  min-height: 280px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 14px;
  font-size: 15px;
  line-height: 1.55;
  font-family: ui-sans-serif, system-ui, sans-serif;
  resize: vertical;
  box-sizing: border-box;
}

.cgm-meeting-live__status {
  margin: 8px 0 0;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.45);
}

.cgm-meeting-live__status.is-error {
  color: #b91c1c;
}

.cgm-meeting-live__rec {
  padding: 20px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.cgm-meeting-live__recTitle {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 900;
}

.cgm-meeting-live__recHint {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(15, 23, 42, 0.55);
}

.cgm-meeting-live__recBtns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cgm-meeting-live__recVisual {
  margin-top: 14px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.cgm-meeting-live__recVisual.is-active {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.cgm-meeting-live__recCanvas {
  display: block;
  width: 100%;
  height: 72px;
  vertical-align: middle;
}

.cgm-meeting-live__recStatus {
  margin: 12px 0 0;
  font-size: 13px;
  min-height: 1.2em;
}

.cgm-meeting-live__recStatus.is-error {
  color: #b91c1c;
}

.cgm-meeting__audioItem {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.cgm-meeting__audioItem:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.cgm-meeting__audioPlayer {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 0 8px;
  border-radius: 10px;
}

.cgm-meeting__audioDl {
  display: inline-flex;
  margin-right: 10px;
}

.cgm-meeting__audioGen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15,23,42,0.14);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.92);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
.cgm-meeting__audioGen:hover {
  background: rgba(15,23,42,0.04);
}

.cgm-meeting-live__audio {
  margin-top: 8px;
}

.cgm-meeting__audioDl {
  display: inline-block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #2563eb;
}

.cgm-meetings__del {
  margin-top: 20px;
}

/* Botones genéricos (reuniones / marca) */
.cgm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  color: #0f172a;
  font-family: inherit;
}

.cgm-btn--primary {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border-color: rgba(37, 99, 235, 0.5);
  color: #fff;
}

.cgm-btn--ghost {
  background: transparent;
}

.cgm-btn--danger {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.35);
  color: #991b1b;
}

.cgm-btn--sm {
  padding: 4px 10px;
  font-size: 16px;
  line-height: 1;
}

.cgm-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* —— Marca / caja fuerte —— */
.cgm-brandHub__h {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 900;
  color: #0f172a;
}

.cgm-brandHub__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.cgm-brandHub__tab {
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  color: rgba(15, 23, 42, 0.55);
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid transparent;
}

.cgm-brandHub__tab.is-active {
  color: #0f172a;
  background: #fff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.cgm-brandHub__p {
  color: rgba(15, 23, 42, 0.62);
  font-size: 14px;
  margin: 0 0 16px;
}

.cgm-brandHub__upload {
  display: grid;
  gap: 12px;
  max-width: 480px;
  margin-bottom: 28px;
}

.cgm-brandHub__field span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
  color: rgba(15, 23, 42, 0.5);
}

.cgm-brandHub__input,
.cgm-brandHub__select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 10px 12px;
  font-size: 14px;
  box-sizing: border-box;
}

.cgm-brandHub__msg {
  font-size: 13px;
  margin: 0;
}

.cgm-brandHub__msg.is-error {
  color: #b91c1c;
}

.cgm-brandHub__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.cgm-brandHub__asset {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
}

.cgm-brandHub__assetHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cgm-brandHub__assetKind {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(15, 23, 42, 0.45);
}

.cgm-brandHub__assetTitle {
  font-weight: 800;
  margin-bottom: 10px;
}

.cgm-brandHub__dl {
  font-weight: 700;
  font-size: 14px;
  color: #2563eb;
}

.cgm-vault__p,
.cgm-vault__note {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(15, 23, 42, 0.65);
}

.cgm-vault__unlock {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.cgm-vault__label {
  display: block;
  font-weight: 700;
  font-size: 13px;
}

.cgm-vault__input {
  display: block;
  margin-top: 6px;
  min-width: 240px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 10px 12px;
  font-size: 14px;
}

.cgm-vault:not(.is-unlocked) .cgm-vault__unlockedBar,
.cgm-vault:not(.is-unlocked) .cgm-vault__add,
.cgm-vault:not(.is-unlocked) .cgm-vault__list {
  display: none;
}

.cgm-vault.is-unlocked .cgm-vault__unlock {
  display: none;
}

.cgm-vault__unlockedBar {
  margin-bottom: 16px;
}

.cgm-vault__add {
  padding: 18px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.2);
  margin-bottom: 24px;
  display: grid;
  gap: 12px;
  max-width: 480px;
}

.cgm-vault__addH {
  margin: 0;
  font-size: 15px;
}

.cgm-vault-secret {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  margin-bottom: 10px;
  position: relative;
  padding-right: 44px;
}

.cgm-vault-secret__label {
  font-weight: 900;
  font-size: 13px;
  margin-bottom: 8px;
}

.cgm-vault-secret__val {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  font-family: ui-monospace, monospace;
}

.cgm-vault-secret__del {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.12);
  color: #991b1b;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.cgm-tile--meetings {
  border-color: rgba(37, 99, 235, 0.25);
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.07), #fff);
}

.cgm-tile--brand {
  border-color: rgba(99, 102, 241, 0.3);
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.08), #fff);
}

.cgm-settings-dlg__hr {
  border: none;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  margin: 22px 0 18px;
}

.cgm-settings-dlg__h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 900;
}
