/* ============================================================
   Módulo de planificación estratégica (Paquete 4)
   Estilos según DESIGN/Modulo Planificacion GHC.dc.html y la
   guía de componentes §1–13 y §22. Solo clases nuevas plan-*;
   ningún token ni clase previa se modifica.
   ============================================================ */

.row-min { display: flex; align-items: center; gap: 8px; min-width: 0; }

/* --- Contenedor, breadcrumb y sub-navegación (guía §14 y §22) --- */
.plan-mod { display: flex; flex-direction: column; gap: 14px; }
.plan-migas {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--text-muted);
}
.plan-migas svg { color: #C6D0E2; }
.plan-migas .act { color: var(--text-strong); font-weight: 700; }
.plan-migas .tag-modulo {
  font-size: 9.5px; font-weight: 800; letter-spacing: .6px; color: var(--brand-primary);
  background: var(--brand-primary-soft); border: 1px solid var(--brand-primary-border);
  border-radius: 5px; padding: 2px 6px;
}
.plan-subnav { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; }
.plan-pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: #5B6B8C;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); padding: 7px 12px; cursor: pointer; white-space: nowrap;
}
.plan-pill .num {
  width: 18px; height: 18px; flex: none; border-radius: 5px; display: flex;
  align-items: center; justify-content: center; font-size: 11px; font-weight: 800;
  color: var(--text-subtle); background: var(--border-soft);
}
.plan-pill.on { color: #fff; background: var(--brand-primary); border-color: var(--brand-primary); font-weight: 700; }
.plan-pill.on .num { color: var(--brand-primary); background: #fff; }

/* --- Cabecera del módulo (vista 1) --- */
.plan-head { margin: 0; }
.plan-head-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.plan-chip-ej {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-primary-soft); border: 1px solid var(--brand-primary-border);
  border-radius: var(--radius-md); padding: 6px 12px;
}
.plan-chip-ej .l { font-size: 11px; font-weight: 700; color: #5B6B8C; text-transform: uppercase; letter-spacing: .5px; }
.plan-chip-ej .y { font-size: 15px; font-weight: 800; color: var(--brand-primary); }
.plan-chip-activo {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  color: var(--success-text); background: var(--success-bg); border: 1px solid var(--success-border);
  border-radius: var(--radius-pill); padding: 5px 11px;
}
.plan-chip-activo i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.plan-chip-activo.cerrado { color: var(--text-muted); background: #F1F2F5; border-color: #D8DEE8; }
.plan-lbl {
  font-size: 11.5px; font-weight: 700; color: var(--text-subtle);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px;
}
.plan-og {
  font-size: 21px; font-weight: 800; color: var(--text-strong); line-height: 1.28;
  border-bottom: 2px dashed #C6D0E2; padding: 4px 8px 8px; border-radius: 6px;
  cursor: text; transition: background .15s;
}
.plan-og:hover { background: var(--brand-primary-soft); }
.plan-og.ro { cursor: default; border-bottom-color: transparent; }
.plan-og.ro:hover { background: transparent; }
.plan-og-inp { font-size: 17px; font-weight: 700; }
.plan-ed-ph { color: var(--text-subtle); font-weight: 600; }
.plan-ed-tag {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; vertical-align: middle;
  font-size: 11px; font-weight: 700; color: var(--brand-primary);
  background: var(--brand-primary-soft); border-radius: 6px; padding: 2px 7px;
}

/* --- KPIs del cuadro resumido --- */
.plan-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.plan-kpi { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.plan-kpi-num { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plan-kpi-num .v { font-size: 28px; font-weight: 800; color: var(--text-strong); line-height: 1.05; }
.plan-kpi-num .s { font-size: 12px; color: var(--text-subtle); font-weight: 600; }
.plan-kpi-foot { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.plan-riesgo-item {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--text); font-weight: 600;
}
.plan-riesgo-item i { width: 8px; height: 8px; border-radius: 2px; background: var(--warning); flex: none; }

/* --- Barras y puntos comunes --- */
.plan-bar-lbl {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 11.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px;
}
.plan-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.plan-linkbtn {
  font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--brand-primary);
  background: none; border: none; cursor: pointer; padding: 0; text-align: left;
}
.plan-linkbtn:hover { text-decoration: underline; }
.plan-linkbtn.rojo { color: var(--error); }

/* --- Filtros y segmentado --- */
.plan-filterbar { margin: 0; }
.plan-seg { display: flex; background: var(--border-soft); border-radius: var(--radius-md); padding: 3px; }
.plan-seg-btn {
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-muted);
  background: transparent; border: none; border-radius: 7px; padding: 6px 13px; cursor: pointer;
}
.plan-seg-btn.on { color: var(--text-strong); font-weight: 700; background: #fff; box-shadow: 0 1px 2px rgba(16,34,60,.1); }

/* --- Grupos de objetivos y tarjetas --- */
.plan-grupo { margin-bottom: 10px; }
.plan-obj-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 4px;
  border-bottom: 1px solid var(--border); margin-bottom: 14px;
}
.plan-obj-head.drop-hint { background: var(--brand-primary-soft); border-radius: 9px; }
.plan-handle { cursor: grab; color: var(--text-subtle); font-size: 13px; letter-spacing: -2px; user-select: none; }
.plan-obj-color { width: 6px; height: 30px; border-radius: 6px; flex: none; }
.plan-objnum {
  width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 13px; flex: none;
}
.plan-obj-tit { min-width: 0; flex: 1; }
.plan-obj-tit .n { font-size: 16px; font-weight: 800; color: var(--text-strong); }
.plan-obj-tit .s { font-size: 12.5px; color: var(--text-subtle); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-obj-conteo {
  font-size: 12px; font-weight: 700; color: #5B6B8C; background: var(--border-soft);
  border-radius: var(--radius-pill); padding: 5px 11px; flex: none;
}
.plan-obj-conteo.filtrado { color: var(--warning-text); background: var(--warning-bg); }
.plan-obj-pct { font-size: 13px; font-weight: 800; flex: none; }
.plan-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.plan-card-grid.suelta { margin-top: 4px; }
.plan-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 13px;
  padding: 15px 16px; box-shadow: var(--shadow-sm); cursor: pointer;
  display: flex; flex-direction: column; gap: 11px;
  transition: box-shadow .15s, transform .15s;
}
.plan-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.plan-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.plan-card.drop-hint { background: var(--brand-primary-soft); }
.plan-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.plan-card-nom { font-size: 14px; font-weight: 700; color: var(--text-strong); line-height: 1.32; min-width: 0; }
.plan-card-resp { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.plan-card-resp svg { color: #98A2B8; flex: none; }
.plan-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border-soft); padding-top: 9px;
}
.plan-card-foot .f { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-subtle); font-weight: 600; }
.plan-card-foot .f.sinfecha {
  color: var(--brand-secondary-text); background: #FEF1E0; border: 1px solid var(--brand-secondary-border);
  border-radius: 8px; padding: 4px 8px;
}
.plan-obj-vacio {
  border: 1.5px dashed var(--border); border-radius: 13px; padding: 26px 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.plan-obj-vacio .t { font-size: 14px; font-weight: 800; color: var(--text-strong); }
.plan-obj-vacio .s { font-size: 12.5px; color: var(--text-subtle); font-weight: 600; margin-bottom: 8px; }

/* --- Etiqueta de estado (badge §4) --- */
.plan-badge {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  font-size: 11px; font-weight: 700; border: 1px solid;
  border-radius: var(--radius-pill); padding: 3px 9px; white-space: nowrap;
}
.plan-badge i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.plan-badge.chica { font-size: 10.5px; padding: 2px 8px; }

/* --- Cuadro de mando (vista 2) --- */
.plan-hint-row {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-muted); font-weight: 600; margin-bottom: 2px;
}
.plan-hint-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-primary-soft); border: 1px solid var(--brand-primary-border);
  color: var(--info-text); font-weight: 700; border-radius: var(--radius-pill); padding: 5px 11px;
}
.plan-cuadro-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
.plan-obj-bar {
  border: 1px solid #E9EDF4; border-radius: 12px; padding: 13px 15px; margin-bottom: 12px;
  cursor: pointer; transition: background .12s;
}
.plan-obj-bar:hover { background: var(--brand-primary-soft); }
.plan-obj-bar-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.plan-obj-bar-nom { font-size: 14px; font-weight: 700; color: var(--text-strong); }
.plan-obj-bar-pct { font-size: 18px; font-weight: 800; }
.plan-verlink {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700;
  color: var(--info-text); background: var(--brand-primary-soft);
  border: 1px solid var(--brand-primary-border); border-radius: var(--radius-pill); padding: 3px 8px;
  white-space: nowrap;
}
.plan-obj-bar-foot {
  display: flex; justify-content: space-between; gap: 8px; margin-top: 7px;
  font-size: 11.5px; color: var(--text-subtle); font-weight: 600; flex-wrap: wrap;
}
.plan-big-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.plan-big { font-size: 30px; font-weight: 800; color: var(--text-strong); }
.plan-big-sub { font-size: 13px; color: var(--text-subtle); font-weight: 700; }
.plan-big-pct { margin-left: auto; font-size: 21px; font-weight: 800; color: var(--success); }
.plan-minigrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.plan-minibox { background: var(--surface-2); border: 1px solid #E9EDF4; border-radius: 11px; padding: 12px 14px; }
.plan-minibox-l { font-size: 11px; font-weight: 700; color: var(--text-subtle); text-transform: uppercase; letter-spacing: .4px; }
.plan-minibox-v { font-size: 17px; font-weight: 800; color: var(--text-strong); margin-top: 3px; }

.plan-meta-row { padding: 11px 0; border-bottom: 1px solid #F0F2F7; }
.plan-meta-row:last-child { border-bottom: none; }
.plan-meta-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 7px; }
.plan-meta-ind { font-size: 13px; font-weight: 700; color: var(--text-strong); line-height: 1.3; }
.plan-meta-sub { font-size: 11.5px; color: var(--text-subtle); font-weight: 600; margin-top: 2px; }
.plan-meta-bar { display: flex; align-items: center; gap: 9px; }
.plan-meta-val { font-size: 12px; font-weight: 800; color: var(--text-strong); flex: none; white-space: nowrap; }
.plan-chip-fuente {
  font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; white-space: nowrap;
  color: #5B6B8C; background: var(--border-soft); border: 1px solid var(--border-strong); flex: none;
}
.plan-chip-fuente.manual { color: var(--brand-secondary-text); background: #FEF1E0; border-color: var(--brand-secondary-border); }
.plan-meta-reg { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.plan-meta-inp { width: 130px; padding: 7px 10px; font-size: 13px; }

.plan-presu-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.plan-presu-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #F0F2F7; }
.plan-presu-row.total { border-bottom: none; padding: 13px 0 2px; }
.plan-presu-row.total .n { font-weight: 800; }
.plan-presu-nom { width: 250px; flex: none; min-width: 0; }
.plan-presu-nom .n { font-size: 13px; font-weight: 700; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-presu-nom .s { font-size: 11px; color: var(--text-subtle); font-weight: 600; }
.plan-presu-monto { font-size: 13px; font-weight: 800; color: var(--text-strong); width: 100px; text-align: right; flex: none; }
.plan-presu-pct { font-size: 12px; font-weight: 700; color: #5B6B8C; width: 52px; text-align: right; flex: none; }

/* --- Cuadro en profundidad (vista 3) --- */
.plan-deep-migas { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.plan-deep-migas svg { color: #C6D0E2; }
.plan-deep-migas-act { color: var(--text-strong); font-weight: 700; }
.plan-deep-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 0 0 4px; }
.plan-deep-nom { font-size: 18px; font-weight: 800; color: var(--text-strong); }
.plan-deep-kpi { text-align: center; padding: 0 14px; }
.plan-deep-kpi.con-borde { border-left: 1px solid #E9EDF4; }
.plan-deep-kpi .v { font-size: 26px; font-weight: 800; }
.plan-deep-kpi .l { font-size: 11px; font-weight: 700; color: var(--text-subtle); text-transform: uppercase; letter-spacing: .4px; }
.plan-deep-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 18px;
  border-bottom: 1px solid #F0F2F7; cursor: pointer; transition: background .12s;
}
.plan-deep-row:hover { background: var(--brand-primary-soft); }
.plan-deep-row:last-child { border-bottom: none; }
.plan-deep-row-nom { flex: 1; min-width: 180px; }
.plan-deep-row-nom .n { font-size: 13.5px; font-weight: 700; color: var(--text-strong); }
.plan-deep-row-nom .s { font-size: 11.5px; color: var(--text-subtle); font-weight: 600; margin-top: 3px; }
.plan-deep-row-bar { width: 200px; flex: none; }
.plan-deep-row > svg { color: #C6D0E2; flex: none; }

/* Registro manual de meta (bloque ámbar) */
.plan-manual-box {
  background: #FEF9F1; border: 1px solid var(--brand-secondary-border);
  border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 14px;
}
.plan-manual-tit { font-size: 14px; font-weight: 800; color: var(--text-strong); }
.plan-manual-sub { font-size: 12.5px; color: var(--warning-text); font-weight: 600; margin-bottom: 12px; }
.plan-manual-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.plan-manual-lbl { display: block; font-size: 11.5px; font-weight: 700; color: var(--warning-text); margin-bottom: 5px; }
.plan-manual-inp { width: 150px; border-color: #F0C98A; }
.plan-manual-inp.txt { width: 100%; }
.plan-btn-manual { color: #fff; background: var(--brand-secondary-hover); box-shadow: 0 2px 6px rgba(232,135,31,.3); }
.plan-btn-manual:hover { background: #D97B15; }

/* --- Gantt (vista 6) --- */
.plan-gantt-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.plan-gantt-lbl { font-size: 14px; font-weight: 800; color: var(--text-strong); }
.plan-icobtn {
  width: 34px; height: 34px; border-radius: var(--radius-md); background: var(--surface);
  border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted);
}
.plan-icobtn:hover { background: var(--border-soft); }
.plan-gantt-wrap { overflow-x: auto; margin: 0; }
.plan-gantt-inner { min-width: max-content; }
.plan-gantt-fila { display: flex; border-bottom: 1px solid #F4F6FA; }
.plan-gantt-fila.cab { border-bottom: 1px solid #E9EDF4; background: var(--surface-2); }
.plan-gantt-nom {
  width: 230px; flex: none; padding: 10px 16px; font-size: 12.5px; font-weight: 600; color: var(--text);
  position: sticky; left: 0; background: #fff; z-index: 1; border-right: 1px solid #E9EDF4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.plan-gantt-nom.cab {
  font-size: 11.5px; font-weight: 700; color: var(--text-subtle); text-transform: uppercase;
  letter-spacing: .5px; background: var(--surface-2); z-index: 2; padding: 11px 16px;
}
.plan-gantt-track { width: calc(var(--gcols) * var(--gcolw)); flex: none; position: relative; height: 42px; }
.plan-gantt-track.cab { display: flex; height: auto; }
.plan-gantt-mes { flex: 1; text-align: center; padding: 11px 4px; font-size: 12px; font-weight: 700; color: var(--text-muted); border-right: 1px solid #F0F2F7; }
.plan-gantt-grid { position: absolute; inset: 0; display: flex; }
.plan-gantt-grid > div { flex: 1; border-right: 1px solid #F4F6FA; }
.plan-gantt-bar {
  position: absolute; top: 9px; height: 24px; border-radius: 7px; display: flex;
  align-items: center; padding: 0 9px; box-shadow: 0 1px 3px rgba(16,34,60,.18); cursor: pointer;
}
.plan-gantt-bar span { font-size: 10.5px; font-weight: 800; color: #fff; white-space: nowrap; text-shadow: 0 1px 1px rgba(0,0,0,.15); }
.plan-gantt-grupo {
  display: flex; align-items: center; gap: 9px; padding: 9px 16px;
  font-size: 12.5px; font-weight: 800; position: sticky; left: 0;
}
.plan-gantt-aviso { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; }
.plan-gantt-aviso svg { flex: none; margin-top: 1px; color: var(--text-subtle); }
.plan-gantt-aviso-t { font-size: 13px; font-weight: 800; color: var(--text-strong); margin-bottom: 2px; }
.plan-gantt-aviso-s { font-size: 12.5px; color: var(--text-muted); font-weight: 600; line-height: 1.45; }
.plan-gantt-aviso .plan-linkbtn { display: block; margin-top: 5px; }

/* --- Tarjeta expandida (vista 5) --- */
.plan-exp { overflow: hidden; }
.plan-exp-head { padding: 18px 22px 16px; border-bottom: 1px solid var(--border-soft); }
.plan-exp-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.plan-chip-select {
  font-family: inherit; font-size: 12.5px; font-weight: 700; border: 1px solid;
  border-radius: var(--radius-md); padding: 7px 10px; cursor: pointer; max-width: 300px;
}
.plan-chip-select:disabled { cursor: default; opacity: .85; }
.plan-exp-ej { font-size: 11.5px; color: var(--text-subtle); font-weight: 600; }
.plan-exp-titulo { font-size: 21px; font-weight: 800; color: var(--text-strong); line-height: 1.25; }
.plan-exp-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.plan-meta-dato, .plan-meta-dato-wrap {
  display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-muted);
  font-weight: 600; background: none; border: none; padding: 0; font-family: inherit;
}
.plan-meta-dato.editable { cursor: pointer; }
.plan-meta-dato.editable:hover { color: var(--brand-primary); }
.plan-meta-dato svg, .plan-meta-dato-wrap svg { color: #98A2B8; flex: none; }
.plan-fechas-edit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-fecha-inp { width: 120px; padding: 7px 10px; font-size: 13px; }
.plan-fecha-err { width: 100%; font-size: 11.5px; font-weight: 700; color: var(--error); }
.plan-exp-body { padding: 18px 22px 22px; }
.plan-exp-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }

.plan-ed {
  font-size: 13.5px; color: var(--text); line-height: 1.5; padding: 2px 4px;
  border-radius: 6px; cursor: text; transition: background .12s;
}
.plan-ed:hover { background: var(--brand-primary-soft); }
.plan-ed.ro { cursor: default; }
.plan-ed.ro:hover { background: transparent; }
.plan-ed.grande { font-size: inherit; font-weight: 800; color: var(--text-strong); }
.plan-ed.chica { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.plan-ed .plan-ed-tag { opacity: 0; transition: opacity .12s; }
.plan-ed:hover .plan-ed-tag { opacity: 1; }
.plan-ed-inp { font-size: 13.5px; }

.plan-caja { background: var(--surface); border: 1px solid #E9EDF4; border-radius: 13px; padding: 16px 17px; }
.plan-caja.presu { background: var(--surface-2); }
.plan-caja-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.plan-caja-t { font-size: 13px; font-weight: 800; color: var(--text-strong); }
.plan-ro-tag {
  font-size: 11px; font-weight: 700; color: var(--text-subtle); background: var(--border-soft);
  border-radius: 6px; padding: 2px 7px; white-space: nowrap;
}
.plan-comp-row {
  display: flex; gap: 10px; align-items: flex-start; background: #fff;
  border: 1px solid #E9EDF4; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px;
}
.plan-comp-nom { font-size: 12.5px; font-weight: 700; color: var(--text-strong); line-height: 1.35; }
.plan-comp-det { font-size: 11.5px; color: var(--text-subtle); font-weight: 600; margin-top: 2px; }
.plan-comp-monto { font-size: 13px; font-weight: 800; color: var(--text-strong); flex: none; }
.plan-comp-acc { display: flex; gap: 3px; flex: none; }
.plan-mini-ico {
  width: 24px; height: 24px; border-radius: 7px; background: var(--border-soft); border: none;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--text-muted); font-size: 12px; font-weight: 700; font-family: inherit; flex: none;
}
.plan-mini-ico:hover { background: var(--border-strong); }
.plan-mini-ico:disabled { opacity: .4; cursor: default; }
.plan-mini-ico.rojo { color: var(--error); }
.plan-comp-form {
  display: flex; flex-direction: column; gap: 8px; background: #fff;
  border: 1.5px dashed var(--brand-primary-border); border-radius: 10px; padding: 12px; margin-bottom: 8px;
}
.plan-add-btn {
  width: 100%; font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--brand-primary);
  background: #fff; border: 1.5px dashed var(--brand-primary-border); border-radius: 10px;
  padding: 9px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 4px;
}
.plan-add-btn:hover { background: var(--brand-primary-soft); }
.plan-eje-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid #E9EDF4;
}
.plan-eje-inp { width: 130px; text-align: right; font-size: 15px; font-weight: 800; }
.plan-tarea-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #F4F6FA; }
.plan-tarea-row:last-child { border-bottom: none; }
.plan-tarea-dot { width: 14px; height: 14px; border-radius: 50%; border: none; cursor: pointer; flex: none; padding: 0; }
.plan-tarea-dot:disabled { cursor: default; }
.plan-tarea-nom { font-size: 13px; font-weight: 600; color: var(--text-strong); line-height: 1.3; }
.plan-tarea-nom.hecha { text-decoration: line-through; color: var(--text-subtle); }
.plan-tarea-conteo {
  font-size: 11.5px; font-weight: 700; color: var(--success-text); background: var(--success-bg);
  border: 1px solid var(--success-border); border-radius: var(--radius-pill); padding: 3px 9px;
}
.plan-tarea-conteo.vacia { color: var(--text-subtle); background: var(--border-soft); border-color: var(--border-strong); }
.plan-exp-danger { padding: 0 22px 18px; }

/* --- Vistas 7 y 8, estados y formularios --- */
.plan-intro { font-size: 13px; color: var(--text-muted); font-weight: 600; max-width: 760px; margin-bottom: 4px; }
.plan-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.plan-form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan-estados-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.plan-estados-grid .card { margin: 0; }
.plan-estado-ok { border-left: 4px solid var(--success); }
.plan-estado-ok svg { color: var(--success); }
.plan-estado-s { font-size: 12.5px; color: var(--text-muted); font-weight: 600; line-height: 1.5; margin-top: 6px; }
.plan-estado-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 0;
  font-size: 13px; font-weight: 600; color: var(--text); border-bottom: 1px solid #F0F2F7;
}
.plan-estado-item:last-child { border-bottom: none; }
.plan-estado-item svg { color: var(--warning); flex: none; }
.plan-estado-item .plan-linkbtn { margin-left: auto; flex: none; }
.plan-estado-lock {
  display: flex; align-items: center; gap: 10px; background: #F1F2F5;
  padding: 13px 18px; border-bottom: 1px solid var(--border);
  font-size: 13px; color: #4A5568;
}
.plan-estado-lock .pill {
  margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--text-muted);
  background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); padding: 3px 10px;
}
.plan-vacio { text-align: center; padding: 34px 24px; margin: 0; }
.plan-vacio .ico {
  width: 56px; height: 56px; border-radius: 15px; background: var(--brand-primary-soft);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; color: var(--brand-primary);
}
.plan-vacio .t { font-size: 16px; font-weight: 800; color: var(--text-strong); margin-bottom: 6px; }
.plan-vacio .s { font-size: 13px; color: var(--text-muted); font-weight: 600; line-height: 1.5; max-width: 400px; margin: 0 auto 18px; }
.plan-vacio-acc { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* --- Modal del módulo (guía §9) --- */
.pmodal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.pmodal {
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  animation: pmodal-in .16s ease-out;
}
.pmodal.rojo { border: 1px solid var(--error-border); }
@keyframes pmodal-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.pmodal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 17px 20px; border-bottom: 1px solid var(--border-soft);
  font-size: 16px; font-weight: 800; color: var(--text-strong);
}
.pmodal-x {
  width: 28px; height: 28px; border-radius: 8px; background: var(--border-soft); border: none;
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); flex: none;
}
.pmodal-body { padding: 18px 20px; }
.pmodal-body.stack-col { display: flex; flex-direction: column; gap: 15px; }
.pmodal-foot {
  display: flex; justify-content: flex-end; gap: 10px; padding: 15px 20px;
  border-top: 1px solid var(--border-soft); background: #FAFBFD;
}
.plan-bloq-head { display: flex; align-items: flex-start; gap: 13px; }
.plan-bloq-head .ico {
  width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--error-bg);
  display: flex; align-items: center; justify-content: center; color: var(--error);
}
.plan-bloq-head .t { font-size: 16px; font-weight: 800; color: var(--text-strong); margin-bottom: 4px; }
.plan-bloq-head .s { font-size: 13px; color: var(--text-muted); font-weight: 600; line-height: 1.5; }
.plan-bloq-sug {
  background: #FDF3F2; border: 1px solid var(--error-border); border-radius: 11px;
  padding: 12px 14px; margin-top: 16px; font-size: 12.5px; color: var(--error-text);
  font-weight: 600; line-height: 1.45;
}
.plan-swatches { display: flex; gap: 10px; }
.plan-swatch { width: 30px; height: 30px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; padding: 0; }
.plan-swatch.sel { border-color: var(--text-strong); box-shadow: 0 0 0 2px #fff inset; }
.plan-opcional { font-weight: 600; color: var(--text-subtle); }
.plan-ayuda { font-size: 11.5px; color: var(--text-subtle); font-weight: 600; margin-top: 7px; }
.plan-ayuda.caja {
  background: var(--surface-2); border: 1px solid #E9EDF4; border-radius: var(--radius-md);
  padding: 10px 12px; margin: 0;
}

/* --- Aviso transitorio --- */
.plan-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 120;
  background: var(--surface-inverse); color: #fff; font-size: 13px; font-weight: 600;
  border-radius: 10px; padding: 11px 18px; box-shadow: var(--shadow-lg);
  max-width: min(520px, 90vw); text-align: center; transition: opacity .3s;
}
.plan-toast.err { background: #7C2A24; }
.plan-toast.out { opacity: 0; }

/* --- Responsive (§4.1: escritorio, tableta y celular) --- */
@media (max-width: 1100px) {
  .plan-kpi-grid { grid-template-columns: 1fr 1fr; }
  .plan-cuadro-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .plan-exp-grid, .plan-form-grid, .plan-estados-grid { grid-template-columns: 1fr; }
  .plan-deep-row-bar { width: 100%; }
  .plan-presu-nom { width: 140px; }
}
@media (max-width: 620px) {
  .plan-kpi-grid { grid-template-columns: 1fr; }
  .plan-card-grid { grid-template-columns: 1fr; }
  .plan-form-2col { grid-template-columns: 1fr; }
  .plan-og { font-size: 17px; }
  .plan-obj-head { flex-wrap: wrap; }
  .plan-gantt-nom { width: 150px; }
  .pmodal { max-width: none; height: 100%; max-height: none; border-radius: 0; }
  .pmodal-backdrop { padding: 0; }
}
