/* Evolutivo Work — estructura tipo Asana (Fase 1) con la identidad visual del 009a (fichas en styles.css).
   Base de 8 px, líneas de 1 px, esquinas de 6/8/12 px, sombras sutiles con tinte azul y transiciones de 150 ms.
   Todo va acotado a la app interna (.shell, .tpanel…) para no cambiar la vista pública. */
:root {
  --rail-w: 64px;
  --navpanel-w: 228px;
  --panel-w: 600px;
  --t: 150ms ease;
  --row-h: 40px;
  --due-over: var(--danger);
  --due-today: var(--ok);
  --due-future: var(--text-2);
}

.shell a, .shell button, .shell .icard, .shell .ocard { transition: background-color var(--t), border-color var(--t), color var(--t), box-shadow var(--t), opacity var(--t); }

/* ---------- Barra lateral de dos niveles ---------- */
.sidebar.side2 { width: calc(var(--rail-w) + var(--navpanel-w)); flex-direction: row; background: var(--sidebar-bg); transition: width var(--t); }
.sidebar.side2.collapsed { width: var(--rail-w); }
.side2 .rail { width: var(--rail-w); flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0 12px;
  background: var(--sidebar-bg); border-right: 1px solid var(--sidebar-line); }
.rail-toggle, .rail-btn { border: 0; background: none; color: var(--sidebar-muted); cursor: pointer; border-radius: 8px; font-family: inherit; }
.rail-toggle { width: 40px; height: 36px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.rail-toggle:hover, .rail-btn:hover { background: var(--sidebar-hover); color: var(--sidebar-text); }
.rail-btn { width: 56px; padding: 6px 0 5px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; font-weight: 600; }
.rail-btn.active { color: var(--sidebar-active-text); }
.rail-btn.active .icon { background: var(--sidebar-active); border-radius: 8px; padding: 5px; width: 30px !important; height: 30px !important; margin: -6px 0 -5px; }
.rail-me { margin-top: 6px; border-radius: 50%; }
.rail-me .avatar { width: 30px; height: 30px; font-size: 11px; box-shadow: 0 0 0 2px var(--bg); }
.side2 .navpanel { width: var(--navpanel-w); flex: none; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.side2.collapsed .navpanel { display: none; }
.np-brand { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; }
.np-brand img { width: 26px; height: 26px; border-radius: 7px; }
.np-scroll { padding: 2px 8px 8px; }
.np-title { font-size: 11px; font-weight: 600; color: var(--sidebar-muted); padding: 6px 10px 6px; }
.side2 .nav a { font-weight: 500; padding: 6px 10px; gap: 10px; }
.side2 .nav a .icon { opacity: 0.9; }
.side2 .nav a.active { background: var(--sidebar-active); color: var(--sidebar-active-text); }
.side2 .nav a.active::before { display: none; }
.np-sep { height: 1px; background: var(--sidebar-line); margin: 6px 4px; }
.np-section { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 600; color: var(--sidebar-muted); padding: 14px 10px 4px; }
.np-add { padding: 2px !important; border-radius: 6px; color: var(--sidebar-muted) !important; }
.np-more, .np-btn { border: 0; background: none; color: var(--sidebar-muted); font: inherit; font-size: 12px; padding: 6px 10px; text-align: left; cursor: pointer; border-radius: 6px; }
.np-btn { display: flex; align-items: center; gap: 10px; color: var(--sidebar-text); font-size: 13px; font-weight: 500; width: 100%; }
.np-more:hover, .np-btn:hover { background: var(--sidebar-hover); color: var(--sidebar-text); }
.nbadge { margin-left: auto; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 99px; background: var(--sidebar-active); color: var(--sidebar-active-text); }
.pj-ico { width: 18px; height: 18px; border-radius: 5px; background: var(--c, var(--primary)); color: var(--on-color); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pj-ico.lg { width: 28px; height: 28px; border-radius: 7px; }
.side2 .nav a.sub { padding-left: 10px; font-weight: 500; }
.np-foot { border-top: 1px solid var(--sidebar-line); padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.np-invite { display: flex; align-items: center; justify-content: center; gap: 8px; height: 32px; border-radius: var(--radius); border: 1px solid var(--border-strong);
  background: var(--bg-elev); color: var(--sidebar-text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.np-invite:hover { background: var(--sidebar-hover); }
.np-user { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.np-user a { color: var(--sidebar-text); font-weight: 600; line-height: 1.2; }
.np-user a small { display: block; color: var(--sidebar-muted); font-weight: 400; }
.np-user .btn.ghost { color: var(--sidebar-text); }

/* Menú inferior (solo celular) */
.bottomnav { display: none; }

/* ---------- Encabezado del proyecto ---------- */
.phead { background: var(--bg); border-bottom: 1px solid var(--border); padding: 0 24px; position: sticky; top: 0; z-index: 20; }
.ph-top { display: flex; align-items: center; gap: 8px; min-height: 56px; padding-top: 8px; flex-wrap: wrap; }
.ph-name { font-size: 20px; font-weight: 600; color: var(--title); letter-spacing: -0.01em; max-width: 42vw; }
.ph-name-input { font: inherit; font-size: 20px; font-weight: 600; color: var(--title); border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 2px 6px; margin-left: -6px; min-width: 6ch; }
.ph-name-input:hover { border-color: var(--border-strong); }
.ph-name-input:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
.ph-star { color: var(--text-3); }
.ph-star.on { color: var(--star-line); }
.ph-star.on .icon { fill: var(--star-fill); stroke: var(--star-line); }
.ph-status { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border-radius: 6px; border: 1px solid transparent; background: none;
  color: var(--text-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.ph-status:hover { background: var(--bg-hover); border-color: var(--border); }
.ph-status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0, 0, 0, 0.15); flex: none; }
.ph-client { font-size: 12px; color: var(--text-3); }
.ph-client a { color: var(--text-2); }
.avstack { display: inline-flex; align-items: center; padding-left: 6px; }
.avstack .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg); }
.avstack .avatar.more { background: var(--bg-active); color: var(--text-2); font-size: 9px; }
.ph-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-top: 2px; }
.ph-tabs a { padding: 8px 10px 10px; font-size: 13px; font-weight: 500; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; border-radius: 6px 6px 0 0; }
.ph-tabs a:hover { color: var(--text); background: var(--bg-hover); text-decoration: none; }
.ph-tabs a.active { color: var(--text); font-weight: 600; border-bottom-color: var(--primary); }
.ph-tabs a.is-soon { color: var(--text-3); }
.ptool { display: flex; align-items: center; gap: 6px; padding: 10px 24px; border-bottom: 1px solid var(--border); background: var(--bg); flex-wrap: wrap; }
.ptool .addtask { font-weight: 600; }
.ptool-mas { display: contents; }
.ptool-vista { display: none; }
.sheet-controles { display: flex; flex-direction: column; gap: 8px; }
.sheet-controles .dropdown { width: 100%; }
.sheet-controles .dropdown > .vbtn { width: 100%; height: 40px; justify-content: flex-start; }
.sheet-controles .dropdown-panel { position: static; margin-top: 6px; width: 100%; max-width: none; box-shadow: none; }
.vbtn.ghosty { border-color: transparent; background: transparent; color: var(--text-2); }
.vbtn.ghosty:hover { background: var(--bg-hover); color: var(--text); }
.vbtn.ghosty.focus { border-color: var(--border-strong); }
.pick-panel { min-width: 220px; }
.soon { max-width: 560px; margin: 40px auto; text-align: center; padding: 32px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.soon > .icon { color: var(--accent-2); }
.soon h2 { font-size: 18px; }
.soon p { margin: 0; }
.soon-extra { text-align: left; width: 100%; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }

/* ---------- Lista tipo tabla ---------- */
.tc.name { padding-left: 4px !important; }
.tt-grip { width: 16px; display: inline-flex; justify-content: center; color: var(--text-3); opacity: 0; cursor: grab; flex: none; }
.tcheck { width: 22px; height: 22px; border: 0; background: none; padding: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; border-radius: 50%; }
.tcheck svg circle { fill: none; stroke: var(--text-3); stroke-width: 1.4; transition: fill var(--t), stroke var(--t); }
.tcheck svg path { fill: none; stroke: var(--text-3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke var(--t); }
.tcheck:hover svg circle { stroke: var(--due-today); }
.tcheck:hover svg path { stroke: var(--due-today); }
.tcheck.done svg circle { fill: var(--due-today); stroke: var(--due-today); }
.tcheck.done svg path { stroke: var(--on-color); }
.tt-key { font-size: 11px; font-weight: 500; color: var(--text-3); flex: none; font-variant-numeric: tabular-nums; }
.tt-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 4px; margin-left: -4px; border-radius: 4px; border: 1px solid transparent; cursor: text; }
.tt-title:hover { border-color: var(--border-strong); background: var(--bg); }
.tt-title-input { flex: 1; min-width: 0; font: inherit; border: 1px solid var(--primary); border-radius: 4px; padding: 2px 4px; margin-left: -4px; background: var(--bg); color: var(--text); box-shadow: var(--focus-ring); outline: none; }
.tt-count { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; color: var(--text-3); flex: none; }
.tt-details { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); flex: none; display: inline-flex; box-shadow: 0 0 0 4px var(--bg-hover); align-items: center; gap: 2px; height: 22px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--border-strong);
  background: var(--bg-elev); color: var(--text-2); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; opacity: 0; }
.tt-details:hover { color: var(--primary); border-color: var(--primary); }
.cell-edit { cursor: pointer; }
.cell-edit:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.tc .avatar { width: 22px; height: 22px; font-size: 9px; }
.tt-placeholder { color: var(--text-3); display: inline-flex; }
.tt-due { font-size: 12px; white-space: nowrap; }
.tt-due.over { color: var(--due-over); }
.tt-due.today { color: var(--due-today); font-weight: 600; }
.tt-due.future { color: var(--due-future); }
.tt-due.done { color: var(--text-3); }
.tt-due.none { color: var(--text-3); opacity: 0; }
.tt-label { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 99px; font-size: 11px; font-weight: 600; white-space: nowrap;
  color: var(--text); background: color-mix(in srgb, var(--c) 22%, transparent); }
.tt-drop { height: 2px; background: var(--primary); margin: -1px 0; position: relative; z-index: 2; }
.tt-proj { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px;
  background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--text); }
.tt-proj-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--c); flex: none; }
.pv-list { padding: 0 12px 40px !important; }

/* ---------- Tablero ---------- */
.shell .iboard { gap: 12px; padding: 16px 24px; }
.shell .icol { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; }
.shell .icol-head .gname { font-weight: 600; }
.shell .icard { border-radius: var(--radius-lg); padding: 10px 12px; }
.shell .icard:hover { border-color: var(--border-strong); }
.bc-thumb { display: block; width: calc(100% + 24px); margin: -10px -12px 8px; height: 132px; object-fit: cover; border-radius: 8px 8px 0 0; background: var(--bg-active); }
.bc-top { display: flex; align-items: flex-start; gap: 6px; }
.bc-top .tcheck { margin-top: -1px; }
.bc-title { white-space: normal !important; line-height: 1.35 !important; }
.bc-key { margin: 4px 0 0 28px; display: block; }
.bc-labels { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0 28px; }
.bc-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; min-height: 22px; }
.bc-foot .avatar { width: 22px; height: 22px; font-size: 9px; }
.add-section { flex: none; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1px dashed var(--border-strong); background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.add-section:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- Panel de tarea (no modal, se desliza desde la derecha) ---------- */
.tpanel { width: var(--panel-w); box-shadow: var(--shadow-pop); border-left: 1px solid var(--border); display: flex; flex-direction: column; }
/* En pantallas muy anchas la lista se recorre para que el panel no la tape; en las demás el panel queda encima
   (sin oscurecer nada) y la lista sigue usable a la izquierda. */
@media (min-width: 1680px) { .shell.with-panel .main { margin-right: var(--panel-w); } }
.shell.with-panel .ph-client { display: none; }
.tp-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.tp-done { white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--border-strong);
  background: var(--bg-elev); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.tp-done:hover { border-color: var(--due-today); color: var(--due-today); }
.tp-done.on { background: color-mix(in srgb, var(--due-today) 14%, transparent); border-color: var(--due-today); color: var(--due-today); }
.tp-body { flex: 1; overflow-y: auto; padding: 16px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.tp-body > * { flex-shrink: 0; }
.tp-title { font: inherit; font-size: 22px; font-weight: 600; color: var(--title); border: 1px solid transparent; background: transparent; width: 100%; padding: 4px 8px; margin: -4px -8px 0;
  border-radius: 6px; resize: none; overflow: hidden; line-height: 1.3; }
.tp-title:hover { border-color: var(--border-strong); }
.tp-title:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
.tp-fields { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 8px 12px; align-items: center; font-size: 13px; }
.tp-fields > .k { color: var(--text-2); font-size: 12px; }
.tp-fields .inline-select, .tp-fields .inline-date { font-size: 13px; height: 30px; }
.tp-link { border: 0; background: none; padding: 4px 0; color: var(--text-2); font: inherit; font-size: 12px; cursor: pointer; text-align: left; }
.tp-link:hover { color: var(--primary); text-decoration: underline; }
.tp-sec { border-top: 1px solid var(--border); padding-top: 14px; }
.tp-sec-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tp-sec-head h3 { font-size: 15px; font-weight: 600; color: var(--title); }
.rt-view { min-height: 56px; padding: 8px 10px; margin: 0 -10px; border-radius: 6px; border: 1px solid transparent; cursor: text; font-size: 13px; line-height: 1.55; }
.rt-view:hover { border-color: var(--border-strong); }
.rt-view.empty { color: var(--text-3); }
.rt-view p { margin: 0; }
.rt-view p.sp { height: 8px; }
.rt-view ul { margin: 4px 0; padding-left: 20px; }
/* A3: la lista de "@" de la descripción va debajo del editor (el editor recorta lo que se sale). */
.rt-wrap { position: relative; }
.rt-wrap > .mention-list { top: calc(100% + 4px); bottom: auto; }
.rt-edit { border: 1px solid var(--primary); border-radius: 8px; box-shadow: var(--focus-ring); overflow: hidden; }
.rt-bar { display: flex; align-items: center; gap: 2px; padding: 4px 6px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.rt-bar button { width: 28px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rt-bar button:hover { background: var(--bg-hover); color: var(--text); }
.rt-area { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; min-height: 120px; }
.subtask { display: flex; align-items: center; gap: 8px; min-height: 36px; border-bottom: 1px solid var(--border); font-size: 13px; }
.subtask.done .txt { color: var(--text-3); text-decoration: line-through; }
.subtask .btn { opacity: 0; }
.subtask:hover .btn { opacity: 1; }
.subtask.add { color: var(--text-3); padding-left: 4px; }
.subtask.add input { border: 0; background: transparent; flex: 1; font: inherit; color: var(--text); height: 32px; }
.subtask.add input:focus { outline: none; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 8px; }
.att { position: relative; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg-elev); }
.att-prev { display: flex; align-items: center; justify-content: center; height: 90px; background: var(--bg-soft); color: var(--text-3); }
.att-prev img { width: 100%; height: 100%; object-fit: cover; }
.att-meta { display: flex; flex-direction: column; padding: 6px 8px; font-size: 12px; min-width: 0; }
.att-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.55); color: var(--on-color); cursor: pointer; display: none; align-items: center; justify-content: center; }
.att:hover .att-x { display: inline-flex; }
.att-drop { border: 1px dashed var(--border-strong); border-radius: 8px; padding: 12px; text-align: center; font-size: 12px; color: var(--text-3); cursor: pointer; }
.att-drop:hover, .att-drop.over { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.deps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; position: relative; }
.dep { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 24px; padding: 0 4px 0 8px; border-radius: 6px; border: 1px solid var(--border-strong); font-size: 12px; }
.dep.done { color: var(--text-3); }
.dep button { border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 2px; display: inline-flex; }
.dep-search { width: 100%; }
.dep-res { border: 1px solid var(--border); border-radius: 8px; margin-top: 4px; max-height: 220px; overflow-y: auto; background: var(--bg-elev); box-shadow: var(--shadow-pop); }
.dep-res button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 7px 10px; font: inherit; font-size: 12px; text-align: left; cursor: pointer; color: var(--text); }
.dep-res button:hover { background: var(--bg-hover); }
.tp-feed .tp-ev { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); padding: 4px 0 8px; }
.mention { color: var(--primary); font-weight: 600; background: var(--primary-soft); border-radius: 4px; padding: 0 2px; }
.mention { color: var(--on-primary-soft); }
/* Fecha de entrega del panel: el texto ("Sin fecha" o la fecha) con el selector nativo invisible encima, como en la Lista. */
.tp-date { position: relative; display: inline-flex; align-items: center; min-height: 28px; padding: 0 8px; border-radius: var(--radius); cursor: pointer; }
.tp-date:hover { background: var(--bg-hover); }
.tp-date:focus-within { box-shadow: var(--focus-ring); }
.tp-date-none { color: var(--text-3); }
.tpanel .activity-item { align-items: flex-start; }
.tpanel .activity-item::before { display: none; }
.tp-compose { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--bg-soft); }
.cbox { flex: 1; min-width: 0; position: relative; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg); }
.cbox:focus-within { border-color: var(--primary); box-shadow: var(--focus-ring); }
.cbox-area { width: 100%; border: 0; background: transparent; resize: none; padding: 8px 10px; font: inherit; font-size: 13px; color: var(--text); min-height: 44px; display: block; }
.cbox-area:focus { outline: none; }
.cbox-bar { display: flex; align-items: center; gap: 8px; padding: 4px 6px 6px 10px; }
.mention-list { position: absolute; bottom: calc(100% + 4px); left: 0; min-width: 220px; background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow-pop); padding: 4px; z-index: 5; }
.mention-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 6px; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; }
.mention-list button.on, .mention-list button:hover { background: var(--primary-soft); color: var(--primary); }

/* ---------- Atajos ---------- */
.atajo { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.atajo:last-child { border-bottom: 0; }
kbd { font-family: inherit; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; background: var(--bg-soft); min-width: 120px; text-align: center; }

/* ---------- Acabados generales de la app interna ---------- */
.shell .card { border-radius: var(--radius-lg); }
.shell .btn, .shell .vbtn { border-radius: 6px; }
.shell .page-head { padding: 16px 24px; }

@media (max-width: 1100px) {
  .ph-name { max-width: 30vw; }
}

/* ---------- Celular ---------- */
@media (max-width: 767px) {
  .sidebar.side2 { width: calc(var(--rail-w) + var(--navpanel-w)); }
  .sidebar.side2.collapsed { width: calc(var(--rail-w) + var(--navpanel-w)); }
  .side2.collapsed .navpanel { display: flex; }
  .rail-toggle { display: none; }
  .bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; height: 60px; padding-bottom: env(safe-area-inset-bottom);
    background: var(--bg-elev); border-top: 1px solid var(--border); }
  .bottomnav a, .bottomnav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; font-weight: 600;
    color: var(--text-2); border: 0; background: none; font-family: inherit; text-decoration: none; }
  .bottomnav a.active { color: var(--primary); }
  .shell .main { padding-bottom: 64px; }
  .tpanel { width: 100vw; z-index: 70; }
  .phead { padding: 0 12px; position: static; }
  .ph-top { gap: 6px; }
  .ph-name, .ph-name-input { font-size: 17px; max-width: 58vw; }
  .ph-top .vbtn span.hide-sm { display: none; }
  .ptool { padding: 8px 12px; flex-wrap: nowrap; }
  /* Retoque 5 (014): en celular la barra cabe en un renglón; Filtrar, Ordenar, Agrupar, Campos y Opciones van en "Vista". */
  .ptool-mas { display: none; }
  .ptool-vista { display: inline-flex; height: 32px; }
  .ptool-buscar .ptool-txt { display: none; }
  .ptool .vsearch { flex: 1; min-width: 0; }
  .modal-backdrop:has(.modal.sheet) { align-items: flex-end; padding: 0; }
  .modal.sheet { max-width: none; border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding-bottom: env(safe-area-inset-bottom); max-height: 85vh; overflow-y: auto; }
  .ptool .contrib { display: none; }
  .tt-grip { display: none; }
  .tt-details { display: none; }
  .tt-due.none { opacity: 1; }
  .pv-list { padding: 0 0 24px !important; }
  .shell .iboard { padding: 12px; }
  .tp-body { padding: 14px 14px 20px; }
  .tp-fields { grid-template-columns: 110px minmax(0, 1fr); }
  .tp-title { font-size: 19px; }
  .tp-compose { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .tp-compose > .avatar { display: none; }
}

/* ---------- Lista estilo tabla (Fase 1c; ver docs/REDISENO.md). Colores de las píldoras: js/list-logic.js ---------- */
:root { --lt-row: var(--bg-soft); --lt-row-hover: var(--bg-hover); --lt-head: var(--bg-soft); --lt-range: var(--primary); --lt-range-text: var(--on-primary);
  --lt-bar: #0a2540; --lt-bar-text: #ffffff; --lt-bar-hover: rgba(255, 255, 255, 0.16); }
:root[data-theme='dark'] { --lt-bar: #1f4275; }
.lt-wrap { position: relative; }
.lt-scroll { overflow-x: auto; padding: 8px 0 12px; }
.ltable { min-width: var(--lt-min); font-size: 13px; }
.lt-group { margin: 0 0 28px; }
.lt-row { display: grid; grid-template-columns: var(--lt-cols); align-items: stretch; min-height: 40px; margin-bottom: 4px; position: relative;
  background: var(--lt-row); border-radius: var(--radius-lg); border-left: 4px solid var(--g); }
.lt-row > .tc { display: flex; align-items: center; gap: 8px; padding: 0 10px; min-width: 0; position: relative; border-right: 1px solid var(--bg); }
.lt-row > .tc:last-child { border-right: 0; }
.lt-task { cursor: pointer; outline: none; }
/* Rendimiento (500 filas): las filas fuera de la pantalla no se acomodan ni se pintan hasta acercarse. Una fila con un
   menú abierto o con el foco se pinta siempre (si no, recortaría su menú). */
.lt-task { content-visibility: auto; contain-intrinsic-size: auto 40px; }
.lt-task:focus-within, .lt-task:has(.dropdown.open) { content-visibility: visible; }
.lt-task:hover { background: var(--lt-row-hover); }
.lt-task:focus-visible { box-shadow: 0 0 0 2px var(--primary); }
.lt-task.checked { background: color-mix(in srgb, var(--primary) 12%, var(--lt-row)); }
.lt-task.selected { background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
:root[data-theme='dark'] .lt-task.selected { background: var(--bg-active); }
.lt-task.dragging { opacity: 0.4; }
.lt-task.done .tt-title { color: var(--text-2); }
.lt-group.drag-over > .lt-row:not(.lt-ghead) { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 25%, transparent); }

/* Encabezado del grupo: bloque de color (seleccionar todo + plegar), nombre, conteos y columnas */
.lt-ghead { border-left: 0; background: var(--lt-head); min-height: 40px; }
.lt-ghead > .tc.lt-gblock { background: var(--gbg); color: var(--gfg); border-radius: 8px 0 0 8px; justify-content: center; gap: 6px; padding: 0 6px; border-right: 0; }
.lt-fold { border: 0; background: none; color: inherit; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; cursor: pointer; padding: 0; }
.lt-fold:hover { background: color-mix(in srgb, currentColor 18%, transparent); }
.lt-fold:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.lt-ghead > .tc.name { cursor: pointer; gap: 10px; }
.lt-gname { font-size: 14px; font-weight: 600; color: var(--title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-theme='dark'] .lt-gname { color: var(--text); }
.lt-gcount { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.lt-ghead > .tc[role='columnheader']:not(.name) { justify-content: center; font-size: 12px; font-weight: 600; color: var(--text-2); text-align: center; }
.lt-ghead > .tc.add, .lt-task > .tc.add { justify-content: center; padding: 0; }

/* Selección */
.lt-row > .tc.lt-sel { gap: 2px; padding: 0 0 0 8px; border-right: 0; }
.lt-check { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; flex: none; }
.lt-gblock .lt-check { accent-color: var(--gfg); }
.lt-task .lt-check { opacity: 0; }
.lt-task:hover .lt-check, .lt-task:focus-within .lt-check, .ltable.selecting .lt-check, .lt-check:focus-visible { opacity: 1; }
@media (hover: none) { .lt-task .lt-check { opacity: 1; } }
.lt-task .tt-grip { width: 14px; }
/* "Detalles", el asa y la fecha vacía aparecen al pasar el ratón o con el foco en la fila (antes apuntaban a la tabla vieja). */
.lt-task:hover .tt-grip, .lt-task:hover .tt-details, .lt-task:focus-within .tt-details, .lt-task:hover .tt-due.none, .lt-task:focus-within .tt-due.none { opacity: 1; }

/* Celda del nombre */
.lt-task > .tc.name { padding-left: 2px; }
.lt-subs-btn { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--border-strong);
  background: var(--bg); color: var(--text-2); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; flex: none; font-variant-numeric: tabular-nums; }
.lt-subs-btn:hover, .lt-subs-btn[aria-expanded='true'] { border-color: var(--primary); color: var(--primary); }
.lt-task .tt-details { box-shadow: 0 0 0 4px var(--lt-row-hover); }
/* Retoque 4 del 026a (escritorio): "Detalles" tiene su propio lugar a la derecha de la celda del nombre (ya no se encima
   con las fichas de subtareas, comentarios y adjuntos), y si las columnas no caben la tabla se desplaza en horizontal
   con la selección y el nombre fijos a la izquierda (task-table.js da al nombre un mínimo de NAME_MIN px). */
@media (min-width: 768px) {
  .lt-task > .tc.name { padding-right: var(--lt-det, 84px); }
  /* Solo con la tabla ya desplazada (task-table.js pone .desplazada): antes no cambia nada y la primera pintura de 500
     filas no paga los elementos fijos (P10). */
  .lt-scroll.desplazada .lt-row > .tc.lt-sel, .lt-scroll.desplazada .lt-row > .tc.lt-gblock { position: sticky; left: 0; z-index: 2; }
  .lt-scroll.desplazada .lt-row > .tc.name { position: sticky; left: var(--lt-sel-w, 44px); z-index: 2; }
  .lt-scroll.desplazada .lt-row > .tc.lt-sel, .lt-scroll.desplazada .lt-row > .tc.name { background: inherit; }
  .lt-scroll.desplazada .lt-summary > .tc.lt-sel, .lt-scroll.desplazada .lt-summary > .tc.name { background: var(--bg); }
  .lt-scroll.desplazada .lt-addrow .quick-add-btn { position: sticky; left: 48px; width: auto; }
  .lt-scroll.desplazada .lt-row > .tc.name { box-shadow: 6px 0 6px -6px rgba(10, 37, 64, 0.25); }
}
/* Encabezado de columna largo (opcional del 026): un renglón con "…"; el nombre completo va en el title. */
.lt-colhead { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-more { width: 30px; height: 30px; color: var(--text-2); }
.lt-task .lt-more { opacity: 0.6; }
.lt-task:hover .lt-more, .lt-more:focus-visible, .lt-rowmenu.open .lt-more { opacity: 1; }

/* Celdas */
.lt-row > .tc.hours { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.lt-row > .tc.lt-pillcell { padding: 4px; justify-content: center; }
/* Retoque 2 (014): ancho según el texto (con mínimo), 24 px de alto y centradas; la fila no cambia de alto. */
.lt-pill { flex: 0 1 auto; min-width: 64px; max-width: 100%; display: inline-flex; align-items: center; justify-content: center; height: 24px; padding: 0 10px; border-radius: var(--radius-pill);
  background: var(--pbg); color: var(--pfg); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-pill.is-soft { font-weight: 600; }
.lt-pillcell:hover .lt-pill { filter: brightness(0.94); }
.lt-chips { display: flex; align-items: center; gap: 4px; width: 100%; height: 100%; overflow: hidden; cursor: pointer; }
.lt-chip-more { flex: none; display: inline-flex; align-items: center; height: 22px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--bg-active); color: var(--text-2);
  font-size: 11px; font-weight: 600; }
.lt-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--radius-pill); flex: 0 1 auto; min-width: 0; max-width: 100%;
  background: var(--pbg); color: var(--pfg); font-size: 11px; font-weight: 600; white-space: nowrap; }
.lt-chip-x { border: 0; background: none; color: inherit; font: inherit; font-size: 14px; line-height: 1; padding: 0; margin-left: 0; cursor: pointer; width: 0; overflow: hidden; opacity: 0; }
.lt-chips:hover .lt-chip-x, .lt-chip-x:focus-visible { width: 12px; margin-left: 3px; opacity: 1; }
.lt-labels-dd { margin-left: auto; flex: none; }
.lt-labels-btn { opacity: 0; color: var(--text-2); }
.lt-chips:hover .lt-labels-btn, .lt-labels-btn:focus-visible, .lt-labels-dd.open .lt-labels-btn { opacity: 1; }

/* "+ Agregar tarea" y resumen */
.lt-addrow { border-left-color: color-mix(in srgb, var(--g) 50%, transparent); }
.lt-row > .tc.lt-span { grid-column: 2 / -1; padding: 0; border-right: 0; }
.lt-addrow .quick-add-btn, .lt-addrow .quick-add { border: 0; background: none; padding: 0 10px 0 2px; min-height: 38px; width: 100%; font-size: 13px; }
.lt-addrow .quick-add-btn:hover { background: none; }
.lt-summary { background: none; border-left-color: transparent; min-height: 44px; margin-top: 6px; }
.lt-summary > .tc { border-right: 0; justify-content: center; }
.lt-summary > .tc:not(.lt-sel):not(.name):not(.add) { background: var(--lt-row); border-right: 1px solid var(--bg); }
.lt-summary > .tc.is-empty { background: none !important; }
.lt-summary > .tc.name + .tc { border-radius: 8px 0 0 8px; }
.lt-summary > .tc.add { background: none; }
.lt-dist { display: flex; width: 100%; height: 22px; border-radius: var(--radius-pill); overflow: hidden; }
.lt-dist > span { min-width: 4px; }
/* "17–28 nov" cabe completo; un rango que cruza meses ("28 nov – 3 dic") baja a dos renglones dentro de la celda. */
.lt-range { display: inline-block; max-width: 100%; padding: 3px 6px; border-radius: var(--radius-pill); background: var(--lt-range); color: var(--lt-range-text); font-size: 12px; font-weight: 600;
  line-height: 1.3; text-align: center; white-space: normal; overflow-wrap: anywhere; }
.lt-summary > .tc.due { padding: 4px; }
.lt-sum-h { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; width: 100%; font-variant-numeric: tabular-nums; }
.lt-sum-h b { font-weight: 600; }
.lt-sum-h small { font-size: 11px; color: var(--text-2); }
.lt-sum-mobile { display: none; }
.lt-create-group { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; margin: 0 0 24px; }
.lt-create-group:hover { background: var(--bg-hover); color: var(--primary); }

/* Subtareas desplegadas */
.lt-subs { margin: -1px 0 6px; }
.lt-sub { display: flex; align-items: center; gap: 8px; min-height: 34px; margin: 0 0 3px 76px; padding: 0 10px 0 0; position: relative;
  background: var(--lt-row); border-radius: 8px; border-left: 4px solid var(--g); }
.lt-sub-line { position: absolute; left: -24px; top: -8px; width: 18px; height: calc(50% + 8px); border-left: 2px solid var(--border-strong);
  border-bottom: 2px solid var(--border-strong); border-bottom-left-radius: 6px; pointer-events: none; }
.lt-sub-check { margin-left: 10px; accent-color: var(--primary); width: 16px; height: 16px; flex: none; cursor: pointer; }
.lt-sub-text { flex: 1; min-width: 0; border: 1px solid transparent; background: none; font: inherit; font-size: 13px; color: var(--text); padding: 3px 6px; border-radius: 4px; }
input.lt-sub-text:hover { border-color: var(--border-strong); }
input.lt-sub-text:focus { border-color: var(--primary); outline: none; box-shadow: var(--focus-ring); background: var(--bg); }
.lt-sub.done .lt-sub-text { text-decoration: line-through; color: var(--text-2); }
.lt-sub-del { opacity: 0; color: var(--text-2); }
.lt-sub:hover .lt-sub-del, .lt-sub-del:focus-visible { opacity: 1; }
.lt-sub-add { color: var(--text-2); border-left-color: color-mix(in srgb, var(--g) 50%, transparent); }
.lt-sub-add > .icon { margin-left: 10px; }

/* Barra de acciones con la selección */
/* Va dentro de la columna de contenido (sticky): se centra en esa área, no en la ventana, y nunca tapa el menú lateral;
   al llegar al final queda debajo de la última fila, así que tampoco la tapa. */
.lt-bar { position: sticky; bottom: 20px; margin: 4px auto 0; width: max-content; z-index: 40; display: flex; align-items: center; gap: 6px;
  max-width: 100%; padding: 6px 6px 6px 14px; border-radius: 12px; background: var(--lt-bar); color: var(--lt-bar-text); box-shadow: var(--shadow-lg); }
.lt-bar-count { white-space: nowrap; font-size: 13px; padding-right: 10px; border-right: 1px solid color-mix(in srgb, var(--lt-bar-text) 30%, transparent); }
.lt-bar-actions { display: flex; flex-wrap: wrap; gap: 2px; }
.lt-bar-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--lt-bar-text);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.lt-bar-btn:hover, .lt-bar-dd.open .lt-bar-btn { background: var(--lt-bar-hover); }
.lt-bar-btn:focus-visible, .lt-bar-x:focus-visible { outline: 2px solid var(--lt-bar-text); outline-offset: 1px; }
.lt-bar-x { color: var(--lt-bar-text); width: 34px; height: 34px; }
.lt-bar-x:hover { background: var(--lt-bar-hover); }
.lt-bar .dropdown-panel { top: auto; bottom: calc(100% + 8px); max-height: 50vh; overflow-y: auto; }
/* Con la barra visible, los avisos suben para no taparla. */
body:has(.lt-bar) .toasts { bottom: 84px; }
.lt-bar-date { display: flex; flex-direction: column; gap: 8px; padding: 12px; min-width: 220px; color: var(--text); }
.lt-bar-date label { display: flex; flex-direction: column; gap: 4px; }

/* Barra de la Lista: "+ Nueva tarea" con desplegable */
.split-btn { display: inline-flex; }
.split-btn > .vbtn.addtask { border-radius: 6px 0 0 6px; }
.split-btn .split-caret { border-radius: 0 var(--radius) var(--radius) 0; padding: 0 6px; border-left: 1px solid color-mix(in srgb, var(--on-primary) 35%, transparent); }

@media (max-width: 767px) {
  .lt-scroll { overflow-x: visible; padding-top: 4px; }
  .ltable { min-width: 0; }
  .lt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 8px 10px 6px; }
  .lt-task { contain-intrinsic-size: auto 84px; }
  .lt-row > .tc { border-right: 0; padding: 0; min-height: 26px; }
  .lt-task > .tc.lt-sel { padding: 0 0 0 2px; }
  .lt-task > .tc.name { flex: 1 1 calc(100% - 76px); }
  .lt-task > .tc.add { margin-left: auto; }
  .lt-task > .tc.assignee, .lt-task > .tc.due, .lt-task > .tc.hours { border: 1px solid var(--border-strong); border-radius: 6px; padding: 0 8px; background: var(--bg); }
  .lt-task > .tc.lt-pillcell { padding: 0; }
  .lt-pill { min-height: 26px; padding: 0 10px; }
  .lt-task > .tc.labels:not(:has(.lt-chip)), .lt-task > .tc.hours:has(.tt-placeholder) { display: none; }
  .lt-task > .tc.labels .lt-labels-dd { display: none; }
  .lt-task .tt-grip, .lt-task .tt-details { display: none; }
  .lt-task .lt-more { opacity: 1; }
  .lt-ghead { flex-wrap: nowrap; padding: 0; }
  .lt-ghead > .tc.lt-gblock { flex: none; padding: 8px; align-self: stretch; }
  .lt-ghead > .tc.name { flex: 1; flex-wrap: wrap; gap: 2px 10px; padding: 6px 10px; }
  .lt-ghead > .tc[role='columnheader']:not(.name), .lt-ghead > .tc.add { display: none; }
  .lt-addrow > .tc.lt-sel { display: none; }
  .lt-row > .tc.lt-span { flex: 1; }
  .lt-summary { min-height: 0; padding: 0 10px; margin-top: 0; }
  .lt-summary > .tc { display: none !important; }
  .lt-summary > .tc.name { display: flex !important; }
  .lt-sum-mobile { display: inline; font-size: 12px; color: var(--text-2); }
  .lt-sub { margin-left: 28px; }
  .lt-sub-line { left: -18px; width: 12px; }
  .lt-bar { width: auto; margin: 4px 8px 0; bottom: calc(68px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .lt-bar-btn { padding: 0 9px; }
  body:has(.lt-bar) .toasts { bottom: calc(176px + env(safe-area-inset-bottom)); }
  .lt-bar-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lt-bar-actions { flex: 1; }
  .ptool .split-btn .vbtn.addtask { padding: 0 10px; }
}

/* ---------- Fase 2: Bandeja de entrada ---------- */
.nav a .nbadge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--primary); color: var(--on-primary); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.side2.collapsed .nav a .nbadge { display: none; }
.ibx-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: var(--radius-pill); background: var(--primary-soft); color: var(--on-primary-soft); font-size: 11px; font-weight: 600; text-align: center; }
.ibx { max-width: 880px; padding-top: 8px; }
.ibx-day { margin-top: 16px; }
.ibx-dh { font-size: 12px; font-weight: 600; color: var(--text-2); margin: 0 0 6px; padding: 0 12px; }
.ibx-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-elev); margin-bottom: 6px; position: relative; }
.ibx-item.unread { border-color: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.ibx-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 9px; flex: none; background: transparent; }
.ibx-item.unread .ibx-dot { background: var(--primary); }
.ibx-main { flex: 1; min-width: 0; }
.ibx-text { display: block; text-align: left; border: 0; background: none; padding: 0; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; line-height: 1.4; }
.ibx-text:hover { color: var(--primary); }
.ibx-item:not(.unread) .ibx-text { color: var(--text-chip); }
.ibx-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 3px; font-size: 12px; color: var(--text-2); min-width: 0; }
.ibx-pj { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; color: var(--text-chip); }
.ibx-task { max-width: 340px; color: var(--text-2); }
a.ibx-task { color: var(--primary); }
.ibx-quote { margin: 6px 0 0; padding: 6px 10px; border-left: 2px solid var(--border-strong); background: var(--bg-soft); border-radius: 0 6px 6px 0; font-size: 13px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.ibx-reply { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
/* Fase 4c: el recordatorio semanal de actualizar el estado (sin persona que lo mande: un reloj en lugar del avatar). */
.ibx-sys { background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.ibx-cta { margin-top: 8px; }
.ibx-hecho { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--ok); }
.ibx-reply textarea { width: 100%; font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg); color: var(--text); resize: vertical; }
.ibx-reply textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
.ibx-acts { display: flex; gap: 2px; flex: none; }
.ibx-acts .icon-btn { color: var(--text-2); }
.ibx-acts .icon-btn:hover { color: var(--text); }
.ibx-acts .icon-btn[aria-label="Me gusta"].on { color: var(--danger); }
.ibx-acts .icon-btn[aria-label="Me gusta"].on .icon, .ibx-acts .icon-btn[aria-label="Favorito"].on .icon { fill: currentColor; }
.ibx-acts .icon-btn[aria-label="Favorito"].on { color: var(--star-fill); }
.ibx-more { display: flex; justify-content: center; padding: 12px 0; }
.ibx-prefs { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ibx-pref { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 6px; border-radius: 6px; font-size: 14px; cursor: pointer; }
.ibx-pref:hover { background: var(--bg-hover); }
.ibx-pref input { width: 16px; height: 16px; accent-color: var(--primary); margin: 0; }
@media (max-width: 767px) {
  .ibx { padding: 4px 12px 96px; }
  .ibx-item { flex-wrap: wrap; padding: 10px; }
  .ibx-acts { width: 100%; justify-content: flex-end; margin-top: -2px; }
  .ibx-acts .icon-btn.lg { width: 36px; height: 36px; }
  .ibx-task { max-width: 60vw; }
}

/* ---------- Fase 2: Mis tareas ---------- */
.pj-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; height: 24px; padding: 0 8px; border-radius: var(--radius-pill); background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-chip); font-size: 12px; font-weight: 500; text-decoration: none; }
.pj-chip:hover { border-color: var(--border-strong); color: var(--text); text-decoration: none; }
.lt-row > .tc.project { min-width: 0; }
.bc-proj { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--text-2); min-width: 0; }
.mt-filtros, .mt-personalizar { max-height: 420px; min-width: 240px; }
.mt-personalizar .menu-empty { max-width: 280px; line-height: 1.45; }

/* ---------- Fase 2: Inicio ---------- */
.home { max-width: 1120px; margin: 0 auto; padding: 28px 24px 48px; width: 100%; }
.home-head { text-align: center; margin-bottom: 24px; }
.home-date { font-size: 13px; font-weight: 500; color: var(--text-2); }
.home-hi { font-size: 30px; font-weight: 600; color: var(--title); letter-spacing: -0.02em; margin: 4px 0 14px; }
.home-week { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; padding: 8px 16px; border-radius: var(--radius-pill); background: var(--bg-elev); border: 1px solid var(--border); font-size: 13px; color: var(--text-chip); }
.hw-cap { font-weight: 600; color: var(--title); }
.hw-item { display: inline-flex; align-items: center; gap: 5px; }
.hw-item b { color: var(--title); }
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.hw { display: flex; flex-direction: column; min-width: 0; }
.hw.full { grid-column: 1 / -1; }
.hw.dragging { opacity: 0.5; }
.hw-head h2 { font-size: 15px; font-weight: 600; color: var(--title); margin: 0; }
.hw-grip { display: inline-flex; color: var(--text-3); cursor: grab; margin-left: -4px; }
.hw-grip:hover { color: var(--text); }
.hw-tabs { padding: 0 14px; margin-bottom: 0; }
.hw-body { max-height: 360px; overflow-y: auto; }
.hw-empty { padding: 16px 14px; }
.hw-more { display: block; padding: 10px 14px; margin-top: auto; border-top: 1px solid var(--border); font-size: 13px; font-weight: 500; }
.hw-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; padding: 12px 14px; }
.hw-proj { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text); text-decoration: none; min-width: 0; }
.hw-proj:hover { border-color: var(--border-strong); background: var(--bg-hover); text-decoration: none; }
.hw-proj-t { display: flex; flex-direction: column; min-width: 0; }
.hw-proj-t b { color: var(--title); font-size: 14px; }
.hw-proj-t small { font-size: 12px; color: var(--text-2); }
.hw-total { font-size: 13px; color: var(--text-2); }
.hw-total b { font-size: 20px; color: var(--title); margin-right: 4px; }
.hw-people { list-style: none; margin: 0; padding: 12px 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.hw-people li { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--text); }
.home-foot { display: flex; justify-content: center; margin-top: 20px; }
.hw-add { display: flex; flex-direction: column; gap: 6px; }
.hw-opt { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-elev); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.hw-opt:hover { border-color: var(--primary); }
.hw-opt small { display: block; font-size: 12px; color: var(--text-2); }
@media (max-width: 900px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .hw.full { grid-column: auto; }
}
@media (max-width: 767px) {
  .home { padding: 16px 12px 96px; }
  .home-hi { font-size: 24px; }
  .home-week { gap: 8px 12px; }
  .hw-grip { display: none; }
  .hw-projects { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Fase 3a: estado del proyecto con historial ---------- */
.pst-pill { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text); background: var(--bg-elev); white-space: nowrap; }
.pst-form { display: grid; gap: 14px; }
.pst-opts { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.pst-opts legend { margin-bottom: 6px; }
.pst-opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; }
.pst-opt.on { border-color: var(--primary); box-shadow: var(--focus-ring); }
.pst-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pst-opt { position: relative; flex-wrap: wrap; }
.pst-opt.off { cursor: not-allowed; color: var(--text-2); background: var(--bg-soft); }
.pst-solo { flex-basis: 100%; font-size: 11px; font-weight: 500; color: var(--text-2); }
.pst-opt:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.pst-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pst-item { display: flex; gap: 10px; align-items: flex-start; }
.pst-main { min-width: 0; flex: 1; }
.pst-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; }
.pst-note { margin: 6px 0 0; white-space: pre-wrap; font-size: 13px; line-height: 1.5; color: var(--text); }

/* ---------- Fase 3a: Resumen del proyecto ---------- */
.rs-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 16px; align-items: start; max-width: 1180px; }
.rs-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.rs-card { padding: 16px; }
.rs-h { font-size: 15px; margin: 0 0 10px; }
.rs-sub { font-size: 13px; margin: 16px 0 10px; color: var(--text-2); }
.rs-text { margin: 0; white-space: pre-wrap; font-size: 13px; line-height: 1.55; }
.rs-bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.rs-bar span { display: block; height: 100%; background: var(--m-curso); border-radius: inherit; }
.rs-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 12px 0 0; }
.rs-nums div { margin: 0; }
.rs-nums dt { font-size: 12px; color: var(--text-2); }
.rs-nums dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--title); }
.rs-nums dd.rs-late { color: var(--m-retraso); }
.rs-people, .rs-metas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.rs-people li, .rs-metas a { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.rs-people .small, .rs-metas .small { white-space: nowrap; }
.rs-people .grow, .rs-metas .grow { min-width: 0; }
.rs-metas a { color: var(--text); text-decoration: none; padding: 4px 6px; margin: -4px -6px; border-radius: 6px; }
.rs-metas a:hover { background: var(--bg-soft); }
.rs-now { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.rs-now .pst-pill { font-size: 14px; padding: 3px 12px; }
/* El Resumen a dos columnas solo cuando hay espacio (barra lateral incluida); si no, una sola. */
@media (max-width: 1180px) { .rs-grid { grid-template-columns: minmax(0, 1fr); } .rs-side { order: -1; } }

/* ---------- Fase 3a: Mensajes del proyecto ---------- */
.msgs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 820px; }
.msg-new, .msg-thread { padding: 14px 16px; }
.msg-new .cbox, .msg-reply-box .cbox { margin: 0; }
.msg-new .mention-list { bottom: auto; top: calc(100% + 4px); }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg-main { min-width: 0; flex: 1; }
.msg-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.msg-body { margin-top: 4px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-acts { margin-top: 6px; }
.msg-acts .link-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.msg-replies { margin: 12px 0 0 44px; display: grid; gap: 12px; padding-left: 12px; border-left: 2px solid var(--border); }
.msg.reply .msg-body { font-size: 13px; }
.msg-reply-box { margin: 12px 0 0 44px; }
.msg.destacado { background: var(--primary-soft); border-radius: 8px; box-shadow: 0 0 0 6px var(--primary-soft); }
@media (max-width: 600px) { .msg-replies, .msg-reply-box { margin-left: 12px; } }

/* ---------- Fase 3b: Cronograma ---------- */
.cr { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cr-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cr-zoom button { width: auto; padding: 0 10px; font: inherit; font-size: 12px; font-weight: 600; }
.cr-scroll { overflow: auto; border: 1px solid var(--border); border-radius: 8px; max-height: calc(100vh - 250px); min-height: 220px; background: var(--bg-elev); overscroll-behavior: contain; }
.cr-in { position: relative; }
.cr-head { position: sticky; top: 0; z-index: 4; display: flex; height: 48px; background: var(--bg-elev); border-bottom: 1px solid var(--border); }
.cr-corner { position: sticky; left: 0; z-index: 5; width: var(--nombre); flex: none; display: flex; align-items: flex-end; padding: 0 12px 7px; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--bg-elev); border-right: 1px solid var(--border); }
.cr-scale { position: relative; height: 48px; }
.cr-months span { position: absolute; top: 6px; padding-left: 6px; border-left: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }
.cr-days span { position: absolute; top: 27px; height: 17px; line-height: 17px; font-size: 11px; color: var(--text-2); text-align: center; font-variant-numeric: tabular-nums; }
.cr-days span.hoy { color: var(--on-primary); background: var(--primary); border-radius: 4px; font-weight: 700; }
.cr-body { position: relative; }
/* Fondo: fines de semana sombreados y una línea cada lunes (el rango empieza en lunes). */
.cr-grid { position: absolute; top: 0; bottom: 0; left: var(--nombre);
  background-image: repeating-linear-gradient(to right, var(--border) 0 1px, transparent 1px calc(var(--dia) * 7)),
    repeating-linear-gradient(to right, transparent 0 calc(var(--dia) * 5), var(--bg-soft) calc(var(--dia) * 5) calc(var(--dia) * 7)); }
.cr-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--danger); z-index: 1; pointer-events: none; }
.cr-deps { position: absolute; top: 0; left: var(--nombre); z-index: 1; pointer-events: none; overflow: visible; }
.cr-dep { fill: none; stroke: var(--text-2); stroke-width: 1.5; }
.cr-dep.mal { stroke: var(--danger); stroke-dasharray: 4 3; }
.cr-punta { fill: var(--text-2); }
.cr-punta.mal { fill: var(--danger); }
.cr-row { position: absolute; left: 0; right: 0; height: 34px; display: flex; }
.cr-name { position: sticky; left: 0; z-index: 2; width: var(--nombre); flex: none; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 12px;
  font: inherit; font-size: 13px; text-align: left; color: var(--text); background: var(--bg-elev); border: 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); cursor: pointer; }
button.cr-name:hover { background: var(--bg-soft); }
.cr-group .cr-name { cursor: default; font-size: 12px; background: var(--bg-soft); }
.cr-row.sel .cr-name { background: var(--primary-soft); }
.cr-key { flex: none; font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cr-track { position: relative; flex: 1; }
.cr-task { position: absolute; top: 7px; height: 20px; display: flex; align-items: center; border: 1px solid var(--c); border-radius: 6px;
  background: color-mix(in srgb, var(--c) 22%, var(--bg-elev)); cursor: grab; touch-action: none; user-select: none; min-width: 8px; }
.cr-task.done { opacity: 0.65; }
.cr-task:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cr-task.moving { cursor: grabbing; box-shadow: var(--shadow-lg); }
.cr-label { flex: 1; min-width: 0; padding: 0 8px; font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-h { position: absolute; top: -1px; bottom: -1px; width: 9px; cursor: ew-resize; }
.cr-h.ini { left: -3px; }
.cr-h.fin { right: -3px; }
.cr-task.hito { border: 0; background: none; justify-content: center; }
.cr-rombo { width: 13px; height: 13px; transform: rotate(45deg); background: var(--c); border-radius: 2px; }
.cr-tip { position: absolute; top: 4px; z-index: 3; transform: translateY(-100%); padding: 2px 6px; border-radius: 4px; font-size: 11px; white-space: nowrap; background: var(--toast-bg); color: var(--toast-text); pointer-events: none; }
.cr-sin { padding: 10px 14px; }
.cr-sin summary { cursor: pointer; }
.cr-sin ul { margin: 8px 0 0; padding-left: 18px; columns: 2; font-size: 13px; }
@media (max-width: 600px) { .cr-sin ul { columns: 1; } .cr-scroll { max-height: calc(100vh - 230px); } }

/* Retoque 3 del 022: menú de estado para quien no es admin. La nota va debajo del nombre y lo deshabilitado se atenúa. */
.pst-menu { min-width: 220px; }
.pst-menu .menu-opt { white-space: nowrap; padding-top: 4px; padding-bottom: 4px; }
.pst-mtxt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pst-mtxt small { font-size: 11px; font-weight: 500; color: var(--text-2); }
.pst-menu .menu-opt:disabled { opacity: 0.6; cursor: not-allowed; }
.pst-menu .menu-opt:disabled:hover { background: none; }

/* ---------- Fase 3c: Panel del proyecto (gráficas: una serie en --chart; barras de 8 px con la punta redondeada) ---------- */
/* 044, retoque 3: el tablero usa el ancho de la página (Panel del proyecto, del portafolio e Informes, iguales). */
.pn .home-grid { max-width: none; }
.pn-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.pn-kpi { margin: 0; }
.pn-kpi dt { font-size: 12px; color: var(--text-2); }
.pn-kpi dd { margin: 2px 0 0; font-size: 28px; font-weight: 700; line-height: 1.1; color: var(--title); font-variant-numeric: tabular-nums; }
.pn-kpi.retraso dd { color: var(--m-retraso); }
.pn-meter { height: 8px; margin-top: 14px; border-radius: 999px; background: var(--border); overflow: hidden; }
.pn-meter span { display: block; height: 100%; background: var(--chart); border-radius: 0 4px 4px 0; }
.pn-bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
/* Retoque 1 del 024: la cifra tiene ancho fijo (el recuadro de la barra mide lo mismo en todas las filas) y "con retraso"
   va en un segundo renglón, debajo de la barra. */
.pn-row { display: grid; grid-template-columns: minmax(90px, 34%) minmax(0, 1fr) 5.5em; align-items: center; gap: 2px 10px; width: 100%; padding: 5px 6px; margin: 0 -6px;
  border: 0; border-radius: 6px; background: none; font: inherit; font-size: 13px; color: var(--text); text-align: left; cursor: pointer; box-sizing: content-box; }
.pn-row:hover:not(:disabled) { background: var(--bg-soft); }
.pn-row:disabled { cursor: default; }
.pn-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pn-track { height: 8px; border-radius: 0 4px 4px 0; background: var(--border); overflow: hidden; }
.pn-fill { display: block; height: 100%; background: var(--chart); border-radius: 0 4px 4px 0; }
.pn-val { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); text-align: right; }
.pn-extra { grid-column: 2 / -1; font-size: 12px; color: var(--text-2); }
/* Retoque 3 del 030: el rojo solo para avisos (retraso, entrega vencida); un dato neutro va en el color secundario. */
.pn-extra.alerta { color: var(--m-retraso); font-weight: 600; }
.pn-sub { font-size: 13px; color: var(--text-2); margin: 14px 0 6px; }
.pn-cols-wrap { position: relative; margin-top: 10px; }
.pn-cols { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; align-items: end; height: 140px; }
.pn-col { display: grid; grid-template-rows: 18px 1fr 18px; height: 100%; min-width: 0; text-align: center; }
.pn-cv { font-size: 11px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pn-cbar { display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--border); }
.pn-cfill { display: block; width: min(24px, 70%); background: var(--chart); border-radius: 4px 4px 0 0; min-height: 0; }
.pn-cx { font-size: 10px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: 3px; }
.pn-col.actual .pn-cx { color: var(--text); font-weight: 600; }
.pn-late { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.pn-late a { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 5px 6px; margin: 0 -6px; border-radius: 6px; font-size: 13px; color: var(--text); text-decoration: none; }
.pn-late a:hover { background: var(--bg-soft); }
.pn-key { flex: none; font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pn-due { flex: none; font-size: 12px; font-weight: 600; color: var(--m-retraso); }
.pn button.hw-more { width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--border); font: inherit; font-size: 13px; font-weight: 500; color: var(--link, var(--primary)); cursor: pointer; }
@media (max-width: 600px) { .pn-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pn-row { grid-template-columns: minmax(80px, 38%) minmax(0, 1fr) 5.5em; } }

/* ---------- Fase 3d: campos personalizados (celda de la Lista y panel de la tarea) ---------- */
.tc.cf { gap: 6px; min-width: 0; }
.cf-pill { display: inline-flex; align-items: center; max-width: 100%; padding: 1px 8px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-num { font-variant-numeric: tabular-nums; }
.cf-edit { display: flex; align-items: center; gap: 6px; min-width: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: text; }
.cf-input { width: 100%; min-width: 0; height: 28px; padding: 0 6px; border: 1px solid var(--primary); border-radius: 6px; background: var(--bg-elev); color: var(--text); font: inherit; font-size: 13px; }
.cf-panel { position: relative; min-height: 28px; gap: 6px; min-width: 0; }

/* ---------- Fase 3d: Personalizar › Campos personalizados y Reglas ---------- */
.pz-list { list-style: none; margin: 0 0 16px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); }
.pz-item { padding: 8px 10px; }
.pz-item + .pz-item { border-top: 1px solid var(--border); }
.pz-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pz-wrap { flex-wrap: wrap; }
.pz-row > .select { flex: none; width: auto; max-width: 100%; }
.pz-row > .input.grow { flex: 1 1 12em; }
.pz-name { flex: 1; min-width: 0; }
.pz-tipo { flex: none; font-size: 12px; color: var(--text-2); min-width: 5em; }
.pz-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.pz-opt { display: inline-flex; align-items: center; gap: 2px; padding: 1px 4px 1px 8px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); font-size: 12px; font-weight: 600; }
.pz-x { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 0; border-radius: 999px; background: none; color: var(--text-2); cursor: pointer; }
.pz-x:hover:not(:disabled) { background: var(--bg-hover); color: var(--text); }
.pz-x:disabled { opacity: .45; cursor: default; }
.pz-add { width: 9em; height: 28px; font-size: 12px; }
.pz-new { border-top: 1px solid var(--border); padding-top: 12px; }
.pz-h { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.pz-dias { width: 5em; }
.pz-regla.off > .pz-row > .grow { color: var(--text-2); text-decoration: line-through; }
@media (max-width: 600px) { .pz-row:not(.pz-wrap) { flex-wrap: wrap; } .pz-name { flex-basis: 100%; } .pz-new .pz-row > .input.grow { flex-basis: 100%; } }
/* Opcional del 026a: con el tipo Lista, "Agregar campo" va debajo de la caja de opciones. */
.pz-actions { display: flex; justify-content: flex-end; margin-top: 8px; }

/* ---------- Fase 4a (026): Portafolios ---------- */
.pf-body { max-width: 1240px; }
/* 034 (retoque 2): con campos, la tabla usa todo el ancho de la página antes de desplazarse. */
.pf-body:has(.pf-table.con-campos) { max-width: none; }
.pf-table { min-width: min-content; }
/* Fase 4d: después de Progreso, una columna por campo visible (--pf-cf lo pone la tabla con sus anchos). */
.pf-row { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(118px, 132px) minmax(140px, 200px) minmax(130px, 168px) minmax(110px, 150px) minmax(100px, 160px) var(--pf-cf,) 44px; align-items: center; min-height: 46px;
  border-bottom: 1px solid var(--border); background: var(--bg); cursor: pointer; outline: none; }
.pf-row:last-child { border-bottom: 0; }
.pf-row > div { padding: 0 10px; min-width: 0; display: flex; align-items: center; gap: 8px; height: 100%; border-right: 1px solid var(--border); position: relative; }
.pf-row > div:last-child { border-right: 0; }
.pf-row:hover, .pf-row:focus-visible { background: var(--bg-hover); }
.pf-row:focus-visible { box-shadow: inset 0 0 0 2px var(--primary); }
/* Rendimiento (200 proyectos): las filas fuera de la pantalla no se acomodan ni se pintan; una con su menú abierto, sí. */
.pf-table > .pf-row[data-project-id] { content-visibility: auto; contain-intrinsic-size: auto 46px; }
.pf-table > .pf-row[data-project-id]:has(.dropdown.open), .pf-table > .pf-row[data-project-id]:focus-within { content-visibility: visible; }
.pf-head { min-height: 36px; cursor: default; background: var(--bg-soft); }
.pf-head:hover { background: var(--bg-soft); }
.pf-head > div { font-size: 12px; font-weight: 600; color: var(--text-2); }
/* Opcional del 028: el encargado no se corta cuando sobra espacio. */
.pf-lista .pf-row { grid-template-columns: minmax(240px, 1.2fr) 110px minmax(200px, 1fr) minmax(190px, 0.8fr) 180px; }
.pf-sort { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 4px 0; font: inherit; color: inherit; cursor: pointer; }
.pf-sort:hover { color: var(--text); }
.pf-sq { width: 18px; height: 18px; border-radius: 5px; background: var(--c, var(--primary)); flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--on-color); }
.pf-sq.lg { width: 30px; height: 30px; border-radius: 8px; }
.pf-title { color: var(--text); font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1 auto; }
.pf-client { font-size: 12px; color: var(--text-2); flex: 1 1 0; min-width: 0; }
.pf-row.archived .pf-title { color: var(--text-2); }
.pf-fecha { font-size: 12px; color: var(--text-chip); white-space: nowrap; font-variant-numeric: tabular-nums; display: inline-flex; align-items: baseline; gap: 0 6px; flex-wrap: wrap; min-width: 0; }
.pf-fecha.tarde { color: var(--due-over); font-weight: 600; }
.pf-fecha.deriv { color: var(--text-2); }
.pf-deriv { font-size: 11px; color: var(--text-2); }
.pf-avance { display: flex; align-items: center; gap: 8px; width: 100%; }
.pf-avance .mbar { flex: 1; width: auto; min-width: 48px; }
.pf-pct { font-size: 12px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
/* Fase 4c: última actualización de estado. "Sin actualizar" (7 días o más, o nunca) va atenuado; la nota, al pasar el
   ratón (title) y en el widget "Actualizaciones de estado" del Panel. */
.pf-upd { display: flex; flex-direction: column; min-width: 0; font-size: 12px; line-height: 1.3; color: var(--text-chip); }
.pf-upd-c { font-variant-numeric: tabular-nums; }
.pf-upd.viejo { color: var(--text-3); }
.pf-upd-t { font-style: italic; }
.pf-upd-nuevo { color: var(--text-2); }
.pf-upds { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pf-upds li { padding: 8px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.pf-upds li:last-child { border-bottom: 0; }
.pf-upds-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pf-upds-n { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1; color: var(--text); font-weight: 600; font-size: 13px; text-decoration: none; }
.pf-upds-n:hover { text-decoration: underline; }
.pf-upds-meta { margin-top: 2px; }
.pf-upds-meta .pf-upd { flex-direction: row; gap: 6px; }
.pf-upds-nota { margin: 6px 0 0; padding: 4px 10px; border-left: 2px solid var(--border-strong); font-size: 13px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.pf-c-count { font-size: 12px; color: var(--text-chip); white-space: nowrap; }
.pf-c-estados { flex-wrap: wrap; gap: 4px 10px !important; padding-top: 6px !important; padding-bottom: 6px !important; }
.pf-est { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.pf-est b { font-weight: 600; font-variant-numeric: tabular-nums; }
.pf-c-menu { justify-content: center; padding: 0 !important; }
/* ---------- Fase 4d (032): campos del portafolio ---------- */
.pf-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pf-bar .pf-resumen { margin: 0; min-width: 0; }
.pf-c-cf { font-size: 13px; }
.pf-c-cf .cf-pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-head .pf-c-cf .pf-sort { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.pf-c-cf .cf-edit { width: 100%; }
.pf-cf-l { display: none; }
.pf-vacio { padding: 16px 12px; }
/* Como la Lista (retoque 4 del 026a): si las columnas no caben, la tabla se desplaza en horizontal con el nombre fijo a
   la izquierda; solo con la tabla ya desplazada (antes no cambia nada y la primera pintura de 200 filas no lo paga). */
@media (min-width: 768px) {
  .pf-wrap.desplazada .pf-row > .pf-c-name { position: sticky; left: 0; z-index: 2; background: inherit; box-shadow: 1px 0 0 var(--border); }
}
.pf-headtxt { min-width: 0; }
.pf-headtxt h1 { line-height: 1.2; }
.pf-owner-h { display: inline-flex; }
.pf-resumen { margin: 0 0 12px; }
.pf-nota { margin: 12px 0 0; }
.pf-pick { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; margin-top: 8px; border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; }
.pf-pick .fopt { gap: 8px; }
.pf-pick .fopt .faint { margin-left: auto; max-width: 45%; }
.menu-opt.danger, .menu-opt.danger .icon { color: var(--danger); }
@media (max-width: 767px) {
  .pf-body { padding: 12px 12px 48px; }
  .pf-head { display: none !important; }
  .pf-table { min-width: 0; }
  .pf-row, .pf-lista .pf-row { display: flex; flex-wrap: wrap; gap: 8px 12px; padding: 12px; height: auto; }
  .pf-row > div { border-right: 0; padding: 0; height: auto; }
  .pf-c-name { flex: 1 1 calc(100% - 52px); flex-wrap: wrap; }
  .pf-client { flex-basis: 100%; padding-left: 26px; }
  .pf-c-prog { flex: 1 1 100%; }
  .pf-c-update { flex: 1 1 100%; order: 9; }
  .pf-c-cf { flex: 1 1 calc(50% - 6px); order: 10; flex-direction: column; align-items: flex-start !important; gap: 2px !important; }
  .pf-cf-l { display: block; font-size: 11px; color: var(--text-2); font-weight: 600; }
  .pf-c-cf.cell-edit { border: 1px solid var(--border-strong); border-radius: 6px; padding: 4px 8px !important; }
  .pf-c-update .pf-upd { flex-direction: row; gap: 6px; }
  .pf-c-menu { position: absolute !important; top: 6px; right: 6px; }
  .pf-row { position: relative; }
  .pf-c-owner.cell-edit, .pf-c-date.cell-edit { border: 1px solid var(--border-strong); border-radius: 6px; padding: 2px 8px !important; min-height: 28px; }
  .pf-owner-h { display: none; }
}

/* ---------- Fase 4b (028): Cronograma y Panel del portafolio ---------- */
.pf-ancho { max-width: none; }
/* Fechas que salen de las tareas del proyecto: punteada y más clara; no se mueve (solo abre). */
.cr-task.aprox { border-style: dashed; background: color-mix(in srgb, var(--c) 10%, var(--bg-elev)); }
.cr-task.fija { cursor: pointer; }
.cr-task.hito.aprox { background: none; }
.cr-task.hito.aprox .cr-rombo { opacity: 0.55; }
.pf-entregas .pn-due { color: var(--text-2); font-weight: 500; }
.pf-entregas .pn-due.tarde { color: var(--m-retraso); font-weight: 600; }
.pf-entregas .pf-deriv { flex: none; }
.pf-metas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pf-metas > li { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 8px; min-width: 0; }
.pf-meta-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pf-meta-t { flex: 1; min-width: 0; font-weight: 600; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-meta-prog { display: flex; align-items: center; gap: 8px; }
.pf-meta-prog .mbar { flex: 1; width: auto; }
.pf-meta-pie { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; font-size: 12px; min-width: 0; }
@media (max-width: 767px) { .pf-metas { grid-template-columns: minmax(0, 1fr); } }
/* 036: Administración › Respaldos */
.rsp-aviso { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.rsp-aviso .icon { flex: none; margin-top: 2px; }
.rsp-ok { display: flex; gap: 8px; align-items: center; margin: 0; color: var(--ok); font-weight: 600; font-size: 13px; }
.rsp-datos { margin: 0; display: grid; gap: 0; }
.rsp-fila { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 4px 16px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.rsp-fila:first-child { border-top: 0; }
.rsp-fila dt { color: var(--text-2); }
.rsp-fila dd { margin: 0; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.rsp-fila dd .faint { font-weight: 400; }
@media (max-width: 520px) { .rsp-fila { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.ibx-sys.warn { background: var(--warn-bg); color: var(--warn-text); }
/* 036: con cuatro pestañas, en el teléfono pasan a dos renglones en lugar de salirse de la pantalla. */
.adm-tabs { flex-wrap: wrap; max-width: 100%; }
/* Fase 5a: Informes › Mi organización */
.inf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0 2px; }
.inf-btn-t { max-width: 180px; }
.inf-periodo { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.inf-periodo .select { width: auto; min-width: 150px; height: 30px; padding-top: 0; padding-bottom: 0; font-size: 13px; }
.inf-fechas { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inf-fechas .input { width: auto; height: 30px; padding: 0 8px; font-size: 13px; }
.inf-varios { width: min(280px, 86vw); padding: 8px; display: grid; gap: 6px; }
.inf-varios .input { height: 30px; font-size: 13px; }
.inf-opciones { max-height: 260px; overflow: auto; display: grid; }
.inf-opcion { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 8px; border-radius: 4px; font-size: 13px; color: var(--text); cursor: pointer; }
.inf-opcion:hover { background: var(--bg-soft); }
.inf-opcion .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.inf-opcion input { margin: 0; }
.inf-varios > .link-btn { justify-self: start; padding: 2px 8px; }
.inf-pie { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: auto; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 12px; }
.inf-filtros { display: inline-flex; align-items: center; gap: 5px; color: var(--text-3); }
.inf-pie .link-btn { display: inline-flex; align-items: center; gap: 4px; }
.inf-nota { margin: 8px 0 0; }
.inf > .inf-nota { margin-top: 14px; }
.pn-kpi-ver { all: unset; cursor: pointer; border-radius: 4px; font: inherit; color: inherit; }
.pn-kpi-ver:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.pn-kpi-ver:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.inf-tabla td, .inf-tabla th { vertical-align: middle; }
.inf-tarea { display: inline-grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; max-width: 100%; color: var(--text); font-size: 13px; font-weight: 500; text-align: left; }
.inf-tarea .pn-key { color: var(--text-3); font-weight: 600; font-size: 12px; }
.inf-pj { display: inline-grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px; max-width: 220px; color: var(--text); }
.inf-pj .dot { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.inf-quien { display: inline-grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px; max-width: 180px; }
.inf-tarde { color: var(--m-retraso); font-weight: 600; }
.inf-hecha { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-weight: 600; }
@media (max-width: 767px) {
  .inf-tabla td:first-child { max-width: 58vw; }
}
/* 044, retoque 1: la Lista avisa si las finalizadas están ocultas (venga de donde venga: Opciones, Panel o Informes). */
.ptool-ocultas { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-text); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ptool-ocultas .link-btn { color: inherit; text-decoration: underline; }
/* 044: Informes › Mi impacto, Copiar enlace e Imprimir o PDF */
.inf-acciones { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.inf-fijo { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--bg-soft); }
.inf-impreso { display: none; }
@media print {
  @page { margin: 12mm; }
  html, body, .main, .page-body { background: #fff !important; }
  .shell > :not(.main), .topbar, .bottomnav, .toast, .toasts, .inf-bar, .inf-acciones, .mhead-tabs, .hw-grip, .hw-head .icon-btn, .inf-pie, .home-foot, .inf > .faint.inf-nota { display: none !important; }
  .shell, .main { display: block !important; min-height: 0 !important; overflow: visible !important; }
  .page-body { padding: 0 !important; }
  .mhead { padding: 0 0 6px !important; border: 0 !important; }
  .inf-impreso { display: block; margin: 0 0 10px; font-size: 11px; color: #425466; }
  .pn .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .hw { break-inside: avoid; box-shadow: none !important; border: 1px solid #d5dbe3 !important; }
  .hw.full { grid-column: 1 / -1 !important; }
  .pn-kpi-ver { text-decoration: none !important; }
}
@media (max-width: 767px) {
  /* En el teléfono la barra va en un renglón; con el aviso, este baja a su propio renglón en lugar de salirse. */
  .ptool:has(.ptool-ocultas) { flex-wrap: wrap; row-gap: 8px; }
  .ptool-ocultas { order: 10; }
}
.tp-estim .input { width: 90px; height: 28px; padding: 0 8px; font-size: 13px; }
/* Fase 5b: Recursos (planificación de capacidad). Una serie en --chart; la sobrecarga en --danger, con su texto. */
.rc-aviso { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; }
.rc-aviso .icon { flex: none; margin-top: 2px; }
.rc-resumen { margin: 0 0 10px; }
.rc-nota { margin: 14px 0 0; max-width: 900px; }
.rc-wrap { overflow-x: auto; }
.rc-tabla { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 820px; }
.rc-tabla th, .rc-tabla td { padding: 8px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.rc-tabla thead th { font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--bg-soft); white-space: nowrap; }
.rc-n { width: 190px; min-width: 160px; position: sticky; left: 0; background: var(--bg-elev); z-index: 1; }
.rc-tabla thead .rc-n { background: var(--bg-soft); }
.rc-quien { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; color: var(--title); }
.rc-quien a { color: var(--title); }
.rc-quien .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.rc-sub { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--text-3); }
.rc-chip { color: var(--danger-strong); font-weight: 700; }
.rc-h { text-align: right !important; }
.rc-c { min-width: 70px; }
.rc-btn { all: unset; display: grid; gap: 4px; width: 100%; cursor: pointer; border-radius: 4px; padding: 2px; box-sizing: border-box; }
.rc-btn:hover .rc-t { text-decoration: underline; }
.rc-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.rc-t { font-variant-numeric: tabular-nums; color: var(--text); text-align: right; font-size: 12px; white-space: nowrap; }
.rc-track { display: block; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.rc-fill { display: block; height: 100%; background: var(--chart); border-radius: 3px; }
.rc-sobre .rc-fill { background: var(--danger); }
.rc-sobre .rc-t { color: var(--danger-strong); font-weight: 700; }
.rc-cap { display: block; text-align: right; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rc-vacia { text-align: right; }
.rc-x { text-align: right; white-space: nowrap; font-size: 12px; }
.rc-proy th, .rc-proy td { background: var(--bg-soft); }
.rc-proy .rc-n { background: var(--bg-soft); }
.rc-gente .rc-n { padding-left: 28px; }
.rc-gente .rc-quien { font-weight: 500; color: var(--text); }
@media (max-width: 767px) { .rc-n { width: 150px; min-width: 140px; } }
/* 046: columna "Estimación" de la Lista (editable en la fila). */
.tc.estimate { justify-content: flex-end; }
.lt-estim { width: 100%; min-width: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; padding: 3px 6px; font: inherit; font-size: 13px; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.lt-estim:hover { border-color: var(--border); }
.lt-estim:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); background: var(--bg-elev); }
.lt-estim::placeholder { color: var(--text-3); }
/* 046, retoque 2: los valores de las tres últimas columnas de Recursos, bajo su título (a la derecha, como el título). */
.rc-tabla td.rc-x, .rc-tabla td.rc-vacia { text-align: right; }
.lt-row > .tc.estimate { justify-content: flex-end; }
@media (max-width: 767px) { .lt-task > .tc.estimate { border: 1px solid var(--border-strong); border-radius: 6px; padding: 0 4px; background: var(--bg); max-width: 96px; } }
.rc-quedan { display: block; font-size: 11px; font-weight: 500; color: var(--text-3); }
/* Fase 6a (046): Personas y Equipos (referencia 21-personas-perfil.jpg) */
.np-vacio { font-size: 12px; color: var(--sidebar-muted); padding: 4px 10px; }
.pp-buscar { max-width: 320px; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pp-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px; color: var(--text); text-decoration: none; min-width: 0; }
.pp-card:hover { border-color: var(--border-strong); text-decoration: none; background: var(--bg-hover); }
.pp-card-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pp-card-t b { color: var(--title); font-size: 14px; font-weight: 600; }
.pp-card-t small { font-size: 12px; color: var(--text-2); }
.pp-team { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--text); text-decoration: none; background: var(--bg-elev); }
.pp-team:hover { border-color: var(--c); text-decoration: none; }
.pp-team-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.pp-away { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; padding: 2px 8px; border-radius: 999px; background: var(--bg-soft); color: var(--text-2); font-size: 12px; font-weight: 500; max-width: 100%; }
.pp-away.now { background: var(--warn-bg); color: var(--warn-text); }
.pp-away-nota { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-perfil { max-width: 1120px; margin: 0 auto; width: 100%; }
.pp-head { display: flex; gap: 24px; align-items: flex-start; padding: 8px 0 24px; }
.pp-av { width: 96px; height: 96px; font-size: 34px; flex: none; }
.pp-head-t { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.pp-head-t h1 { margin: 0; font-size: 26px; font-weight: 600; color: var(--title); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.pp-head-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pp-cargo { font-size: 14px; color: var(--text-2); font-weight: 500; }
.pp-head-aus { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pp-about { margin: 0; font-size: 14px; color: var(--text); white-space: pre-line; max-width: 70ch; overflow-wrap: anywhere; }
.pp-head .link-btn { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; }
.pp-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.pp-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pp-tlist, .pp-plist, .pp-colab { list-style: none; margin: 0; padding: 4px 0; }
.pp-tline { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 14px; border: 0; border-bottom: 1px solid var(--border); background: none; font: inherit; font-size: 13px; color: var(--text); text-align: left; cursor: pointer; min-width: 0; }
.pp-tlist li:last-child .pp-tline { border-bottom: 0; }
.pp-tline:hover { background: var(--bg-hover); }
.pp-tproj { display: inline-flex; align-items: center; gap: 5px; max-width: 34%; font-size: 12px; color: var(--text-2); }
.pp-tdue { flex: none; min-width: 52px; text-align: right; font-size: 12px; color: var(--text-2); }
.pp-tdue.late { color: var(--danger); font-weight: 600; }
.pp-pline { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: var(--text); text-decoration: none; font-size: 13px; min-width: 0; }
.pp-pline:hover { background: var(--bg-hover); text-decoration: none; }
.pp-avs { display: inline-flex; flex: none; padding-left: 6px; }
.pp-avs .avatar { width: 22px; height: 22px; font-size: 9px; margin-left: -6px; box-shadow: 0 0 0 2px var(--bg-elev); }
.pp-colab li > a { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: var(--text); text-decoration: none; min-width: 0; }
.pp-colab li > a:hover { background: var(--bg-hover); text-decoration: none; }
.pp-eq-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--c); color: var(--on-color); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pp-eq-ico.lg { width: 96px; height: 96px; border-radius: 22px; }
.pp-eq .pp-avs { padding: 6px 0 0 6px; }
.pp-casillas { display: flex; flex-direction: column; gap: 8px; }
.pp-casillas-l { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.pp-casilla { display: flex; align-items: center; gap: 8px; padding: 7px 10px; font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--border); min-width: 0; }
.pp-casilla:last-child { border-bottom: 0; }
.pp-casilla:hover { background: var(--bg-hover); }
.pp-casilla small { margin-left: auto; flex: none; }
.pp-colores { display: flex; gap: 8px; flex-wrap: wrap; }
.pp-color { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; box-shadow: 0 0 0 1px var(--border); }
.pp-color.on { border-color: var(--bg-elev); box-shadow: 0 0 0 2px var(--c); }
@media (max-width: 900px) {
  .pp-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .pp-head { gap: 14px; }
  .pp-av, .pp-eq-ico.lg { width: 64px; height: 64px; font-size: 22px; border-radius: 50%; }
  .pp-eq-ico.lg { border-radius: 16px; }
  .pp-head-t h1 { font-size: 21px; }
  .pp-tproj { display: none; }
  .pp-buscar { max-width: none; width: 100%; }
}
/* 6a: Recursos con ausencia y filtro por equipo */
.rc-ausente { display: block; margin-top: 2px; font-size: 11px; font-weight: 600; color: var(--warn-text); }
.rc-c.rc-aus, .rc-cap.rc-aus { background-image: repeating-linear-gradient(135deg, transparent 0 6px, var(--bg-soft) 6px 9px); }
/* 048, retoque 1: el aviso de ausencia cabe en la ficha (su renglón, sin cortar; la nota debajo) */
.pp-card-t .pp-away { white-space: nowrap; margin-top: 4px; }
.pp-away-abajo { display: block; font-size: 12px; color: var(--text-2); white-space: normal; overflow-wrap: anywhere; }
.senal-ausencia { white-space: nowrap; }
