/* ==================================================================
   CADENA — dialecto "La casa matriz" (DESIGN.md §6.2)
   ------------------------------------------------------------------
   Acento bordó. Piezas propias:
   - el código de cada propiedad (BRC, MDZ…) como pastilla con su color,
     el mismo en todo el producto: selector, tablas, gráficos
   - la tira de propiedades del encabezado
   - tablas de posiciones (quién va primero y cuánto se movió)
   - grillas de semanas × propiedades
   ================================================================== */
:root{
  --ch: #8f1d3f; --ch-ink: #6e1530; --ch-soft: #f9ecf0; --ch-softer: #fcf5f7; --ch-line: rgba(143,29,63,.22);
}
#section-cadena{ --sec-accent: var(--ch); --sec-accent-soft: var(--ch-soft); }

/* ---------- Pastilla de código ---------- */
.ch-code{
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 22px; padding: 0 7px;
  border-radius: 7px; font: 700 11px/1 var(--font-mono, ui-monospace, monospace); letter-spacing: .06em;
  color: #fff; background: var(--pc, var(--ch)); box-shadow: inset 0 -1px 0 rgba(0,0,0,.12); flex: none;
}
.ch-code.sm{ min-width: 32px; height: 18px; font-size: 10px; border-radius: 6px; padding: 0 5px; }

/* ---------- Barra superior: propiedad actual + selector ---------- */
.topbar .logo.ch-logo{ display: flex; align-items: center; min-width: 0; }
.ch-switch{
  display: inline-flex; align-items: center; gap: 9px; min-width: 0; max-width: 300px; padding: 5px 9px 5px 6px;
  border: 1px solid transparent; border-radius: 12px; background: transparent; cursor: pointer; color: inherit; font: inherit; text-align: left;
  transition: background var(--dur-fast, .15s) ease, border-color var(--dur-fast, .15s) ease;
}
.ch-switch:hover, .ch-switch[aria-expanded="true"]{ background: var(--ch-softer); border-color: var(--ch-line); }
.ch-switch.static{ cursor: default; }
.ch-switch.static:hover{ background: transparent; border-color: transparent; }
.ch-switch-txt{ display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.ch-switch-txt b{ font-size: 14px; font-weight: 700; color: var(--color-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-switch-txt em{ font-style: normal; font-size: 10.5px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .02em; }
.ch-switch > svg{ width: 14px; height: 14px; color: var(--color-text-muted); flex: none; }

.ch-pop{
  position: fixed; z-index: 1200; width: 340px; max-height: min(560px, calc(100vh - 90px)); display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--hairline, #e7e3dc); border-radius: 16px;
  box-shadow: 0 18px 50px -12px rgba(30,20,25,.28), 0 2px 8px rgba(30,20,25,.06); overflow: hidden;
  animation: chPopIn .16s ease-out;
}
@keyframes chPopIn{ from{ opacity: 0; transform: translateY(-4px); } to{ opacity: 1; transform: none; } }
.ch-pop-head{ display: flex; gap: 10px; align-items: center; padding: 14px 14px 10px; }
.ch-pop-mark{ width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--ch-soft); color: var(--ch); flex: none; }
.ch-pop-mark svg{ width: 17px; height: 17px; }
.ch-pop-head b{ display: block; font-size: 14px; color: var(--color-primary); }
.ch-pop-head span{ font-size: 11.5px; color: var(--color-text-muted); }
.ch-pop-q{ margin: 0 12px 8px; min-height: 36px !important; padding: 7px 11px !important; border-radius: 10px !important; font-size: 13px !important; }
.ch-pop-portfolio{
  display: flex; align-items: center; gap: 10px; margin: 0 10px 6px; padding: 9px 11px; border: 1px solid var(--ch-line); border-radius: 12px;
  background: var(--ch-softer); color: var(--ch-ink); cursor: pointer; text-align: left; font: inherit;
}
.ch-pop-portfolio:hover{ background: var(--ch-soft); }
.ch-pop-portfolio svg{ width: 16px; height: 16px; flex: none; }
.ch-pop-portfolio .ch-pop-txt{ flex: 1; display: flex; flex-direction: column; }
.ch-pop-portfolio b{ font-size: 13px; }
.ch-pop-portfolio em{ font-style: normal; font-size: 11px; opacity: .8; }
.ch-pop-list{ overflow-y: auto; padding: 0 6px 8px; }
.ch-pop-group{ padding: 9px 10px 4px; font: 600 10px/1 var(--font-body); letter-spacing: .09em; text-transform: uppercase; color: var(--color-text-muted); }
.ch-pop-item{
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 8px; border: 0; border-radius: 10px; background: transparent;
  cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.ch-pop-item:hover{ background: var(--color-surface-2, #f6f4f0); }
.ch-pop-item.on{ background: var(--ch-softer); }
.ch-pop-item .ch-pop-txt{ flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ch-pop-item b{ font-size: 13px; font-weight: 600; color: var(--color-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-pop-item em{ font-style: normal; font-size: 11.5px; color: var(--color-text-muted); }
.ch-pop-here{ display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 11px; color: var(--ch); font-weight: 600; }
.ch-pop-here svg{ width: 13px; height: 13px; }

/* ---------- La sección ---------- */
.ch-page{ max-width: 1440px; margin: 0 auto; padding: 8px 4px 48px; display: flex; flex-direction: column; gap: 16px; }
.ch-head{
  position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: var(--radius-lg, 18px); border: 1px solid var(--ch-line);
  background: linear-gradient(135deg, var(--ch-softer) 0%, #fff 60%);
}
.ch-eyebrow{ display: inline-flex; align-items: center; gap: 6px; font: 700 10.5px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ch); }
.ch-eyebrow svg{ width: 13px; height: 13px; }
.ch-head h1{ margin: 6px 0 4px; font-family: var(--font-display); font-size: 26px; letter-spacing: -.02em; color: var(--color-primary); }
.ch-head p{ margin: 0; font-size: 13px; color: var(--color-text-secondary); }
.ch-head p b{ color: var(--ch-ink); font-weight: 600; }
.ch-strip{ display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ch-strip-p{
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 5px; border: 1px solid var(--hairline); border-radius: 99px;
  background: #fff; cursor: pointer; font: 600 12px var(--font-body); color: var(--color-text-secondary); position: relative;
}
.ch-strip-p{ white-space: nowrap; flex: none; }
.ch-strip-p:hover{ border-color: var(--ch-line); color: var(--color-primary); }
.ch-strip-p.here{ border-color: var(--ch); box-shadow: 0 0 0 2px var(--ch-soft); color: var(--color-primary); }
.ch-dot{ width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; }
.ch-dot.t-amber{ background: #d97706; } .ch-dot.t-green{ background: #16a34a; } .ch-dot.t-red{ background: #dc2626; }

.ch-tabs{ display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 2px; border-bottom: 1px solid var(--hairline); }
.ch-tabs::-webkit-scrollbar{ display: none; }
.ch-tabs button{
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px 11px; border: 0; background: transparent; cursor: pointer; white-space: nowrap;
  font: 600 13px var(--font-body); color: var(--color-text-secondary); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ch-tabs button svg{ width: 15px; height: 15px; }
.ch-tabs button:hover{ color: var(--color-primary); }
.ch-tabs button.on{ color: var(--ch); border-bottom-color: var(--ch); }
.ch-main{ display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---------- Tarjetas, listas, notas ---------- */
.ch-card{ background: var(--color-surface, #fff); border: 1px solid var(--hairline); border-radius: var(--radius-lg, 18px); overflow: hidden; min-width: 0; }
.ch-card-head{ display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 6px; flex-wrap: wrap; }
.ch-card-head h3{ margin: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--color-primary); font-weight: 650; }
.ch-card-head h3 svg{ width: 16px; height: 16px; color: var(--ch); }
.ch-card-head p{ margin: 4px 0 0; font-size: 12.5px; color: var(--color-text-muted); max-width: 720px; }
.ch-card-head > :last-child:not(:first-child){ display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ch-card-body{ padding: 12px 18px 18px; }
.ch-grid{ display: grid; gap: 16px; }
.ch-grid.two{ grid-template-columns: repeat(2, minmax(0,1fr)); }
.ch-grid.three{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.ch-list{ display: flex; flex-direction: column; }
.ch-li{ display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--hairline); }
.ch-li:first-child{ border-top: 0; }
.ch-li-main{ display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ch-li-main b{ font-size: 13.5px; color: var(--color-primary); font-weight: 600; }
.ch-li-main span{ font-size: 12px; color: var(--color-text-muted); }
.ch-li-side{ display: flex; gap: 6px; align-items: center; flex: none; }
.ch-muted{ color: var(--color-text-muted); font-size: 12px; }
.ch-tag{ display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font: 600 11px/1.5 var(--font-body); background: var(--color-surface-2, #f3f1ec); color: var(--color-text-secondary); white-space: nowrap; }
.ch-tag.t-green{ background: #e7f6ec; color: #166534; } .ch-tag.t-amber{ background: #fdf3e2; color: #92400e; } .ch-tag.t-red{ background: #fdecec; color: #991b1b; }
.ch-tag.t-blue{ background: #e8efff; color: #1e40af; } .ch-tag.t-slate{ background: #eef1f5; color: #475569; } .ch-tag.t-wine{ background: var(--ch-soft); color: var(--ch-ink); }
.ch-note{ display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; margin-top: 10px; border-radius: 12px; background: var(--ch-softer); font-size: 12.5px; color: var(--color-text-secondary); line-height: 1.45; }
.ch-note svg{ width: 15px; height: 15px; color: var(--ch); flex: none; margin-top: 1px; }
.ch-note.t-warn{ background: #fdf6e8; } .ch-note.t-warn svg{ color: #b45309; }
.ch-empty{ display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 28px 16px; color: var(--color-text-muted); font-size: 13px; }
.ch-empty > svg{ width: 26px; height: 26px; color: var(--ch); opacity: .7; }
.ch-empty b{ color: var(--color-primary); font-size: 14px; }
.ch-empty span{ max-width: 460px; }
.ch-skel{ display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.ch-skel .skeleton{ height: 14px; border-radius: 8px; }
.ch-skel .skeleton:nth-child(2n){ width: 78%; }

/* ---------- Propiedades ---------- */
.ch-props{ display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.ch-prop{ position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--hairline); border-radius: 16px; background: #fff; }
.ch-prop::before{ content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--pc); }
.ch-prop.here{ border-color: var(--ch-line); background: var(--ch-softer); }
.ch-prop-top{ display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ch-prop h4{ margin: 4px 0 0; font-size: 15px; color: var(--color-primary); }
.ch-prop p{ margin: 0; font-size: 12.5px; color: var(--color-text-muted); }
.ch-prop-meta{ display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-height: 20px; }
.ch-prop-act{ display: flex; gap: 6px; align-items: center; justify-content: space-between; margin-top: 6px; flex-wrap: wrap; }
.ch-here{ display: inline-flex; gap: 5px; align-items: center; font: 600 12px var(--font-body); color: var(--ch); }
.ch-here svg{ width: 14px; height: 14px; }

/* ---------- Equipo ---------- */
.ch-people{ display: flex; flex-direction: column; }
.ch-person{ display: grid; grid-template-columns: 38px minmax(0,1.3fr) minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--hairline); }
.ch-person:first-child{ border-top: 0; }
.ch-person.off{ opacity: .55; }
.ch-person-av .ar-avatar, .ch-person-av > *{ width: 36px; height: 36px; }
.ch-person-id{ display: flex; flex-direction: column; min-width: 0; }
.ch-person-id b{ font-size: 13.5px; color: var(--color-primary); display: flex; gap: 6px; align-items: center; }
.ch-person-id span{ font-size: 12px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-me{ font-style: normal; font-size: 10px; padding: 1px 6px; border-radius: 99px; background: var(--ch-soft); color: var(--ch-ink); }
.ch-person-role{ display: flex; flex-direction: column; gap: 3px; align-items: flex-start; font-size: 12px; color: var(--color-text-muted); min-width: 0; }
.ch-staff{ display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.ch-staff-p{ display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--hairline); border-radius: 12px; }
.ch-staff-p div{ display: flex; flex-direction: column; min-width: 0; }
.ch-staff-p b{ font-size: 13px; color: var(--color-primary); }
.ch-staff-p span{ font-size: 12px; color: var(--color-text-muted); }
.ch-roles{ display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.ch-role{ display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--color-surface-2, #f7f5f1); }
.ch-role b{ display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--color-primary); }
.ch-role b svg{ width: 14px; height: 14px; color: var(--ch); }
.ch-role span{ font-size: 12px; color: var(--color-text-muted); line-height: 1.4; }

/* ---------- Modales de la cadena (viven fuera de la sección) ---------- */
.ch-modal-box{ max-width: 680px !important; }
.ch-modal-box.modal-wide{ max-width: 980px !important; }
.ch-modal h3{ display: flex; gap: 8px; align-items: center; }
.ch-modal-sub{ margin: 2px 0 14px; font-size: 13px; color: var(--color-text-muted); }
.ch-form-grid{ display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 14px; }
.ch-hint{ font-size: 11.5px; color: var(--color-text-muted); }
.ch-checks{ display: flex; gap: 8px; flex-wrap: wrap; }
.ch-checks label{ display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border: 1px solid var(--hairline); border-radius: 10px; font-size: 13px; cursor: pointer; }
.ch-modal input[type=checkbox], .ch-modal input[type=radio]{ width: 16px !important; height: 16px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; accent-color: var(--ch); flex: none; }

/* ==================================================================
   PANORAMA Y COMPARAR
   ================================================================== */
#section-cadena{ --gx: var(--ch); }
.ch-link{ border: 0; background: none; padding: 0; color: var(--ch); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* Controles: período, comparación, agrupación */
.ch-bar{ display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ch-bar-r{ display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ch-seg{ display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--color-surface-2, #f3f1ec); border: 1px solid var(--hairline); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ch-seg::-webkit-scrollbar{ display: none; }
.ch-seg button{ border: 0; background: transparent; padding: 6px 11px; border-radius: 9px; font: 600 12.5px var(--font-body); color: var(--color-text-secondary); cursor: pointer; white-space: nowrap; }
.ch-seg button:hover{ color: var(--color-primary); }
.ch-seg button.on{ background: #fff; color: var(--ch); box-shadow: 0 1px 2px rgba(30,20,25,.12); }
.ch-seg.sm button{ padding: 4px 9px; font-size: 12px; }
.ch-sel{ width: auto !important; min-width: 0; min-height: 34px !important; padding: 5px 30px 5px 11px !important; font-size: 12.5px !important; border-radius: 10px !important; }
.ch-icon-btn{ width: 34px; height: 34px; padding: 0 !important; display: inline-grid; place-items: center; }
.ch-icon-btn svg{ width: 15px; height: 15px; }
.ch-bar-r .arsel-btn{ min-height: 34px; padding-top: 5px; padding-bottom: 5px; font-size: 12.5px; border-radius: 10px; }

/* Banda de indicadores */
.ch-kpis{ display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 10px; }
.ch-kpi{ display: flex; flex-direction: column; gap: 3px; padding: 13px 14px; border: 1px solid var(--hairline); border-radius: 16px; background: #fff; min-width: 0; }
.ch-kpi:first-child{ border-color: var(--ch-line); background: linear-gradient(160deg, var(--ch-softer), #fff 70%); }
.ch-kpi-l{ font: 600 11px var(--font-body); color: var(--color-text-muted); letter-spacing: .02em; }
.ch-kpi b{ font-family: var(--font-display); font-size: 23px; letter-spacing: -.02em; color: var(--color-primary); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ch-kpi-s{ font-size: 11.5px; color: var(--color-text-muted); }
.ch-kpi-foot{ margin: -6px 2px 0; font-size: 11.5px; color: var(--color-text-muted); }
.ch-d{ display: inline-block; font: 600 11.5px var(--font-body); color: var(--color-text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ch-d.up{ color: #15803d; } .ch-d.down{ color: #b91c1c; } .ch-d.flat{ color: var(--color-text-muted); }

/* Lo que hay que mirar */
.ch-ins{ display: flex; flex-direction: column; gap: 8px; }
.ch-in{ display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--hairline); background: #fff; }
.ch-in-ic{ width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--color-surface-2, #f3f1ec); color: var(--color-text-secondary); }
.ch-in-ic svg{ width: 17px; height: 17px; }
.ch-in.t-red .ch-in-ic{ background: #fdecec; color: #b91c1c; } .ch-in.t-amber .ch-in-ic{ background: #fdf3e2; color: #b45309; }
.ch-in.t-green .ch-in-ic{ background: #e7f6ec; color: #15803d; } .ch-in.t-blue .ch-in-ic{ background: #e8efff; color: #1d4ed8; }
.ch-in-main b{ display: flex; gap: 7px; align-items: center; flex-wrap: wrap; font-size: 13.5px; color: var(--color-primary); font-weight: 650; }
.ch-in-main p{ margin: 3px 0 0; font-size: 12.5px; color: var(--color-text-secondary); line-height: 1.45; }
.ch-in-act{ white-space: nowrap; }
.ch-in-act svg{ width: 13px; height: 13px; }

/* Hoy en la cadena */
.ch-today{ display: flex; flex-direction: column; }
.ch-today-r{ display: grid; grid-template-columns: minmax(180px,1.1fr) minmax(260px,1.3fr) minmax(0,2fr); gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--hairline); }
.ch-today-r:first-child{ border-top: 0; }
.ch-today-p{ display: flex; gap: 9px; align-items: center; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; min-width: 0; }
.ch-today-p span{ display: flex; flex-direction: column; min-width: 0; }
.ch-today-p b{ font-size: 13px; color: var(--color-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-today-p em{ font-style: normal; font-size: 11.5px; color: var(--color-text-muted); }
.ch-today-p:hover b{ color: var(--ch); }
.ch-today-n{ display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; }
.ch-today-n span{ display: flex; flex-direction: column; font-size: 10.5px; color: var(--color-text-muted); line-height: 1.2; }
.ch-today-n b{ font-size: 16px; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.ch-today-a{ display: flex; gap: 6px; flex-wrap: wrap; }
.ch-chip{ border: 1px solid transparent; border-radius: 99px; padding: 4px 10px; font: 600 11.5px var(--font-body); cursor: pointer; background: var(--color-surface-2, #f3f1ec); color: var(--color-text-secondary); }
.ch-chip:hover{ filter: brightness(.97); border-color: currentColor; }
.ch-chip.t-red{ background: #fdecec; color: #991b1b; } .ch-chip.t-amber{ background: #fdf3e2; color: #92400e; } .ch-chip.t-blue{ background: #e8efff; color: #1e40af; } .ch-chip.t-slate{ background: #eef1f5; color: #475569; }
.ch-ok{ display: inline-flex; gap: 5px; align-items: center; font-size: 12px; color: #15803d; font-weight: 600; }
.ch-ok svg{ width: 14px; height: 14px; }

/* Tabla de posiciones */
.ch-lg-wrap{ overflow-x: auto; margin: 0 -4px; }
.ch-lg{ width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.ch-lg th{ text-align: left; font: 600 11px var(--font-body); color: var(--color-text-muted); letter-spacing: .02em; padding: 8px 8px; border-bottom: 1px solid var(--hairline); cursor: pointer; white-space: nowrap; user-select: none; }
.ch-lg th.on{ color: var(--ch); }
.ch-lg th.num, .ch-lg td.num{ text-align: right; }
.ch-lg td{ padding: 9px 8px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.ch-lg td.num b{ display: block; font-weight: 600; color: var(--color-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ch-lg td.num .ch-d{ font-size: 11px; }
.ch-lg td.best b{ color: var(--ch); }
.ch-lg td.best b::after{ content: ''; display: inline-block; width: 5px; height: 5px; margin-left: 5px; border-radius: 50%; background: var(--ch); vertical-align: middle; }
.ch-lg-rk{ width: 26px; color: var(--color-text-muted); font: 700 12px var(--font-mono, monospace); text-align: center !important; }
.ch-lg-p{ min-width: 210px; }
.ch-lg td.ch-lg-p{ display: flex; gap: 9px; align-items: center; }
.ch-lg-p span{ display: flex; flex-direction: column; min-width: 0; }
.ch-lg-p b{ font-size: 13px; color: var(--color-primary); }
.ch-lg-p em{ font-style: normal; font-size: 11.5px; color: var(--color-text-muted); }
.ch-lg tr.here td{ background: var(--ch-softer); }
.ch-lg tr.off td{ opacity: .55; }
.ch-lg-go{ width: 40px; text-align: right; }
.ch-lg-go .mb{ padding: 5px 8px; min-height: 0; }
.ch-lg-go svg{ width: 14px; height: 14px; }
.ch-lg tfoot td{ border-bottom: 0; border-top: 2px solid var(--ch-line); background: var(--ch-softer); }
.ch-lg tfoot .ch-lg-p{ display: table-cell; }
.ch-lg tfoot .ch-lg-p b{ display: block; color: var(--ch-ink); }

/* Semanas × propiedades */
.ch-hm-wrap{ overflow-x: auto; }
.ch-hm{ width: 100%; border-collapse: separate; border-spacing: 3px; font-variant-numeric: tabular-nums; }
.ch-hm thead th{ font: 600 10.5px var(--font-body); color: var(--color-text-muted); padding: 0 2px 4px; white-space: nowrap; text-align: center; }
.ch-hm tbody th{ text-align: left; padding-right: 6px; font: 600 11.5px var(--font-body); color: var(--ch-ink); white-space: nowrap; }
.ch-hm td{ position: relative; min-width: 46px; height: 40px; border-radius: 8px; text-align: center; background: rgba(143,29,63,var(--a,.04)); color: var(--color-primary); }
.ch-hm td b{ display: block; font-size: 12.5px; font-weight: 650; line-height: 1.1; }
.ch-hm td i{ display: block; font-style: normal; font-size: 9.5px; font-weight: 600; opacity: .85; }
.ch-hm td[style*="color:#fff"] i{ opacity: .95; }
.ch-hm td i.up{ color: #15803d; } .ch-hm td i.down{ color: #b91c1c; }
.ch-hm td[style*="color:#fff"] i.up{ color: #bbf7d0; } .ch-hm td[style*="color:#fff"] i.down{ color: #fecaca; }
.ch-hm tr.tot th{ color: var(--color-primary); }
.ch-hm tr.tot td{ outline: 1.5px solid var(--ch-line); outline-offset: -1.5px; }
.ch-hm-legend{ display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: var(--color-text-muted); }
.ch-hm-legend > i{ width: 18px; height: 12px; border-radius: 4px; background: rgba(143,29,63,var(--a)); }
.ch-hm-k{ margin-left: 12px; } .ch-hm-k i{ font-style: normal; font-weight: 700; } .ch-hm-k i.up{ color: #15803d; } .ch-hm-k i.down{ color: #b91c1c; }

/* Mes a mes */
.ch-legend{ display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--color-text-secondary); }
.ch-legend span{ display: inline-flex; gap: 6px; align-items: center; }
.ch-sub-h{ margin: 18px 0 8px; font-size: 13px; color: var(--color-primary); }
.gx-chart .line.ch-line.fut{ stroke-dasharray: 5 4; opacity: .7; }

/* Comparar */
.ch-metrics{ display: flex; gap: 6px; flex-wrap: wrap; }
.ch-metrics button{ border: 1px solid var(--hairline); background: #fff; border-radius: 99px; padding: 6px 12px; font: 600 12.5px var(--font-body); color: var(--color-text-secondary); cursor: pointer; }
.ch-metrics button:hover{ border-color: var(--ch-line); color: var(--color-primary); }
.ch-metrics button.on{ background: var(--ch); border-color: var(--ch); color: #fff; }
.ch-rank{ display: flex; flex-direction: column; gap: 6px; }
.ch-rank-r{ display: grid; grid-template-columns: 22px 150px minmax(0,1fr) 128px; gap: 10px; align-items: center; min-height: 34px; }
.ch-rank-r.off{ opacity: .5; }
.ch-rank-n{ font: 700 12px var(--font-mono, monospace); color: var(--color-text-muted); text-align: center; }
.ch-rank-p{ display: flex; gap: 8px; align-items: center; min-width: 0; }
.ch-rank-p em{ font-style: normal; font-size: 12px; color: var(--color-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-rank-bar{ position: relative; height: 22px; border-radius: 6px; background: var(--color-surface-2, #f5f3ef); }
.ch-rank-bar i{ position: absolute; top: 3px; bottom: 3px; border-radius: 5px; background: var(--pc); }
.ch-rank-bar i.good{ background: #16a34a; } .ch-rank-bar i.bad{ background: #dc2626; }
.ch-rank-bar s{ position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--color-primary); border-radius: 2px; text-decoration: none; }
.ch-rank-v{ display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.ch-rank-v b{ font-size: 13.5px; color: var(--color-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ch-str{ display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.ch-str-p{ position: relative; display: flex; flex-direction: column; gap: 8px; padding: 13px 14px 13px 16px; border: 1px solid var(--hairline); border-radius: 14px; }
.ch-str-p::before{ content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--pc); }
.ch-str-p header{ display: flex; gap: 8px; align-items: center; }
.ch-str-p header b{ font-size: 13.5px; color: var(--color-primary); }
.ch-str-p p{ display: flex; gap: 7px; margin: 0; font-size: 12.5px; color: var(--color-text-secondary); line-height: 1.45; }
.ch-str-p p svg{ width: 14px; height: 14px; flex: none; margin-top: 2px; }
.ch-str-p p.g svg{ color: #15803d; } .ch-str-p p.b svg{ color: #b45309; }
.ch-str-p p b{ color: var(--color-primary); }
.ch-str-p > .mb{ align-self: flex-start; }
.ch-ai-wait{ display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ch-ink); padding: 4px 0 0; }
.ch-ai-wait svg{ width: 16px; height: 16px; color: var(--ch); animation: chPulse 1.4s ease-in-out infinite; }
@keyframes chPulse{ 50%{ opacity: .35; } }
.ch-ai-t{ margin: 0 0 6px; font-family: var(--font-display); font-size: 18px; color: var(--color-primary); letter-spacing: -.01em; }
.ch-ai-p{ margin: 0 0 12px; font-size: 13.5px; color: var(--color-text-secondary); line-height: 1.55; max-width: 900px; }
.ch-ai-props{ display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.ch-ai-prop{ display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 14px; background: #fff; }
.ch-ai-prop header{ display: flex; gap: 8px; align-items: center; }
.ch-ai-prop p{ margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--color-text-secondary); }
.ch-ai-prop p b{ color: var(--color-primary); }
.ch-ai-do{ padding: 7px 9px; border-radius: 10px; background: var(--ch-softer); }
.ch-ai h5{ margin: 16px 0 6px; font-size: 12.5px; color: var(--color-primary); }
.ch-ai-ul{ margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--color-text-secondary); line-height: 1.55; }
.ch-ai-foot{ margin: 14px 0 0; }

/* ==================================================================
   RESERVAS CENTRALES
   ================================================================== */
.ch-cro-search{ border-color: var(--ch-line); background: linear-gradient(160deg, var(--ch-softer), #fff 65%); }
.ch-cro-h h3{ margin: 0; display: flex; gap: 8px; align-items: center; font-size: 16px; color: var(--color-primary); }
.ch-cro-h h3 svg{ width: 17px; height: 17px; color: var(--ch); }
.ch-cro-h p{ margin: 4px 0 12px; font-size: 12.5px; color: var(--color-text-muted); }
.ch-cro-form{ display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.ch-cro-form label{ display: flex; flex-direction: column; gap: 4px; font: 600 11px var(--font-body); color: var(--color-text-muted); flex: 1 1 150px; min-width: 0; }
.ch-cro-form label.sm{ flex: 0 0 96px; }
.ch-cro-form input{ min-height: 40px; }
.ch-cro-go{ min-height: 40px; padding: 0 18px; }
.ch-cro-go svg{ width: 15px; height: 15px; }
.ch-cro-quick{ display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.ch-cro-quick span{ font: 700 12px var(--font-body); color: var(--ch-ink); margin-right: 6px; }
.ch-cro-quick button{ border: 1px solid var(--hairline); background: #fff; border-radius: 99px; padding: 4px 10px; font: 600 12px var(--font-body); color: var(--color-text-secondary); cursor: pointer; }
.ch-cro-quick button:hover{ border-color: var(--ch-line); color: var(--ch); }
.ch-cro-list{ display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px; }
.ch-cro-p{ position: relative; display: flex; flex-direction: column; border: 1px solid var(--hairline); border-radius: 16px; padding: 12px 14px 12px 16px; background: #fff; }
.ch-cro-p::before{ content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--pc); }
.ch-cro-p.none{ background: var(--color-surface-2, #faf9f6); }
.ch-cro-p.focus{ border-color: var(--ch); box-shadow: 0 0 0 3px var(--ch-soft); }
.ch-cro-p header{ display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.ch-cro-pid{ flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ch-cro-pid b{ font-size: 14px; color: var(--color-primary); }
.ch-cro-pid span{ font-size: 11.5px; color: var(--color-text-muted); }
.ch-cro-ph{ width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--hairline); color: var(--color-text-secondary); flex: none; }
.ch-cro-ph svg{ width: 15px; height: 15px; }
.ch-cro-opts{ display: flex; flex-direction: column; }
.ch-cro-o{ display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--hairline); }
.ch-cro-o-main{ display: flex; flex-direction: column; min-width: 0; }
.ch-cro-o-main b{ font-size: 13px; color: var(--color-primary); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-cro-o-main span{ font-size: 11.5px; color: var(--color-text-muted); }
.ch-cro-o-price{ display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.ch-cro-o-price b{ font-size: 15px; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.ch-cro-o-price span{ font-size: 11px; color: var(--color-text-muted); }
.ch-cro-o-price i{ display: inline-flex; gap: 3px; align-items: center; margin-top: 2px; font-style: normal; font: 600 10.5px var(--font-body); color: #15803d; }
.ch-cro-o-price i svg{ width: 11px; height: 11px; }
.ch-cro-none{ margin: 2px 0; font-size: 12.5px; color: var(--color-text-muted); }
.ch-cro-foot{ margin: 6px 0 0; font-size: 11.5px; color: var(--color-text-muted); }
.ch-cro-sum{ display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin: 4px 0 14px; }
.ch-cro-sum > div{ display: flex; flex-direction: column; padding: 9px 11px; border-radius: 12px; background: var(--ch-softer); min-width: 0; }
.ch-cro-sum span{ font: 600 10.5px var(--font-body); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .05em; }
.ch-cro-sum b{ font-size: 14px; color: var(--color-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-cro-sum em{ font-style: normal; font-size: 11.5px; color: var(--color-text-muted); }
.ch-radio label{ align-items: flex-start; flex-direction: column; gap: 2px; }
.ch-radio label input{ position: absolute; opacity: 0; pointer-events: none; }
.ch-radio label:has(input:checked){ border-color: var(--ch); background: var(--ch-softer); color: var(--ch-ink); }
.ch-radio label em{ font-style: normal; font-size: 11.5px; color: var(--color-text-muted); font-weight: 400; }
.ch-cro-price{ margin-top: 6px; border: 1px dashed var(--hairline); border-radius: 12px; padding: 8px 12px; }
.ch-cro-price summary{ cursor: pointer; font: 600 12.5px var(--font-body); color: var(--color-text-secondary); }
.ch-cro-done{ text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ch-cro-ok{ width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #e7f6ec; color: #15803d; }
.ch-cro-ok svg{ width: 24px; height: 24px; }
.ch-cro-done h3{ margin: 4px 0 0; justify-content: center; }
.ch-cro-done p{ margin: 0; font-size: 13px; color: var(--color-text-secondary); }
.ch-cro-msg{ width: 100%; text-align: left; display: flex; flex-direction: column; gap: 4px; margin-top: 10px; font: 600 11px var(--font-body); color: var(--color-text-muted); }
.ch-cro-msg textarea{ font: 400 13px/1.45 var(--font-body); }
.ch-cro-done-act{ display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.ch-cro-done-act .mb svg{ width: 14px; height: 14px; }
.ch-cro-done-act a.mb, .ch-sister-o a.mb{ text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.ch-li-btn{ width: 100%; border: 0; border-top: 1px solid var(--hairline); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ch-li-btn:first-child{ border-top: 0; }
.ch-li-btn:hover .ch-li-main b{ color: var(--ch); }
.ch-li-main b .ch-code{ vertical-align: 1px; margin-right: 4px; }
/* Reubicar */
.ch-rl-list{ display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; max-height: 320px; overflow-y: auto; }
.ch-rl-o{ display: flex; gap: 10px; align-items: center; padding: 9px 11px; border: 1px solid var(--hairline); border-radius: 12px; cursor: pointer; }
.ch-rl-o:has(input:checked){ border-color: var(--ch); background: var(--ch-softer); }
.ch-rl-o input{ accent-color: var(--ch); }
.ch-rl-t{ flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ch-rl-t b{ font-size: 13px; color: var(--color-primary); }
.ch-rl-t em, .ch-rl-p em{ font-style: normal; font-size: 11.5px; color: var(--color-text-muted); }
.ch-rl-p{ display: flex; flex-direction: column; align-items: flex-end; }
.ch-rl-p b{ font-size: 13.5px; color: var(--color-primary); }
/* En la nueva reserva: las propiedades hermanas */
.ch-sister{ margin-top: 12px; }
.ch-sister-btn{ display: inline-flex; gap: 7px; align-items: center; border: 1px dashed var(--ch-line, rgba(143,29,63,.3)); background: var(--ch-softer, #fcf5f7); color: var(--ch-ink, #6e1530); border-radius: 10px; padding: 7px 12px; font: 600 12px var(--font-body); cursor: pointer; }
.ch-sister-btn svg{ width: 14px; height: 14px; }
.ch-sister-list{ display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ch-sister-o{ display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--hairline); border-radius: 10px; }
.ch-sister-t{ flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ch-sister-t b{ font-size: 12.5px; color: var(--color-primary); }
.ch-sister-t em{ font-style: normal; font-size: 11.5px; color: var(--color-text-muted); }
.ch-sister-o .mb{ padding: 5px 10px; min-height: 0; font-size: 12px; }

/* ==================================================================
   HUÉSPEDES DE LA CADENA
   ================================================================== */
.ch-kpis.three{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.ch-privacy{ border-color: var(--ch-line); }
.ch-priv{ display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.ch-priv h4{ margin: 0 0 6px; font-size: 13px; color: var(--color-primary); }
.ch-priv ul{ margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--color-text-secondary); line-height: 1.55; }
.ch-priv p{ margin: 0 0 8px; font-size: 12.5px; color: var(--color-text-secondary); line-height: 1.55; }
.ch-priv-ok{ display: flex; gap: 9px; align-items: flex-start; margin: 14px 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--ch-softer); font-size: 12.5px; color: var(--color-text-secondary); cursor: pointer; }
.ch-priv-ok input{ width: 16px; height: 16px; margin-top: 1px; accent-color: var(--ch); flex: none; }
.ch-g-search{ display: flex; gap: 8px; }
.ch-g-search input{ flex: 1; min-height: 40px; }
.ch-g-list{ display: flex; flex-direction: column; margin-top: 10px; }
.ch-g-row{ display: grid; grid-template-columns: 34px minmax(0,1.6fr) minmax(0,1fr) 70px 80px 110px; gap: 10px; align-items: center; padding: 9px 4px; border: 0; border-top: 1px solid var(--hairline); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ch-g-row:first-child{ border-top: 0; }
.ch-g-row:hover{ background: var(--ch-softer); }
.ch-g-av, .ch-g-row .ar-avatar{ width: 32px !important; height: 32px !important; }
.ch-g-id{ display: flex; flex-direction: column; min-width: 0; }
.ch-g-id b{ font-size: 13px; color: var(--color-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-g-id em{ font-style: normal; font-size: 11.5px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-g-props{ display: flex; gap: 4px; flex-wrap: wrap; }
.ch-g-num{ display: flex; flex-direction: column; font-size: 10.5px; color: var(--color-text-muted); line-height: 1.2; }
.ch-g-num b{ font-size: 13px; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.ch-g-when{ font-size: 11.5px; color: var(--color-text-muted); text-align: right; }
.ch-g-when i{ font-style: normal; font-weight: 600; color: #1d4ed8; }
.ch-g-tips{ display: flex; flex-direction: column; gap: 6px; margin: 0 0 6px; }
.ch-g-tips p{ display: flex; gap: 8px; margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--ch-softer); font-size: 12.5px; color: var(--color-text-secondary); line-height: 1.45; }
.ch-g-tips svg{ width: 14px; height: 14px; color: var(--ch); flex: none; margin-top: 2px; }
.ch-li-side b{ font-size: 13px; color: var(--color-primary); }
.ch-pairs{ display: flex; flex-direction: column; gap: 7px; }
.ch-pair{ display: grid; grid-template-columns: auto 10px auto minmax(0,1fr) 34px; gap: 6px; align-items: center; }
.ch-pair i{ font-style: normal; color: var(--color-text-muted); text-align: center; font-size: 11px; }
.ch-pair-bar{ height: 8px; border-radius: 99px; background: var(--color-surface-2, #f3f1ec); overflow: hidden; }
.ch-pair-bar b{ display: block; height: 100%; border-radius: 99px; background: var(--ch); }
.ch-pair em{ font-style: normal; font: 700 12px var(--font-body); color: var(--color-primary); text-align: right; }
/* Reconocimiento en la reserva (fuera de la sección) */
.ch-recog{ display: none; }
.ch-recog.on{ display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 4px; padding: 8px 11px; border-radius: 10px; background: var(--ch-softer, #fcf5f7); border: 1px solid var(--ch-line, rgba(143,29,63,.22)); font-size: 12.5px; color: var(--color-text-secondary); line-height: 1.45; }
.ch-recog.on svg{ width: 15px; height: 15px; color: var(--ch, #8f1d3f); flex: none; margin-top: 1px; }
.ch-recog.on b{ color: var(--ch-ink, #6e1530); }
.bkc > .ch-recog.on{ margin: 10px 26px 2px; }   /* alineado con la estadía de la ficha de la reserva */

/* ==================================================================
   TARIFAS Y CONFIGURACIÓN
   ================================================================== */
.ch-subtabs{ display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--color-surface-2, #f3f1ec); border: 1px solid var(--hairline); align-self: flex-start; max-width: 100%; overflow-x: auto; }
.ch-subtabs button{ border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font: 600 13px var(--font-body); color: var(--color-text-secondary); cursor: pointer; white-space: nowrap; }
.ch-subtabs button.on{ background: #fff; color: var(--ch); box-shadow: 0 1px 2px rgba(30,20,25,.12); }
#chr-body{ display: flex; flex-direction: column; gap: 16px; }
.ch-rt-list{ display: flex; flex-direction: column; gap: 14px; }
.ch-rt-p{ position: relative; border: 1px solid var(--hairline); border-radius: 14px; padding: 10px 12px 10px 15px; }
.ch-rt-p::before{ content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--pc); }
.ch-rt-p header{ display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.ch-rt-p header b{ font-size: 13.5px; color: var(--color-primary); }
.ch-rt-p header .ch-rt-info{ flex: 1; font-size: 11.5px; color: var(--color-text-muted); }
.ch-rt-wrap{ overflow-x: auto; }
.ch-rt{ border-collapse: separate; border-spacing: 2px; font-variant-numeric: tabular-nums; }
.ch-rt th{ font: 600 10px var(--font-body); color: var(--color-text-muted); text-align: center; min-width: 38px; padding: 0 0 2px; }
.ch-rt th span{ display: block; text-transform: uppercase; letter-spacing: .04em; }
.ch-rt th b{ display: block; font-size: 12px; color: var(--color-primary); }
.ch-rt th.we b, .ch-rt th.we span{ color: var(--ch); }
.ch-rt td{ text-align: center; font-size: 12px; padding: 5px 2px; border-radius: 6px; background: var(--color-surface-2, #f7f5f1); color: var(--color-primary); }
.ch-rt td.hi{ background: var(--ch-soft); color: var(--ch-ink); font-weight: 650; }
.ch-rt td.lo{ background: #eaf2fb; color: #1e4f8a; }
.ch-rt tr.occ td{ background: rgba(143,29,63,var(--a,.04)); font-weight: 650; position: relative; }
.ch-rt tr.occ td i{ position: absolute; top: -3px; right: -2px; font-style: normal; font-size: 9px; }
.ch-rt tr.occ td i.up{ color: #15803d; } .ch-rt tr.occ td i.down{ color: #b45309; }
.ch-rt td.ch-rt-name{ background: none; text-align: left; min-width: 170px; max-width: 220px; padding-right: 8px; }
.ch-rt td.ch-rt-name b{ display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-rt td.ch-rt-name em{ font-style: normal; font-size: 10.5px; color: var(--color-text-muted); }
.ch-rt tr.occ td.ch-rt-name{ font-size: 11px; color: var(--color-text-muted); font-weight: 600; }
.ch-bulk{ display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
.ch-bulk h4{ margin: 4px 0 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ch); }
.ch-dows{ display: flex; gap: 4px; flex-wrap: wrap; }
.ch-dows label{ cursor: pointer; }
.ch-dows input{ position: absolute; opacity: 0; pointer-events: none; }
.ch-dows span{ display: inline-block; min-width: 40px; text-align: center; padding: 6px 4px; border: 1px solid var(--hairline); border-radius: 9px; font: 600 12px var(--font-body); color: var(--color-text-secondary); }
.ch-dows input:checked + span{ background: var(--ch); border-color: var(--ch); color: #fff; }
.ch-bulk-hint{ display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--ch-softer); font-size: 12.5px; color: var(--color-text-secondary); line-height: 1.5; }
.ch-bulk-hint svg{ width: 15px; height: 15px; color: var(--ch); flex: none; margin-top: 1px; }
.ch-bulk-hint b{ color: var(--ch-ink); }
.ch-inv{ width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ch-inv th{ text-align: left; font: 600 11px var(--font-body); color: var(--color-text-muted); padding: 6px 8px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.ch-inv td{ padding: 7px 8px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.ch-inv td.num{ text-align: center; font-weight: 650; color: var(--color-primary); }
.ch-inv td.num em{ display: block; font-style: normal; font-weight: 400; font-size: 10.5px; color: var(--color-text-muted); }
.ch-inv td.zero{ color: #b45309; }
.ch-inv tr.src td{ background: var(--ch-softer); }
.ch-copy{ display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 22px; }
.ch-copy-l{ display: block; font: 600 12px var(--font-body); color: var(--color-text-secondary); margin-bottom: 6px; }
.ch-copy-items{ display: flex; flex-direction: column; gap: 6px; }
.ch-copy-items label{ display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--hairline); border-radius: 12px; cursor: pointer; }
.ch-copy-items label:has(input:checked){ border-color: var(--ch-line); background: var(--ch-softer); }
.ch-copy-items label.off{ opacity: .5; cursor: default; }
.ch-copy-items input{ width: 16px; height: 16px; margin-top: 2px; accent-color: var(--ch); flex: none; }
.ch-copy-items span{ display: flex; flex-direction: column; gap: 1px; }
.ch-copy-items b{ font-size: 13px; color: var(--color-primary); }
.ch-copy-items b i{ font-style: normal; font-size: 11px; font-weight: 600; color: var(--color-text-muted); margin-left: 4px; }
.ch-copy-items em{ font-style: normal; font-size: 11.5px; color: var(--color-text-muted); line-height: 1.4; }
.ch-copy-prev{ display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; margin-top: 14px; }
.ch-copy-t{ border: 1px solid var(--hairline); border-radius: 12px; padding: 10px 12px; }
.ch-copy-t header{ display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.ch-copy-t header b{ font-size: 13px; color: var(--color-primary); }
.ch-copy-t ul{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ch-copy-t li{ display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--color-text-secondary); }
.ch-copy-t li em{ font-style: normal; color: var(--color-text-muted); text-align: right; }
.ch-copy-t li b.cr{ color: #15803d; } .ch-copy-t li b.up{ color: #b45309; }

/* ==================================================================
   ESTÁNDARES Y AUDITORÍAS
   ================================================================== */
.ch-kpis:has(> .ch-kpi:nth-child(5):last-child){ grid-template-columns: repeat(5, minmax(0,1fr)); }
.ch-score{ font-variant-numeric: tabular-nums; }
.ch-score.good{ color: #15803d !important; } .ch-score.mid{ color: #b45309 !important; } .ch-score.bad{ color: #b91c1c !important; }
.ch-spark{ width: 70px; height: 22px; }
.ch-spark polyline{ fill: none; stroke: var(--ch); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.ch-std-props{ display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.ch-std-p{ position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 12px 16px; border: 1px solid var(--hairline); border-radius: 14px; }
.ch-std-p::before{ content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--pc); }
.ch-std-p header{ display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ch-std-p header b{ font-size: 13.5px; color: var(--color-primary); flex: 1; min-width: 0; }
.ch-std-score{ display: flex; align-items: flex-end; gap: 12px; }
.ch-std-score .ch-score{ font-family: var(--font-display); font-size: 32px; line-height: 1; font-weight: 700; color: var(--color-primary); }
.ch-std-p p{ margin: 0; font-size: 12px; color: var(--color-text-muted); }
.ch-std-tags{ display: flex; gap: 5px; flex-wrap: wrap; min-height: 20px; }
.ch-std-act{ display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.ch-std-areas{ border-collapse: separate; border-spacing: 3px; font-variant-numeric: tabular-nums; }
.ch-std-areas th{ font: 600 10.5px var(--font-body); color: var(--color-text-muted); padding: 2px 6px; white-space: nowrap; text-align: center; }
.ch-std-areas tbody th{ text-align: left; }
.ch-std-areas td{ min-width: 64px; text-align: center; padding: 7px 4px; border-radius: 8px; font-weight: 650; font-size: 12.5px; background: var(--color-surface-2, #f5f3ef); color: var(--color-text-muted); }
.ch-std-areas td.good{ background: #e7f6ec; color: #166534; } .ch-std-areas td.mid{ background: #fdf3e2; color: #92400e; } .ch-std-areas td.bad{ background: #fdecec; color: #991b1b; }
.ch-std-list{ display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.ch-std-list h4{ margin: 0 0 6px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--ch); }
.ch-std-list h4 span{ color: var(--color-text-muted); font-weight: 600; }
.ch-std-row{ display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; border-top: 1px solid var(--hairline); }
.ch-std-row > div{ flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ch-std-row b{ font-size: 12.5px; color: var(--color-primary); font-weight: 600; }
.ch-std-row span{ font-size: 11.5px; color: var(--color-text-muted); }
.ch-std-row.off{ opacity: .5; }
/* El recorrido de la auditoría */
.ch-run-h{ display: flex; gap: 10px; align-items: center; }
.ch-run-h > div{ flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ch-run-h b{ font-size: 15px; color: var(--color-primary); }
.ch-run-h span{ font-size: 12px; color: var(--color-text-muted); }
.ch-run-h .ch-score{ font-family: var(--font-display); font-size: 28px; }
.ch-run-bar{ height: 6px; border-radius: 99px; background: var(--color-surface-2, #f3f1ec); margin-top: 10px; overflow: hidden; }
.ch-run-bar i{ display: block; height: 100%; background: var(--ch); border-radius: 99px; transition: width .2s; }
.ch-run-list{ max-height: min(60vh, 560px); overflow-y: auto; padding-right: 2px; }
.ch-run-list h4{ position: sticky; top: 0; z-index: 1; margin: 10px 0 4px; padding: 4px 0; background: var(--color-surface, #fff); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ch); }
.ch-run-i{ display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 12px; align-items: center; padding: 9px 10px; margin-bottom: 6px; border: 1px solid var(--hairline); border-radius: 12px; }
.ch-run-i.r-ok{ border-color: #bbe5c8; background: #f6fcf8; } .ch-run-i.r-fail{ border-color: #f3c4c4; background: #fff7f7; } .ch-run-i.r-na{ opacity: .75; }
.ch-run-t{ display: flex; flex-direction: column; gap: 3px; min-width: 0; align-items: flex-start; }
.ch-run-t b{ font-size: 13px; color: var(--color-primary); font-weight: 600; }
.ch-run-t span{ font-size: 11.5px; color: var(--color-text-muted); }
.ch-run-t em{ display: inline-flex; gap: 4px; align-items: center; font-style: normal; font-size: 11px; color: #15803d; }
.ch-run-t em svg{ width: 12px; height: 12px; }
.ch-run-b{ display: inline-flex; gap: 4px; }
.ch-run-b button{ border: 1px solid var(--hairline); background: #fff; border-radius: 10px; padding: 8px 10px; font: 600 12px var(--font-body); color: var(--color-text-secondary); cursor: pointer; min-width: 76px; }
.ch-run-b button.on.ok{ background: #15803d; border-color: #15803d; color: #fff; }
.ch-run-b button.on.fail{ background: #b91c1c; border-color: #b91c1c; color: #fff; }
.ch-run-b button.on.na{ background: #64748b; border-color: #64748b; color: #fff; }
.ch-run-n{ grid-column: 1 / -1; min-height: 34px !important; font-size: 12.5px !important; }
/* En la propiedad: Administración → Tareas */
.ch-std-mine{ display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--ch-line, rgba(143,29,63,.22)); border-radius: 14px; background: var(--ch-softer, #fcf5f7); }
.ch-std-mine-ic{ width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--ch, #8f1d3f); flex: none; }
.ch-std-mine-ic svg{ width: 17px; height: 17px; }
.ch-std-mine > div{ flex: 1; display: flex; flex-direction: column; min-width: 200px; }
.ch-std-mine > div b{ font-size: 13.5px; color: var(--color-primary); }
.ch-std-mine > div span{ font-size: 12px; color: var(--color-text-secondary); }
.ch-std-mine .ch-score{ font-size: 13px; }
.ch-std-mine-act{ display: flex !important; flex-direction: row !important; gap: 6px; min-width: 0 !important; flex: none !important; }

/* ==================================================================
   FINANZAS
   ================================================================== */
.ch-kpi b.neg, .ch-pnl b.neg{ color: #b91c1c; }
.ch-pnl td.num.neg{ color: #9a3412; }
.ch-pnl tr.ent td{ background: var(--ch-softer); }
.ch-pnl tr.ent td.ch-lg-p b{ color: var(--ch-ink); }
.ch-pnl tr.sub td.ch-lg-p{ padding-left: 26px; }
.ch-pnl tr.sub td{ font-size: 12px; }
.ch-pnl tfoot tr.tot td{ font-weight: 650; }
.ch-bud{ border-collapse: separate; border-spacing: 3px; font-variant-numeric: tabular-nums; }
.ch-bud thead th{ font: 600 10.5px var(--font-body); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .04em; padding: 0 2px 2px; }
.ch-bud thead th.now{ color: var(--ch); }
.ch-bud tbody th{ padding-right: 6px; }
.ch-bud td{ min-width: 66px; padding: 6px 4px; border-radius: 8px; text-align: center; background: var(--color-surface-2, #f5f3ef); cursor: default; }
.ch-bud td b{ display: block; font-size: 12.5px; color: var(--color-primary); }
.ch-bud td span{ display: block; font-size: 10px; color: var(--color-text-muted); white-space: nowrap; }
.ch-bud td.fut{ opacity: .6; }
.ch-bud td.now{ outline: 1.5px solid var(--ch-line); outline-offset: -1.5px; }
.ch-bud td.good{ background: #e7f6ec; } .ch-bud td.good b{ color: #166534; }
.ch-bud td.mid{ background: #fdf3e2; } .ch-bud td.mid b{ color: #92400e; }
.ch-bud td.bad{ background: #fdecec; } .ch-bud td.bad b{ color: #991b1b; }
.ch-bud td[onclick]{ cursor: pointer; }
.ch-bud td[onclick]:hover{ box-shadow: inset 0 0 0 1.5px var(--ch); }
.ch-bud td.ytd{ min-width: 90px; }

/* ==================================================================
   CRECIMIENTO DE LA CADENA
   ================================================================== */
.ch-bar-txt{ margin: 0; font-size: 13px; color: var(--color-text-secondary); max-width: 640px; }
.ch-gr-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ch-gr-card{ position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 12px 17px; border: 1px solid var(--hairline); border-radius: 16px; background: #fff; min-width: 0; }
.ch-gr-card::before{ content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--pc); }
.ch-gr-card header{ display: flex; gap: 10px; align-items: center; }
.ch-gr-card header > div{ display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ch-gr-card header b{ font-size: 14px; color: var(--color-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-gr-card header span{ font-size: 11.5px; color: var(--color-text-muted); }
.ch-gr-diag{ display: flex; gap: 7px; align-items: flex-start; margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--color-surface-2, #f5f3ef); font-size: 12.5px; color: var(--color-text-secondary); }
.ch-gr-diag svg{ width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--ch); }
.ch-gr-diag b{ color: var(--color-primary); font-weight: 650; }
.ch-gr-goals{ display: flex; flex-direction: column; gap: 10px; }
.ch-gr-goal > div:first-child{ display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; margin-bottom: 5px; }
.ch-gr-goal b{ color: var(--color-primary); font-weight: 600; }
.ch-gr-track{ display: flex; gap: 8px; align-items: center; font-size: 11.5px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; min-width: 0; }
.ch-gr-track > span{ white-space: nowrap; }
.ch-gr-track i{ position: relative; flex: 1; height: 7px; border-radius: 999px; background: var(--color-surface-2, #efece6); overflow: hidden; min-width: 40px; }
.ch-gr-track i em{ position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); border-radius: 999px; background: var(--ch); transition: width .4s var(--ease-out, ease); }
.ch-gr-track.lg i{ height: 10px; }
.ch-gr-track.lg{ font-size: 13px; }
.ch-gr-track.sm i{ height: 6px; min-width: 70px; }
.ch-gr-now{ display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; font-size: 11.5px; color: var(--color-text-muted); }
.ch-gr-now b{ color: var(--color-primary); }
.ch-gr-stats{ display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 12px; color: var(--color-text-muted); padding-top: 8px; border-top: 1px solid var(--hairline); }
.ch-gr-stats b{ color: var(--color-primary); font-variant-numeric: tabular-nums; }
.ch-gr-stats .neg b, .ch-gr-stats .neg{ color: #b91c1c; }
.ch-gr-run{ margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--color-text-secondary); }
.ch-gr-run li::before{ content: '•'; color: var(--ch); margin-right: 6px; }
.ch-gr-run em{ font-style: normal; color: var(--color-text-muted); font-size: 11px; }
.ch-gr-card footer{ margin-top: auto; }
.ch-goal .ch-card-body{ display: flex; flex-direction: column; gap: 12px; }
.ch-goal-top{ display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--ch-softer); border: 1px solid var(--ch-line); }
.ch-goal-act{ display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ch-goal-t td{ vertical-align: middle; }
.ch-goal-t tr.off td{ opacity: .55; }
.ch-goal-t .ch-goal-on{ margin: 0 4px 0 0; width: 16px; height: 16px; accent-color: var(--ch); }
.ch-num-in{ width: 110px; text-align: right; font-variant-numeric: tabular-nums; }
.ch-goal-form .ch-card-body h4, .ch-chm-form .ch-card-body h4{ margin: 10px 0 6px; font-size: 12.5px; color: var(--color-text-secondary); }
.ch-lesson-list{ display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.ch-lesson{ position: relative; display: flex; flex-direction: column; gap: 9px; padding: 14px 14px 12px 17px; border: 1px solid var(--hairline); border-radius: 16px; background: #fff; min-width: 0; }
.ch-lesson::before{ content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--pc); }
.ch-lesson header{ display: flex; gap: 10px; align-items: flex-start; }
.ch-lesson header > div{ display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ch-lesson header b{ font-size: 13.5px; color: var(--color-primary); }
.ch-lesson header span{ font-size: 11.5px; color: var(--color-text-muted); }
.ch-lesson-txt{ margin: 0; font-size: 13px; line-height: 1.5; color: var(--color-text-secondary); }
.ch-lesson-meta{ display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--color-text-muted); }
.ch-lesson-meta span{ display: inline-flex; gap: 4px; align-items: center; }
.ch-lesson-meta svg{ width: 12px; height: 12px; }
.ch-lesson-reps{ display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 11.5px; color: var(--color-text-muted); }
.ch-rep{ display: inline-flex; gap: 5px; align-items: center; padding: 2px 8px 2px 3px; border-radius: 999px; background: var(--color-surface-2, #f5f3ef); color: var(--color-text-secondary); }
.ch-lesson footer{ margin-top: auto; }
.ch-tag.t-wine{ font-weight: 650; }

/* "Vos vs. la cadena" (dentro de la propiedad) */
.ch-bench-slot:empty{ display: none; }
.ch-bench{ margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--ch-line); border-radius: 16px; background: linear-gradient(170deg, var(--ch-softer), #fff 60%); }
.ch-bench header{ display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.ch-bench header > div{ display: flex; flex-direction: column; min-width: 0; }
.ch-bench header b{ font-size: 14px; color: var(--color-primary); }
.ch-bench header span{ font-size: 12px; color: var(--color-text-muted); }
.ch-bench-ic{ width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--ch); border: 1px solid var(--ch-line); flex: none; }
.ch-bench-ic svg{ width: 16px; height: 16px; }
.ch-bench-rows{ display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 22px; }
.ch-bench-r{ display: grid; grid-template-columns: 112px minmax(60px, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--hairline); }
.ch-bench-l{ font-size: 12.5px; color: var(--color-text-secondary); }
.ch-bench-bar{ position: relative; height: 8px; border-radius: 999px; background: #efe9eb; }
.ch-bench-bar i{ position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 2px; background: rgba(110,21,48,.35); }
.ch-bench-bar i.med{ left: 50%; }
.ch-bench-bar i.top{ left: 75%; background: rgba(21,128,61,.45); }
.ch-bench-bar em{ position: absolute; top: 50%; left: var(--x, 50%); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--color-text-muted); box-shadow: 0 0 0 2px #fff; }
.ch-bench-r.up .ch-bench-bar em{ background: #15803d; }
.ch-bench-r.down .ch-bench-bar em{ background: #c2410c; }
.ch-bench-v{ display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ch-bench-v b{ font-size: 13.5px; color: var(--color-primary); white-space: nowrap; }
.ch-bench-v small{ font-size: 10.5px; color: var(--color-text-muted); white-space: nowrap; }
.ch-bench-named{ grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; font-size: 11px; color: var(--color-text-muted); }
.ch-bench-named em{ font-style: normal; padding: 1px 6px; border-radius: 6px; background: var(--color-surface-2, #f5f3ef); }
.ch-bench-named em.me{ background: var(--ch-soft); color: var(--ch-ink); font-weight: 650; }
.ch-bench-foot, .ch-bench-few{ margin: 10px 0 0; font-size: 11.5px; color: var(--color-text-muted); }

/* ==================================================================
   COMUNICACIÓN: avisos y pedidos
   ================================================================== */
.ch-ann, .ch-ro{ display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--hairline); border-radius: 16px; background: #fff; }
.ch-ann.t-amber{ border-color: #f3d9ae; } .ch-ann.t-red{ border-color: #f2c4c4; }
.ch-ann header, .ch-ro header{ display: flex; gap: 10px; align-items: flex-start; }
.ch-ann header > div:not(.ch-ann-tags), .ch-ro header > div:not(.ch-ann-tags){ display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ch-ann header b, .ch-ro header b{ font-size: 14px; color: var(--color-primary); }
.ch-ann header span, .ch-ro header span{ font-size: 11.5px; color: var(--color-text-muted); }
.ch-ann-ic{ width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: #e8efff; color: #1d4ed8; }
.ch-ann-ic svg{ width: 16px; height: 16px; }
.ch-ann.t-amber .ch-ann-ic{ background: #fdf3e2; color: #b45309; } .ch-ann.t-red .ch-ann-ic{ background: #fdecec; color: #b91c1c; }
.ch-ann-tags{ display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.ch-ann-body{ margin: 0; font-size: 13px; line-height: 1.5; color: var(--color-text-secondary); white-space: pre-line; }
.ch-ann-prog{ display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--color-text-muted); }
.ch-ann-prog .ch-gr-track{ flex: 1; min-width: 140px; }
.ch-ann-prog b{ color: var(--color-primary); font-variant-numeric: tabular-nums; }
.ch-ann-by{ display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: var(--color-surface-2, #f7f5f1); }
.ch-ann-p{ display: grid; grid-template-columns: auto 64px minmax(0,1fr); gap: 10px; align-items: center; padding: 4px 0; font-size: 12.5px; }
.ch-ann-p-n b{ color: var(--color-primary); font-variant-numeric: tabular-nums; }
.ch-ann-p-m{ color: var(--color-text-secondary); }
.ch-ann-none{ margin: 4px 0 0; }
.ch-ok{ color: #15803d; font-weight: 600; }
.ch-ann footer, .ch-ro footer{ display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ch-ro-rows{ display: flex; flex-direction: column; border-top: 1px solid var(--hairline); }
.ch-ro-r{ display: grid; grid-template-columns: auto 110px auto minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--hairline); font-size: 12.5px; }
.ch-ro-n{ color: var(--color-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-ro-m{ color: var(--color-text-muted); font-size: 11.5px; min-width: 0; }
.ch-ro-r > .ch-tag{ justify-self: start; }
.ch-inline{ display: flex; gap: 7px; align-items: center; font-size: 13px; cursor: pointer; min-height: 38px; }
.ch-inline input{ width: 16px; height: 16px; accent-color: var(--ch); }
.ch-std-act{ display: inline-flex; gap: 10px; align-items: center; flex: none; }

/* El aviso de arriba (en cada propiedad) */
.ch-ann-bar{ display: flex; gap: 10px; align-items: center; margin: -4px 0 12px; padding: 8px 10px 8px 12px; border-radius: 14px; border: 1px solid #c9d7fb; background: #f2f6ff; animation: chAnnIn .3s var(--ease-out, ease); }
.ch-ann-bar.t-amber{ border-color: #f3d9ae; background: #fffaf1; }
.ch-ann-bar.t-red{ border-color: #f2c4c4; background: #fff5f5; }
@keyframes chAnnIn{ from{ opacity: 0; transform: translateY(-4px); } to{ opacity: 1; transform: none; } }
.ch-ann-bar-ic{ width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #fff; color: var(--ch); flex: none; }
.ch-ann-bar-ic svg{ width: 15px; height: 15px; }
.ch-ann-bar-txt{ flex: 1; min-width: 0; display: flex; gap: 2px 8px; align-items: baseline; flex-wrap: wrap; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.ch-ann-bar-txt em{ font-style: normal; font: 650 11px var(--font-body); color: var(--ch); letter-spacing: .02em; text-transform: uppercase; }
.ch-ann-bar-txt b{ font-size: 13.5px; color: var(--color-primary); font-weight: 650; min-width: 0; }
.ch-ann-bar-txt span{ font-size: 12px; color: var(--color-text-muted); }
.ch-ann-bar-go{ flex: none; }
.ch-ann-bar-x{ flex: none; width: 30px; height: 30px; border: 0; border-radius: 9px; background: transparent; color: var(--color-text-muted); font-size: 20px; line-height: 1; cursor: pointer; }
.ch-ann-bar-x:hover{ background: rgba(0,0,0,.05); color: var(--color-primary); }
.ch-ann-read .ch-ann-tags{ justify-content: flex-start; margin-bottom: 8px; }
.ch-ann-read h3{ margin: 0 0 4px; }
.ch-ann-full{ margin: 12px 0; padding: 14px 16px; border-radius: 14px; background: var(--color-surface-2, #f7f5f1); font-size: 14px; line-height: 1.6; color: var(--color-text); }
/* La tarea que vino de la cadena, en Administración → Tareas */
.op-chain{ display: inline-flex; gap: 4px; align-items: center; padding: 1px 7px; border-radius: 999px; background: var(--ch-soft); color: var(--ch-ink); font-size: 11px; font-weight: 600; }
.op-chain svg{ width: 11px; height: 11px; }

/* ==================================================================
   EQUIPO, INFORME MENSUAL Y CONFIGURACIÓN → CADENA
   ================================================================== */
.mb.sec.danger{ color: #b91c1c; border-color: #f2c4c4; margin-right: auto; }
.mb.sec.danger:hover{ background: #fff5f5; }
.ch-person-last .ch-link{ font-weight: 600; }
/* Informe: una hoja */
.ch-rep{ background: #fff; border: 1px solid var(--hairline); border-radius: 18px; padding: 26px 28px; display: flex; flex-direction: column; gap: 20px; max-width: 1040px; }
.ch-rep-head h2{ margin: 6px 0 4px; font-family: var(--font-display); font-size: 26px; letter-spacing: -.02em; color: var(--color-primary); }
.ch-rep-head p{ margin: 0; font-size: 12.5px; color: var(--color-text-muted); }
.ch-rep-kpis{ display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 10px; }
.ch-rep-kpi{ display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; background: var(--ch-softer); border: 1px solid var(--ch-line); min-width: 0; }
.ch-rep-kpi span{ font: 600 11px var(--font-body); color: var(--color-text-muted); }
.ch-rep-kpi b{ font-family: var(--font-display); font-size: 20px; color: var(--color-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ch-rep-kpi em{ font-style: normal; }
.ch-rep-sec h3{ margin: 0 0 8px; font-size: 14px; color: var(--ch-ink); text-transform: uppercase; letter-spacing: .05em; }
.ch-rep-list{ margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; line-height: 1.5; color: var(--color-text); }
.ch-rep-t tr.off td{ opacity: .6; }
.ch-rep-t td.ch-lg-p em{ display: block; font-style: normal; font-size: 11px; color: var(--color-text-muted); }
.ch-rep-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.ch-rep-cell{ display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 12px; font-size: 12.5px; }
.ch-rep-cell span{ color: var(--color-text-muted); font-size: 12px; }
.ch-rep-note, .ch-rep-foot{ margin: 6px 0 0; font-size: 11.5px; color: var(--color-text-muted); }
.ch-rep-foot{ padding-top: 12px; border-top: 1px solid var(--hairline); }
.ch-rep-copy{ width: 100%; font: 12.5px/1.5 var(--font-mono, ui-monospace, monospace); padding: 10px; border-radius: 10px; border: 1px solid var(--hairline); }
/* Configuración → Cadena */
.ch-st{ display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--ch-line); border-radius: 16px; background: linear-gradient(170deg, var(--ch-softer), #fff 60%); margin-bottom: 16px; }
.ch-st-id{ display: flex; gap: 12px; align-items: center; }
.ch-st-id > div{ display: flex; flex-direction: column; min-width: 0; }
.ch-st-id b{ font-size: 17px; color: var(--color-primary); }
.ch-st-id span{ font-size: 12.5px; color: var(--color-text-muted); }
.ch-st-mark{ width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--pc); color: #fff; flex: none; }
.ch-st-mark svg{ width: 19px; height: 19px; }
.ch-st-grid{ display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.ch-st-cell{ display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--hairline); min-width: 0; }
.ch-st-cell span{ font: 600 11px var(--font-body); color: var(--color-text-muted); }
.ch-st-cell b{ font-size: 13.5px; color: var(--color-primary); }
.ch-st-h{ margin: 18px 0 8px; display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--color-text-secondary); }
.ch-st-h em{ font-style: normal; font-weight: 500; color: var(--color-text-muted); }
.ch-st-h svg{ width: 14px; height: 14px; color: var(--ch); }
.ch-st-people{ display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.ch-st-person{ display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 12px; background: #fff; }
.ch-st-person > div{ display: flex; flex-direction: column; min-width: 0; }
.ch-st-person b{ font-size: 13.5px; color: var(--color-primary); }
.ch-st-person span{ font-size: 12px; color: var(--color-text-muted); overflow-wrap: anywhere; }
.ch-st-share{ display: flex; flex-direction: column; border: 1px solid var(--hairline); border-radius: 12px; background: #fff; }
.ch-st-share > div{ display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 10px; padding: 10px 12px; border-top: 1px solid var(--hairline); font-size: 13px; }
.ch-st-share > div:first-child{ border-top: 0; }
.ch-st-share b{ color: var(--color-primary); }
.ch-st-share span{ color: var(--color-text-secondary); }
.ch-st-admin{ margin-top: 20px; padding: 16px; border: 1px dashed var(--ch-line); border-radius: 16px; }
.ch-st-admin input[type=color]{ width: 64px; height: 38px; padding: 2px; }
.ch-pv .ch-muted{ margin: -2px 0 10px; }
.ch-pv-ex{ display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.ch-pv-p{ border: 1px solid var(--hairline); border-radius: 12px; background: #fff; }
.ch-pv-p > summary{ display: flex; gap: 8px; align-items: center; padding: 9px 12px; cursor: pointer; list-style: none; font-size: 13px; min-height: 40px; }
.ch-pv-p > summary::-webkit-details-marker{ display: none; }
.ch-pv-p > summary b{ color: var(--color-primary); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-pv-p > summary em{ margin-left: auto; font-style: normal; font-size: 12px; color: var(--color-text-muted); flex: none; }
.ch-pv-p[open] > summary em{ color: var(--ch); }
.ch-pv-p > .ch-form-grid{ padding: 2px 12px 8px; border-top: 1px solid var(--hairline); }
.ch-bench-named em.anon{ font-style: italic; opacity: .75; }
.ch-st-admin code, .ch-st code{ font-size: 11.5px; padding: 1px 5px; border-radius: 5px; background: var(--color-surface-2, #f3f1ec); }

@media (max-width: 1200px){
  .ch-kpis{ grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ch-today-r{ grid-template-columns: minmax(170px,1fr) minmax(0,1.4fr); }
  .ch-today-a{ grid-column: 1 / -1; }
}
@media (max-width: 1000px){
  .ch-grid.two, .ch-grid.three{ grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 760px){
  .ch-page{ padding: 4px 0 32px; gap: 12px; }
  .ch-head{ padding: 14px; }
  .ch-head h1{ font-size: 21px; }
  .ch-strip{ justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .ch-strip::-webkit-scrollbar{ display: none; }
  .ch-card-head{ padding: 14px 14px 4px; }
  .ch-card-body{ padding: 10px 14px 14px; }
  .ch-form-grid{ grid-template-columns: minmax(0,1fr); }
  .ch-person{ grid-template-columns: 38px minmax(0,1fr); }
  .ch-person-role, .ch-person-last{ grid-column: 2; }
  .ch-switch{ max-width: 190px; padding: 4px 6px 4px 4px; }
  .ch-switch-txt em{ display: none; }
  .ch-pop{ left: 8px !important; right: 8px; bottom: 8px; top: auto !important; width: auto; max-height: 72vh; border-radius: 18px; }

  /* Panorama en el teléfono */
  .ch-bar{ gap: 8px; }
  .ch-bar > .ch-seg{ width: 100%; }
  .ch-bar-r{ width: 100%; }
  .ch-bar-r{ flex-wrap: nowrap; }
  .ch-bar-r .arsel{ flex: 1; min-width: 0; }
  .ch-bar-r .arsel-btn{ width: 100%; }
  .ch-bar-r .arsel-val{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ch-icon-btn{ flex: none; }
  .ch-kpis{ grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .ch-kpi{ padding: 11px 12px; }
  .ch-kpi b{ font-size: 19px; }
  .ch-in{ grid-template-columns: 30px minmax(0,1fr); gap: 10px; }
  .ch-in-ic{ width: 30px; height: 30px; }
  .ch-in-act{ grid-column: 2; justify-self: start; }
  .ch-today-r{ grid-template-columns: minmax(0,1fr); gap: 8px; }
  .ch-today-a{ grid-column: auto; }
  /* La tabla de posiciones pasa a tarjetas */
  .ch-lg-wrap{ overflow: visible; margin: 0; }
  .ch-lg, .ch-lg tbody, .ch-lg tfoot, .ch-lg tr, .ch-lg td{ display: block; width: auto; }
  .ch-lg thead{ display: none; }
  .ch-lg tr{ position: relative; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px 10px; padding: 12px 12px 12px 14px; margin-bottom: 8px; border: 1px solid var(--hairline); border-radius: 14px; }
  .ch-lg tbody tr::before{ content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--pc); }
  .ch-lg td{ padding: 0; border: 0; }
  .ch-lg td.num{ text-align: left; }
  .ch-lg td.num::before{ content: attr(data-l); display: block; font: 600 10.5px var(--font-body); color: var(--color-text-muted); margin-bottom: 1px; }
  .ch-lg-rk{ display: none !important; }
  .ch-lg td.ch-lg-p{ grid-column: 1 / -1; min-width: 0; padding-right: 44px; }
  .ch-lg-go{ position: absolute; top: 10px; right: 10px; width: auto; }
  .ch-lg tfoot tr{ border-color: var(--ch-line); background: var(--ch-softer); }
  .ch-lg tfoot td{ border-top: 0; background: transparent; }
  .ch-lg tfoot td.ch-lg-p{ display: block; }
  .ch-lg tr.here td{ background: transparent; }
  .ch-lg tr.here{ background: var(--ch-softer); }
  .ch-hm td{ min-width: 40px; height: 36px; }
  .ch-hm-k{ margin-left: 0; width: 100%; }
  .ch-rank-r{ grid-template-columns: 18px 60px minmax(0,1fr) 92px; gap: 8px; }
  .ch-rank-p em{ display: none; }
  /* Central en el teléfono */
  .ch-cro-form label{ flex: 1 1 calc(50% - 10px); }
  .ch-cro-form label.sm{ flex: 1 1 calc(50% - 10px); }
  .ch-cro-go{ width: 100%; justify-content: center; }
  .ch-cro-o{ grid-template-columns: minmax(0,1fr) auto; }
  .ch-cro-o .mb{ grid-column: 1 / -1; justify-content: center; }
  .ch-cro-sum{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  /* Huéspedes en el teléfono */
  .ch-kpis.three{ grid-template-columns: minmax(0,1fr); }
  .ch-priv{ grid-template-columns: minmax(0,1fr); }
  .ch-g-row{ grid-template-columns: 32px minmax(0,1fr) auto; }
  .ch-g-props{ grid-column: 2; }
  .ch-g-num, .ch-g-when{ display: none; }
  /* Tarifas en el teléfono */
  .ch-bulk, .ch-copy{ grid-template-columns: minmax(0,1fr); }
  .ch-rt td.ch-rt-name{ min-width: 120px; max-width: 140px; }
  /* La auditoría en el teléfono: botones grandes, uno abajo del otro */
  .ch-kpis:has(> .ch-kpi:nth-child(5):last-child){ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ch-run-i{ grid-template-columns: minmax(0,1fr); }
  .ch-run-b{ display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ch-run-b button{ min-width: 0; padding: 11px 6px; }
  .ch-run-list{ max-height: 62vh; }
  /* Crecimiento y comunicación en el teléfono */
  .ch-gr-grid, .ch-lesson-list{ grid-template-columns: minmax(0,1fr); }
  .ch-goal-t td.ch-goal-bar{ grid-column: 1 / 3; align-self: center; }
  .ch-goal-t td.ch-goal-st{ align-self: center; }
  .ch-num-in{ width: 100%; }
  .ch-bench{ padding: 12px; }
  .ch-bench-rows{ grid-template-columns: minmax(0,1fr); }
  .ch-bench-r{ grid-template-columns: 96px minmax(40px,1fr) auto; gap: 8px; }
  .ch-ann, .ch-ro{ padding: 12px; }
  .ch-ann header, .ch-ro header{ flex-wrap: wrap; }
  .ch-ann-tags{ width: 100%; justify-content: flex-start; }
  .ch-ann-p{ grid-template-columns: auto 56px minmax(0,1fr); }
  .ch-ro-r{ grid-template-columns: auto minmax(0,1fr) auto; }
  .ch-ro-n{ display: none; }
  .ch-ro-m{ grid-column: 1 / -1; }
  .ch-ro-r .gx-link{ grid-column: 3; grid-row: 1; }
  .ch-ann-bar{ flex-wrap: wrap; margin: 0 0 10px; }
  .ch-ann-bar-txt{ flex-basis: calc(100% - 80px); }
  .ch-ann-bar-go{ flex: 1; justify-content: center; }
  .ch-std-act{ flex-direction: column; align-items: flex-end; gap: 4px; }
  /* Informe y Configuración → Cadena en el teléfono */
  .ch-rep{ padding: 16px 14px; border-radius: 14px; }
  .ch-rep-head h2{ font-size: 21px; }
  .ch-rep-kpis{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ch-st-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ch-st-share > div{ grid-template-columns: minmax(0,1fr); gap: 2px; }
}
@media print{
  .ch-tabs, .ch-strip, .ch-prop-act, .ch-no-print{ display: none !important; }
  /* El informe mensual sale solo, en una hoja limpia */
  body:has(#chi-sheet) *{ visibility: hidden; }
  body:has(#chi-sheet) #chi-sheet, body:has(#chi-sheet) #chi-sheet *{ visibility: visible; }
  body:has(#chi-sheet) #chi-sheet{ position: absolute; left: 0; top: 0; width: 100%; max-width: none; border: 0; border-radius: 0; padding: 0; }
  #chi-sheet .ch-rep-kpi{ break-inside: avoid; }
  #chi-sheet .ch-rep-sec{ break-inside: avoid-page; }
}
