/*
 * MOD-257/258 · Proyectos Desktop revamp
 *
 * HANDOFF CLAUDE:
 * - Este archivo sólo completa la capa 4.4.000 ya existente en app.css.
 * - Todos los cambios de página están aislados con body:not(.mobile-mode).
 * - Se preservan IDs y contratos DOM de MOD-03/105/135; no hay reglas de lógica.
 */

/* ── Lista de Proyectos: densidad Linear/GitHub, aire Notion ─────────────── */
body:not(.mobile-mode) #page-dealx{
  padding:30px clamp(26px,3vw,48px) 70px;
  background:var(--bg);
}
body:not(.mobile-mode) #page-dealx .dxp-toolbar{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(220px,320px);
  align-items:end;
  gap:16px;
  margin:0 0 24px;
  padding:0;
  border:0;
  background:transparent;
}
body:not(.mobile-mode) #page-dealx .dxp-heading{min-width:0}
body:not(.mobile-mode) #page-dealx .dxp-eyebrow{
  display:flex;align-items:center;gap:8px;
  margin-bottom:7px;color:var(--dim);
  font-size:11px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;
}
body:not(.mobile-mode) #page-dealx .dxp-eyebrow i{color:var(--green)}
body:not(.mobile-mode) #page-dealx .dxp-title{
  margin:0;color:var(--text);font-size:27px;font-weight:650;letter-spacing:-.025em;line-height:1.15;
}
body:not(.mobile-mode) #page-dealx .dxp-subtitle{
  margin:7px 0 0;color:var(--dim);font-size:13px;line-height:1.5;text-transform:none;
}
body:not(.mobile-mode) #page-dealx .dxp-control{
  display:flex;flex-direction:column;gap:6px;min-width:0;
}
body:not(.mobile-mode) #page-dealx .dxp-control span{
  color:var(--dim);font-size:10.5px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;
}
body:not(.mobile-mode) #page-dealx .dxp-control .fsel,
body:not(.mobile-mode) #page-dealx .dxp-control .finp{
  width:100%;height:36px;box-sizing:border-box;margin:0;
  border:1px solid var(--border);border-radius:8px;background:var(--bg2);color:var(--text);
  font-family:var(--font);font-size:12.5px;outline:none;
}
body:not(.mobile-mode) #page-dealx .dxp-control .finp{text-transform:none}
body:not(.mobile-mode) #page-dealx .dxp-control .fsel:focus,
body:not(.mobile-mode) #page-dealx .dxp-control .finp:focus{
  border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent);
}
body:not(.mobile-mode) #page-dealx #dx-stats{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;margin:0 0 20px;padding:0;
}
body:not(.mobile-mode) #page-dealx #dx-stats .pq-stat{
  min-height:92px;box-sizing:border-box;padding:16px 17px;
  border:1px solid var(--border);border-radius:11px;background:var(--dash-panel);
  box-shadow:none;
}
body:not(.mobile-mode) #page-dealx #dx-stats .pq-stat-lbl{
  margin-bottom:8px;color:var(--dim);font-size:11px;font-weight:500;letter-spacing:0;text-transform:none;
}
body:not(.mobile-mode) #page-dealx #dx-stats .pq-stat-val{
  color:var(--text);font-size:23px!important;font-weight:650;letter-spacing:-.02em;
}
body:not(.mobile-mode) #page-dealx .dxp-table-wrap{
  margin:0;border:1px solid var(--border);border-radius:12px;background:var(--dash-panel);overflow:auto;
}
body:not(.mobile-mode) #page-dealx .dxp-table{width:100%;border-collapse:collapse}
body:not(.mobile-mode) #page-dealx .dxp-table thead{background:var(--bg2)}
body:not(.mobile-mode) #page-dealx .dxp-table th{
  height:38px;padding:0 13px;border-bottom:1px solid var(--border);
  color:var(--dim);font-size:10.5px;font-weight:600;letter-spacing:.045em;text-transform:uppercase;
}
body:not(.mobile-mode) #page-dealx .dxp-table td{
  height:58px;padding:0 13px;border-bottom:1px solid color-mix(in srgb,var(--border) 72%,transparent);
  color:var(--text2);font-size:12.5px;vertical-align:middle;
}
body:not(.mobile-mode) #page-dealx .dxp-table tbody tr:last-child td{border-bottom:0}
body:not(.mobile-mode) #page-dealx .dxp-table tbody tr{transition:background .12s}
body:not(.mobile-mode) #page-dealx .dxp-table tbody tr:hover{background:color-mix(in srgb,var(--accent) 5%,transparent)}
body:not(.mobile-mode) #page-dealx .dxp-project-link{
  display:block;max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  border:0;background:transparent;padding:0;color:var(--text);
  font-family:var(--font);font-size:13px;font-weight:600;text-align:left;cursor:pointer;
}
body:not(.mobile-mode) #page-dealx .dxp-project-link:hover{color:var(--accent);text-decoration:underline}
body:not(.mobile-mode) #page-dealx .dxp-folio{font-family:var(--font-mono);font-size:11px;color:var(--dim)}
body:not(.mobile-mode) #page-dealx .dxp-money{font-weight:650;color:var(--text);white-space:nowrap}
body:not(.mobile-mode) #page-dealx .dxp-money small{color:var(--dim);font-size:10px}
body:not(.mobile-mode) #page-dealx .dxp-open{
  width:30px;height:30px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--dim);cursor:pointer;
}
body:not(.mobile-mode) #page-dealx .dxp-open:hover{border-color:var(--border);background:var(--bg3);color:var(--text)}

/* ── Dashboard: comando, notas y grid de trabajo ─────────────────────────── */
body:not(.mobile-mode) #page-proyecto-detail .prjx-command{
  display:flex;align-items:center;gap:18px;margin:0 0 20px;padding:12px 14px;
  border:1px solid var(--border);border-radius:12px;background:var(--prj-panel);
}
body:not(.mobile-mode) #page-proyecto-detail .prjx-command-copy{flex:1;min-width:180px}
body:not(.mobile-mode) #page-proyecto-detail .prjx-command-copy span{
  display:block;color:var(--text);font-size:13px;font-weight:650;
}
body:not(.mobile-mode) #page-proyecto-detail .prjx-command-copy small{
  display:block;margin-top:2px;color:var(--dim);font-size:11.5px;text-transform:none;
}
body:not(.mobile-mode) #page-proyecto-detail .prjx-command-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
body:not(.mobile-mode) #page-proyecto-detail .prjx-command-btn{
  display:inline-flex;align-items:center;gap:7px;height:31px;padding:0 10px;
  border:1px solid transparent;border-radius:7px;background:transparent;color:var(--text2);
  font-family:var(--font);font-size:11.5px;font-weight:500;cursor:pointer;transition:background .12s,border-color .12s,color .12s;
}
body:not(.mobile-mode) #page-proyecto-detail .prjx-command-btn:hover{border-color:var(--border);background:var(--bg3);color:var(--text)}
body:not(.mobile-mode) #page-proyecto-detail .prjx-command-btn.primary{border-color:var(--accent);background:var(--accent);color:var(--on-accent)}
body:not(.mobile-mode) #page-proyecto-detail .prjx-command-btn:disabled{opacity:.42;cursor:not-allowed}
body:not(.mobile-mode) #page-proyecto-detail .prjx-command-btn:disabled:hover{border-color:transparent;background:transparent}
body:not(.mobile-mode) #page-proyecto-detail .prjx-workgrid{
  display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:18px;align-items:start;
}
body:not(.mobile-mode) #page-proyecto-detail .prjx-workgrid>#prj-dash-2col,
body:not(.mobile-mode) #page-proyecto-detail .prjx-workgrid>#prj-dash-hist{grid-column:1/-1}
body:not(.mobile-mode) #page-proyecto-detail .prjx-workgrid>#prj-dash-trabajos,
body:not(.mobile-mode) #page-proyecto-detail .prjx-workgrid>#prj-dash-acts,
body:not(.mobile-mode) #page-proyecto-detail .prjx-workgrid>#prj-dash-arch,
body:not(.mobile-mode) #page-proyecto-detail .prjx-workgrid>#prj-dash-oc{grid-column:span 6}
body:not(.mobile-mode) #page-proyecto-detail .prjx-workgrid>.prj-dash-section{margin-bottom:0}
body:not(.mobile-mode) #page-proyecto-detail .prjx-workgrid>#prj-dash-2col{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:18px!important;margin:0!important;
}
body:not(.mobile-mode) #page-proyecto-detail .prjx-notes-section{margin-bottom:18px}
body:not(.mobile-mode) #page-proyecto-detail .prjx-notes-head>span:first-of-type{flex:0 1 auto}
body:not(.mobile-mode) #page-proyecto-detail .prjx-notes-head .cnt{margin-right:auto}
body:not(.mobile-mode) #page-proyecto-detail .prjx-note-type{
  width:max-content;padding:2px 7px;border:1px solid var(--border);border-radius:999px;
  color:var(--dim);font-size:9.5px;font-weight:650;letter-spacing:.03em;text-transform:uppercase;
}
body:not(.mobile-mode) #page-proyecto-detail .prjx-notes-empty{
  display:flex;align-items:center;gap:13px;padding:20px 18px;color:var(--dim);
}
body:not(.mobile-mode) #page-proyecto-detail .prjx-notes-empty>i{font-size:20px;opacity:.55}
body:not(.mobile-mode) #page-proyecto-detail .prjx-notes-empty>div{flex:1}
body:not(.mobile-mode) #page-proyecto-detail .prjx-notes-empty b{display:block;color:var(--text);font-size:13px}
body:not(.mobile-mode) #page-proyecto-detail .prjx-notes-empty span{display:block;margin-top:3px;font-size:12px;text-transform:none}

/* ── Modal de nota: aislado del DOM de la página ─────────────────────────── */
#mo-prj-nota .pnt-box{max-width:720px;border-radius:14px;overflow:hidden}
#mo-prj-nota .pnt-head{align-items:flex-start;padding:16px 20px}
#mo-prj-nota .pnt-icon{
  display:grid;place-items:center;width:34px;height:34px;flex-shrink:0;
  border:1px solid color-mix(in srgb,var(--yellow) 32%,transparent);border-radius:9px;
  background:color-mix(in srgb,var(--yellow) 10%,transparent);color:var(--yellow);
}
#mo-prj-nota .pnt-heading{flex:1;min-width:0}
#mo-prj-nota .pnt-heading h3{margin:0;color:var(--text);font-size:16px;font-weight:650;text-transform:none}
#mo-prj-nota .pnt-heading small{display:block;margin-top:3px;color:var(--dim);font-size:11.5px;text-transform:none}
#mo-prj-nota .pnt-body{padding:20px}
#mo-prj-nota .pnt-readonly{
  display:flex;align-items:center;gap:8px;margin-bottom:16px;padding:9px 11px;
  border:1px solid var(--border);border-radius:8px;background:var(--bg3);color:var(--dim);
  font-size:11.5px;text-transform:none;
}
#mo-prj-nota .pnt-field{display:block;margin-bottom:15px}
#mo-prj-nota .pnt-field>span{
  display:block;margin-bottom:6px;color:var(--dim);font-size:10.5px;font-weight:650;letter-spacing:.055em;text-transform:uppercase;
}
#mo-prj-nota .pnt-field input,
#mo-prj-nota .pnt-field textarea,
#mo-prj-nota .pnt-field select{
  width:100%;box-sizing:border-box;padding:10px 11px;border:1px solid var(--border);border-radius:8px;
  background:var(--bg);color:var(--text);font-family:var(--font);font-size:13px;line-height:1.5;
  text-transform:none;outline:none;resize:vertical;
}
#mo-prj-nota .pnt-field input:focus,
#mo-prj-nota .pnt-field textarea:focus,
#mo-prj-nota .pnt-field select:focus{
  border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent);
}
#mo-prj-nota .pnt-field input:read-only,
#mo-prj-nota .pnt-field textarea:read-only,
#mo-prj-nota .pnt-field select:disabled{background:var(--bg2);color:var(--text2);cursor:default}
#mo-prj-nota .pnt-row{display:grid;grid-template-columns:minmax(180px,1fr) minmax(220px,1fr);gap:16px;align-items:end}
#mo-prj-nota .pnt-row .pnt-field{margin-bottom:0}
#mo-prj-nota .pnt-pin{
  display:flex;align-items:center;min-height:41px;box-sizing:border-box;padding:0 12px;
  border:1px solid var(--border);border-radius:8px;background:var(--bg2);color:var(--text2);cursor:pointer;
}
#mo-prj-nota .pnt-pin input{margin:0 9px 0 0;accent-color:var(--accent)}
#mo-prj-nota .pnt-pin span{display:flex;align-items:center;gap:7px;font-size:12px;text-transform:none}
#mo-prj-nota .pnt-meta{margin-top:15px;color:var(--dim);font-size:11px;text-transform:none}
#mo-prj-nota .pnt-foot{padding:13px 20px}
#mo-prj-nota .pnt-spacer{flex:1}
#mo-prj-nota .pnt-delete{color:var(--red);border-color:color-mix(in srgb,var(--red) 45%,var(--border))}

@media(max-width:1240px){
  body:not(.mobile-mode) #page-dealx .dxp-toolbar{grid-template-columns:minmax(0,1fr) 200px 260px}
  body:not(.mobile-mode) #page-proyecto-detail .prjx-command{align-items:flex-start;flex-direction:column}
  body:not(.mobile-mode) #page-proyecto-detail .prjx-command-actions{justify-content:flex-start}
}
