/* Giina Pro — sistema de diseño (minimal, cálido, editorial) */
:root {
  --bg:      #f6f4f1;   /* off-white cálido */
  --surface: #ffffff;
  --ink:     #211f1c;   /* casi negro */
  --muted:   #8c857c;
  --line:    #e6e1da;   /* bordes suaves */
  --accent:  #9c6b4f;   /* clay / taupe */
  --accent-soft: #f0e7df;
  --interna: #b9862f;   /* ámbar: columnas internas */
  --interna-bg: #fbf6ec;
  --pos:     #3f7d5b;   /* margen positivo */
  --neg:     #b1442f;   /* margen negativo */
  --color-error: #b85c4f;
  /* Identidad documental: no sustituye los colores de estado (ok, aviso, error). */
  --doc-presupuesto: #a87918;
  --doc-presupuesto-bg: #fbf3da;
  --doc-proforma: #6555a4;
  --doc-proforma-bg: #eeebf8;
  --doc-factura: #a65332;
  --doc-factura-bg: #f8ebe5;
  --doc-pedido: #356fa8;
  --doc-pedido-bg: #e7f0fa;
  --radius: 10px;
}

* { box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.gp-wrap { max-width: 1180px; margin: 0 auto; padding: 1.6rem 1.4rem 4rem; }

/* Cabecera del presupuesto */
.gp-doc-head {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.3rem 1.5rem;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
  margin-bottom: 1.1rem;
}
.gp-doc-head .proyecto { font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; }
.gp-doc-head .cliente { color: var(--muted); margin-top: .1rem; }
.gp-num { font-family: Georgia, serif; letter-spacing: .05em; color: var(--accent); font-weight: 600; }
.gp-meta { text-align: right; color: var(--muted); font-size: .82rem; line-height: 1.5; }

.gp-badge { display: inline-block; padding: .12rem .55rem; border-radius: 999px;
  font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.gp-badge.borrador { background: #f0eeeb; color: #8c857c; }
.gp-badge.enviado  { background: #e7eef5; color: #3d6ea5; }
.gp-badge.aprobado { background: #e6f1ea; color: var(--pos); }

/* Sistema visual de documentos: el icono identifica el origen; el badge, el estado. */
.gp-document-type-icon { flex: 0 0 auto; }
.gp-document-type-icon--presupuesto { color: var(--doc-presupuesto); }
.gp-document-type-icon--proforma { color: var(--doc-proforma); }
.gp-document-type-icon--factura { color: var(--doc-factura); }
.gp-document-type-icon--pedido { color: var(--doc-pedido); }

.gp-document-ref {
  display: inline-flex;
  align-items: center;
  gap: .34rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: .26rem .52rem;
  font-size: .76rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}
.gp-document-ref .gp-document-type-icon { width: 13px; height: 13px; }
.gp-document-ref--presupuesto { color: var(--doc-presupuesto); background: var(--doc-presupuesto-bg); border-color: #ead79f; }
.gp-document-ref--proforma { color: var(--doc-proforma); background: var(--doc-proforma-bg); border-color: #d7d0ed; }
.gp-document-ref--factura { color: var(--doc-factura); background: var(--doc-factura-bg); border-color: #eac9ba; }
.gp-document-ref--pedido { color: var(--doc-pedido); background: var(--doc-pedido-bg); border-color: #c9ddef; }
.gp-document-ref:hover { filter: brightness(.97); text-decoration: none; }

/* Barra de acciones */
.gp-actions { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; }
.gp-actions .spacer { flex: 1; }

/* Toggle vista */
.gp-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); overflow: hidden; }
.gp-toggle button { border: 0; background: transparent; padding: .32rem .9rem;
  font-size: .78rem; color: var(--muted); cursor: pointer; }
.gp-toggle button.on { background: var(--ink); color: #fff; }

/* Tabla de líneas */
.gp-card { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; }
.gp-table { width: 100%; border-collapse: collapse; }
.gp-table thead th {
  font-size: .64rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; text-align: right;
  padding: .7rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.gp-table thead th.l { text-align: left; }
.gp-table tbody td { padding: .55rem .6rem; border-bottom: 1px solid var(--line);
  text-align: right; vertical-align: middle; }
.gp-table tbody tr:last-child td { border-bottom: 0; }
.gp-table tbody tr:hover { background: #faf8f5; }
.gp-idx { color: var(--muted); font-size: .8rem; text-align: center !important; width: 2rem; }

/* Celda de elemento */
.gp-elem input.titulo { font-weight: 600; font-size: .92rem; border: 0; background: transparent;
  width: 100%; padding: 2px 0; color: var(--ink); }
.gp-elem input.titulo::placeholder { color: #c3bcb2; font-weight: 400; }
.gp-elem .sub { display: flex; gap: .5rem; margin-top: .15rem; }
.gp-elem .sub input { border: 0; background: transparent; font-size: .76rem; color: var(--muted);
  padding: 1px 0; }
.gp-elem .sub input.desc { flex: 1; }
.gp-elem .sub input.ubic { width: 130px; }
.gp-elem .sub input:focus { color: var(--ink); }

/* Inputs numéricos */
.gp-num-in { width: 74px; text-align: right; border: 1px solid transparent; background: transparent;
  border-radius: 6px; padding: .28rem .4rem; font-size: .84rem; color: var(--ink);
  font-variant-numeric: tabular-nums; }
.gp-num-in:hover { border-color: var(--line); }
.gp-num-in:focus { border-color: var(--accent); background: #fff; outline: none; }
.gp-num-in.pct { width: 58px; }

.gp-calc { font-variant-numeric: tabular-nums; color: var(--ink); }
.gp-calc.muted { color: var(--muted); }
.gp-total-cell { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Columnas internas */
.col-interna { background: var(--interna-bg); }
th.col-interna { color: var(--interna); }
.gp-margen.pos { color: var(--pos); font-weight: 600; }
.gp-margen.neg { color: var(--neg); font-weight: 600; }
.gp-margen small { font-weight: 400; opacity: .7; }
body.vista-cliente .col-interna { display: none; }

/* Elemento: fotos + inputs */
.gp-elem-flex { display: flex; gap: .55rem; align-items: flex-start; }
.gp-elem-inputs { flex: 1; min-width: 0; }
.gp-fotos { display: flex; gap: .25rem; align-items: center; padding-top: 2px; }
.gp-thumb { position: relative; display: inline-block; }
.gp-thumb img { width: 38px; height: 38px; object-fit: cover; border-radius: 7px;
  border: 1px solid var(--line); display: block; }
.gp-thumb .x { position: absolute; top: -6px; right: -6px; width: 16px; height: 16px;
  border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: .62rem;
  line-height: 1; cursor: pointer; display: none; padding: 0; }
.gp-thumb:hover .x { display: block; }
.gp-foto-add { width: 38px; height: 38px; border: 1px dashed var(--line); border-radius: 7px;
  display: flex; align-items: center; justify-content: center; color: #c3bcb2;
  cursor: pointer; font-size: 1rem; margin: 0; }
.gp-foto-add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.gp-icon-picker { position: relative; }
.gp-icon-picker summary { list-style: none; cursor: pointer; }
.gp-icon-picker summary::-webkit-details-marker { display: none; }
.gp-item-icon { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center; background: #f6f3ef;
  color: var(--accent); }
.gp-item-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; }
.gp-icon-picker[open] .gp-item-icon { border-color: var(--accent); background: var(--accent-soft); }
.gp-icon-pop { position: absolute; top: 44px; left: 0; z-index: 15; width: 154px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; padding: .55rem;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 18px 45px rgba(33,31,28,.16); }
.gp-icon-pop button { border: 1px solid var(--line); background: #fbfaf8; border-radius: 7px;
  height: 40px; display: flex; align-items: center; justify-content: center; color: var(--ink);
  cursor: pointer; }
.gp-icon-pop button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.gp-icon-pop svg { width: 20px; height: 20px; fill: none; stroke: currentColor; }

.gp-elem .sub select.tipo { border: 0; background: transparent; font-size: .72rem;
  color: var(--muted); max-width: 120px; cursor: pointer; }
.gp-elem .sub select.tipo:hover { color: var(--accent); }
.gp-elem .sub .hon-lbl { display: inline-flex; align-items: center; gap: .3rem;
  font-size: .72rem; color: var(--interna); white-space: nowrap; }
.gp-num-in:disabled { opacity: .35; }

/* Botones de acción (exportar, etc.) */
.gp-btn { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); border-radius: 8px; padding: .38rem .85rem;
  font-size: .8rem; text-decoration: none; cursor: pointer; }
.gp-btn:hover { border-color: var(--accent); color: var(--accent); }
.gp-btn.primario { background: var(--ink); border-color: var(--ink); color: #fff; }
.gp-btn.primario:hover { background: #000; color: #fff; }
.gp-sel { border: 1px solid var(--line); background: var(--surface); border-radius: 8px;
  padding: .38rem .6rem; font-size: .8rem; color: var(--ink); }

/* Botón eliminar fila */
.gp-del { border: 0; background: transparent; color: #cbc4ba; cursor: pointer;
  font-size: 1rem; line-height: 1; padding: .2rem .4rem; border-radius: 6px; }
.gp-del:hover { color: var(--neg); background: #f7ece9; }
.gp-row-actions { white-space: nowrap; min-width: 70px; }
.gp-save-state { display: none; margin-right: .2rem; color: var(--muted); font-size: .68rem; }
.gp-save-state.htmx-request,
.htmx-request .gp-save-state { display: inline-block; }
.gp-line-row.htmx-request { opacity: .78; }

/* Añadir línea */
.gp-add { display: block; width: 100%; text-align: left; border: 0; border-top: 1px dashed var(--line);
  background: transparent; color: var(--accent); padding: .7rem 1rem; font-size: .84rem;
  cursor: pointer; font-weight: 600; }
.gp-add:hover { background: var(--accent-soft); }

/* Panel de totales */
.gp-totales { display: flex; justify-content: flex-end; margin-top: 1.1rem; }
.gp-totales .box { width: 340px; }
.gp-trow { display: flex; justify-content: space-between; padding: .3rem 0; color: var(--muted); }
.gp-trow span:last-child { color: var(--ink); font-variant-numeric: tabular-nums; }
.gp-trow.total { border-top: 1px solid var(--line); margin-top: .3rem; padding-top: .6rem;
  font-size: 1.15rem; font-weight: 600; }
.gp-trow.total span { color: var(--ink); }
.gp-internal-box { margin-top: .9rem; padding: .8rem 1rem; background: var(--interna-bg);
  border: 1px solid #f0e4cd; border-radius: 8px; }
.gp-internal-box .lbl { font-size: .64rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--interna); font-weight: 700; margin-bottom: .35rem; }
body.vista-cliente .gp-internal-box { display: none; }

/* Revisión de ofertas PDF: ficha editorial compacta y sin tabla horizontal. */
.gp-import-review { max-width: 1420px; margin: 0 auto; color: var(--ink); }
.gp-import-review__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.15rem; }
.gp-import-review__head h1 { margin: .35rem 0 .2rem; font-size: clamp(1.45rem, 2.2vw, 2rem); letter-spacing: -.025em; }
.gp-import-review__head p { margin: 0; color: var(--muted); }
.gp-import-review__head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.gp-import-back { color: var(--accent); font-size: .78rem; font-weight: 650; text-decoration: none; }
.gp-import-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--line); box-shadow: 0 8px 24px rgba(33, 31, 28, .05); }
.gp-import-summary > div { min-width: 0; padding: .85rem 1rem; background: var(--surface); }
.gp-import-summary span, .gp-import-field > label, .gp-import-provider > label { display: block; margin-bottom: .3rem; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.gp-import-summary strong { display: block; overflow: hidden; font-size: .86rem; text-overflow: ellipsis; text-transform: capitalize; }
.gp-import-toolbar { display: flex; align-items: end; gap: 1.2rem; margin-bottom: .85rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 11px; background: #fbfaf8; }
.gp-import-provider { flex: 0 1 260px; }
.gp-import-provider .form-select { min-width: 220px; }
.gp-import-select-all { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .45rem; color: var(--ink); font-size: .8rem; font-weight: 650; cursor: pointer; }
.gp-import-select-all .form-check-input:checked { border-color: var(--accent); background-color: var(--accent); }
.gp-import-counts { display: flex; justify-content: flex-end; gap: .4rem; flex: 1; flex-wrap: wrap; margin-bottom: .25rem; }
.gp-import-count { display: inline-flex; align-items: center; border-radius: 999px; padding: .27rem .58rem; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.gp-import-count--ok { background: #e6f1ea; color: var(--pos); }
.gp-import-count--muted { background: #eeeae5; color: #6f6961; }
.gp-import-count--pending { background: var(--accent-soft); color: var(--accent); }
.gp-import-candidates { display: grid; gap: .7rem; }
.gp-import-candidate { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 7px 20px rgba(33, 31, 28, .035); }
.gp-import-candidate:has([data-candidate-select]:checked) { border-color: #c8a58f; box-shadow: 0 0 0 2px rgba(156, 107, 79, .10); }
.gp-import-candidate--descartada { opacity: .68; background: #f3f1ee; }
.gp-import-candidate__header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 42px; padding: .55rem .8rem; border-bottom: 1px solid var(--line); background: #fbfaf8; }
.gp-import-candidate__state { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.gp-import-status { display: inline-flex; border-radius: 999px; padding: .2rem .52rem; font-size: .63rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.gp-import-status--propuesta { background: var(--doc-presupuesto-bg); color: var(--doc-presupuesto); }
.gp-import-status--confirmada { background: #e6f1ea; color: var(--pos); }
.gp-import-status--fusionada { background: var(--doc-proforma-bg); color: var(--doc-proforma); }
.gp-import-status--descartada { background: #e8e4df; color: #6d665f; }
.gp-import-discard-note { overflow: hidden; color: var(--muted); font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.gp-import-origin { color: var(--muted); font-size: .7rem; font-weight: 600; white-space: nowrap; }
.gp-import-candidate__body { display: grid; grid-template-columns: 88px minmax(190px, 1.1fr) minmax(260px, 1.8fr) minmax(120px, .65fr) minmax(120px, .65fr); gap: .75rem; padding: .8rem; align-items: start; }
.gp-import-field { min-width: 0; }
.gp-import-field .form-control, .gp-import-field .form-select { width: 100%; min-height: 38px; border-color: #ddd7d0; border-radius: 8px; background-color: #fff; color: var(--ink); font-size: .8rem; }
.gp-import-field textarea.form-control { resize: vertical; line-height: 1.35; }
.gp-import-field .form-control:focus, .gp-import-field .form-select:focus, .gp-import-provider .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 .18rem rgba(156, 107, 79, .12); }
.gp-import-field .form-control:disabled, .gp-import-field .form-select:disabled { background: #ebe8e4; color: #6f6961; opacity: .85; }
.gp-import-warning { display: block; margin-top: .25rem; color: var(--doc-presupuesto); font-size: .68rem; }
.gp-import-media { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .35rem; grid-row: span 2; }
.gp-import-media .gp-v2-media-tile { grid-column: auto; grid-row: auto; margin-top: 1.1rem; }
.gp-import-media > div.gp-v2-media-tile { cursor: default; }
.gp-import-pricing { display: grid; grid-template-columns: minmax(140px, .9fr) minmax(125px, .75fr) minmax(100px, .55fr) minmax(110px, .65fr) minmax(105px, .6fr) minmax(220px, 1.4fr); gap: .75rem; padding: 0 .8rem .85rem 7.15rem; align-items: start; }
.gp-import-quantity { display: grid; grid-template-columns: minmax(70px, 1fr) 58px; gap: .35rem; }
.gp-import-check { display: inline-flex; align-items: center; gap: .3rem; margin-top: .32rem; color: #5e5852; font-size: .65rem; font-weight: 600; cursor: pointer; }
.gp-import-check input { accent-color: var(--accent); }
.gp-import-field--item .form-select { min-width: 0; }
.gp-import-item-link { display: flex; min-height: 38px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: .45rem .65rem; color: var(--accent); font-size: .8rem; text-decoration: none; }
.gp-import-actions { z-index: 5; display: flex; align-items: center; gap: .55rem; margin-top: .85rem; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, .96); box-shadow: 0 -8px 22px rgba(33, 31, 28, .06); backdrop-filter: blur(8px); }
.gp-import-actions > span { color: var(--muted); font-size: .76rem; }
.gp-import-actions > span strong { color: var(--ink); }

@media (max-width: 1180px) {
  .gp-import-candidate__body { grid-template-columns: 78px minmax(180px, 1fr) minmax(240px, 1.5fr) minmax(110px, .65fr); }
  .gp-import-candidate__body > :last-child { grid-column: 2; }
  .gp-import-pricing { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-left: 6.5rem; }
  .gp-import-field--item { grid-column: span 2; }
}
@media (max-width: 760px) {
  .gp-import-review__head, .gp-import-toolbar { align-items: stretch; flex-direction: column; }
  .gp-import-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gp-import-provider, .gp-import-provider .form-select { width: 100%; min-width: 0; }
  .gp-import-counts { justify-content: flex-start; }
  .gp-import-candidate__header { align-items: flex-start; flex-direction: column; }
  .gp-import-origin { white-space: normal; }
  .gp-import-candidate__body { grid-template-columns: 78px minmax(0, 1fr); }
  .gp-import-field--description, .gp-import-candidate__body > :last-child { grid-column: 2; }
  .gp-import-pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: .8rem; }
  .gp-import-field--item { grid-column: 1 / -1; }
  .gp-import-actions { flex-wrap: wrap; }
  .gp-import-actions .ms-auto { margin-left: 0 !important; }
}

/* Lista */
.gp-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; }
.gp-list a.item { display: flex; justify-content: space-between; align-items: center;
  padding: .9rem 1.2rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.gp-list a.item:last-child { border-bottom: 0; }
.gp-list a.item:hover { background: #faf8f5; }

/* Primera capa visual GIINA Pro */
:root {
  --shadow: 0 18px 50px rgba(33, 31, 28, .07);
  --radius: 8px;
}

.gp-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.3rem;
}

.gp-page-head h1 {
  margin: 0;
  font-size: 1.95rem;
  line-height: 1.08;
  font-weight: 650;
  letter-spacing: 0;
}

.gp-eyebrow {
  margin: 0 0 .28rem;
  color: var(--accent);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.gp-status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e4d4c8;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: .42rem .72rem;
  font-size: .78rem;
  font-weight: 650;
}

.gp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
}

.gp-kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.gp-kpi .lbl {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.gp-kpi .num {
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.gp-kpi .hint {
  color: var(--muted);
  font-size: .82rem;
}

.gp-workbench {
  margin-top: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.2rem;
  box-shadow: var(--shadow);
}

.gp-workbench h2 {
  margin: 0 0 .45rem;
  font-size: 1.2rem;
}

.gp-workbench p {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.55;
}

.gp-checklist {
  display: grid;
  gap: .5rem;
  align-content: center;
}

.gp-checklist div {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
  font-size: .86rem;
  padding: .5rem .62rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf8;
}

.gp-checklist span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.gp-card,
.gp-doc-head,
.gp-list {
  box-shadow: var(--shadow);
}

@media (max-width: 860px) {
  .gp-kpi-grid,
  .gp-workbench {
    grid-template-columns: 1fr;
  }
}

/* Pagos / hitos */
.gp-section-card {
  margin-top: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.gp-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: .85rem;
  margin-bottom: .85rem;
}

.gp-section-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.gp-section-head p {
  margin: .2rem 0 0;
  color: var(--muted);
  font-size: .82rem;
}

.gp-payment-form {
  display: flex;
  gap: .45rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.gp-payment-form input,
.gp-payment-form select,
.gp-modal input,
.gp-modal select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .44rem .55rem;
  background: #fff;
  color: var(--ink);
  font-size: .84rem;
}

.gp-payment-form input { width: 150px; }
.gp-payment-form input.num { width: 94px; text-align: right; }

.gp-payment-form button,
.gp-modal-actions button.primary {
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: .48rem .78rem;
  font-weight: 700;
  font-size: .82rem;
  cursor: pointer;
}

.gp-payment-table-wrap { overflow-x: auto; }
.gp-payment-table { width: 100%; border-collapse: collapse; }
.gp-payment-table th {
  text-align: left;
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .55rem .45rem;
}
.gp-payment-table td {
  border-top: 1px solid var(--line);
  padding: .62rem .45rem;
  vertical-align: middle;
}
.gp-payment-table td span,
.gp-pay-note {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  margin-top: .12rem;
}

.gp-doc-pill,
.gp-pay-state {
  display: inline-flex !important;
  width: fit-content;
  border-radius: 999px;
  padding: .18rem .5rem;
  font-size: .7rem !important;
  margin: 0;
}
.gp-doc-pill { background: #f2eee8; color: var(--accent); }
.gp-pay-state { background: #f0eeeb; color: var(--muted); text-transform: capitalize; }
.gp-pay-state.proforma_emitida { background: #e7eef5; color: #3d6ea5; }
.gp-pay-state.comprobante_recibido { background: #f5ede4; color: #8a5b35; }
.gp-pay-state.acreditado, .gp-pay-state.facturado { background: #e6f1ea; color: var(--pos); }
.gp-pay-state.parcialmente_cobrado { background: #fff3d8; color: #936a14; }
.gp-pay-state.cobrado { background: #e6f1ea; color: var(--pos); }

.gp-link-btn {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-weight: 700;
  font-size: .82rem;
  cursor: pointer;
}
.gp-btn.mini { padding: .32rem .58rem; font-size: .76rem; }
.gp-payment-history td {
  padding-top: .2rem;
  background: #fbfaf8;
}
.gp-payment-history span {
  display: inline-block;
  margin: .1rem .55rem .1rem 0;
}

.gp-payment-ledger {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .7rem;
}

.gp-payment-ledger span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .22rem .55rem;
  background: #fff;
}

.gp-payment-ledger .gp-link-btn {
  margin-left: .35rem;
  padding: 0;
  font-size: .7rem;
}

.gp-payment-invoice-option {
  margin-top: .8rem;
}

.gp-empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 1rem;
  color: var(--muted);
  background: #fbfaf8;
}
.gp-empty-state strong { display: block; color: var(--ink); margin-bottom: .2rem; }

.gp-modal {
  width: min(860px, calc(100vw - 2rem));
  border: 0;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 30px 90px rgba(0,0,0,.28);
}
.gp-modal::backdrop { background: rgba(0,0,0,.48); }
.gp-modal h3 {
  margin: 0 0 1rem;
  font-size: 1.8rem;
  letter-spacing: 0;
}
.gp-modal-x {
  position: absolute;
  top: .8rem;
  right: .9rem;
}
.gp-modal-x button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.8rem;
  cursor: pointer;
}
.gp-modal-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: .75rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}
.gp-modal-total strong { font-size: 1.25rem; }
.gp-modal label {
  display: grid;
  gap: .25rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 650;
}
.gp-modal label input,
.gp-modal label select {
  color: var(--ink);
  font-size: 1rem;
}
.gp-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 1rem;
}
.gp-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: .8rem;
  margin-top: 2rem;
}
.gp-modal-actions button {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: .55rem .75rem;
  font-weight: 700;
  cursor: pointer;
}

.gp-v2-pay-summary {
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
}

.gp-v2-balance-row {
  margin-top: .25rem;
  padding: .55rem .65rem;
  border-radius: 8px;
  background: #fff8ef;
  box-shadow: inset 0 0 0 1px rgba(149, 83, 44, .16);
}

.gp-v2-balance-row strong {
  color: var(--accent);
  font-size: 1.1rem;
}

.gp-v2-pay-mini {
  display: grid;
  gap: .18rem;
  margin-top: .5rem;
  color: var(--muted);
  font-size: .74rem;
}

@media (max-width: 860px) {
  .gp-section-head { display: block; }
  .gp-payment-form { justify-content: flex-start; margin-top: .8rem; }
  .gp-payment-form input { width: 100%; }
  .gp-modal-grid { grid-template-columns: 1fr; }
}

/* Presupuestos v2 */
.gp-v2-body .gp-wrap {
  max-width: min(1840px, 98vw);
}

.gp-v2-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.gp-v2-header h1 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.gp-v2-subline {
  margin-top: .35rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}

.gp-v2-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.gp-v2-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}

.gp-v2-main,
.gp-v2-side {
  min-width: 0;
}

.gp-v2-toolbar {
  position: sticky;
  top: 68px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .8rem;
  padding: .65rem .75rem;
  margin-bottom: .75rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.gp-v2-toolbar strong {
  display: block;
  font-size: .95rem;
}

.gp-v2-toolbar span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
}

.gp-v2-items {
  display: grid;
  gap: .75rem;
}

.gp-v2-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.gp-v2-item-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  gap: 0;
}

.gp-v2-item-main {
  display: grid;
  grid-template-columns: 26px 92px minmax(0, 1fr);
  gap: .75rem;
  padding: .85rem;
  min-width: 0;
}

.gp-v2-item-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding-top: .1rem;
}

.gp-v2-drag {
  cursor: grab;
  color: #c4bcb0;
  font-size: 1.05rem;
  line-height: 1;
  user-select: none;
}

.gp-v2-drag:hover { color: var(--accent); }

.gp-v2-select {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}

.gp-v2-item.dragging {
  opacity: .55;
  outline: 2px dashed var(--accent);
}

.gp-v2-item.drop-before { box-shadow: 0 -3px 0 0 var(--accent); }
.gp-v2-item.drop-after { box-shadow: 0 3px 0 0 var(--accent); }

.gp-v2-item.selected {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.gp-v2-bulkbar {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  display: none;
  align-items: center;
  gap: .8rem;
  margin: .75rem auto 0;
  padding: .55rem .9rem;
  width: fit-content;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

.gp-v2-bulkbar.on { display: flex; }
.gp-v2-bulkbar { flex-wrap: wrap; }
.gp-v2-bulkbar strong { font-size: .88rem; }
.gp-v2-bulkbar button {
  border: 0;
  border-radius: 999px;
  padding: .35rem .8rem;
  font-size: .82rem;
  cursor: pointer;
}
.gp-v2-bulkbar .del { background: var(--neg); color: #fff; }
.gp-v2-bulkbar .clr { background: rgba(255,255,255,.18); color: #fff; }
.gp-v2-bulkbar .apply { background: var(--accent); color: #fff; }
.gp-v2-bulkbar .apply:disabled { opacity: .45; cursor: default; }

.gp-v2-bulk-fields {
  display: flex;
  align-items: center;
  gap: .4rem;
  min-width: 0;
  padding-left: .6rem;
  border-left: 1px solid rgba(255,255,255,.22);
}

.gp-v2-bulk-fields select {
  min-width: 0;
  flex: 0 1 auto;
  max-width: 150px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  padding: .3rem .6rem;
  font-size: .8rem;
}

/* El desplegable nativo hereda el fondo oscuro de la barra: las opciones necesitan
   volver al lienzo claro para seguir siendo legibles. */
.gp-v2-bulk-fields select option { background: #fff; color: var(--ink); }

.gp-v2-select-all {
  flex-direction: row;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
}

.gp-v2-select-all input { accent-color: var(--accent); cursor: pointer; }

.gp-v2-media-tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  appearance: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: #f8f5f0;
  color: var(--accent);
  cursor: pointer;
}

.gp-v2-media-tile::after {
  content: '+';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(33, 31, 28, .58);
  color: #fff;
  font-size: 1.45rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity .15s ease;
}

.gp-v2-photo-stack:empty::before {
  content: '+';
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 1.45rem;
  font-weight: 500;
}

.gp-v2-media-tile:hover,
.gp-v2-media-tile:focus-visible { border-color: var(--accent); }
.gp-v2-media-tile:hover::after,
.gp-v2-media-tile:focus-visible::after { opacity: 1; }

.gp-v2-photo-stack {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gp-v2-photo,
.gp-v2-icon-preview {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.gp-v2-photo {
  position: relative;
  border: 1px solid var(--line);
  background: #f4f1ec;
}

.gp-v2-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: .35rem;
}

.gp-v2-icon-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  background: #f8f5f0;
  color: var(--accent);
}

.gp-v2-icon-preview {
  border-style: solid;
  border: 0;
}

.gp-v2-icon-preview svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
}

.gp-v2-item-body {
  min-width: 0;
}

.gp-v2-item-top {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 28px;
  gap: .45rem;
  align-items: center;
}

.gp-v2-order {
  color: var(--muted);
  font-size: .78rem;
  text-align: center;
}

.gp-v2-title,
.gp-v2-description,
.gp-v2-tag-input,
.gp-v2-pricing input,
.gp-v2-doc-config select {
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  width: 100%;
}

.gp-v2-title {
  font-size: 1rem;
  font-weight: 700;
  padding: .3rem .35rem;
}

.gp-v2-description {
  resize: vertical;
  min-height: 44px;
  margin-top: .35rem;
  padding: .35rem;
  color: #4b4741;
  line-height: 1.35;
}

.gp-v2-title:hover,
.gp-v2-description:hover,
.gp-v2-tag-input:hover,
.gp-v2-pricing input:hover {
  border-color: var(--line);
}

.gp-v2-title:focus,
.gp-v2-description:focus,
.gp-v2-tag-input:focus,
.gp-v2-pricing input:focus,
.gp-v2-doc-config select:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}

.gp-v2-save {
  color: var(--muted);
  font-size: .72rem;
  min-width: 68px;
  text-align: right;
}
.gp-v2-save[hidden],
.gp-library-kind-empty[hidden],
.gp-library-icon-picker[hidden] { display:none !important; }

.gp-v2-save[data-state="Guardando"],
.gp-v2-save[data-state="Subiendo"] {
  color: var(--accent);
}

.gp-v2-save[data-state="Error"] {
  color: var(--neg);
}

.gp-v2-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #c8c0b5;
  width: 24px;
  height: 24px;
  padding: 0;
  cursor: pointer;
  border-radius: 6px;
}

.gp-v2-delete svg { width: 14px; height: 14px; }

.gp-v2-delete:hover {
  color: var(--neg);
  background: #f7ece9;
}

.gp-v2-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .55rem;
}

.gp-v2-chip {
  border: 1px solid var(--line);
  background: #fbfaf8;
  color: var(--muted);
  border-radius: 999px;
  padding: .28rem .52rem;
  font-size: .76rem;
  cursor: pointer;
  white-space: nowrap;
}

.gp-v2-chip:hover {
  color: var(--ink);
  border-color: #d7cec2;
}

.gp-v2-chip.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.gp-v2-location-block {
  margin-top: .35rem;
  padding-top: .3rem;
  display: flex;
  align-items: baseline;
  gap: .5rem;
  flex-wrap: wrap;
}

.gp-v2-location-label {
  color: var(--muted);
  font-size: .7rem;
  opacity: .8;
}

.gp-v2-location-label strong {
  color: var(--ink);
}

.gp-v2-location-picker {
  margin-top: .2rem;
}

.gp-v2-location-picker summary {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.gp-v2-location-picker summary::-webkit-details-marker {
  display: none;
}

.gp-v2-tag-input {
  margin-top: .45rem;
  padding: .34rem .45rem;
  font-size: .8rem;
}

.gp-v2-details {
  margin-top: .55rem;
}

.gp-v2-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: .78rem;
}

.gp-v2-icon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .45rem;
}

.gp-v2-icon-grid button {
  border: 1px solid var(--line);
  background: #fbfaf8;
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.gp-v2-icon-grid button.on,
.gp-v2-icon-grid button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.gp-v2-icon-grid svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
}

.gp-v2-pricing {
  display: grid;
  grid-template-columns: repeat(6, minmax(68px, 1fr));
  gap: .45rem;
  align-content: start;
  padding: .85rem;
  border-left: 1px solid var(--line);
  background: #fbfaf8;
}

.gp-v2-pricing label,
.gp-v2-doc-config label {
  display: grid;
  gap: .2rem;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.gp-v2-pricing input {
  padding: .34rem .38rem;
  background: #fff;
  border-color: var(--line);
  text-align: right;
  font-size: .86rem;
  font-variant-numeric: tabular-nums;
}

.gp-v2-internal label,
label.gp-v2-internal,
.gp-v2-internal {
  color: var(--interna);
}

.gp-v2-line-summary {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .65rem .85rem;
  border-top: 1px solid var(--line);
  background: #fff;
}

.gp-v2-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, auto));
  gap: .4rem 1.15rem;
}

.gp-v2-line-summary span {
  color: var(--muted);
  font-size: .74rem;
}

.gp-v2-line-summary strong {
  display: block;
  color: var(--ink);
  margin-top: .12rem;
  font-size: .88rem;
  font-variant-numeric: tabular-nums;
}

.gp-v2-line-summary strong.pos,
.gp-v2-total-row strong.pos {
  color: var(--pos);
}

.gp-v2-line-summary strong.neg,
.gp-v2-total-row strong.neg {
  color: var(--neg);
}

.gp-v2-side {
  position: sticky;
  top: 76px;
  display: grid;
  gap: .8rem;
}

.gp-v2-totals,
.gp-v2-doc-config {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.gp-v2-panel-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: .55rem;
}

.gp-v2-panel-title span {
  font-weight: 700;
}

.gp-v2-panel-title strong {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.gp-v2-total-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .28rem 0;
  color: var(--muted);
}

.gp-v2-total-row strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.gp-v2-total-final {
  border-top: 1px solid var(--line);
  margin-top: .35rem;
  padding-top: .7rem;
}

.gp-v2-total-final span,
.gp-v2-total-final strong {
  color: var(--ink);
  font-size: 1rem;
}

.gp-v2-internal-summary {
  margin-top: .8rem;
  padding: .75rem;
  border-radius: 8px;
  border: 1px solid #f0e4cd;
  background: var(--interna-bg);
}

.gp-v2-internal-summary .gp-v2-total-row {
  font-size: .86rem;
}

.gp-v2-internal-summary > div:first-child {
  color: var(--interna);
  text-transform: uppercase;
  font-size: .66rem;
  letter-spacing: .08em;
  font-weight: 800;
  margin-bottom: .25rem;
}

.gp-v2-checks {
  display: grid;
  gap: .35rem;
  margin-top: .8rem;
}

.gp-v2-checks div {
  display: flex;
  gap: .45rem;
  align-items: center;
  color: var(--muted);
  font-size: .78rem;
}

.gp-v2-checks span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pos);
  flex: 0 0 auto;
}

.gp-v2-doc-config h2 {
  font-size: .95rem;
  margin: 0 0 .75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gp-v2-doc-config .gp-v2-doc-status {
  font-size: .7rem;
  color: var(--muted);
  font-weight: 400;
}

.gp-v2-lock-notice {
  margin: -.25rem 0 1rem;
  padding: .75rem 1rem;
  border: 1px solid #e0c8a8;
  border-radius: 10px;
  background: #fbf6ed;
  color: #785b35;
  font-size: .86rem;
}

.gp-v2-item.is-locked .gp-v2-item-form {
  opacity: 1;
}

.gp-v2-item.is-locked :is(input, select, textarea, button):disabled,
.gp-v2-item.is-locked [contenteditable="false"] {
  cursor: not-allowed;
  opacity: .72;
}

.gp-v2-item.is-locked [data-drag-handle] {
  pointer-events: none;
  cursor: default;
  opacity: .45;
}

.gp-v2-item-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}

.gp-v2-item-action svg { width: 14px; height: 14px; }
.gp-v2-item-action:hover { color: var(--accent); background: var(--accent-soft); }
.gp-v2-item-action.saved { color: var(--accent); background: var(--accent-soft); }
.gp-v2-item-action.saved svg { fill: none; }

.gp-v2-doc-subtitle {
  margin: .75rem 0 .35rem;
  color: var(--muted);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gp-v2-client-preview,
.gp-v2-client-export { width: 100%; justify-content: center; margin-bottom: .65rem; }
.gp-v2-client-export { margin: .7rem 0 0; }

.gp-library-modal { width: min(860px, calc(100vw - 2rem)); padding:1.5rem; }
.gp-library-modal__head { margin:0 2.5rem 1.15rem 0; }
.gp-library-modal__head > span { color:var(--accent); font-size:.66rem; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.gp-library-modal__head h3 { margin:.2rem 0 .25rem; font-size:1.7rem; letter-spacing:-.025em; }
.gp-library-modal__head p { margin:0; color:var(--muted); font-size:.82rem; }
.gp-library-quick-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.7rem; }
.gp-library-quick-action { display:grid; grid-template-columns:42px minmax(0,1fr); align-items:center; gap:.7rem; min-width:0; padding:.85rem; border:1px solid var(--line); border-radius:11px; background:#fff; color:var(--ink); text-align:left; cursor:pointer; }
.gp-library-quick-action:hover { border-color:#c79e82; background:#fcf7f2; box-shadow:0 5px 15px rgba(48,37,29,.06); }
.gp-library-quick-action.is-primary { border-color:#292622; background:#fff; color:var(--ink); }
.gp-library-quick-action.is-primary:hover { border-color:#8f6248; background:#fcf7f2; }
.gp-library-quick-action > svg { width:42px; height:42px; padding:9px; box-sizing:border-box; border-radius:10px; background:#f2ece6; color:var(--accent); }
.gp-library-quick-action.is-primary > svg { background:#f2ece6; color:var(--accent); }
.gp-library-quick-action > span { display:grid; gap:.2rem; min-width:0; }
.gp-library-quick-action strong { font-size:.82rem; }
.gp-library-quick-action small { color:var(--muted); font-size:.68rem; line-height:1.35; }
.gp-library-quick-action.is-primary small { color:var(--muted); }
.gp-library-divider { display: flex; align-items: center; gap: .7rem; margin: 1rem 0 .7rem; color: var(--muted); font-size: .78rem; }
.gp-library-divider::before, .gp-library-divider::after { content: ""; height: 1px; background: var(--border); flex: 1; }
.gp-library-modal > input { width: 100%; margin-bottom: .65rem; }
.gp-library-list { max-height: 360px; overflow: auto; display: grid; gap: 5px; }
.gp-library-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.45rem; margin-bottom:.65rem; }
.gp-library-filters select, .gp-library-offer { min-width:0; border:1px solid var(--border); border-radius:8px; background:#fff; padding:.42rem .55rem; color:var(--ink); }
.gp-library-entry { display:grid; gap:4px; }
.gp-library-item { border: 1px solid var(--border); background: #fff; border-radius: 9px; padding: .55rem .7rem; display:grid; grid-template-columns:54px minmax(0,1fr) auto; gap:.75rem; align-items:center; text-align:left; }
.gp-library-entry .gp-library-item { width:100%; }
.gp-library-offer { margin-left:69px; width:calc(100% - 69px); font-size:.74rem; }
.gp-library-item:hover { border-color: #b89479; background: #fbf8f4; }
.gp-library-item__media { width:54px; height:54px; border-radius:9px; overflow:hidden; display:grid; place-items:center; background:#f2eee8; color:#3b3732; }
.gp-library-item__media img { width:100%; height:100%; object-fit:cover; }
.gp-library-item__media svg { width:28px; height:28px; }
.gp-library-item__copy { min-width:0; display:grid; gap:2px; }
.gp-library-item__copy strong { overflow:hidden; text-overflow:ellipsis; }
.gp-library-item__price { white-space:nowrap; }
.gp-library-item small { color: var(--muted); }
.gp-library-divider { display:flex; align-items:center; justify-content:center; gap:.65rem; }
.gp-library-divider [data-library-reset] { border:0; background:transparent; color:var(--accent); text-decoration:underline; cursor:pointer; font:inherit; }
.gp-library-kind-empty { padding:1rem; border:1px dashed var(--border); border-radius:10px; display:grid; justify-items:start; gap:.35rem; color:var(--muted); }
.gp-library-kind-empty strong { color:var(--ink); }
.gp-library-kind-empty .gp-btn { margin-top:.35rem; }
@media(max-width:700px){.gp-library-filters{grid-template-columns:1fr}.gp-library-offer{margin-left:0;width:100%}}

.gp-import-url-launch { margin-left: .45rem; }
@media (max-width:700px) {
  .gp-library-quick-actions { grid-template-columns:1fr; }
}
.gp-product-import { width: min(1180px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow-y: auto; padding: 1.35rem; }
.gp-product-import label { display: grid; gap: .35rem; color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.gp-product-import input, .gp-product-import select, .gp-product-import textarea {
  width: 100%; border: 1px solid #d9d2c9; border-radius: 7px; padding: .68rem .78rem;
  background: #fcfbf9; color: var(--ink); font: inherit; font-size: .95rem; font-weight: 400; letter-spacing: 0; text-transform: none;
}
.gp-import-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-top: .25rem; }
.gp-import-heading h3 { margin-bottom: .2rem; }
.gp-import-heading p { margin: 0; color: var(--muted); font-size: .86rem; }
.gp-import-status { border: 1px solid #cddfc9; border-radius: 999px; padding: .35rem .65rem; color: #52724a; background: #f2f8f0; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.gp-import-status.is-warning { border-color: #ead2a8; color: #8b5c20; background: #fff8e8; }
.gp-import-preview-grid { display: grid; grid-template-columns: 275px minmax(0, 1fr); gap: 1.35rem; margin-top: 1.1rem; align-items: start; }
.gp-import-image-card { display: grid; gap: .7rem; }
.gp-import-image { min-height: 295px; border: 1px dashed #cfc6bb; border-radius: 11px; display: grid; place-items: center; align-content: center; gap: .35rem; overflow: hidden; background: #f8f7f4; color: #9b8b78; }
.gp-import-image img { width: 100%; height: 100%; max-height: 320px; object-fit: contain; background: #fff; }
.gp-import-image small { font-size: .72rem; color: #b1a393; }
.gp-import-image.has-image small { display:none; }
.gp-import-image.is-dragging { border-color:var(--accent); background:var(--accent-soft); }
.gp-import-image-picker { display:grid; gap:.4rem; }
.gp-import-image-picker[hidden] { display:none; }
.gp-import-image-picker > span { color:var(--muted); font-size:.68rem; font-weight:700; }
.gp-import-image-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.45rem; }
.gp-import-image-options button { aspect-ratio:1; min-width:0; overflow:hidden; border:1px solid #d8d1c8; border-radius:9px; padding:3px; background:#fff; cursor:pointer; }
.gp-import-image-options button:hover { border-color:#b9957d; }
.gp-import-image-options button.is-selected { border-color:var(--accent); background:var(--accent-soft); box-shadow:0 0 0 1px var(--accent); }
.gp-import-image-options button[hidden] { display:none; }
.gp-import-image-options img { display:block; width:100%; height:100%; border-radius:6px; object-fit:cover; }
.gp-import-image-actions { display:grid; grid-template-columns:1fr 1fr; gap:.45rem; }
.gp-import-image-actions .gp-btn { padding:.55rem .65rem; font-size:.72rem; }
.gp-import-image-actions .danger { color:var(--neg); }
.gp-import-image-actions [hidden] { display:none !important; }
.gp-import-image-url input { font-size: .78rem; }
.gp-import-image-help { margin:-.25rem 0 0; color:var(--muted); font-size:.68rem; line-height:1.4; }
.gp-media-drop-help { margin: -.25rem 0 .5rem; text-align: center; }
.gp-v2-media-current.is-dragging { border-color: var(--accent); background: var(--accent-soft); }
.gp-import-fields { display: grid; gap: .8rem; min-width: 0; }
.gp-import-section { display: grid; gap: .75rem; padding: 1rem; border: 1px solid #e2dbd3; border-radius: 10px; background: #fff; }
.gp-import-section-heading { display: flex; align-items: center; gap: .65rem; margin-bottom: .15rem; }
.gp-import-section-heading h4 { margin: 0; color: var(--ink); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.gp-import-section-heading p { margin: .18rem 0 0; color: var(--muted); font-size: .76rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.gp-import-section-number { display: grid; place-items: center; width: 1.65rem; height: 1.65rem; border-radius: 50%; background: #f2ebe4; color: #96745a; font-size: .7rem; font-weight: 800; }
.gp-import-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.gp-import-description-tools { display:flex; flex-wrap:wrap; align-items:center; gap:.45rem; margin-top:-.3rem; }
.gp-import-description-tools[hidden] { display:none; }
.gp-import-description-tools span { flex:1 1 220px; color:var(--muted); font-size:.7rem; }
.gp-import-description-tools button { border:0; border-bottom:1px solid currentColor; padding:.15rem 0; background:transparent; color:var(--accent); font:inherit; font-size:.7rem; font-weight:750; cursor:pointer; }
.gp-import-description-tools .gp-description-improve,
.gp-library-description-head .gp-description-improve { display:inline-flex; align-items:center; gap:.38rem; border:1px solid #d8c3b3; border-radius:8px; padding:.48rem .65rem; background:#fff8f2; color:var(--accent); font:inherit; font-size:.7rem; font-weight:750; line-height:1; cursor:pointer; white-space:nowrap; }
.gp-description-improve svg { width:17px; height:17px; flex:0 0 17px; }
.gp-description-improve:hover { border-color:var(--accent); background:var(--accent-soft); }
.gp-description-improve:disabled { opacity:.55; cursor:wait; }
.gp-import-financial-grid { display: grid; grid-template-columns: .65fr 1.35fr .9fr .9fr .8fr 1fr 1fr 1.2fr; border: 1px solid #e4c1ad; border-radius: 9px; overflow: hidden; background: #fcfbfa; }
.gp-import-financial-grid > * { min-width: 0; min-height: 74px; padding: .65rem .7rem; border-right: 1px solid #e3dbd3; }
.gp-import-financial-grid > *:last-child { border-right: 0; }
.gp-import-financial-grid label { background: #fff; }
.gp-import-financial-grid input, .gp-import-financial-grid select { margin-top: auto; padding: .3rem 0 0; border: 0; background: transparent; font-size: .98rem; }
.gp-import-financial-grid input:focus, .gp-import-financial-grid select:focus { outline: 0; box-shadow: none; }
.gp-import-field--internal { color: #8b755f !important; }
.gp-import-net-price { background:#fff8f2 !important; box-shadow:inset 0 -3px 0 rgba(171,93,49,.28); color:var(--accent) !important; }
.gp-import-net-price input { color:var(--ink); font-weight:750; }
.gp-import-calculated { display: grid; align-content: center; gap: .35rem; text-align: right; background: #faf8f5; }
.gp-import-calculated span { color: #8c8277; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.gp-import-calculated strong { color: var(--ink); font-size: 1.02rem; font-weight: 700; white-space: nowrap; }
.gp-import-calculated--total { background: #fdf5f0; }
.gp-import-calculated--total strong { color: #bd5d25; font-size: 1.15rem; }
.gp-import-calculation-note { margin: 0; color: #a08e79; font-size: .75rem; text-align: right; }
.gp-import-source { background:#fbfaf8; }
.gp-import-source-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.gp-import-source-grid input[readonly] { background:#f1eee9; color:var(--muted); cursor:default; }
.gp-import-master-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:.7rem; }
.gp-import-master-card { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:.65rem; padding:.8rem; border:1px solid #ded5cc; border-radius:9px; background:#fff; }
.gp-import-master-card > div { grid-column:1 / -1; display:flex; align-items:baseline; gap:.6rem; }
.gp-import-master-card > div strong { color:var(--ink); font-size:.82rem; }
.gp-import-master-card > div span { color:var(--muted); font-size:.68rem; }
.gp-import-master-card .gp-import-create-master { grid-column:1 / -1; padding:.35rem .45rem; border-radius:6px; background:#f7f3ee; color:var(--ink); font-size:.7rem; }
.gp-import-source-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.7rem 1rem; padding-top:.15rem; }
.gp-import-source-actions > span { flex:1 1 260px; color:var(--muted); font-size:.7rem; line-height:1.35; }
.gp-import-apply-calculation { border:1px solid var(--accent); border-radius:8px; padding:.6rem .8rem; background:var(--accent); color:#fff; font:inherit; font-size:.74rem; font-weight:750; cursor:pointer; }
.gp-import-apply-calculation:hover { filter:brightness(.95); }
.gp-import-create-master { display: flex !important; grid-template-columns: none; align-items: center; gap: .45rem !important; }
.gp-import-create-master input { width: auto; }
.gp-import-error { margin-top: .75rem; padding: .7rem .8rem; border-radius: 8px; color: #842029; background: #f8d7da; }
.gp-import-warnings { margin: .75rem 0; padding: .55rem .75rem; border-radius: 8px; background: #fff3cd; color: #664d03; }
.gp-import-warnings p { margin: .2rem 0; }
.gp-import-progress { color: var(--muted); font-size: .8rem; }
.gp-import-progress span { display: inline-block; width: .8rem; height: .8rem; margin-right: .35rem; border: 2px solid #d5c6ba; border-top-color: #795b45; border-radius: 50%; animation: gp-spin .8s linear infinite; }
@keyframes gp-spin { to { transform: rotate(360deg); } }
.gp-proforma-create-modal { width: min(760px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; }
.gp-proforma-create-head { padding-right: 2.5rem; }
.gp-proforma-create-head h3 { margin: .15rem 0 .35rem; }
.gp-proforma-create-head p { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.5; }
.gp-proforma-create-eyebrow { color: var(--accent); font-size: .68rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.gp-proforma-create-impact { display: flex; gap: .7rem; align-items: flex-start; margin: 1.15rem 0; padding: .8rem .9rem; border: 1px solid #ead8ca; border-radius: 10px; background: #fff8f2; color: #75553e; font-size: .82rem; line-height: 1.45; }
.gp-proforma-create-impact svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; }
.gp-proforma-scope { margin: 0; padding: 0; border: 0; }
.gp-proforma-scope legend { margin-bottom: .55rem; color: var(--ink); font-size: .78rem; font-weight: 800; }
.gp-proforma-scope-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.gp-modal .gp-proforma-scope-option { display: flex; grid-template-columns: none; gap: .65rem; align-items: flex-start; min-height: 78px; padding: .75rem .8rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; }
.gp-modal .gp-proforma-scope-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(171, 93, 49, .1); background: #fffbf8; }
.gp-proforma-scope-option input { flex: 0 0 auto; margin-top: .2rem; accent-color: var(--accent); }
.gp-proforma-scope-option span { display: grid; gap: .2rem; color: var(--ink); }
.gp-proforma-scope-option small { color: var(--muted); font-weight: 500; line-height: 1.35; }
.gp-proforma-items { margin-top: 1rem; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.gp-proforma-items-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .8rem; border-bottom: 1px solid var(--border); background: #faf8f5; }
.gp-proforma-items-head > div { display: grid; gap: .12rem; }
.gp-proforma-items-head small { color: var(--muted); font-size: .7rem; }
.gp-modal .gp-proforma-select-all { display: flex; grid-template-columns: none; align-items: center; gap: .35rem; color: var(--ink); font-size: .74rem; font-weight: 750; white-space: nowrap; }
.gp-proforma-line-list { max-height: 280px; overflow: auto; display: grid; }
.gp-modal .gp-proforma-line-list label { display: flex; grid-template-columns: none; align-items: center; gap: .65rem; padding: .7rem .8rem; border-bottom: 1px solid #eee9e4; color: var(--ink); cursor: pointer; }
.gp-proforma-line-list label:last-child { border-bottom: 0; }
.gp-proforma-line-list label:hover { background: #fdfbf9; }
.gp-proforma-line-list span { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex: 1; }
.gp-proforma-line-list small { color: var(--muted); font-weight: 600; white-space: nowrap; }
.gp-proforma-items.is-readonly .gp-proforma-line-list { pointer-events: none; }
.gp-proforma-items.is-readonly .gp-proforma-line-list input { opacity: .55; }
.gp-proforma-create-summary { margin-top: .8rem; padding: .8rem .9rem; border-radius: 10px; background: #f5f2ee; }
.gp-proforma-create-summary > div { display: flex; justify-content: space-between; gap: 1rem; color: var(--ink); }
.gp-proforma-create-summary > div strong { font-size: 1.05rem; }
.gp-proforma-create-summary p { margin: .3rem 0 0; color: var(--muted); font-size: .75rem; }
.gp-proforma-create-error { margin: .75rem 0 0; padding: .65rem .75rem; border-radius: 8px; color: #842029; background: #f8d7da; font-size: .8rem; }
.gp-proforma-create-modal .gp-modal-actions { margin-top: 1rem; }
.gp-proforma-create-modal .gp-modal-actions .primary:disabled { opacity: .45; cursor: not-allowed; }
.gp-derived-documents { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin: .35rem 0 .9rem; font-size: .78rem; }
.gp-derived-documents a { border: 1px solid var(--border); border-radius: 999px; padding: .25rem .55rem; }
.gp-payment-unit { display: flex; align-items: center; min-width: 0; border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: hidden; }
.gp-payment-unit input { min-width: 0; border: 0 !important; border-radius: 0 !important; }
.gp-payment-unit b { padding: 0 .55rem; color: var(--muted); }

.gp-v2-doc-config select {
  border-color: var(--line);
  background: #fff;
  padding: .42rem .5rem;
  font-size: .84rem;
  text-transform: none;
  letter-spacing: 0;
}

@media (max-width: 760px) {
  .gp-proforma-scope-grid { grid-template-columns: 1fr; }
  .gp-proforma-items-head, .gp-proforma-line-list span { align-items: flex-start; }
  .gp-proforma-line-list span { display: grid; gap: .15rem; }
  .gp-import-preview-grid { grid-template-columns: 1fr; }
  .gp-import-image { min-height: 150px; }
  .gp-import-two, .gp-import-source-grid, .gp-import-master-grid { grid-template-columns: 1fr; }
  .gp-import-financial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gp-import-financial-grid > * { border-bottom: 1px solid #e3dbd3; }
  .gp-import-financial-grid > *:nth-child(2n) { border-right: 0; }
}

@media (min-width: 761px) and (max-width: 1000px) {
  .gp-import-financial-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gp-import-financial-grid > *:nth-child(4n) { border-right: 0; }
  .gp-import-source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.gp-v2-doc-config p {
  margin: .65rem 0 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.45;
}

.gp-v2-payments .gp-section-card {
  margin-top: 1rem;
}

@media (max-width: 1180px) {
  .gp-v2-layout {
    grid-template-columns: 1fr;
  }

  .gp-v2-side {
    position: static;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  }
}

@media (max-width: 920px) {
  .gp-v2-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .gp-v2-actions {
    justify-content: flex-start;
  }

  .gp-v2-item-form {
    grid-template-columns: 1fr;
  }

  .gp-v2-pricing {
    border-left: 0;
    border-top: 1px solid var(--line);
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gp-v2-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .gp-v2-toolbar {
    position: static;
  }

  .gp-v2-item-main {
    grid-template-columns: 1fr;
  }

  .gp-v2-photo-stack {
    grid-template-columns: repeat(4, 42px);
  }

  .gp-v2-pricing,
  .gp-v2-line-summary {
    grid-template-columns: 1fr 1fr;
  }

  .gp-v2-line-summary span {
    min-width: 0;
  }
}

/* V2 compact pass */
.gp-v2-items {
  gap: .55rem;
}

.gp-v2-item-form {
  grid-template-columns: minmax(0, 1fr);
}

.gp-v2-item-main {
  grid-template-columns: 24px 72px minmax(0, 1fr);
  grid-template-rows: auto;
  column-gap: .55rem;
  padding: .62rem .72rem;
  align-items: center;
}

.gp-v2-item-controls {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  padding-top: 0;
}

.gp-v2-order {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
}

.gp-v2-media-tile {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: center;
}

.gp-v2-pricing {
  grid-column: 1;
  border-top: 1px solid var(--line);
  border-left: 0;
  grid-template-columns: minmax(56px, .75fr) minmax(92px, 1.15fr) minmax(92px, 1fr) minmax(92px, 1fr) minmax(72px, .8fr) minmax(100px, 1fr) minmax(110px, 1.1fr);
}

.gp-v2-item-body {
  grid-column: 3;
  grid-row: 1;
}

.gp-v2-photo-stack {
  width: 100%;
  height: 100%;
}

.gp-v2-photo,
.gp-v2-icon-preview,
.gp-v2-logo-preview {
  width: 100%;
  height: 100%;
}

.gp-v2-logo-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.gp-v2-logo-preview img {
  width: 32px;
  height: auto;
  display: block;
}

.gp-v2-item-top {
  grid-template-columns: minmax(0, 1fr) auto;
}

.gp-v2-item-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.gp-v2-title {
  font-size: .92rem;
  padding: .18rem .25rem;
}

.gp-v2-description-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .45rem;
  align-items: start;
  margin-top: .22rem;
  min-height: 46px;
  padding: .22rem .28rem;
  border-radius: 7px;
  cursor: text;
}

.gp-v2-description-preview:hover {
  background: #fbfaf8;
}

.gp-v2-description-preview [data-description-preview] {
  margin: 0;
  color: #5b554e;
  font-size: .78rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  outline: none;
  border-radius: 5px;
}

.gp-v2-description-preview [data-description-preview]:hover {
  background: #fbfaf8;
}

.gp-v2-description-preview [data-description-preview]:focus {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--accent);
  padding: 2px 4px;
  margin: -2px -4px;
}

.gp-v2-description-preview [data-description-preview]:empty:before {
  content: attr(data-placeholder);
  color: #a8a29a;
}

.gp-v2-description-preview [data-description-preview] p,
.gp-v2-description-preview [data-description-preview] ul,
.gp-v2-description-preview [data-description-preview] ol {
  margin: 0;
}

.gp-v2-description-preview [data-description-preview] ul,
.gp-v2-description-preview [data-description-preview] ol {
  padding-left: 1rem;
}

.gp-v2-description-preview button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  padding: .08rem 0;
  white-space: nowrap;
  cursor: pointer;
}

.gp-v2-items-filter {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-left: auto;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.gp-v2-items-filter select {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: .38rem .5rem;
  background: #fff;
  color: var(--ink);
  font-size: .78rem;
  text-transform: none;
}

.gp-v2-items-filter + .gp-v2-items-filter { margin-left: 0; }

.gp-v2-hidden-description {
  display: none;
}

.gp-v2-location-block {
  margin-top: .32rem;
  padding-top: .36rem;
}

.gp-v2-chip-row.gp-v2-location-chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: .1rem;
}

.gp-v2-chip {
  padding: .22rem .45rem;
  font-size: .71rem;
}

.gp-v2-tag-input {
  margin-top: .25rem;
  padding: .22rem .36rem;
  font-size: .74rem;
}

.gp-v2-pricing {
  grid-template-columns:minmax(56px,.62fr) minmax(105px,1fr) minmax(62px,.5fr) minmax(112px,1fr) minmax(140px,1.2fr) minmax(112px,1fr);
  padding: .62rem .65rem;
  gap: .38rem;
}

.gp-v2-pricing label {
  font-size: .57rem;
  min-width: 0;
  white-space: nowrap;
}

.gp-v2-pricing label > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .2rem;
}

.gp-v2-unit-select {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.gp-v2-iva-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: .28rem .32rem;
  background: #fff;
  color: var(--ink);
  font-size: .76rem;
  text-align: right;
}

.gp-v2-pricing input {
  padding: .28rem .32rem;
  font-size: .76rem;
  text-align: right;
}

.gp-v2-price-output {
  display: grid;
  align-content: end;
  min-width: 0;
  border: 1px solid #ead7c7;
  border-radius: 8px;
  padding: .32rem .42rem;
  background: #fffaf5;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.gp-v2-price-output span {
  color: var(--muted);
  font-size: .54rem;
  white-space: nowrap;
  font-weight: 700;
  text-transform: uppercase;
}

.gp-v2-price-output strong {
  color: var(--accent);
  font-size: .8rem;
  line-height: 1.15;
}

.gp-v2-price-output.tc {
  background: #fff;
  border-color: var(--accent);
}

.gp-v2-price-output.tc strong {
  color: var(--ink);
  font-size: .92rem;
  font-weight: 800;
}

.gp-v2-line-summary {
  padding: .45rem .72rem;
}

.gp-v2-line-summary strong {
  font-size: .82rem;
}

.gp-v2-line-summary .gp-v2-internal {
  background: var(--interna-bg);
  border: 1px solid #f0e4cd;
  border-radius: 7px;
  padding: .22rem .35rem;
}

.gp-v2-doc-config form {
  display: grid;
  gap: .65rem;
}

.gp-v2-doc-default-note {
  margin: 0 0 .45rem;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.4;
}

.gp-v2-doc-config textarea,
.gp-v2-rich-editor,
.gp-v2-description-modal input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .55rem .6rem;
  background: #fff;
  color: var(--ink);
  font-size: .86rem;
}

.gp-v2-rich-editor {
  min-height: 220px;
  max-height: 42vh;
  overflow: auto;
  line-height: 1.45;
  font-weight: 400;
  outline: none;
}

.gp-v2-received {
  display: grid;
  gap: .3rem;
  margin-top: .65rem;
  padding-top: .6rem;
  border-top: 1px solid var(--line);
}

.gp-v2-received-title {
  color: var(--interna);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.gp-v2-received-row {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  color: var(--muted);
  font-size: .72rem;
}

.gp-v2-received-row strong { color: var(--ink); }

.gp-v2-rich-editor:focus {
  border-color: var(--accent);
}

.gp-v2-rich-editor p {
  margin: 0 0 .65rem;
}

.gp-v2-rich-editor ul,
.gp-v2-rich-editor ol {
  margin: 0 0 .65rem;
  padding-left: 1.35rem;
}

.gp-v2-doc-status {
  color: var(--muted);
  font-size: .74rem;
  text-align: right;
}

.gp-v2-doc-status[data-state="Guardando"] {
  color: var(--accent);
}

.gp-v2-doc-status[data-state="Error"] {
  color: var(--neg);
}

.gp-v2-switch {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row;
  align-items: center;
  gap: .45rem !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: .82rem !important;
  color: var(--ink) !important;
}

.gp-v2-switch input {
  width: 16px;
  height: 16px;
}

.gp-v2-media-modal,
.gp-v2-description-modal {
  width: min(900px, calc(100vw - 2rem));
  border: 0;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 30px 90px rgba(0,0,0,.28);
}

.gp-v2-media-modal::backdrop,
.gp-v2-description-modal::backdrop {
  background: rgba(0,0,0,.46);
}

.gp-v2-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.gp-v2-dialog-head h3 {
  margin: 0;
  font-size: 1.7rem;
}

.gp-v2-dialog-head button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.55rem;
  cursor: pointer;
}

.gp-v2-media-current {
  min-height: 180px;
  border: 1px dashed #c8beb2;
  border-radius: 8px;
  background: #f8f5f0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: var(--muted);
}

.gp-v2-media-current .gp-v2-photo,
.gp-v2-media-current .gp-v2-icon-preview,
.gp-v2-media-current .gp-v2-logo-preview {
  width: 112px;
  height: 112px;
}

.gp-v2-media-current .gp-v2-icon-preview svg {
  width: 54px;
  height: 54px;
}

.gp-v2-media-current .gp-v2-logo-preview img {
  width: 92px;
}

.gp-v2-media-menu {
  margin-top: .9rem;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.gp-v2-media-menu > button,
.gp-v2-media-menu summary {
  width: 100%;
  border: 0;
  background: #fff;
  color: var(--ink);
  text-align: left;
  padding: .72rem .9rem;
  cursor: pointer;
  list-style: none;
}

.gp-v2-media-menu > button.danger {
  color: var(--neg);
}

.gp-v2-media-menu > button:hover,
.gp-v2-media-menu summary:hover {
  background: #f7f3ee;
}

.gp-v2-media-menu details[open] summary {
  background: #f7f3ee;
}

.gp-v2-media-menu .gp-v2-icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 60px);
  gap: .9rem 1rem;
  padding: 1rem .9rem;
  background: #fff;
}

.gp-v2-media-menu .gp-v2-icon-grid button {
  width: 60px;
  height: 60px;
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  background: #eeebe5;
  color: #111;
}

.gp-v2-media-menu .gp-v2-icon-grid button.on,
.gp-v2-media-menu .gp-v2-icon-grid button:hover {
  background: #e6e1d9;
  color: #111;
  outline: 2px solid #111;
  outline-offset: 2px;
}

.gp-v2-media-menu .gp-v2-icon-grid svg {
  width: 27px;
  height: 27px;
}

.gp-v2-media-menu .gp-v2-icon-grid button img {
  display:block;
  width:42px !important;
  height:28px !important;
  max-width:42px !important;
  max-height:28px !important;
  object-fit:contain;
}

.gp-v2-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: .7rem;
  margin-top: 1.2rem;
}

.gp-v2-dialog-actions > button:not(.gp-btn) {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.gp-v2-description-modal label {
  display: grid;
  gap: .25rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: .7rem;
}

.gp-v2-rich-toolbar {
  display: flex;
  gap: .35rem;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  padding: .45rem .55rem;
  color: var(--ink);
  font-weight: 700;
}

.gp-v2-rich-toolbar button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  border-radius: 6px;
  min-width: 30px;
  height: 30px;
  padding: 0 .45rem;
  font-size: .8rem;
  font-weight: 800;
  cursor: pointer;
}

.gp-v2-rich-toolbar button:hover {
  border-color: var(--line);
  background: #f7f3ee;
}

.gp-pay-inline {
  display: inline-block;
  margin-left: .55rem;
}

.gp-link-btn.danger {
  color: var(--neg);
}

@media (max-width: 920px) {
  .gp-v2-item-form {
    grid-template-columns: 1fr;
  }

  .gp-v2-pricing {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .gp-v2-item-main {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .gp-v2-item-controls,
  .gp-v2-media-tile,
  .gp-v2-item-body {
    grid-column: 1;
    grid-row: auto;
  }

  .gp-v2-item-controls {
    flex-direction: row;
    justify-content: flex-start;
  }

  .gp-v2-media-tile {
    justify-items: start;
  }

  .gp-v2-pricing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Tarjeta de Item (jul-2026): etiquetas libres, tipo de documento, visibilidad por
   campo y panel de información interna colapsable. */
.gp-v2-tags-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: nowrap;
  padding: .35rem .72rem;
  border-top: 1px solid var(--line);
}

.gp-v2-tags-row .gp-v2-tag-input {
  width: auto;
  flex: 0 1 130px;
  min-width: 0;
}

.gp-v2-tags-row .gp-v2-tag-select {
  width: auto;
  max-width: 230px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: .38rem .5rem;
  background: #fff;
  color: var(--ink);
}

.gp-v2-items.is-view-sorted [data-drag-handle] {
  opacity: .25;
  cursor: not-allowed;
}

.gp-v2-item-body > .gp-v2-chip-row {
  margin-top: .4rem;
}

.gp-v2-chip.doctype {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
}

.gp-v2-chip.doctype[hidden] { display: none; }
.gp-v2-chip.doctype svg { width: 11px; height: 11px; }
.gp-v2-chip.doctype.pedido { background: var(--doc-pedido-bg); color: var(--doc-pedido); border-color: #c9ddef; }
.gp-v2-chip.doctype.factura { background: var(--doc-factura-bg); color: var(--doc-factura); border-color: #eac9ba; }

.gp-v2-chip button[data-remove-tag] {
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0;
  margin-left: .3rem;
  cursor: pointer;
  font-size: .85em;
  line-height: 1;
  padding: 0;
}

.gp-v2-chip:hover button[data-remove-tag] { opacity: .7; }
.gp-v2-chip button[data-remove-tag]:hover { opacity: 1; }

.gp-v2-doctype-select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .22rem .4rem;
  background: #fff;
  color: var(--muted);
  font-size: .72rem;
  flex-shrink: 0;
}

.gp-v2-advanced-toggle {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  font-size: .74rem;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

.gp-v2-field {
  position: relative;
}

.gp-v2-field-corner {
  position: absolute;
  top: -7px;
  right: -3px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 3px;
  box-shadow: 0 1px 2px rgba(33,31,28,.08);
}

.gp-v2-field-corner .gp-v2-unit-select {
  font-size: .62rem;
  font-weight: 700;
  color: var(--accent);
  padding: 0 1px;
}

.gp-v2-field-corner .gp-v2-lock {
  font-size: .68rem;
}

.gp-v2-field-corner .gp-v2-vis-toggle {
  width: 15px;
  height: 15px;
  background: transparent;
}

.gp-v2-field-corner .gp-v2-vis-toggle.off { background: transparent; }
.gp-v2-field-corner .gp-v2-unit-select + .gp-v2-vis-toggle { margin-left: 1px; }

.gp-v2-vis-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 5px;
  vertical-align: -4px;
}

.gp-v2-vis-toggle:hover { background: #e9dccb; }

.gp-v2-vis-toggle.off {
  color: var(--muted);
  background: #f0eeeb;
}

.gp-v2-eye {
  width: 13px;
  height: 13px;
}

.gp-v2-eye .eye-slash { opacity: 0; }
.gp-v2-vis-toggle.off .eye-open { opacity: .35; }
.gp-v2-vis-toggle.off .eye-slash { opacity: 1; }

.gp-v2-lock {
  font-style: normal;
  font-size: .8em;
  opacity: .8;
  cursor: help;
}

/* Header del editor y jerarquía de controles de la tarjeta */
.gp-v2-body { background: #eeece6; }
.gp-v2-header {
  align-items: center;
  margin-bottom: .85rem;
}
.gp-v2-context { min-width: 0; }
.gp-v2-context .gp-project-document-nav { margin-bottom:0; }
.gp-v2-breadcrumb {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: #6b665a;
  font-size: .82rem;
  line-height: 1.2;
}
.gp-v2-breadcrumb strong { color: var(--ink); font-weight: 700; }
.gp-v2-breadcrumb-caret { color: #9c9689; font-size: .58rem; }
.gp-v2-saved-state {
  display: flex;
  align-items: center;
  gap: .38rem;
  margin-top: .32rem;
  color: #9c9689;
  font-size: .75rem;
}
.gp-v2-saved-state [data-header-save-state] { color: #9c9689; }
.gp-v2-saved-state [data-header-save-icon] { color: var(--pos); font-size: .9rem; }
.gp-v2-saved-state [data-header-save-state][data-state="Guardando"] { color: var(--accent); }
.gp-v2-saved-state [data-header-save-state][data-state="Error"] { color: var(--neg); }
.gp-v2-breadcrumb > a { color: #6b665a; text-decoration: none; }
.gp-v2-breadcrumb > a:hover { color: var(--accent); text-decoration: underline; }
.gp-v2-breadcrumb-menu { position: relative; }
.gp-v2-breadcrumb-menu summary { display: flex; align-items: center; gap: .45rem; cursor: pointer; list-style: none; }
.gp-v2-breadcrumb-menu summary::-webkit-details-marker { display: none; }
.gp-v2-breadcrumb-menu[open] .gp-v2-breadcrumb-caret { transform: rotate(180deg); }
.gp-v2-breadcrumb-popover { position: absolute; top: calc(100% + .55rem); left: -.7rem; z-index: 30; display: grid; min-width: 245px; padding: .35rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 12px 30px rgba(33,31,28,.14); }
.gp-v2-breadcrumb-popover a { display: grid; gap: .1rem; padding: .55rem .65rem; border-radius: 7px; color: var(--ink); text-decoration: none; }
.gp-v2-breadcrumb-popover a:hover,
.gp-v2-breadcrumb-popover a.current { background: var(--accent-soft); }
.gp-v2-breadcrumb-popover small { color: var(--muted); font-size: .7rem; }
.gp-v2-actions { align-items: center; }
.gp-v2-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #6b665a;
  font: inherit;
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
}
.gp-v2-icon-action svg { width: 17px; height: 17px; }
.gp-v2-icon-action:hover,
.gp-v2-icon-action:focus-visible { color: var(--accent); border-color: #d7c2b2; background: #fffaf5; }
.gp-v2-icon-action.is-disabled,
.gp-v2-icon-action.is-disabled:hover { opacity: .48; cursor: not-allowed; color: #6b665a; background: #fff; border-color: var(--line); }
.gp-v2-action-divider { width: 1px; height: 24px; margin: 0 .15rem; background: var(--line); }
.gp-v2-info-card {
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.gp-v2-info-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.35rem;
  cursor: pointer;
  list-style: none;
}
.gp-v2-info-summary::-webkit-details-marker { display: none; }
.gp-v2-info-title { font-size: 1rem; font-weight: 700; }
.gp-v2-info-caret { display: inline-block; margin-left: .3rem; color: #9c9689; font-size: .68rem; transition: transform .15s ease; }
.gp-v2-info-card:not([open]) .gp-v2-info-caret { transform: rotate(180deg); }
.gp-v2-info-edit {
  border: 0;
  padding: 0;
  background: transparent;
  color: #c9c3b6;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.gp-v2-info-edit:hover { color: var(--accent); }
.gp-v2-info-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  padding: 0 1.35rem 1.25rem;
}
.gp-v2-info-content [hidden] { display: none; }
.gp-v2-party { display: flex; gap: .9rem; min-width: 0; }
.gp-v2-company-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: #f7f1e6;
  color: var(--accent);
  font-size: .8rem;
  font-weight: 800;
}
.gp-v2-company-mark img { width: 84%; height: 84%; object-fit: contain; }
.gp-v2-party-copy,
.gp-v2-bill-to { display: grid; align-content: start; gap: .12rem; min-width: 0; color: #6b665a; font-size: .82rem; line-height: 1.45; }
.gp-v2-party-copy strong,
.gp-v2-party-heading strong { color: var(--ink); font-size: 1rem; }
.gp-v2-party-copy span,
.gp-v2-bill-to > span,
.gp-v2-bill-to a { overflow-wrap: anywhere; }
.gp-v2-bill-to a { color: var(--accent); text-decoration: none; }
.gp-v2-bill-to a:hover { text-decoration: underline; }
.gp-v2-party-heading { display: flex; align-items: center; gap: .35rem; margin-bottom: .08rem; }
.gp-v2-party-edit { margin-left: auto; color: #c9c3b6; font-size: .9rem; text-decoration: none; }
.gp-v2-party-edit:hover { color: var(--accent); }
.gp-v2-info-divider { height: 1px; margin: 0 1.35rem; background: #f0ede4; }
.gp-v2-budget-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.35rem;
}
.gp-v2-budget-title { display: block; width: min(420px, 100%); margin: 0; padding: .1rem .2rem; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); font: inherit; font-size: 1.65rem; font-weight: 700; line-height: 1.1; }
.gp-v2-budget-title:hover { border-color: var(--line); }
.gp-v2-budget-title:focus { outline: none; border-color: var(--accent); background: #fff; }
.gp-v2-budget-number { display: flex; align-items: center; gap: .7rem; margin-top: .55rem; color: #9c9689; font-size: .82rem; }
.gp-v2-budget-number strong { color: #4a463d; }
.gp-v2-status-pill { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .65rem; border: 1px solid #ead8c8; border-radius: 8px; background: #fff3e9; color: var(--accent); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.gp-v2-status-pill:focus { outline: 2px solid #b3502155; outline-offset: 1px; }
.gp-v2-status-pill.aprobado { background: #eaf7ee; border-color: #c5e4cf; color: var(--pos); }
.gp-v2-status-pill.enviado { background: #e7eef5; border-color: #cfdeee; color: #3d6ea5; }
.gp-v2-date-fields { display: flex; gap: 1.25rem; }
.gp-v2-date-fields label { display: grid; gap: .38rem; color: #9c9689; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.gp-v2-date-fields input { min-width: 150px; padding: .58rem .7rem; border: 1px solid var(--line); border-radius: 9px; color: #4a463d; background: #fff; font: inherit; font-size: .9rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.gp-v2-date-fields input:focus { outline: 2px solid #b3502155; border-color: var(--accent); }
.gp-v2-emisor-modal { width: min(620px, calc(100vw - 2rem)); border: 0; border-radius: 14px; padding: 1.35rem; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.gp-v2-emisor-modal::backdrop { background: rgba(0,0,0,.46); }
.gp-v2-emisor-modal h3 { margin: 0; font-size: 1.2rem; }
.gp-v2-emisor-modal > p { margin: 0 0 1rem; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.gp-v2-emisor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.gp-v2-emisor-grid label { display: grid; gap: .28rem; color: var(--muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.gp-v2-emisor-grid input { width: 100%; padding: .52rem .6rem; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fbfaf8; font: inherit; font-size: .84rem; text-transform: none; }
.gp-v2-emisor-modal .gp-v2-dialog-actions { display: flex; justify-content: flex-end; margin-top: 1rem; }

.gp-v2-field-label { display: flex !important; align-items: center; justify-content: space-between; gap: .25rem; min-height: 18px; }
.gp-v2-field-tools { display: inline-flex; align-items: center; justify-content: flex-end; gap: .15rem; color: var(--accent); font-size: .75rem; }
.gp-v2-field-hint { color: var(--accent); font-size: .7rem; font-weight: 800; }
.gp-v2-field-tools .gp-v2-unit-select { color: var(--accent); font-size: .7rem; font-weight: 800; }
.gp-v2-field-tools .gp-v2-vis-toggle { width: 17px; height: 17px; background: transparent; }
.gp-v2-field-tools .gp-v2-vis-toggle:hover { background: var(--accent-soft); }
.gp-v2-field-tools .gp-v2-lock { color: var(--interna); font-size: .72rem; }

/* Editor de detalles generales: una sola entrada desde el lápiz de información. */
.gp-v2-general-modal {
  width: min(960px, calc(100vw - 2rem));
  max-height: min(820px, calc(100vh - 2rem));
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 30px 90px rgba(0,0,0,.3);
  overflow: hidden;
}
.gp-v2-general-modal::backdrop { background: rgba(0,0,0,.48); }

/* Editor documental: controles y la salida A4 real comparten una sola superficie. */
.gp-doc-editor {
  width: min(1500px, calc(100vw - 2rem));
  height: min(920px, calc(100vh - 2rem));
  padding: 0;
  border: 0;
  border-radius: 16px;
  color: var(--ink);
  background: #f4f1ec;
  box-shadow: 0 30px 90px rgba(0,0,0,.32);
  overflow: hidden;
}
.gp-doc-editor::backdrop { background: rgba(24,22,20,.58); }
.gp-doc-editor-head {
  min-height: 74px;
  padding: .9rem 1.15rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.gp-doc-editor-head h2 { margin: 0; font-size: 1.15rem; }
.gp-doc-editor-head p { margin: .15rem 0 0; color: var(--muted); font-size: .78rem; }
.gp-doc-editor-actions { display: flex; align-items: center; gap: .5rem; }
.gp-doc-editor-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f0ece6;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
}
.gp-doc-editor-layout {
  height: calc(100% - 74px);
  display: grid;
  grid-template-columns: minmax(560px, 1fr) 390px;
  min-height: 0;
}
.gp-doc-preview { padding: 1rem; min-width: 0; display: grid; grid-template-rows: auto 1fr; gap: .55rem; }
.gp-doc-preview-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .75rem; }
.gp-doc-preview-label span { color: var(--ink); font-weight: 700; }
.gp-doc-preview iframe {
  width: 100%;
  height: 100%;
  border: 1px solid #d9d3ca;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(35,30,25,.1);
}
.gp-doc-controls { background: #fff; border-left: 1px solid var(--line); overflow: auto; }
.gp-doc-controls form { display: grid; }
.gp-doc-controls fieldset { border: 0; border-bottom: 1px solid var(--line); padding: 1rem 1.15rem 1.1rem; display: grid; gap: .65rem; }
.gp-doc-controls legend { float: none; width: auto; margin: 0 0 .2rem; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.gp-doc-controls label:not(.gp-v2-switch) { display: grid; gap: .3rem; color: var(--muted); font-size: .7rem; font-weight: 700; }
.gp-doc-controls input:not([type="checkbox"]), .gp-doc-controls select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: .48rem .55rem;
  font-size: .84rem;
}
.gp-doc-controls input[readonly] { background: #f5f2ed; color: var(--muted); }
.gp-doc-date-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.gp-doc-party { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .6rem; border-radius: 7px; background: #f7f4ef; font-size: .78rem; }
.gp-doc-party span { color: var(--muted); }
.gp-doc-party strong { text-align: right; }
.gp-doc-help { margin: .1rem 0 0; color: var(--muted); font-size: .74rem; line-height: 1.45; }

@media (max-width: 900px) {
  .gp-doc-editor { width: calc(100vw - 1rem); height: calc(100vh - 1rem); }
  .gp-doc-editor-layout { grid-template-columns: 1fr; grid-template-rows: minmax(360px, 55vh) auto; overflow: auto; }
  .gp-doc-controls { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .gp-doc-editor-head { align-items: flex-start; }
  .gp-doc-editor-actions .gp-btn { display: none; }
}

/* Navegación común de documentos dentro de un proyecto. */
.gp-document-body { background:#f3f1ed; }
.gp-project-document-nav { display:flex; align-items:center; justify-content:space-between; gap:1rem; min-width:0; margin-bottom:1.15rem; }
.gp-project-document-nav__project { display:flex; align-items:center; gap:.65rem; min-width:0; color:var(--ink); text-decoration:none; }
.gp-project-document-nav__project > svg { width:34px; height:34px; flex:0 0 auto; padding:.45rem; border:1px solid var(--line); border-radius:10px; background:#fff; color:#8c7d70; }
.gp-project-document-nav__project span { display:grid; min-width:0; }
.gp-project-document-nav__project small,.gp-project-document-nav__kind { color:#9c6b4f; font-size:.61rem; font-weight:750; letter-spacing:.09em; text-transform:uppercase; }
.gp-project-document-nav__project strong { overflow:hidden; font-size:.86rem; text-overflow:ellipsis; white-space:nowrap; }
.gp-project-document-nav__switcher { display:grid; grid-template-columns:38px minmax(230px,360px) 38px; align-items:stretch; gap:.4rem; min-width:0; }
.gp-project-document-nav__arrow { display:grid; place-items:center; border:1px solid var(--line); border-radius:10px; background:#fff; color:#6e655c; text-decoration:none; }
.gp-project-document-nav__arrow:not(.disabled):hover { border-color:#ccb6a4; background:#fffaf5; color:#9c5c35; }
.gp-project-document-nav__arrow.disabled { opacity:.38; }
.gp-project-document-nav__arrow svg { width:18px; height:18px; }
.gp-project-document-nav__menu { position:relative; min-width:0; }
.gp-project-document-nav__menu > summary { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:.65rem; height:100%; min-height:48px; padding:.45rem .75rem; border:1px solid var(--line); border-radius:11px; background:#fff; cursor:pointer; list-style:none; }
.gp-project-document-nav__menu > summary::-webkit-details-marker { display:none; }
.gp-project-document-nav__menu[open] > summary { border-color:#cbb4a1; box-shadow:0 0 0 3px rgba(156,107,79,.08); }
.gp-project-document-nav__current { display:grid; min-width:0; }
.gp-project-document-nav__current strong,.gp-project-document-nav__current small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gp-project-document-nav__current strong { font-size:.8rem; }
.gp-project-document-nav__current small { color:var(--muted); font-size:.64rem; }
.gp-project-document-nav__caret { width:15px; height:15px; color:#8c8379; transition:transform .16s ease; }
.gp-project-document-nav__menu[open] .gp-project-document-nav__caret { transform:rotate(180deg); }
.gp-project-document-nav__popover { position:absolute; top:calc(100% + .45rem); right:0; z-index:50; width:min(390px,calc(100vw - 2rem)); padding:.38rem; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:0 18px 45px rgba(33,31,28,.16); }
.gp-project-document-nav__all { display:flex!important; align-items:center; gap:.6rem; margin-bottom:.28rem; padding:.65rem!important; border-bottom:1px solid #eee9e3; color:var(--ink); text-decoration:none; }
.gp-project-document-nav__all svg { width:18px; height:18px; color:#9c6b4f; }
.gp-project-document-nav__all span { display:grid; }
.gp-project-document-nav__all small { color:var(--muted); font-size:.66rem; }
.gp-project-document-nav__items { display:grid; max-height:310px; overflow:auto; }
.gp-project-document-nav__items a { display:grid; gap:.08rem; padding:.55rem .65rem; border-radius:8px; color:var(--ink); text-decoration:none; }
.gp-project-document-nav__items a:hover,.gp-project-document-nav__items a.current { background:#f6efe9; }
.gp-project-document-nav__items a.current { box-shadow:inset 3px 0 #9c6b4f; }
.gp-project-document-nav__items span { font-size:.78rem; font-weight:650; }
.gp-project-document-nav__items small { color:var(--muted); font-size:.66rem; }

@media (max-width:700px) {
  .gp-project-document-nav { align-items:stretch; flex-direction:column; }
  .gp-project-document-nav__switcher { grid-template-columns:38px minmax(0,1fr) 38px; width:100%; }
  .gp-project-document-nav__project > svg { width:30px; height:30px; }
  .gp-project-document-nav__popover { right:-42px; }
}

/* Ficha interna de Partida: lectura económica, flujo y operación conectada. */
.gp-partida-breadcrumb { display:flex; gap:.45rem; align-items:center; flex-wrap:wrap; margin-bottom:.8rem; color:var(--muted); font-size:.76rem; }
.gp-partida-breadcrumb a { color:inherit; text-decoration:none; }
.gp-partida-breadcrumb a:hover { color:var(--ink); }
.gp-partida-alert { margin-bottom:.85rem; padding:.7rem .9rem; border-radius:10px; font-size:.84rem; }
.gp-partida-alert.error { border:1px solid #e7c8c8; background:#fbefef; color:#8d2e2e; }
.gp-partida-context { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; margin-bottom:1rem; }
.gp-partida-eyebrow,.gp-partida-section-kicker { color:#9c6b4f; font-size:.68rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
.gp-partida-title-row { display:flex; align-items:center; gap:.55rem; flex-wrap:wrap; }
.gp-partida-title-row h1 { margin:.15rem 0; font-size:1.55rem; }
.gp-partida-forma { display:inline-flex; align-items:center; min-height:24px; padding:.2rem .55rem; border:1px solid #d9cec3; border-radius:999px; background:#f7f3ee; color:#66584d; font-size:.68rem; font-weight:700; }
.gp-partida-forma.forma-b { border-color:#d6c89e; background:#faf5df; color:#786024; }
.gp-partida-forma.forma-c { border-color:#bfd5ca; background:#ecf5f0; color:#376754; }
.gp-partida-forma.forma-mixto { border-color:#c9c5dd; background:#f0eff8; color:#575176; }
.gp-partida-meta { display:flex; gap:.35rem; flex-wrap:wrap; color:var(--muted); font-size:.8rem; }
.gp-partida-meta a { color:inherit; }
.gp-partida-next { min-width:220px; max-width:300px; padding:.75rem .85rem; border:1px solid #d8c9b8; border-left:3px solid #9c6b4f; border-radius:10px; background:#fbf8f4; display:grid; gap:.15rem; }
.gp-partida-next.blocked { border-left-color:#a32d2d; }
.gp-partida-next span { color:var(--muted); font-size:.66rem; text-transform:uppercase; letter-spacing:.07em; }
.gp-partida-next strong { font-size:.84rem; }
.gp-partida-next a { font-size:.76rem; color:#185fa5; }
.gp-partida-hero { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border:1px solid var(--border); border-radius:14px; overflow:hidden; background:#fff; margin-bottom:1rem; }
.gp-partida-kpi { min-width:0; padding:.8rem .9rem; border-right:1px solid var(--border); border-bottom:1px solid var(--border); display:grid; gap:.12rem; }
.gp-partida-kpi span { color:var(--muted); font-size:.69rem; }
.gp-partida-kpi strong { font-size:1.03rem; font-variant-numeric:tabular-nums; white-space:nowrap; }
.gp-partida-kpi small { color:#8d735f; font-size:.62rem; }
.gp-partida-kpi.principal { background:#211f1c; color:#fff; }
.gp-partida-kpi.principal span { color:#cfc7be; }
.gp-partida-kpi.positivo strong { color:#1d7a4c; }
.gp-partida-kpi.atencion strong { color:#9c6b4f; }
.gp-partida-kpi.informativo { background:#f2f5f8; }
.gp-partida-reading { grid-column:1/-1; margin:0; padding:.65rem .9rem; background:#f8f5f1; color:var(--muted); font-size:.78rem; }
.gp-partida-reading strong { color:var(--ink); }
.gp-partida-stepper { list-style:none; margin:0 0 1rem; padding:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(125px,1fr)); gap:1px; border:1px solid var(--border); border-radius:12px; overflow:hidden; background:var(--border); }
.gp-partida-stepper li { min-width:0; padding:.65rem .7rem; background:#fff; display:grid; grid-template-columns:28px 1fr auto; align-items:center; gap:.45rem; }
.gp-partida-step-dot { width:26px; height:26px; border-radius:50%; display:grid; place-items:center; background:#f0ece6; color:#7f766d; font-size:.7rem; font-weight:700; }
.gp-partida-stepper li.completado .gp-partida-step-dot { background:#dff0e7; color:#1d7a4c; }
.gp-partida-stepper li.actual { background:#fcf8f3; box-shadow:inset 0 -3px #9c6b4f; }
.gp-partida-stepper li.actual .gp-partida-step-dot { background:#9c6b4f; color:#fff; }
.gp-partida-stepper li.bloqueado { opacity:.68; }
.gp-partida-stepper strong,.gp-partida-stepper small { display:block; }
.gp-partida-stepper strong { font-size:.72rem; }
.gp-partida-stepper small { color:var(--muted); font-size:.62rem; text-transform:capitalize; }
.gp-partida-stepper a { font-size:.66rem; color:#185fa5; }
.gp-partida-details,.gp-partida-section { border:1px solid var(--border); border-radius:13px; background:#fff; margin-bottom:1rem; }
.gp-partida-details > summary { cursor:pointer; list-style:none; padding:.8rem 1rem; display:flex; justify-content:space-between; gap:1rem; align-items:center; }
.gp-partida-details > summary::-webkit-details-marker { display:none; }
.gp-partida-details > summary span { font-size:.86rem; font-weight:700; }
.gp-partida-details > summary small { color:var(--muted); font-size:.72rem; }
.gp-partida-details[open] > summary { border-bottom:1px solid var(--border); }
.gp-partida-details.inner { margin-top:.85rem; background:#faf8f5; }
.gp-partida-config-form { padding:1rem; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; }
.gp-partida-config-form label,.gp-partida-inline-form label,.gp-partida-line-actions label,.gp-partida-exception-form label { display:grid; gap:.25rem; color:var(--muted); font-size:.68rem; font-weight:700; }
.gp-partida-config-form .wide { grid-column:1/-1; }
.gp-partida-config-form input,.gp-partida-config-form select,.gp-partida-config-form textarea,.gp-partida-inline-form input,.gp-partida-inline-form select,.gp-partida-line-actions input,.gp-partida-mini-form input,.gp-partida-exception-form input,.gp-partida-exception-form select { width:100%; min-width:0; padding:.45rem .5rem; border:1px solid var(--border); border-radius:8px; background:#fff; color:var(--ink); font-size:.82rem; font-weight:400; }
.gp-partida-config-form select:disabled { background:#f2efeb; color:var(--muted); }
.gp-partida-check { display:flex!important; grid-template-columns:none!important; align-items:center; gap:.4rem!important; color:var(--ink)!important; }
.gp-partida-check input { width:16px!important; }
.gp-partida-form-note { margin:0; padding:.55rem .65rem; border-radius:8px; background:#f7f3ee; color:#7a6655; font-size:.74rem; }
.gp-partida-section { padding:1rem; }
.gp-partida-section-head { display:flex; justify-content:space-between; align-items:center; gap:.75rem; flex-wrap:wrap; margin-bottom:.35rem; }
.gp-partida-section-head h2 { margin:.1rem 0 0; font-size:1.02rem; }
.gp-partida-count { min-width:28px; height:28px; display:grid; place-items:center; border-radius:50%; background:#f0ece6; font-size:.72rem; }
.gp-partida-help { margin:.2rem 0 .8rem; color:var(--muted); font-size:.76rem; line-height:1.45; }
.gp-partida-inline-form { display:flex; gap:.55rem; align-items:end; flex-wrap:wrap; padding:.75rem; margin:.7rem 0; border:1px dashed #d9cec3; border-radius:10px; background:#fbf9f6; }
.gp-partida-inline-form label:first-child { flex:1 1 260px; }
.gp-partida-inline-form label { min-width:110px; }
.gp-partida-stack { display:grid; gap:.7rem; }
.gp-partida-stack.compact { gap:.5rem; }
.gp-partida-empty { padding:1.3rem; border:1px dashed #d8d0c8; border-radius:10px; background:#fbfaf8; color:var(--muted); text-align:center; font-size:.8rem; }
.gp-partida-empty.compact { padding:.75rem; }
.gp-partida-line-card,.gp-partida-order,.gp-partida-movement,.gp-partida-commission { border:1px solid var(--border); border-radius:11px; padding:.8rem; background:#fff; }
.gp-partida-line-card { display:grid; grid-template-columns:minmax(180px,1.15fr) minmax(360px,2fr); gap:.7rem 1rem; align-items:start; }
.gp-partida-line-main h3 { margin:.28rem 0 .1rem; font-size:.9rem; }
.gp-partida-line-main a { color:#185fa5; font-size:.72rem; }
.gp-partida-line-data { margin:0; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:.4rem; }
.gp-partida-line-data div { min-width:0; }
.gp-partida-line-data dt { color:var(--muted); font-size:.63rem; font-weight:400; }
.gp-partida-line-data dd { margin:0; font-size:.78rem; font-weight:700; font-variant-numeric:tabular-nums; }
.gp-partida-line-data dd.negative { color:#a32d2d; }
.gp-partida-line-orders { display:flex; gap:.35rem; flex-wrap:wrap; color:var(--muted); font-size:.7rem; }
.gp-partida-line-orders a { padding:.18rem .4rem; border-radius:6px; background:#edf2f7; text-decoration:none; }
.gp-partida-line-actions { display:flex; gap:.4rem; justify-content:flex-end; align-items:end; flex-wrap:wrap; }
.gp-partida-line-actions label { max-width:120px; }
.gp-btn.danger { border-color:#e2c3c3; color:#963333; }
.gp-partida-money-strip { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:1px; overflow:hidden; margin:.65rem 0; border:1px solid var(--border); border-radius:10px; background:var(--border); }
.gp-partida-money-strip div { padding:.65rem .75rem; background:#faf8f5; display:flex; justify-content:space-between; gap:.5rem; }
.gp-partida-money-strip span { color:var(--muted); font-size:.7rem; }
.gp-partida-money-strip strong { font-size:.82rem; font-variant-numeric:tabular-nums; }
.gp-partida-movement { display:grid; grid-template-columns:minmax(180px,1.5fr) repeat(2,minmax(100px,.7fr)) minmax(150px,1fr) auto; gap:.65rem; align-items:center; font-size:.76rem; }
.gp-partida-movement > div { display:grid; gap:.12rem; }
.gp-partida-movement span { color:var(--muted); font-size:.68rem; }
.gp-partida-movement a { font-size:.7rem; }
.gp-partida-order-head { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; }
.gp-partida-order-head h3 { display:inline; margin-left:.35rem; font-size:.92rem; }
.gp-partida-order-head h3 a { color:inherit; }
.gp-partida-order-head > div:last-child { display:grid; justify-items:end; color:var(--muted); font-size:.72rem; }
.gp-partida-order-origin { display:flex; gap:.45rem; flex-wrap:wrap; margin:.5rem 0; font-size:.68rem; color:var(--muted); }
.gp-partida-order-origin a { color:#185fa5; }
.gp-partida-line-data.order-data { grid-template-columns:repeat(3,minmax(0,1fr)); padding:.55rem; border-radius:8px; background:#f7f4ef; }
.gp-partida-order-next { display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; margin-top:.6rem; font-size:.72rem; }
.gp-partida-order-next span { color:var(--muted); }
.gp-partida-order-next a { margin-left:auto; }
.gp-partida-formula { display:grid; grid-template-columns:repeat(4,minmax(100px,1fr) auto); align-items:end; gap:.35rem .55rem; padding:.8rem; border-radius:10px; background:#211f1c; color:#fff; }
.gp-partida-formula span { color:#cfc7be; font-size:.65rem; }
.gp-partida-formula strong { grid-row:2; font-size:.88rem; white-space:nowrap; }
.gp-partida-formula b { grid-row:1/3; align-self:center; color:#9c6b4f; }
.gp-partida-commission { display:grid; grid-template-columns:minmax(180px,1fr) minmax(180px,.7fr) minmax(130px,.7fr) minmax(220px,1.2fr); gap:.65rem; align-items:center; font-size:.76rem; }
.gp-partida-commission > div:first-child { display:grid; gap:.3rem; }
.gp-partida-commission dl { margin:0; display:flex; gap:1rem; }
.gp-partida-commission dl div { display:grid; }
.gp-partida-commission dt { color:var(--muted); font-size:.64rem; }
.gp-partida-commission dd { margin:0; font-weight:700; }
.gp-partida-commission-docs { display:flex; gap:.35rem; flex-wrap:wrap; }
.gp-partida-mini-form { display:flex; gap:.35rem; flex-wrap:wrap; justify-content:flex-end; }
.gp-partida-mini-form input { width:auto; max-width:125px; }
.gp-partida-warning { margin:1rem; padding:.65rem .8rem; border:1px solid #ead8b1; border-radius:8px; background:#fff8e8; color:#7d6229; font-size:.76rem; }
.gp-partida-exceptions .gp-partida-stack { padding:0 1rem 1rem; }
.gp-partida-exception-form { display:grid; grid-template-columns:repeat(5,minmax(90px,1fr)); gap:.55rem; align-items:end; padding:.75rem; border:1px solid var(--border); border-radius:10px; }
.gp-partida-exception-form .wide { grid-column:span 2; }
.gp-partida-exception-summary { display:flex; gap:.65rem; grid-column:1/-2; color:var(--muted); font-size:.72rem; }
.gp-partida-exception-actions { display:flex; gap:.35rem; justify-content:flex-end; }
.gp-partida-exception-form.new { background:#faf8f5; }

/* Lenguaje visual común de la ficha: iconografía lineal, etiquetas y ayudas. */
.gp-ui-icon { width:18px; height:18px; flex:0 0 auto; color:currentColor; vertical-align:-.2em; }
.gp-section-heading { display:flex!important; align-items:center; gap:.5rem; }
.gp-section-heading .gp-ui-icon { color:#8c8277; }
.gp-partida-context { padding:.2rem .15rem .35rem; }
.gp-partida-title-row h1 { font-size:1.8rem; font-weight:650; letter-spacing:-.025em; }
.gp-partida-next { border-color:#dfd4c8; border-left-width:4px; background:#fff; box-shadow:0 1px 2px rgba(33,31,28,.03); }
.gp-partida-hero { grid-template-columns:repeat(auto-fit,minmax(125px,1fr)); border-radius:17px; box-shadow:0 2px 5px rgba(33,31,28,.04); }
.gp-partida-kpi { min-height:94px; justify-content:center; padding:1rem 1.15rem; border-bottom:0; }
.gp-partida-kpi span { font-size:.76rem; }
.gp-partida-kpi strong { font-size:1.24rem; font-weight:650; }
.gp-partida-kpi.principal { background:#fff; color:var(--ink); }
.gp-partida-kpi.principal span { color:var(--muted); }
.gp-partida-kpi.principal strong,.gp-partida-kpi.interno strong { color:#9c5c35; }
.gp-partida-kpi.informativo { background:#f8fafb; }
.gp-partida-reading { border-top:1px solid var(--border); padding:.72rem 1.15rem; }

.gp-partida-stepper { position:relative; gap:0; padding:1.35rem 1rem 1.05rem; border-radius:17px; background:#fff; box-shadow:0 2px 5px rgba(33,31,28,.035); }
.gp-partida-stepper li { position:relative; grid-template-columns:1fr; justify-items:center; gap:.5rem; padding:.25rem .4rem; background:transparent; text-align:center; }
.gp-partida-stepper li.actual { background:transparent; box-shadow:none; }
.gp-partida-stepper li::after { content:""; position:absolute; z-index:0; top:16px; left:50%; width:100%; height:2px; background:#e4dfd8; }
.gp-partida-stepper li:last-child::after { display:none; }
.gp-partida-stepper li.completado::after { background:#a86f4d; }
.gp-partida-step-dot { position:relative; z-index:1; width:34px; height:34px; border:2px solid #e2ddd6; background:#fff; font-size:.82rem; }
.gp-partida-stepper li.completado .gp-partida-step-dot { border-color:#a86f4d; background:#a86f4d; color:#fff; }
.gp-partida-stepper li.actual .gp-partida-step-dot { border-color:#9c5c35; background:#fff; color:#9c5c35; }
.gp-partida-stepper strong { font-size:.76rem; }
.gp-partida-stepper small { font-size:.6rem; }
.gp-partida-stepper a { padding:.15rem .4rem; border-radius:6px; text-decoration:none; }
.gp-partida-stepper a:hover { background:#f5eee8; }

.gp-partida-details,.gp-partida-section { border-color:#ddd7cf; border-radius:17px; box-shadow:0 2px 5px rgba(33,31,28,.035); }
.gp-partida-details > summary { min-height:58px; padding:.9rem 1.2rem; }
.gp-partida-summary-title { display:inline-flex; align-items:center; gap:.65rem; }
.gp-partida-summary-title .gp-ui-icon { color:#8c8277; }
.gp-partida-section { padding:0; overflow:visible; }
.gp-partida-section-head { min-height:92px; margin:0; padding:1.15rem 1.35rem; border-bottom:1px solid var(--border); }
.gp-partida-section-title { display:flex; align-items:flex-start; gap:.75rem; }
.gp-partida-section-title > .gp-ui-icon { width:23px; height:23px; margin-top:.16rem; color:#8c8277; }
.gp-partida-section-head h2 { display:flex; align-items:center; gap:.5rem; font-size:1.16rem; }
.gp-partida-section-kicker { display:block; margin-bottom:.18rem; }
.gp-partida-count { display:inline-grid; width:27px; min-width:27px; height:25px; background:#ece8e2; color:#71685e; font-size:.68rem; vertical-align:middle; }
.gp-partida-help { margin:0; padding:.8rem 1.35rem 0; }
.gp-partida-add-trigger { display:inline-flex; align-items:center; gap:.35rem; }
.gp-partida-add-trigger .gp-ui-icon { width:15px; height:15px; color:inherit; }
.gp-partida-add-panel { margin:.85rem 1.35rem 0; border:1px dashed #d7c7ba; border-radius:11px; background:#fbf8f5; }
.gp-partida-add-panel > summary { padding:.65rem .8rem; color:#8d5433; cursor:pointer; font-size:.76rem; font-weight:700; list-style:none; }
.gp-partida-add-panel > summary::-webkit-details-marker { display:none; }
.gp-partida-add-panel .gp-partida-inline-form { margin:0; border:0; border-top:1px dashed #d7c7ba; border-radius:0; }
.gp-partida-section > .gp-partida-stack { padding:1rem 1.35rem 1.35rem; }
.gp-partida-section > .gp-partida-empty { margin:1rem 1.35rem 1.35rem; }
.gp-partida-section > .gp-partida-inline-form { margin:.9rem 1.35rem; }

/* Campos de configuración: mismo tratamiento editorial y cromático que el editor. */
.gp-partida-config-form { padding:1.15rem 1.35rem 1.35rem; gap:.85rem; background:linear-gradient(180deg,#fff 0%,#fcfbf9 100%); }
.gp-partida-config-form .gp-partida-field { min-width:0; padding:.78rem .82rem .82rem; border:1px solid #e1dad2; border-radius:12px; background:#f8f5f1; box-shadow:0 1px 1px rgba(33,31,28,.02); color:#7d7267; font-size:.66rem; font-weight:750; letter-spacing:.055em; text-transform:uppercase; transition:border-color .16s ease,box-shadow .16s ease,background .16s ease; }
.gp-partida-config-form .gp-partida-field:focus-within { border-color:#b8734f; background:#fffdfa; box-shadow:0 0 0 3px rgba(184,115,79,.13); }
.gp-partida-config-form .gp-partida-field input:not([type="hidden"]),.gp-partida-config-form .gp-partida-field select,.gp-partida-config-form .gp-partida-field textarea { min-height:40px; margin-top:.28rem; padding:.58rem .65rem; border-color:#d8d0c7; border-radius:8px; background:#fff; color:#38332e; font:inherit; font-size:.86rem; font-weight:500; letter-spacing:0; line-height:1.35; text-transform:none; box-shadow:inset 0 1px 1px rgba(33,31,28,.025); }
.gp-partida-config-form .gp-partida-field textarea { min-height:78px; resize:vertical; }
.gp-partida-config-form .gp-partida-field--notes { background:#f7f2ed; }
.gp-partida-config-form .gp-partida-field--notes textarea { min-height:108px; }
.gp-partida-config-form .gp-partida-field input:focus,.gp-partida-config-form .gp-partida-field select:focus,.gp-partida-config-form .gp-partida-field textarea:focus { outline:0; border-color:#a65d37; box-shadow:0 0 0 3px rgba(166,93,55,.13); }
.gp-partida-config-form .gp-partida-field select { cursor:pointer; }
.gp-partida-config-form .gp-partida-field select:disabled { border-color:#e0d9d1; background:#eeebe7; color:#9a9087; cursor:not-allowed; box-shadow:none; }
.gp-partida-config-form .gp-partida-check { min-height:52px; padding:.75rem .82rem; border:1px dashed #d7c8bc; border-radius:12px; background:#fffaf5; color:#6c5a4d!important; font-size:.72rem!important; font-weight:700!important; letter-spacing:.02em; }
.gp-partida-config-form .gp-partida-check input { accent-color:#a65d37; }
.gp-partida-config-actions { display:flex; justify-content:flex-end; padding-top:.15rem; }
.gp-partida-config-actions .gp-btn { min-width:188px; }

.gp-partida-line-card { padding:1rem 1.1rem; border-color:#e0dad3; background:#fff; }
.gp-partida-line-heading { display:flex; align-items:center; gap:.55rem; flex-wrap:wrap; }
.gp-partida-line-heading h3 { margin:0; font-size:.95rem; }
.gp-partida-line-main > a { display:inline-flex; align-items:center; gap:.28rem; margin-top:.35rem; color:#766a60; text-decoration:none; }
.gp-partida-line-main > a:hover { color:#9c5c35; }
.gp-partida-line-main > a .gp-ui-icon { width:13px; height:13px; }
.gp-partida-line-data dt { color:#817468; }
.gp-partida-line-data dd { margin-top:.16rem; font-size:.82rem; }

.gp-partida-cash-overview { display:grid; grid-template-columns:minmax(0,1fr) minmax(260px,1fr); gap:1rem; padding:1rem 1.35rem .25rem; }
.gp-partida-progress-card,.gp-partida-available-card { min-height:118px; padding:1rem 1.15rem; border:1px solid #ded8d1; border-radius:12px; background:#fbfaf8; }
.gp-partida-progress-card > div:first-child { display:flex; justify-content:space-between; gap:1rem; color:#6f655c; }
.gp-partida-progress-card strong { color:#008d55; font-size:1.06rem; }
.gp-partida-progress { height:7px; margin:.9rem 0 .45rem; overflow:hidden; border-radius:999px; background:#e6e1da; }
.gp-partida-progress span { display:block; height:100%; border-radius:inherit; background:#11b975; }
.gp-partida-progress-card small { display:block; color:var(--muted); text-align:right; }
.gp-partida-available-card { display:flex; align-items:center; justify-content:center; gap:.7rem; border-style:dashed; color:#95542f; text-align:left; text-decoration:none; }
.gp-partida-available-card:hover { border-color:#c48b67; background:#fff8f3; color:#794125; }
.gp-partida-available-card > .gp-ui-icon { width:19px; height:19px; }
.gp-partida-available-card span { display:grid; gap:.15rem; }
.gp-partida-available-card small { color:var(--muted); }
.gp-partida-section#cobros > .gp-partida-stack { padding-top:.75rem; }

.gp-partida-order { padding:1rem 1.1rem; background:#fbfaf8; }
.gp-partida-order-head h3 { font-size:1rem; }
.gp-partida-order-next { padding-top:.65rem; border-top:1px solid var(--border); color:#96542e; }
.gp-partida-formula { margin:1rem 1.35rem .25rem; background:#2a2723; }
.gp-partida-section#margen > .gp-partida-help { padding-top:.55rem; }
.gp-partida-section#margen > .gp-partida-stack { padding-top:.75rem; }
.gp-partida-section#margen > .gp-partida-details { margin-right:1.35rem; margin-left:1.35rem; }

@media (max-width:1050px) {
  .gp-partida-hero { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .gp-partida-line-card { grid-template-columns:1fr; }
  .gp-partida-movement { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gp-partida-commission { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gp-partida-formula { grid-template-columns:repeat(2,minmax(100px,1fr) auto); }
  .gp-partida-exception-form { grid-template-columns:repeat(3,minmax(90px,1fr)); }
}
@media (max-width:650px) {
  .gp-partida-context { display:grid; }
  .gp-partida-next { min-width:0; max-width:none; }
  .gp-partida-hero { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gp-partida-stepper { grid-template-columns:1fr; }
  .gp-partida-stepper li { grid-template-columns:34px 1fr auto; justify-items:start; text-align:left; }
  .gp-partida-stepper li::after { top:50%; left:16px; width:2px; height:100%; }
  .gp-partida-config-form { grid-template-columns:1fr; }
  .gp-partida-config-form .wide { grid-column:auto; }
  .gp-partida-line-data,.gp-partida-line-data.order-data { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gp-partida-line-actions { justify-content:flex-start; }
  .gp-partida-money-strip { grid-template-columns:1fr; }
  .gp-partida-cash-overview { grid-template-columns:1fr; padding-right:.85rem; padding-left:.85rem; }
  .gp-partida-movement,.gp-partida-commission { grid-template-columns:1fr; }
  .gp-partida-order-head { display:grid; }
  .gp-partida-order-head > div:last-child { justify-items:start; }
  .gp-partida-formula { grid-template-columns:1fr auto; }
  .gp-partida-exception-form { grid-template-columns:1fr; }
  .gp-partida-exception-form .wide,.gp-partida-exception-summary { grid-column:auto; }
  .gp-partida-exception-actions { justify-content:flex-start; }
  .gp-partida-section-head { min-height:0; padding:1rem .9rem; }
  .gp-partida-section-head .gp-btn { width:100%; justify-content:center; }
  .gp-partida-config-form { padding:.9rem; }
  .gp-partida-config-actions .gp-btn { width:100%; }
  .gp-partida-help { padding-right:.9rem; padding-left:.9rem; }
  .gp-partida-section > .gp-partida-stack { padding:.85rem .9rem 1rem; }
  .gp-partida-add-panel,.gp-partida-formula,.gp-partida-section#margen > .gp-partida-details { margin-right:.9rem; margin-left:.9rem; }
}
.gp-v2-general-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 3rem 1.35rem;
}
.gp-v2-general-head h2 { margin: 0; font-size: 2rem; line-height: 1.1; }
.gp-v2-general-close {
  border: 0;
  padding: .15rem;
  color: #9f9887;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.gp-v2-general-close:hover { color: var(--ink); }
.gp-v2-general-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .25rem;
  margin: 0 3rem;
  padding: .28rem;
  border-radius: 999px;
  background: #efede8;
}
.gp-v2-general-tab {
  min-height: 2.9rem;
  padding: .55rem .8rem;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.gp-v2-general-tab.is-active { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.gp-v2-general-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.gp-v2-general-body { min-height: 0; overflow: auto; padding: 1.35rem 3rem 2rem; }
.gp-v2-general-panel { max-width: 860px; margin: 0 auto; }
.gp-v2-general-panel h3 { margin: .15rem 0 .7rem; font-size: 1.2rem; }
.gp-v2-general-panel h3 + h3 { margin-top: 1.6rem; }
.gp-v2-general-note { margin: -.25rem 0 1rem; color: var(--muted); font-size: .84rem; }
.gp-v2-general-readonly { display: grid; gap: .1rem; }
.gp-v2-general-row {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 1rem;
  min-height: 3.15rem;
  border-bottom: 1px solid #f0ede7;
}
.gp-v2-general-label { font-weight: 600; }
.gp-v2-general-value { min-width: 0; color: #2d2a25; overflow-wrap: anywhere; }
.gp-v2-general-value.is-muted { color: #aaa393; }
.gp-v2-general-logo { font-size: 1.55rem; letter-spacing: .35em; }
.gp-v2-general-eye { color: #a29a88; text-align: center; font-size: 1.05rem; }
.gp-v2-general-eye.is-off { opacity: .62; }
.gp-v2-general-row input.gp-v2-general-value { width:100%; min-width:0; box-sizing:border-box; padding:.58rem .65rem; border:1px solid #ded8ca; border-radius:7px; background:#fff; font:inherit; }
.gp-v2-general-visibility { display:grid; place-items:center; }
.gp-v2-general-visibility input { position:absolute; opacity:0; inline-size:1px; block-size:1px; }
.gp-v2-general-visibility svg { display:grid; place-items:center; width:28px; height:28px; padding:6px; box-sizing:border-box; border-radius:50%; color:var(--accent); background:#f6ebe4; cursor:pointer; }
.gp-v2-general-visibility svg .eye-slash { opacity:0; }
.gp-v2-general-visibility input:not(:checked) + svg { color:#a29a88; background:#f0eeeb; }
.gp-v2-general-visibility input:not(:checked) + svg .eye-open { opacity:.3; }
.gp-v2-general-visibility input:not(:checked) + svg .eye-slash { opacity:1; }
.gp-v2-general-visibility input:focus-visible + svg { outline:2px solid var(--accent); outline-offset:2px; }
.gp-v2-general-input-look,
.gp-v2-general-wide-field input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: .65rem .75rem;
  border: 1px solid #ded8ca;
  border-radius: 7px;
  background: #fff;
  color: #4b473e;
  font: inherit;
}
.gp-v2-general-custom-field { display: flex; gap: .6rem; align-items: center; }
.gp-v2-general-custom-field span:first-child { width: 28%; padding: .65rem .75rem; border: 1px solid #ded8ca; border-radius: 7px; }
.gp-v2-general-custom-field span:last-child { flex: 1; padding: .65rem .75rem; border: 1px solid #ded8ca; border-radius: 7px; }
.gp-v2-general-edit-row { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: end; gap: 1rem; }
.gp-v2-general-wide-field { display: grid; gap: .35rem; font-weight: 600; }
.gp-v2-general-wide-field input { font-weight: 400; }
.gp-v2-general-link { display: inline-block; margin: .65rem 0 1.25rem; color: var(--accent); font-size: .86rem; font-weight: 700; text-decoration: none; }
.gp-v2-general-link:hover { text-decoration: underline; }
.gp-v2-general-reset { color: #49453d; font-weight: 600; line-height: 1.25; }
.gp-v2-general-form { display: grid; gap: 1rem; max-width: 600px; }
.gp-v2-general-form label { display: grid; gap: .35rem; font-weight: 600; }
.gp-v2-general-form label em { color: #c04b25; font-style: normal; }
.gp-v2-general-form input { width: 100%; box-sizing: border-box; padding: .7rem .75rem; border: 1px solid #ded8ca; border-radius: 7px; color: var(--ink); background: #fff; font: inherit; font-size: 1rem; }
.gp-v2-general-form input:focus { outline: 2px solid #b3502155; border-color: var(--accent); }
.gp-v2-general-form input[readonly] { color: #4b473e; background: #fbfaf8; }
.gp-v2-general-modal .gp-v2-general-form { display:block; max-width:none; }
.gp-v2-general-doc-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.85rem 1rem; }
.gp-v2-general-doc-grid label,.gp-v2-general-conditions { display:grid; gap:.35rem; color:#4a463d; font-size:.78rem; font-weight:700; }
.gp-v2-general-doc-grid input,.gp-v2-general-doc-grid select,.gp-v2-general-conditions textarea { width:100%; box-sizing:border-box; padding:.65rem .72rem; border:1px solid #ded8ca; border-radius:8px; color:var(--ink); background:#fff; font:inherit; font-weight:400; }
.gp-v2-general-conditions { margin-top:1rem; }
.gp-v2-general-conditions textarea { resize:vertical; min-height:130px; line-height:1.5; }
.gp-v2-general-switches { display:flex; flex-wrap:wrap; gap:.55rem 1rem; margin:1rem 0; }
.gp-v2-general-switches label { display:inline-flex; align-items:center; gap:.45rem; color:#4a463d; font-size:.8rem; font-weight:600; }
.gp-v2-general-switches input[type="checkbox"] { width:16px; height:16px; margin:0; padding:0; }
.gp-v2-general-switches input[type="hidden"] { display:none; }
.gp-v2-general-reset-list { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: .8rem 1.5rem; margin-top: 1rem; color: #49453d; }
.gp-v2-general-reset-list span:nth-child(even) { font-weight: 600; }
.gp-v2-general-add-field { margin-top: 1.5rem; padding: 0; border: 0; color: var(--ink); background: transparent; font: inherit; font-weight: 700; cursor: pointer; }
.gp-v2-general-add-field:hover { color: var(--accent); }
.gp-v2-general-footer { display: flex; justify-content: flex-end; align-items: center; gap: 1.5rem; padding: 1rem 3rem; border-top: 1px solid #eeeae3; background: #fff; }
.gp-v2-general-cancel { border: 0; padding: .65rem .2rem; color: var(--ink); background: transparent; font: inherit; font-weight: 600; cursor: pointer; }
.gp-v2-general-footer .gp-btn { min-width: 126px; }

@media (max-width: 920px) {
  .gp-v2-actions .gp-btn { display: none; }
  .gp-v2-info-content { gap: 1.25rem; }
  .gp-v2-budget-meta { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 620px) {
  .gp-v2-header { gap: .7rem; }
  .gp-v2-actions { width: 100%; justify-content: flex-start; }
  .gp-v2-icon-action { width: 34px; height: 34px; }
  .gp-v2-info-content { grid-template-columns: 1fr; }
  .gp-v2-date-fields { width: 100%; gap: .6rem; }
  .gp-v2-date-fields label { flex: 1; }
  .gp-v2-date-fields input { min-width: 0; width: 100%; }
  .gp-v2-emisor-grid { grid-template-columns: 1fr; }
  .gp-v2-general-head { padding: 1.35rem 1.25rem 1rem; }
  .gp-v2-general-head h2 { font-size: 1.55rem; }
  .gp-v2-general-tabs { margin: 0 1.25rem; overflow-x: auto; }
  .gp-v2-general-tab { white-space: nowrap; font-size: .88rem; }
  .gp-v2-general-body { padding: 1rem 1.25rem 1.5rem; }
  .gp-v2-general-row { grid-template-columns: 1fr 24px; gap: .5rem; padding: .5rem 0; }
  .gp-v2-general-label { grid-column: 1 / -1; }
  .gp-v2-general-value { grid-column: 1; }
  .gp-v2-general-eye { grid-column: 2; grid-row: 2; }
  .gp-v2-general-reset { grid-column: 1 / -1; }
  .gp-v2-general-custom-field { grid-column: 1; }
  .gp-v2-general-footer { padding: .85rem 1.25rem; }
}

.gp-v2-advanced-panel {
  display: none;
  padding: .7rem .72rem;
  border-top: 1px solid var(--line);
  background: var(--interna-bg);
}

.gp-v2-item.show-advanced .gp-v2-advanced-panel { display: block; }

.gp-v2-advanced-title {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--interna);
  margin-bottom: .5rem;
}

.gp-v2-advanced-panel .gp-v2-line-summary {
  border-top: 0;
  background: transparent;
  padding: 0;
}
.gp-v2-advanced-panel .gp-v2-metrics { width:100%; grid-template-columns:repeat(4,minmax(95px,1fr)); gap:.35rem; }
.gp-v2-advanced-panel .gp-v2-metrics > span { padding:.38rem .5rem; border:1px solid #f0e4cd; border-radius:7px; background:#fff; }

.gp-v2-service-note {
  display:flex;
  align-items:center;
  gap:.65rem;
  padding:.65rem .75rem;
  border:1px solid #eadff0;
  border-radius:9px;
  color:#684c73;
  background:#fdfbfe;
}
.gp-v2-service-note svg { width:22px; height:22px; flex:0 0 auto; }
.gp-v2-service-note span { display:grid; gap:.1rem; color:var(--muted); font-size:.78rem; }
.gp-v2-service-note strong { color:#684c73; font-size:.84rem; }

.gp-v2-advanced-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: .45rem;
  margin-top: .65rem;
}
.gp-v2-advanced-fields.has-multi-provider {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gp-v2-advanced-proveedor {
  display: block;
  min-width: 0;
  margin: 0;
  max-width: none;
}
.gp-v2-advanced-proveedor.is-multi-provider { grid-column: 1 / -1; }

.gp-v2-advanced-proveedor[hidden] { display: none; }
.gp-v2-advanced-proveedor > label { display: block; }

.gp-v2-advanced-proveedor select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: .4rem .5rem;
  background: #fff;
  color: var(--ink);
  font-size: .84rem;
}

.gp-v2-advanced-proveedor select:disabled {
  background: #f4efe7;
  color: #6f685f;
  cursor: default;
  opacity: 1;
}

.gp-v2-economic-help {
  display: block;
  min-height: 1.05rem;
  margin-top: .22rem;
  color: #81776b;
  font-size: .68rem;
  line-height: 1.3;
}

.gp-v2-provider-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: .3rem;
  margin-top: .35rem;
}

.gp-v2-provider-create[hidden] { display: none; }
.gp-v2-multi-enable {
  margin-top: .3rem;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-size: .72rem;
  text-align: left;
}
.gp-v2-multi-enable[hidden], .gp-v2-multi-provider[hidden] { display: none; }
.gp-v2-multi-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: .18rem .45rem;
  background: #f1e4ce;
  color: #7e5418;
  font-size: .66rem;
  font-weight: 700;
}
.gp-v2-multi-badge[hidden] { display: none; }
.gp-v2-item-top { grid-template-columns: minmax(0, 1fr) auto auto; }
.gp-v2-multi-provider {
  width: 100%;
  border: 1px solid #e6d3b7;
  border-radius: 8px;
  padding: .5rem;
  background: #fffaf2;
}
.gp-v2-multi-provider header,
.gp-v2-multi-provider footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-size: .72rem;
}
.gp-v2-multi-provider footer {
  justify-content: flex-end;
  flex-wrap: wrap;
  border-top: 1px solid #eadcc8;
  padding-top: .42rem;
}
.gp-v2-multi-provider footer > span + span {
  border-left: 1px solid #dcc9ab;
  padding-left: .5rem;
}
.gp-v2-multi-provider [data-components-alert] {
  flex-basis: 100%;
  text-align: right;
  font-size: .7rem;
  font-weight: 700;
}
.gp-v2-multi-provider [data-components-alert].is-ok { color: #2f7a55; }
.gp-v2-multi-provider [data-components-alert].is-warning { color: #a9402f; }
.gp-v2-multi-provider header button {
  border: 0;
  background: transparent;
  color: var(--accent);
}
.gp-v2-component-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) 1.8rem;
  align-items: end;
  gap: .45rem;
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px solid #eadcc8;
}
.gp-v2-component-row label {
  display: grid;
  min-width: 0;
  gap: .22rem;
  margin: 0;
  color: #81776b;
  font-size: .68rem;
  font-weight: 600;
}
.gp-v2-component-row input,
.gp-v2-component-row select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .35rem .4rem;
  background: #fff;
  font-size: .76rem;
}
.gp-v2-component-row [data-remove-component] {
  border: 0;
  background: transparent;
  color: #8c7062;
  font-size: 1rem;
  height: 2rem;
}
.gp-v2-component-row.is-invalid input,
.gp-v2-component-row.is-invalid select { border-color: #b84b3e; }
@media (max-width: 900px) {
  .gp-v2-advanced-fields.has-multi-provider { grid-template-columns: 1fr; }
  .gp-v2-component-row { grid-template-columns: 1fr 1fr; }
  .gp-v2-component-row [data-remove-component] { grid-column: 2; justify-self: end; }
}
.gp-v2-provider-create input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: .4rem .5rem;
  background: #fff;
  color: var(--ink);
  font-size: .82rem;
}
.gp-v2-provider-create button {
  border: 1px solid #d7b993;
  border-radius: 7px;
  padding: .35rem .48rem;
  background: #fff;
  color: var(--interna);
  font-size: .76rem;
  font-weight: 700;
  cursor: pointer;
}
.gp-v2-provider-create button:hover { background: #fff4df; }
.gp-v2-provider-create small {
  grid-column: 1 / -1;
  color: #a33a2b;
  font-size: .72rem;
}

@media (max-width: 920px) {
  .gp-v2-advanced-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .gp-v2-advanced-fields { grid-template-columns: 1fr; }
}

/* Panel de Control Financiero por capítulos */
.gpc-eyebrow {
  display: block;
  color: var(--accent);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.gpc-overview {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(0, 2fr);
  gap: 1px;
  margin-bottom: .85rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.gpc-overview > div { background: var(--surface); }
.gpc-overview__intro { padding: 1.15rem 1.2rem; }
.gpc-overview__intro h2 { margin: .18rem 0 .3rem; font-size: 1.28rem; }
.gpc-overview__intro p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.gpc-overview__numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.gpc-overview__metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 1rem .9rem;
  border-left: 1px solid var(--line);
}
.gpc-overview__metric span,
.gpc-hero span,
.gpc-kpi span { color: var(--muted); font-size: .7rem; }
.gpc-overview__metric strong {
  margin-top: .15rem;
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gpc-overview__metric--primary { background: #faf7f3; }
.gpc-overview__metric--primary strong { color: var(--pos); font-size: 1.24rem; }

.gpc-cash { padding: .9rem 1rem; }
.gpc-cash { grid-column: 1 / -1; }
.gpc-cash__head,
.gpc-cash__split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
}
.gpc-cash__head strong { display: block; margin-top: .12rem; font-size: .9rem; }
.gpc-cash__head > span { color: var(--muted); font-size: .7rem; text-align: right; }
.gpc-progress {
  height: 7px;
  margin: .62rem 0 .48rem;
  overflow: hidden;
  border-radius: 99px;
  background: #ece7e0;
}
.gpc-progress span { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: var(--pos); }
.gpc-cash__split { align-items: flex-start; font-size: .66rem; color: var(--muted); }
.gpc-cash__split span { display: flex; flex-wrap: wrap; align-items: center; gap: .22rem; }
.gpc-cash__split strong { color: var(--ink); white-space: nowrap; }
.gpc-cash__note {
  margin: .55rem 0 0;
  padding-top: .5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.4;
}
.gpc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.gpc-dot--ok { background: var(--pos); }
.gpc-dot--warn { background: var(--interna); }

.gpc-alerts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  margin-bottom: 1rem;
}
.gpc-alert {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  padding: .55rem .65rem;
  border: 1px solid #eadcc6;
  border-radius: 9px;
  background: var(--interna-bg);
  color: #75551f;
  font-size: .7rem;
  line-height: 1.3;
  text-decoration: none;
}
.gpc-alert > span:first-child {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #ead8b8;
  font-weight: 800;
}
.gpc-alert.is-clear { border-color: #dce9e1; background: #f3f8f5; color: var(--pos); }
.gpc-alert.is-clear > span:first-child { background: #dcebe2; }
.gpc-alert:hover { border-color: currentColor; }

.gpc-setup {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1rem;
  padding: .8rem 1rem;
  border: 1px dashed #cdb7a8;
  border-radius: 11px;
  background: #faf7f3;
}
.gpc-setup > div { margin-right: auto; }
.gpc-setup p { margin: .1rem 0 0; color: var(--muted); font-size: .72rem; }
.gpc-setup form { margin: 0; }
.gpc-setup__single { display: flex; gap: .35rem; }
.gpc-setup select,
.gpc-setup input {
  height: 34px;
  padding: 0 .55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: .76rem;
}

.gpc-chapters { display: grid; gap: .85rem; }
.gpc-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  background: var(--surface);
}
.gpc-card--a { border-left-color: #587b6a; }
.gpc-card--b { border-left-color: #5f7897; }
.gpc-card--c { border-left-color: #8b6f96; }
.gpc-card--mixto { border-left-color: var(--interna); }
.gpc-card--honorarios { background: #fdfbfe; }
.gpc-card__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem .8rem;
}
.gpc-card__identity { display: flex; align-items: flex-start; gap: .75rem; min-width: 0; }
.gpc-card__icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #faf8f5;
  color: var(--accent);
  font-size: 1.05rem;
}
.gpc-card__icon svg { width: 17px; height: 17px; }
.gpc-card__titleline { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.gpc-card__titleline h3 { margin: 0; font-size: 1.08rem; line-height: 1.2; }
.gpc-form,
.gpc-state,
.gpc-health {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  border-radius: 99px;
  font-size: .64rem;
  font-weight: 650;
  line-height: 1.2;
}
.gpc-form { padding: .22rem .48rem; background: var(--accent-soft); color: #76503a; }
.gpc-form--a { background: #e8f0eb; color: #426554; }
.gpc-form--b { background: #e9eef4; color: #48627f; }
.gpc-form--c { background: #f0e9f2; color: #72587b; }
.gpc-form--mixto { background: var(--interna-bg); color: #8a6221; }
.gpc-health { margin-top: .38rem; color: var(--pos); }
.gpc-health > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #e4f0e8;
  font-size: .58rem;
  font-weight: 800;
}
.gpc-health--atencion { color: #8a6221; }
.gpc-health--atencion > span { background: #f3e6cd; }

.gpc-hero { display: grid; grid-template-columns: auto auto; gap: .6rem; text-align: right; }
.gpc-hero > div { min-width: 112px; padding-left: .7rem; border-left: 1px solid var(--line); }
.gpc-hero span { display: block; }
.gpc-hero strong { display: block; margin-top: .08rem; font-size: 1.12rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gpc-hero__primary strong { color: var(--pos); font-size: 1.3rem; }
.gpc-hero__secondary strong { color: #5f5a53; }

.gpc-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 1px;
  margin: 0 1.1rem .75rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--line);
}
.gpc-kpi { min-width: 0; padding: .52rem .62rem; background: #faf9f7; }
.gpc-kpi span { display: block; line-height: 1.25; }
.gpc-kpi strong { display: block; margin-top: .14rem; font-size: .87rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gpc-kpi--positivo strong { color: var(--pos); }
.gpc-kpi--atencion strong { color: #92671f; }
.gpc-kpi--interno { background: var(--interna-bg); }
.gpc-kpi--informativo { background: #f1f5f8; }

.gpc-card__alerts {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0 1.1rem .75rem;
}
.gpc-card__alerts a {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .26rem .48rem;
  border-radius: 7px;
  background: var(--interna-bg);
  color: #805a1f;
  font-size: .67rem;
  font-weight: 650;
  text-decoration: none;
}
.gpc-card__alerts a:hover { text-decoration: underline; }

.gpc-detail { border-top: 1px solid var(--line); }
.gpc-detail > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .68rem 1.1rem;
  color: var(--muted);
  background: #fcfbfa;
  cursor: pointer;
  font-size: .72rem;
  list-style: none;
}
.gpc-detail > summary::-webkit-details-marker { display: none; }
.gpc-detail > summary:hover { color: var(--ink); background: #faf8f5; }
.gpc-detail > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.gpc-detail__toggle { display: inline-flex; align-items: center; gap: .35rem; color: var(--accent); font-weight: 700; }
.gpc-detail__hide { display: none; }
.gpc-detail__chevron { display: inline-block; font-size: 1rem; transition: transform .18s ease; }
.gpc-detail[open] .gpc-detail__show { display: none; }
.gpc-detail[open] .gpc-detail__hide { display: inline; }
.gpc-detail[open] .gpc-detail__chevron { transform: rotate(180deg); }
.gpc-detail__body { display: grid; gap: .7rem; padding: .85rem 1.1rem 1rem; background: #f9f7f4; }

.gpc-flow-segments { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .5rem; }
.gpc-flow-segments > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .2rem .7rem;
  padding: .6rem .7rem;
  border: 1px solid #eadcc6;
  border-radius: 9px;
  background: var(--interna-bg);
  font-size: .68rem;
}
.gpc-flow-segments > div strong { grid-column: 1 / -1; }
.gpc-flow-segments > div span { color: var(--muted); }

.gpc-provider { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.gpc-provider--missing { border-color: #dec8a3; }
.gpc-provider__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem .7rem;
  border-bottom: 1px solid var(--line);
  background: #fcfbfa;
  font-size: .72rem;
}
.gpc-provider__head > div { display: flex; flex-wrap: wrap; align-items: center; gap: .42rem; }
.gpc-provider__head span { color: var(--muted); }
.gpc-provider__icon { color: var(--accent); font-size: .9rem; }
.gpc-provider__actions { justify-content: flex-end; }
.gpc-provider__actions > span { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.gpc-provider__actions a { color: #486b8f; font-weight: 650; text-decoration: none; }
.gpc-provider__actions a:hover { text-decoration: underline; }

.gpc-parts { display: grid; }
.gpc-part {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(350px, 1.5fr);
  gap: 1rem;
  align-items: center;
  padding: .62rem .7rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.gpc-part:last-child { border-bottom: 0; }
.gpc-part:hover { background: #faf8f5; }
.gpc-part:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.gpc-part__main { min-width: 0; }
.gpc-part__main > div { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.gpc-part__main > span { display: block; margin-top: .22rem; color: var(--muted); font-size: .68rem; }
.gpc-state { padding: .17rem .4rem; background: #f0eeeb; color: #6f6961; text-transform: none; }
.gpc-state--aprobado,
.gpc-state--cobrado,
.gpc-state--recibido,
.gpc-state--instalado,
.gpc-state--cerrado { background: #e6f1ea; color: var(--pos); }
.gpc-state--enviado,
.gpc-state--pedido,
.gpc-state--en_produccion { background: #e7eef5; color: #496b91; }
.gpc-state--parcialmente_cobrado { background: var(--interna-bg); color: #8a6221; }
.gpc-state--cancelado { background: #f8e9e5; color: var(--neg); }
.gpc-part__money {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
  margin: 0;
  text-align: right;
}
.gpc-part__money div { min-width: 0; }
.gpc-part__money dt { color: var(--muted); font-size: .62rem; font-weight: 400; }
.gpc-part__money dd { margin: .12rem 0 0; font-size: .76rem; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }

.gpc-empty {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 76px;
  padding: .75rem .9rem;
  border: 1px dashed #d6cec4;
  border-radius: 10px;
  background: #fff;
}
.gpc-empty > span { color: var(--accent); font-size: 1.15rem; }
.gpc-empty > div { margin-right: auto; }
.gpc-empty strong { font-size: .8rem; }
.gpc-empty p { margin: .15rem 0 0; color: var(--muted); font-size: .7rem; }
.gpc-empty a { color: var(--accent); font-size: .72rem; font-weight: 700; text-decoration: none; }
.gpc-empty--page { background: var(--surface); }

@media (max-width: 760px) {
  .gpc-overview { grid-template-columns: 1fr; }
  .gpc-cash { grid-column: auto; }
  .gpc-overview__numbers { border-top: 1px solid var(--line); }
  .gpc-overview__metric:first-child { border-left: 0; }
  .gpc-alerts { grid-template-columns: 1fr; }
  .gpc-setup { align-items: stretch; flex-direction: column; }
  .gpc-setup > div { margin-right: 0; }
  .gpc-setup__single { display: grid; grid-template-columns: 1fr 1fr; }
  .gpc-setup__single label,
  .gpc-setup__single select { width: 100%; }
  .gpc-setup__single button { grid-column: 1 / -1; }
  .gpc-card__head { grid-template-columns: 1fr; }
  .gpc-hero { grid-template-columns: 1fr 1fr; text-align: left; }
  .gpc-hero > div { padding: .6rem 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .gpc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gpc-kpi strong { white-space: normal; overflow-wrap: anywhere; }
  .gpc-part { grid-template-columns: 1fr; gap: .55rem; }
  .gpc-part__money { text-align: left; }
  .gpc-provider__head { align-items: flex-start; flex-direction: column; }
  .gpc-provider__actions { justify-content: flex-start; }
}

@media (max-width: 430px) {
  .gpc-overview__numbers { grid-template-columns: 1fr; }
  .gpc-overview__metric { border-left: 0; border-top: 1px solid var(--line); }
  .gpc-card__head,
  .gpc-detail__body { padding-left: .8rem; padding-right: .8rem; }
  .gpc-kpis,
  .gpc-card__alerts { margin-left: .8rem; margin-right: .8rem; }
  .gpc-detail > summary { padding-left: .8rem; padding-right: .8rem; }
  .gpc-card__titleline { align-items: flex-start; flex-direction: column; }
  .gpc-hero { grid-template-columns: 1fr; }
  .gpc-part__money { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gpc-detail > summary > span:first-child { display: none; }
  .gpc-detail > summary { justify-content: flex-end; }
}

/* ================================================================
   Control unificado: stepper Clasificar → Pedidos → Cobros y pagos → Resultado
   ================================================================ */
.gpc-stepper {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .55rem; margin-bottom: 1.1rem;
}
.gpc-step {
  display: flex; align-items: center; gap: .55rem; min-width: 0; padding: .7rem .85rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  color: var(--muted); font: inherit; text-align: left; cursor: pointer;
}
.gpc-step:hover { border-color: #d7c2b2; color: var(--ink); }
.gpc-step.active { border-color: #cfb1a0; background: var(--accent-soft); color: #6f4938; }
.gpc-step.active .gpc-step__icon { color: var(--accent); }
.gpc-step.active .gpc-step__icon .gp-document-type-icon { color: currentColor; }
.gpc-step__icon {
  display: grid; flex: 0 0 auto; place-items: center; width: 30px; height: 30px;
  border-radius: 8px; background: rgba(0,0,0,.05); color: var(--accent);
}
.gpc-step.active .gpc-step__icon { background: rgba(156,107,79,.12); }
.gpc-step__icon svg { width: 16px; height: 16px; }
.gpc-step__label { flex: 1; min-width: 0; font-size: .8rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gpc-step__badge {
  display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 .35rem; border-radius: 99px;
  background: var(--interna-bg); color: #8a6221; font-size: .68rem; font-weight: 800;
}
.gpc-step.active .gpc-step__badge { background: #e2cbbb; color: #6f4938; }

.gpc-paso { display: grid; gap: 1rem; }
.gpc-paso-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.gpc-paso-head h2 { margin: .1rem 0 0; font-size: 1.2rem; }
.gpc-paso-head p { margin: 0; color: var(--muted); font-size: .82rem; }

/* Ítems con imagen: grupos Capítulo → Proveedor → Partida en el paso Pedidos */
.gpc-item-thumb {
  display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px;
  overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #faf8f5; color: var(--accent);
}
.gpc-item-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gpc-item-thumb svg { width: 16px; height: 16px; }
.gpc-item-trace { display: block; margin-top: .14rem; color: var(--muted); font-size: .68rem; font-weight: 500; }
.gpc-items-table { width: 100%; border-collapse: collapse; }
.gpc-items-table td { padding: .5rem .55rem; border-top: 1px solid var(--line); font-size: .82rem; vertical-align: middle; }
.gpc-items-table tr:first-child td { border-top: 0; }
.gpc-items-table .titulo { display: flex; align-items: center; gap: .55rem; min-width: 220px; }
.gpc-items-table .titulo small { display: block; color: var(--muted); font-size: .68rem; }
.gpc-items-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gpc-items-table .interna { color: var(--interna); }
.gpc-partida-group { margin: .5rem 0 .85rem; }
.gpc-partida-group__head { display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; font-size: .78rem; font-weight: 650; }
.gpc-partida-group__head a { color: inherit; text-decoration: none; }
.gpc-partida-group__head a:hover { text-decoration: underline; }

/* Paso Cobros y pagos: cada libro de caja ocupa todo el ancho para leer sus documentos. */
.gpc-cobros-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 1.15rem; align-items: start; }
.gpc-cobros-col { min-width: 0; }
.gpc-cobros-col h3 { display: flex; align-items: center; gap: .4rem; margin: 0 0 .6rem; font-size: .85rem; }
.gpc-cobros-col h3 svg { width: 16px; height: 16px; color: var(--accent); }
.gpc-cobros-table-wrap { overflow-x:auto; padding: .8rem 1rem; }
.gpc-cobros-table { width:100%; min-width:680px; font-size:.82rem; }

@media (max-width: 760px) {
  .gpc-stepper { grid-template-columns: repeat(2, 1fr); }
  .gpc-step__label { font-size: .74rem; }
}

/* ================================================================
   Shell Houzz UX + Giina: sidebar global, cabecera sticky y cockpit
   ================================================================ */
:root { --sidebar-w:56px; --shadow-dropdown:0 12px 24px rgba(33,31,28,.12); }
html,body { min-height:100%; }
body { margin:0; background:var(--bg); }

.gp-global-sidebar {
  position:fixed; inset:0 auto 0 0; z-index:60; width:var(--sidebar-w);
  display:flex; flex-direction:column; align-items:center;
  padding:1rem 0; background:var(--ink); color:#fff;
}
.gp-global-sidebar__nav { display:grid; gap:.55rem; margin-top:.35rem; }
.gp-global-sidebar__divider { width:24px; height:1px; margin:.08rem auto; background:rgba(255,255,255,.13); }
.gp-global-sidebar__item {
  position:relative; width:40px; height:40px; display:grid; place-items:center; padding:0;
  border:0; border-radius:8px; background:transparent; color:#8c857c;
  text-decoration:none; cursor:pointer; transition:background .16s,color .16s;
}
.gp-global-sidebar__item[data-label]::after {
  content:attr(data-label); position:absolute; left:calc(100% + 9px); z-index:90;
  padding:.34rem .5rem; border-radius:6px; background:var(--ink); color:#fff;
  font-size:.68rem; font-weight:600; white-space:nowrap; pointer-events:none;
  opacity:0; transform:translateX(-3px); transition:opacity .12s,transform .12s;
}
.gp-global-sidebar__item[data-label]:hover::after,
.gp-global-sidebar__item[data-label]:focus-visible::after { opacity:1; transform:none; }
.gp-global-sidebar__item svg { width:19px; height:19px; fill:none; stroke:currentColor; }
.gp-global-sidebar__item:hover,.gp-global-sidebar__item:focus-visible { color:#fff; background:rgba(255,255,255,.1); outline:none; }
.gp-global-sidebar__item.active { color:#fff; background:rgba(255,255,255,.15); box-shadow:inset 2px 0 var(--accent); }
.gp-global-sidebar__logout { margin:auto 0 0; }

.gp-main-wrapper { min-height:100vh; display:flex; flex-direction:column; }
.gp-main-wrapper.with-sidebar { margin-left:var(--sidebar-w); }
.gp-top-header {
  position:sticky; top:0; z-index:50; min-height:60px;
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  padding:.55rem 1.5rem; border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.97); box-shadow:0 1px 0 rgba(33,31,28,.02);
  backdrop-filter:blur(14px);
}
.gp-top-header__user { color:var(--muted); font-size:.75rem; white-space:nowrap; }
.gp-workspace { flex:1; min-width:0; }
.gp-workspace-inner.gp-wrap {
  width:100%; max-width:1400px; box-sizing:border-box; margin:0 auto; padding:2rem 2rem 4rem;
}
.gp-v2-body .gp-workspace-inner.gp-wrap { max-width:1400px; padding:1.25rem 2rem 4rem; }

.gp-breadcrumb-nav { min-width:0; display:flex; align-items:center; font-size:.84rem; }
.gp-breadcrumb-nav .divider { margin:0 .18rem; color:var(--muted); }
.gp-breadcrumb-btn {
  min-width:0; display:inline-flex; align-items:center; gap:.42rem;
  padding:.42rem .58rem; border:1px solid transparent; border-radius:8px;
  background:transparent; color:var(--ink); font:inherit; font-weight:650;
  line-height:1.2; text-decoration:none; cursor:pointer; white-space:nowrap;
}
.gp-breadcrumb-btn:hover,.gp-breadcrumb-btn:focus-visible { background:var(--bg); color:var(--ink); outline:none; }
.gp-breadcrumb-btn.current { max-width:310px; }
.gp-breadcrumb-btn svg { width:15px; height:15px; flex:0 0 auto; fill:none; stroke:currentColor; }
.gp-breadcrumb-brand img { display:block; width:74px; height:auto; }

/* Cartera de proyectos: jerarquía por actividad documental y estado operativo. */
.gp-projects-dashboard-head { display:flex; justify-content:space-between; align-items:flex-end; gap:2rem; margin-bottom:1.2rem; }
.gp-projects-dashboard-head h1 { margin:.15rem 0 .25rem; font-size:2rem; letter-spacing:-.035em; }
.gp-projects-dashboard-head p { margin:0; color:var(--muted); font-size:.88rem; }
.gp-projects-dashboard-summary { display:flex; overflow:hidden; border:1px solid var(--line); border-radius:11px; background:#fff; }
.gp-projects-dashboard-summary span { display:grid; min-width:86px; padding:.65rem .8rem; border-left:1px solid var(--line); color:var(--muted); font-size:.68rem; text-align:center; }
.gp-projects-dashboard-summary span:first-child { border-left:0; }
.gp-projects-dashboard-summary strong { color:var(--ink); font-size:1rem; }
.gp-projects-filters { display:flex; gap:.4rem; margin-bottom:1.5rem; padding:.3rem; overflow-x:auto; border:1px solid var(--line); border-radius:11px; background:#fff; }
.gp-projects-filters button { display:inline-flex; align-items:center; gap:.45rem; padding:.55rem .8rem; border:0; border-radius:8px; color:var(--muted); background:transparent; font:inherit; font-size:.78rem; cursor:pointer; white-space:nowrap; }
.gp-projects-filters button span { display:grid; place-items:center; min-width:20px; height:20px; padding:0 .3rem; border-radius:999px; background:var(--bg); font-size:.66rem; }
.gp-projects-filters button.on { color:#fff; background:var(--ink); }
.gp-projects-filters button.on span { color:var(--ink); background:#fff; }
.gp-projects-group { margin-bottom:2rem; }
.gp-projects-group__head { display:flex; justify-content:space-between; align-items:end; gap:1rem; margin-bottom:.75rem; }
.gp-projects-group__head h2 { margin:0 0 .15rem; font-size:1rem; }
.gp-projects-group__head p,.gp-projects-group__head > span { margin:0; color:var(--muted); font-size:.72rem; }
.gp-projects-card-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:.85rem; }
.gp-project-overview-card { position:relative; overflow:hidden; border:1px solid #dcd7ce; border-radius:14px; background:#fff; box-shadow:0 8px 24px rgba(33,31,28,.055); transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease; }
.gp-project-overview-card::before { content:""; position:absolute; inset:0 0 auto; height:4px; background:#1d7a4c; }
.gp-project-overview-card.is-recent { border-color:#cfe1d6; box-shadow:0 12px 30px rgba(29,122,76,.09); }
.gp-project-overview-card:hover { transform:translateY(-2px); box-shadow:0 14px 34px rgba(33,31,28,.1); }
.gp-project-overview-card.is-secondary { box-shadow:none; }
.gp-project-overview-card.is-secondary::before { height:3px; background:#c6bfb5; }
.gp-project-overview-card.state-pausado::before { background:#b78235; }
.gp-project-overview-card.state-cerrado::before,.gp-project-overview-card.state-cancelado::before { background:#8c857c; }
.gp-project-overview-card__main { display:block; padding:1.1rem 1.15rem .9rem; color:inherit; text-decoration:none; }
.gp-project-overview-card.is-secondary .gp-project-overview-card__main { background:#fcfbf9; }
.gp-project-overview-card__top { display:flex; justify-content:space-between; align-items:center; gap:1rem; margin-bottom:.75rem; }
.gp-project-overview-card__eyebrow { color:#50755e; font-size:.63rem; font-weight:750; letter-spacing:.09em; text-transform:uppercase; }
.gp-project-overview-card.is-secondary .gp-project-overview-card__eyebrow { color:var(--muted); }
.gp-project-overview-card h2 { margin:0; overflow:hidden; font-size:1.18rem; letter-spacing:-.02em; text-overflow:ellipsis; white-space:nowrap; }
.gp-project-overview-card__client { margin:.18rem 0 .9rem; overflow:hidden; color:var(--muted); font-size:.8rem; text-overflow:ellipsis; white-space:nowrap; }
.gp-project-overview-card__activity { display:grid; grid-template-columns:32px minmax(0,1fr) auto; align-items:center; gap:.65rem; min-height:54px; padding:.65rem .7rem; border:1px solid #e9e5df; border-radius:10px; background:#faf9f7; }
.gp-project-overview-card__activity.is-empty { grid-template-columns:32px minmax(0,1fr); }
.gp-project-overview-card__docicon,.gp-project-overview-card__emptymark { display:grid; place-items:center; width:32px; height:32px; border-radius:8px; background:#fff; }
.gp-project-overview-card__docicon .gp-document-type-icon { width:18px; height:18px; }
.gp-project-overview-card__emptymark { color:var(--muted); }
.gp-project-overview-card__activity > span:nth-child(2) { display:grid; min-width:0; }
.gp-project-overview-card__activity small { color:var(--muted); font-size:.62rem; }
.gp-project-overview-card__activity strong { overflow:hidden; font-size:.78rem; text-overflow:ellipsis; white-space:nowrap; }
.gp-project-overview-card__activity time { color:#50755e; font-size:.68rem; white-space:nowrap; }
.gp-project-overview-card__counts { display:grid; grid-template-columns:repeat(4,1fr); margin:0 1.15rem; overflow:hidden; border:1px solid #eeeae4; border-radius:9px; }
.gp-project-overview-card__count { display:flex; align-items:center; justify-content:center; gap:.34rem; min-width:0; padding:.48rem .25rem; border-left:1px solid #eeeae4; color:var(--muted); text-align:center; text-decoration:none; transition:background .15s ease; }
.gp-project-overview-card__count:first-child { border-left:0; }
.gp-project-overview-card__count > span { display:grid; justify-items:start; min-width:0; }
.gp-project-overview-card__count strong { color:var(--ink); font-size:.8rem; line-height:1; }
.gp-project-overview-card__count small { overflow:hidden; max-width:100%; color:inherit; font-size:.55rem; line-height:1.2; text-overflow:ellipsis; text-transform:uppercase; white-space:nowrap; }
.gp-project-overview-card__count .gp-document-type-icon { width:15px; height:15px; flex:0 0 auto; }
.gp-project-overview-card__count:hover { background:#faf9f7; }
.gp-project-overview-card__count.is-presupuesto:hover { background:var(--doc-presupuesto-bg); }.gp-project-overview-card__count.is-proforma:hover { background:var(--doc-proforma-bg); }.gp-project-overview-card__count.is-factura:hover { background:var(--doc-factura-bg); }.gp-project-overview-card__count.is-pedido:hover { background:var(--doc-pedido-bg); }
.gp-project-overview-card__dates { display:flex; justify-content:space-between; gap:.5rem; margin:.6rem 1.15rem .9rem; color:var(--muted); font-size:.64rem; }
.gp-projects-empty,.gp-projects-filter-empty { padding:2rem; color:var(--muted); text-align:center; }
.gp-project-view-dropdown { position:relative; min-width:0; }
.gp-project-view-dropdown > summary { list-style:none; }
.gp-project-view-dropdown > summary::-webkit-details-marker { display:none; }
.gp-project-view-dropdown .caret { transition:transform .15s; }
.gp-project-view-dropdown[open] .caret { transform:rotate(180deg); }
.gp-project-view-dropdown__menu {
  position:absolute; top:calc(100% + .55rem); left:0; z-index:100;
  width:280px; padding:.5rem; border:1px solid var(--line); border-radius:9px;
  background:var(--surface); box-shadow:var(--shadow-dropdown);
}
.gp-project-view-dropdown__label {
  display:block; padding:.45rem .7rem; color:var(--muted); font-size:.63rem;
  font-weight:700; letter-spacing:.08em; text-transform:uppercase;
}
.gp-project-view-dropdown__menu a {
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  padding:.56rem .7rem; border-radius:6px; color:var(--ink);
  font-size:.79rem; text-decoration:none;
}
.gp-project-view-dropdown__menu a:hover,.gp-project-view-dropdown__menu a.active { background:var(--bg); }
.gp-project-view-dropdown__menu a.active { font-weight:700; box-shadow:inset 2px 0 var(--accent); }
.gp-project-view-dropdown__menu small {
  min-width:22px; padding:.08rem .35rem; border-radius:99px;
  background:#ece8e2; color:var(--muted); text-align:center; font-size:.62rem;
}

.gp-project-header-actions { display:flex; align-items:center; gap:.45rem; }
.gp-project-header-actions form { margin:0; }
.gp-header-chip {
  display:inline-flex; align-items:center; gap:.34rem; padding:.35rem .58rem; border:1px solid var(--line); border-radius:7px; color:var(--muted);
  font-size:.72rem; text-decoration:none; background:#fff;
}
.gp-header-chip svg,.gp-project-action svg { width:15px; height:15px; flex:0 0 auto; }
.gp-header-chip__brand { width:16px; height:16px; flex:0 0 auto; object-fit:contain; }
.gp-header-chip:hover { background:var(--bg); color:var(--accent); }
.gp-header-chip.drive:hover { border-color:#b8d9bf; }.gp-header-chip.canva:hover { border-color:#9be3e7; }
.gp-project-action { display:inline-flex; align-items:center; gap:.34rem; min-height:31px; padding:.38rem .65rem; border-radius:7px; font-size:.75rem; font-weight:700; }
.gp-project-action.gp-document-action--presupuesto { border-color:#e4c77c; background:#f5dfb2; color:#795a13; }.gp-project-action.gp-document-action--presupuesto:hover { background:#eed298; border-color:#d9b762; }
.gp-project-action.gp-document-action--proforma { border-color:#d7d0ed; background:var(--doc-proforma-bg); color:var(--doc-proforma); }.gp-project-action.gp-document-action--proforma:hover { border-color:var(--doc-proforma); background:#e4dff4; }
.gp-document-action--presupuesto .gp-document-type-icon { color:currentColor; }
.gp-project-page-heading { margin-bottom:1.25rem; }
.gp-project-page-heading > div { display:flex; align-items:center; gap:.65rem; }
.gp-project-page-heading h1 { margin:0; font-size:1.65rem; font-weight:650; letter-spacing:-.02em; }
.gp-project-page-heading p { margin:.16rem 0 0; color:var(--muted); }
.gp-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:.75rem; margin-bottom:1rem; }
.gp-kpis .gp-kpi { min-height:0; padding:.85rem 1rem; background:#fff; box-shadow:none; }
.gp-kpis .gp-kpi .k { color:var(--muted); font-size:.7rem; }
.gp-kpis .gp-kpi .v { margin-top:.2rem; font-size:1.2rem; font-weight:600; font-variant-numeric:tabular-nums; }
.gp-kpis .gp-kpi .v.ok { color:var(--pos); }
.gp-kpis .gp-kpi .v.warn { color:var(--interna); }
.gp-kpis .gp-kpi .v.neg { color:var(--neg); }
.gp-docrow { display:flex; align-items:center; gap:.7rem; padding:.65rem .1rem; border-bottom:1px solid var(--line); color:inherit; font-size:.82rem; text-decoration:none; }
.gp-docrow:last-child { border-bottom:0; }
.gp-docrow .num { min-width:90px; color:var(--muted); }
.gp-docrow .tit { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gp-docrow .tag { display:inline-flex; align-items:center; min-width:18px; }
.gp-docrow .tag .gp-document-type-icon { width:17px; height:17px; }
.gp-activity { padding:1rem 1.1rem; }
.gp-activity__title { margin:0 0 .7rem; font-size:.85rem; font-weight:600; }
.gp-activity .gp-tabs { display:flex; gap:6px; margin-bottom:.8rem; flex-wrap:wrap; }
.gp-activity .gp-tab { display:inline-flex; align-items:center; gap:6px; padding:5px 12px;
  border:1px solid var(--border); border-radius:8px; background:transparent; color:inherit;
  font-size:.8rem; cursor:pointer; }
.gp-activity .gp-tab .gp-document-type-icon { width:16px; height:16px; flex:none; }
.gp-activity .gp-tab.on { background:#211f1c; color:#fff; border-color:#211f1c; }
.gp-document-list { overflow:hidden; padding:.5rem 1rem; border:1px solid var(--line); border-radius:var(--radius); background:#fff; }
.gp-document-list-row { display:grid;
  grid-template-columns:28px minmax(92px,120px) minmax(140px,1fr) auto auto 18px;
  align-items:center; gap:10px; padding:9px 6px; border-bottom:1px solid var(--border);
  border-radius:6px; color:inherit; font-size:.9rem; text-decoration:none; }
.gp-document-list-row[hidden] { display:none; }
.gp-document-list-row:last-of-type { border-bottom:0; }
.gp-document-list-row:hover { text-decoration:none; }
.gp-document-list-row--presupuesto:hover { background:var(--doc-presupuesto-bg); }
.gp-document-list-row--proforma:hover { background:var(--doc-proforma-bg); }
.gp-document-list-row--factura:hover { background:var(--doc-factura-bg); }
.gp-document-list-row--pedido:hover { background:var(--doc-pedido-bg); }
.gp-document-list-row:focus-visible { outline:2px solid var(--tertiary,#8a4f30); outline-offset:2px; }
.gp-document-list-row__type { display:inline-flex; align-items:center; justify-content:center; }
.gp-document-list-row__type .gp-document-type-icon { width:18px; height:18px; }
.gp-document-list-row__number { min-width:0; color:var(--muted); font-variant-numeric:tabular-nums; }
.gp-document-list-row__title { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gp-document-list-row__title small { display:block; overflow:hidden; color:var(--muted); font-size:.72rem;
  font-weight:400; line-height:1.3; text-overflow:ellipsis; white-space:nowrap; }
.gp-document-list-row__amount { font-variant-numeric:tabular-nums; white-space:nowrap; }
.gp-document-list-row__open { width:16px; height:16px; color:var(--muted); }
.gp-activity__empty { padding:.6rem 2px; color:var(--muted); font-size:.85rem; }
@media (max-width:760px) {
  .gp-document-list-row {
    grid-template-columns:24px minmax(88px,110px) minmax(110px,1fr) 18px;
  }
  .gp-document-list-row__amount,.gp-document-list-row .gp-b { display:none; }
}
.gp-rail-card { margin-bottom:.75rem; padding:1rem; border:1px solid var(--line); border-radius:10px; background:#fff; }
.gp-rail-card h3 { margin:0 0 .55rem; font-size:.8rem; }
.gp-rail-card .muted { color:var(--muted); font-size:.76rem; line-height:1.55; }
.gp-avatar { width:34px; height:34px; display:grid; place-items:center; border-radius:50%; background:#e8eef7; color:#185fa5; font-size:.76rem; font-weight:650; }
.gp-chip { display:inline-flex; padding:.3rem .55rem; border:1px solid var(--line); border-radius:7px; color:var(--muted); font-size:.72rem; text-decoration:none; }
.gp-b { display:inline-flex; padding:.15rem .5rem; border-radius:99px; font-size:.68rem; }
.gp-b.muted { background:#f1efe8; color:#6f6a62; }
.gp-b.accent { background:#e8eef7; color:#185fa5; }
.gp-b.ok { background:#e3f2ea; color:#1d7a4c; }
.gp-b.warn { background:#f7efe2; color:#9c6b4f; }
.gp-b.danger { background:#f9e9e9; color:#a32d2d; }
.gp-top-header__document { width:100%; min-width:0; display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:1rem; }
.gp-top-header__document .gp-breadcrumb-nav { grid-column:1; }
.gp-top-header__document .gp-project-document-nav.compact { grid-column:2; width:auto; margin:0; }
.gp-top-header__document .gp-project-document-nav__switcher { grid-template-columns:34px minmax(190px,320px) 34px; }
.gp-top-header__document .gp-project-document-nav__menu > summary { min-height:42px; }

/* Zona interna: separación inequívoca entre cliente y cockpit Giina. */
.gp-table { width:100%; border-collapse:collapse; }
.gp-table thead th { padding:.85rem 1rem; }
.gp-table tbody td { padding:.78rem 1rem; }
.gp-table .col-interna,.gpc-part__money .col-interna {
  background:#fffcf8; border-left:1px dashed #f0e4cd;
}
.gp-table th.col-interna {
  background:var(--interna-bg); color:var(--interna);
  border-left:1px dashed #f0e4cd;
}
.gpc-part__money .col-interna { padding:.35rem .45rem; color:var(--interna); }
.gpc-internal-zone { background:var(--interna-bg)!important; border-left:1px dashed #f0e4cd!important; }
.gpc-internal-zone span { color:var(--interna); }
.gp-calc,.font-mono,.gp-money { font-variant-numeric:tabular-nums; font-weight:500; text-align:right; }
.gpc-eyebrow,.gp-proj-eyebrow {
  display:block; margin-bottom:.2rem; color:var(--accent); font-size:.68rem;
  font-weight:700; letter-spacing:.1em; text-transform:uppercase;
}

.pill-filters { display:flex; gap:.5rem; margin:0 0 1.25rem; padding-bottom:.2rem; overflow-x:auto; }
.pill-filter {
  padding:.38rem .9rem; border:1px solid var(--line); border-radius:99px;
  background:#fff; color:var(--muted); font:inherit; font-size:.76rem;
  font-weight:550; white-space:nowrap; cursor:pointer;
}
.pill-filter:hover { border-color:#d7c2b2; color:var(--ink); }
.pill-filter.active { border-color:var(--ink); background:var(--ink); color:#fff; }

.gp-flow-actions {
  display:flex; align-items:center; justify-content:space-between; gap:1.25rem;
  margin:0 0 1rem; padding:1rem 1.15rem; background:var(--surface);
  border:1px solid var(--line); border-left:3px solid var(--accent); border-radius:12px;
}
.gp-flow-actions > div:first-child { display:grid; gap:.18rem; }
.gp-flow-actions strong { font-size:1rem; }
.gp-flow-actions small,.gp-flow-help { color:var(--muted); }
.gp-flow-actions form { margin:0; }
.gp-flow-actions__buttons { display:flex!important; flex-direction:row!important; align-items:center; gap:.55rem!important; }
.gp-flow-help { margin:-.55rem 0 1rem; font-size:.82rem; }
.gp-flow-validation {
  margin:0 0 1rem; padding:.85rem 1rem; border:1px solid #e7bdb7;
  border-radius:10px; background:#fff7f5; color:#743b33;
}
.gp-flow-validation ul { margin:.45rem 0 0; padding-left:1.15rem; }
.gp-flow-validation li + li { margin-top:.35rem; }
.gp-flow-validation a { color:inherit; font-weight:600; }
.gp-flow-inline-fix { display:inline-flex; gap:.35rem; margin-left:.55rem; }
.gp-flow-inline-fix select,.gp-flow-inline-fix button { border:1px solid var(--line); border-radius:7px; background:#fff; padding:.3rem .45rem; }
.gp-flow-inline-fix button { color:#fff; background:var(--ink); border-color:var(--ink); }
.gp-save-toast {
  position:fixed; z-index:1200; right:1.25rem; bottom:1.25rem; max-width:390px;
  display:flex; align-items:center; gap:.75rem; padding:.8rem .9rem; border-radius:10px;
  color:#fff; background:var(--color-error); box-shadow:0 16px 40px rgba(33,31,28,.22);
}
.gp-save-toast[hidden] { display:none; }
.gp-save-toast button { margin-left:auto; border:1px solid rgba(255,255,255,.55); border-radius:7px; color:#fff; background:transparent; padding:.3rem .55rem; }
.gp-v2-save[data-state="No se pudo guardar el ítem"],
.gp-v2-save[data-state="Error al subir imagen"],
.gp-v2-saved-state [data-header-save-state][data-state="Error"] { color:var(--color-error); }
.gp-v2-actions .gp-btn { display:inline-flex; }

@media (max-width:760px) {
  body { padding-bottom:58px; }
  .gp-global-sidebar { inset:auto 0 0; width:100%; height:58px; padding:.35rem .45rem; flex-direction:row; justify-content:center; }
  .gp-global-sidebar__nav { display:flex; align-items:center; justify-content:flex-start; flex:1; min-width:0; gap:.18rem; margin:0; overflow-x:auto; scrollbar-width:none; }
  .gp-global-sidebar__nav::-webkit-scrollbar { display:none; }
  .gp-global-sidebar__item { flex:0 0 38px; width:38px; height:38px; }
  .gp-global-sidebar__divider { width:1px; height:24px; margin:0 .08rem; }
  .gp-global-sidebar__logout { margin:0 0 0 .18rem; }
  .gp-global-sidebar__item[data-label]::after { display:none; }
  .gp-main-wrapper.with-sidebar { margin-left:0; }
  .gp-top-header { align-items:stretch; flex-direction:column; gap:.35rem; padding:.48rem .7rem; }
  .gp-top-header > * { min-width:0; }
  .gp-top-header__user { display:none; }
  .gp-project-header-actions { width:100%; min-width:0; justify-content:flex-start; overflow-x:auto; scrollbar-width:none; padding-bottom:2px; }
  .gp-project-header-actions::-webkit-scrollbar { display:none; }
  .gp-project-header-actions form,.gp-project-header-actions a { flex:0 0 auto; }
  .gp-resumen-grid > div { min-width:0; }
  .gp-margen-hero,.gp-kpis { width:100%; max-width:100%; box-sizing:border-box; }
  .gp-project-header-actions .gp-header-chip { display:inline-flex; }
  .gp-top-header__document { display:flex; align-items:stretch; flex-direction:column; gap:.3rem; }
  .gp-top-header__document .gp-project-document-nav.compact { width:100%; margin:0; }
  .gp-top-header__document .gp-project-document-nav__switcher { grid-template-columns:34px minmax(0,1fr) 34px; width:100%; }
  .gp-workspace-inner.gp-wrap,.gp-v2-body .gp-workspace-inner.gp-wrap { padding:1.15rem .85rem 3rem; }
  .gp-breadcrumb-nav { width:100%; }
  .gp-breadcrumb-btn { overflow:hidden; text-overflow:ellipsis; }
  .gp-breadcrumb-brand img { width:66px; }
  .gp-projects-dashboard-head { align-items:stretch; flex-direction:column; gap:.9rem; }
  .gp-projects-dashboard-summary { width:100%; }
  .gp-projects-dashboard-summary span { flex:1; min-width:0; }
  .gp-projects-card-grid { grid-template-columns:1fr; }
  .gp-project-view-dropdown { min-width:0; }
  .gp-project-view-dropdown__menu { right:0; left:auto; width:min(280px,calc(100vw - 1.4rem)); }
  .gp-flow-actions { align-items:stretch; flex-direction:column; }
  .gp-flow-actions__buttons { width:100%; flex-wrap:wrap; }
  .gp-flow-actions__buttons .gp-btn,.gp-flow-actions > form .gp-btn,.gp-flow-actions > .gp-btn { width:100%; text-align:center; }
  .gp-flow-inline-fix { display:flex; margin:.4rem 0 0; }
  .gp-flow-inline-fix select { min-width:0; flex:1; }
  .gp-save-toast { left:.65rem; right:.65rem; bottom:calc(58px + .65rem); }
}

/* Correcciones visuales P0 · editor documental y navegación de proyecto */
:root { --project-sidebar-w:224px; }

.gp-project-sidebar {
  position:fixed; inset:0 auto 0 0; z-index:55; width:var(--project-sidebar-w);
  overflow-y:auto; padding:1.1rem .7rem 1.5rem; border-right:1px solid var(--line);
  background:#fbfaf8; box-shadow:5px 0 20px rgba(33,31,28,.035);
}
.gp-global-sidebar + .gp-project-sidebar { left:var(--sidebar-w); }
.gp-main-wrapper.with-project-sidebar { margin-left:var(--project-sidebar-w); }
.gp-main-wrapper.with-sidebar.with-project-sidebar { margin-left:calc(var(--sidebar-w) + var(--project-sidebar-w)); }
.gp-project-sidebar__head { margin:0 .35rem 1.2rem; padding:.2rem .25rem 1rem; border-bottom:1px solid var(--line); }
.gp-project-sidebar__head span { display:block; margin-bottom:.28rem; color:var(--muted); font-size:.62rem; font-weight:750; letter-spacing:.1em; text-transform:uppercase; }
.gp-project-sidebar__head a { display:block; overflow:hidden; color:var(--ink); font-size:.9rem; font-weight:700; line-height:1.35; text-decoration:none; text-overflow:ellipsis; }
.gp-project-sidebar__nav { display:grid; gap:.16rem; }
.gp-project-sidebar__label { margin:1rem .6rem .35rem; color:var(--muted); font-size:.61rem; font-weight:750; letter-spacing:.09em; text-transform:uppercase; }
.gp-project-sidebar__label:first-child { margin-top:0; }
.gp-project-sidebar__nav a { display:block; padding:.52rem .62rem; border-radius:7px; color:#403d38; font-size:.78rem; line-height:1.25; text-decoration:none; }
.gp-project-sidebar__nav a:hover { background:#f1eeea; color:var(--ink); }
.gp-project-sidebar__nav a.active { background:#f0ece8; color:var(--ink); font-weight:700; box-shadow:inset 2px 0 var(--accent); }

.gp-v2-layout { grid-template-columns:minmax(0,1fr) minmax(350px,380px); }
.gp-v2-panel-title { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; }
.gp-v2-panel-title strong,
.gp-v2-total-row strong,
.gp-v2-pay-mini,
.gp-v2-received-row strong { white-space:nowrap; }
.gp-v2-panel-title strong { font-size:clamp(1.08rem,1.45vw,1.35rem); text-align:right; }
.gp-v2-item-main { grid-template-columns:24px 100px minmax(0,1fr); }
.gp-v2-media-tile { width:92px; height:92px; border-radius:12px; background:#f5f2ed; }
.gp-v2-photo { border:0; }
.gp-v2-photo img { padding:0; object-fit:cover; }
.gp-v2-vis-toggle { position:relative; z-index:2; }

.gp-v2-general-visibility button { display:grid; place-items:center; margin:0; padding:0; border:0; border-radius:50%; background:transparent; cursor:pointer; }
.gp-v2-general-visibility button svg { display:grid; place-items:center; width:28px; height:28px; padding:6px; box-sizing:border-box; border-radius:50%; color:var(--accent); background:#f6ebe4; }
.gp-v2-general-visibility button svg .eye-slash { opacity:0; }
.gp-v2-general-visibility input:not(:checked) + button svg { color:#a29a88; background:#f0eeeb; }
.gp-v2-general-visibility input:not(:checked) + button svg .eye-open { opacity:.3; }
.gp-v2-general-visibility input:not(:checked) + button svg .eye-slash { opacity:1; }
.gp-v2-general-visibility button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

/* Editor ordenado de la biblioteca */
.gp-library-editor-head { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; max-width:1180px; margin:0 auto 1.2rem; }
.gp-library-editor-head h1 { margin:.12rem 0 0; font-size:1.75rem; letter-spacing:-.025em; }
.gp-library-editor-head p { margin:.35rem 0 0; color:var(--muted); }
.gp-library-editor { display:grid; grid-template-columns:minmax(0,1fr) 310px; gap:1rem; max-width:1180px; margin:0 auto; }
.gp-library-editor__main,
.gp-library-editor__media { border:1px solid var(--line); border-radius:13px; background:var(--surface); box-shadow:var(--shadow); }
.gp-library-editor__main { overflow:hidden; }
.gp-library-section { display:grid; grid-template-columns:190px minmax(0,1fr); gap:1.4rem; padding:1.5rem; }
.gp-library-section + .gp-library-section { border-top:1px solid var(--line); }
.gp-library-section__head { display:flex; align-items:flex-start; gap:.65rem; }
.gp-library-section__head > span { display:grid; place-items:center; flex:0 0 28px; height:28px; border-radius:50%; background:var(--accent-soft); color:var(--accent); font-size:.65rem; font-weight:750; }
.gp-library-section__head h2 { margin:.18rem 0 .25rem; font-size:.9rem; }
.gp-library-section__head p { margin:0; color:var(--muted); font-size:.72rem; line-height:1.45; }
.gp-library-fields { display:grid; gap:.85rem; min-width:0; }
.gp-library-fields--identity { grid-template-columns:minmax(0,1.65fr) minmax(150px,.75fr); }
.gp-library-fields--three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.gp-library-fields--four { grid-template-columns:repeat(4,minmax(0,1fr)); }
.gp-library-fields--classification { grid-template-columns:repeat(6,minmax(0,1fr)); align-items:start; }
.gp-library-classification--type { grid-column:1 / 5; }
.gp-library-classification--unit { grid-column:5 / 7; }
.gp-library-classification--brand { grid-column:1 / 4; }
.gp-library-classification--supplier { grid-column:4 / 7; }
.gp-library-fields--commercial { grid-template-columns:minmax(150px,.65fr) minmax(0,1.55fr); align-items:start; }
.gp-library-field { display:grid; gap:.4rem; min-width:0; color:#4c4842; font-size:.73rem; font-weight:650; }
.gp-library-field input,
.gp-library-field select,
.gp-library-field textarea { width:100%; min-width:0; padding:.68rem .72rem; border:1px solid #dcd6ce; border-radius:8px; outline:0; background:#fff; color:var(--ink); font:inherit; font-size:.84rem; font-weight:400; }
.gp-library-field textarea { resize:vertical; line-height:1.5; }
.gp-library-description-head { display:flex; align-items:center; justify-content:space-between; gap:.75rem; }
.gp-library-description-head label { font:inherit; color:inherit; }
.gp-library-description-status { min-height:.8rem; color:var(--muted); font-size:.66rem; font-weight:400; }
.gp-library-description-status.is-error { color:var(--neg); }
.gp-library-master__select { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.4rem; }
.gp-library-master__select > button,
.gp-library-master__create > button { padding:.55rem .65rem; border:1px solid #dcd6ce; border-radius:8px; color:var(--accent); background:#fff; font:inherit; font-size:.72rem; font-weight:700; white-space:nowrap; cursor:pointer; }
.gp-library-master__select > button:hover,
.gp-library-master__create > button:hover { border-color:#c9b09d; background:var(--accent-soft); }
.gp-library-master__create { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:.35rem; }
.gp-library-master__create[hidden] { display:none; }
.gp-library-master__create > button:last-child { color:var(--muted); }
.gp-library-master > small { min-height:.8rem; color:var(--neg); font-size:.66rem; }
.gp-library-field input:focus,
.gp-library-field select:focus,
.gp-library-field textarea:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(156,107,79,.11); }
.gp-library-availability { display:flex; align-items:center; gap:.75rem; margin:0; padding:1.05rem 1.5rem; border-top:1px solid var(--line); cursor:pointer; }
.gp-library-availability > input { position:absolute; opacity:0; }
.gp-library-switch { position:relative; flex:0 0 36px; height:20px; border-radius:99px; background:#c9c3bb; transition:.15s; }
.gp-library-switch::after { content:""; position:absolute; top:3px; left:3px; width:14px; height:14px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.2); transition:.15s; }
.gp-library-availability > input:checked + .gp-library-switch { background:var(--pos); }
.gp-library-availability > input:checked + .gp-library-switch::after { transform:translateX(16px); }
.gp-library-availability > input:focus-visible + .gp-library-switch { outline:2px solid var(--accent); outline-offset:2px; }
.gp-library-availability > span:last-child { display:grid; gap:.12rem; }
.gp-library-availability strong { font-size:.8rem; }
.gp-library-availability small { color:var(--muted); font-size:.7rem; }
.gp-library-editor__media { align-self:start; position:sticky; top:78px; padding:1rem; }
.gp-library-media-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:.8rem; }
.gp-library-media-head span { font-size:.82rem; font-weight:700; }
.gp-library-media-head small { color:var(--muted); font-size:.66rem; text-transform:uppercase; letter-spacing:.06em; }
.gp-library-image-preview { display:grid; place-items:center; aspect-ratio:1; margin-bottom:1rem; overflow:hidden; border:1px dashed #d7d0c7; border-radius:11px; background:#f8f6f2; }
.gp-library-image-preview.has-image { border-style:solid; background:#fff; }
.gp-library-image-preview img { display:block; width:100%; height:100%; object-fit:cover; }
.gp-library-image-preview > div { display:grid; place-items:center; gap:.35rem; padding:1.5rem; color:var(--muted); text-align:center; }
.gp-library-image-preview > div > span { display:grid; place-items:center; width:38px; height:38px; border-radius:50%; background:var(--accent-soft); color:var(--accent); font-size:1.25rem; }
.gp-library-image-preview > div strong { color:#59544e; font-size:.8rem; }
.gp-library-image-preview > div small { line-height:1.4; }
.gp-library-media-actions { display:flex; gap:.45rem; margin:-.35rem 0 .85rem; }
.gp-library-media-actions .gp-btn { flex:1; padding:.5rem .65rem; font-size:.72rem; }
.gp-library-image-remove { color:var(--neg); }
.gp-library-media-help { margin:.7rem 0 0; color:var(--muted); font-size:.69rem; line-height:1.45; }
.gp-library-icon-picker { margin-top:1rem; padding-top:1rem; border-top:1px solid var(--line); }
.gp-library-icon-picker > p { margin:-.35rem 0 .75rem; color:var(--muted); font-size:.69rem; line-height:1.4; }
.gp-library-icon-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.45rem; }
.gp-library-icon-grid label { min-width:0; border:1px solid var(--line); border-radius:9px; padding:.55rem .35rem; display:grid; place-items:center; gap:.3rem; cursor:pointer; color:var(--ink); }
.gp-library-icon-grid label:has(input:checked) { border-color:var(--accent); background:#f7efe8; box-shadow:0 0 0 1px var(--accent); }
.gp-library-icon-grid input { position:absolute; opacity:0; pointer-events:none; }
.gp-library-icon-grid svg { width:28px; height:28px; }
.gp-library-icon-grid span { width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:center; font-size:.58rem; color:var(--muted); }
.gp-library-editor__actions { grid-column:1 / -1; display:flex; justify-content:flex-end; gap:.55rem; padding-top:.15rem; }

@media (max-width:1100px) {
  .gp-project-sidebar { display:none; }
  .gp-main-wrapper.with-project-sidebar,
  .gp-main-wrapper.with-sidebar.with-project-sidebar { margin-left:var(--sidebar-w); }
  .gp-main-wrapper.with-project-sidebar:not(.with-sidebar) { margin-left:0; }
}
@media (min-width:1101px) and (max-width:1450px) {
  .with-project-sidebar .gp-v2-layout { grid-template-columns:1fr; }
  .with-project-sidebar .gp-v2-side { position:static; grid-template-columns:minmax(0,1fr) minmax(300px,360px); }
}
@media (max-width:900px) {
  .gp-library-editor { grid-template-columns:1fr; }
  .gp-library-editor__media { position:static; display:grid; grid-template-columns:220px minmax(0,1fr); gap:1rem; align-items:start; }
  .gp-library-media-head { grid-column:1 / -1; margin-bottom:0; }
  .gp-library-image-preview { grid-row:2 / span 2; margin:0; }
}
@media (max-width:760px) {
  .gp-main-wrapper.with-project-sidebar,
  .gp-main-wrapper.with-sidebar.with-project-sidebar { margin-left:0; }
  .gp-library-editor-head { align-items:flex-start; flex-direction:column; }
  .gp-library-editor { display:block; }
  .gp-library-section { grid-template-columns:1fr; gap:.85rem; padding:1.15rem; }
  .gp-library-section__head p { max-width:35rem; }
  .gp-library-fields--identity,
  .gp-library-fields--three,
  .gp-library-fields--four,
  .gp-library-fields--classification,
  .gp-library-fields--commercial { grid-template-columns:1fr; }
  .gp-library-classification--type,
  .gp-library-classification--unit,
  .gp-library-classification--brand,
  .gp-library-classification--supplier { grid-column:auto; }
  .gp-library-editor__media { display:block; margin-top:.8rem; }
  .gp-library-image-preview { max-width:280px; margin:0 auto 1rem; }
  .gp-library-editor__actions { display:flex; margin-top:.8rem; }
}

/* Ajustes de ítems comerciales: Honorario compacto y Venta prioritaria. */
.gp-v2-item.is-service .gp-v2-pricing {
  grid-template-columns:minmax(72px,.7fr) minmax(62px,.5fr) minmax(150px,1.35fr) minmax(112px,1fr);
}
.gp-v2-pricing .gp-v2-iva-field {
  display:grid;
  grid-template-rows:minmax(16px,auto) auto;
  align-content:end;
}
.gp-v2-pricing .gp-v2-iva-field .gp-v2-field-label {
  width:76px;
  max-width:100%;
  margin-left:auto;
  justify-content:flex-start;
  text-align:left;
}
.gp-v2-pricing .gp-v2-iva-field .gp-v2-iva-select {
  display:block;
  width:76px;
  max-width:100%;
  margin-left:auto;
  padding-inline:.22rem;
}
.gp-v2-pricing .gp-v2-sale-field {
  margin:-.18rem;
  padding:.18rem;
  border:1px solid #dfc1aa;
  border-radius:9px;
  background:#fff7f0;
}
.gp-v2-pricing .gp-v2-sale-field .gp-v2-field > input:first-child {
  border-color:#c8916e;
  background:#fff;
  font-weight:700;
}
.gp-v2-media-current {
  overflow:hidden;
}
.gp-v2-media-current > .gp-v2-photo,
.gp-v2-media-current > .gp-v2-icon-preview,
.gp-v2-media-current > .gp-v2-logo-preview {
  flex:0 0 150px;
  width:150px !important;
  height:150px !important;
  overflow:hidden;
}
.gp-v2-media-current img {
  display:block;
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  max-height:100% !important;
  object-fit:contain;
}
@media (max-width:920px) {
  .gp-v2-item.is-service .gp-v2-pricing { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:620px) {
  .gp-v2-item.is-service .gp-v2-pricing { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Hub: lista personal de Google Tasks para el proyecto actual. */
.gp-project-tasks-config { border:1px solid #dbe6dd; background:linear-gradient(135deg,#fff 0%,#f5faf6 100%); }
.gp-project-tasks-config__head { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.5rem; }
.gp-project-tasks-config__head span { color:#467456; font-size:.68rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.gp-project-tasks-config__head h2 { margin:.16rem 0 0; font-size:1rem; }
.gp-project-tasks-config__head i { display:grid; place-items:center; flex:0 0 32px; width:32px; height:32px; border-radius:50%; background:#243f3a; color:#fff; font-size:.78rem; font-style:normal; font-weight:700; }
.gp-project-tasks-config>p { max-width:600px; margin:.35rem 0 .85rem; color:var(--muted); font-size:.82rem; line-height:1.45; }
.gp-project-tasks-config__form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.45rem .6rem; align-items:end; }
.gp-project-tasks-config__form label { grid-column:1/-1; color:var(--muted); font-size:.74rem; font-weight:600; }
.gp-project-tasks-config__form select { min-width:0; padding:.48rem .55rem; border:1px solid var(--border); border-radius:7px; background:#fff; font:inherit; }
.gp-project-tasks-config small { display:block; margin-top:.65rem; color:var(--muted); font-size:.72rem; line-height:1.4; }
@media (max-width:580px) { .gp-project-tasks-config__form { grid-template-columns:1fr; } }

/* Bloc personal: accesible desde cualquier sección interna sin ocupar la pantalla. */
.gp-quick-notes-trigger { position:fixed; z-index:1050; right:1.35rem; bottom:1.35rem; display:inline-flex; align-items:center; gap:.42rem; min-height:42px; padding:.55rem .72rem; border:0; border-radius:999px; background:#2d5247; box-shadow:0 12px 28px rgba(33,31,28,.2); color:#fff; font:inherit; font-size:.78rem; font-weight:750; cursor:pointer; }
.gp-quick-notes-trigger svg { width:17px; height:17px; }.gp-quick-notes-trigger b { display:grid; min-width:18px; height:18px; place-items:center; border-radius:50%; background:#f5dfb2; color:#755719; font-size:.65rem; }
.gp-quick-notes { position:fixed; z-index:1051; right:1.35rem; bottom:4.8rem; width:min(580px,calc(100vw - 2rem)); max-height:min(820px,calc(100vh - 6rem)); overflow:auto; border:1px solid #d8e2dc; border-radius:16px; background:#fff; box-shadow:0 22px 54px rgba(33,31,28,.22); transition:width .18s ease,height .18s ease; }
.gp-quick-notes.is-expanded { right:1rem; bottom:1rem; width:min(880px,calc(100vw - 2rem)); max-height:calc(100vh - 2rem); height:calc(100vh - 2rem); }
.gp-quick-notes.is-expanded .gp-note-editor__body { min-height:clamp(280px,38vh,480px); max-height:480px; overflow:auto; }
.gp-quick-notes[hidden] { display:none; }.gp-quick-notes > header { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; padding:1rem 1rem .75rem; border-bottom:1px solid var(--line); }.gp-quick-notes header span { color:#4f7969; font-size:.62rem; font-weight:800; letter-spacing:.1em; }.gp-quick-notes h2 { margin:.16rem 0 0; font-size:1.02rem; }.gp-quick-notes__header-actions { display:flex; gap:.35rem; }.gp-quick-notes > header button { width:30px; height:30px; border:0; border-radius:50%; background:#f4f1ed; color:var(--muted); font-size:1.1rem; line-height:1; cursor:pointer; }
.gp-quick-notes__form { display:grid; gap:.65rem; padding:1rem; border-bottom:1px solid var(--line); background:#fcfbf9; }.gp-quick-notes__form label { display:grid; gap:.28rem; color:#766c63; font-size:.68rem; font-weight:750; }.gp-quick-notes__form input,.gp-quick-notes__form textarea,.gp-quick-notes__form select { width:100%; border:1px solid #ddd5cd; border-radius:8px; background:#fff; padding:.5rem .58rem; color:var(--ink); font:inherit; font-size:.8rem; }.gp-quick-notes__options { display:grid; grid-template-columns:100px 1fr; gap:.55rem; }.gp-quick-notes__form .gp-btn { justify-self:end; }
.gp-note-color-picker { min-width:0; margin:0; padding:0; border:0; }.gp-note-color-picker legend { margin-bottom:.28rem; color:#766c63; font-size:.68rem; font-weight:750; }.gp-note-color-picker>div { display:flex; align-items:center; gap:.42rem; min-height:34px; }.gp-note-color-picker label { display:block; cursor:pointer; }.gp-note-color-picker input { position:absolute; width:1px !important; height:1px; opacity:0; }.gp-note-color-picker label>span[aria-hidden] { display:block; width:20px; height:20px; border:2px solid #fff; border-radius:50%; box-shadow:0 0 0 1px #d5cec6; transition:transform .15s ease,box-shadow .15s ease; }.gp-note-color-picker__arena>span[aria-hidden] { background:#c9a961; }.gp-note-color-picker__coral>span[aria-hidden] { background:#d2765f; }.gp-note-color-picker__menta>span[aria-hidden] { background:#5c9a7b; }.gp-note-color-picker__lavanda>span[aria-hidden] { background:#8874b2; }.gp-note-color-picker label:has(input:checked)>span[aria-hidden] { transform:scale(1.12); box-shadow:0 0 0 2px #2d5247; }.gp-note-color-picker label:focus-within>span[aria-hidden] { outline:2px solid #a6cdb7; outline-offset:3px; }
.gp-template-toolbar { display:flex; align-items:center; gap:.5rem; margin:-.1rem 0 .3rem; }.gp-template-toolbar button { width:28px; height:27px; border:1px solid #cfc7be; border-radius:5px; background:#fff; color:#28231f; font-family:Georgia,serif; font-weight:800; cursor:pointer; }.gp-template-toolbar button:hover { border-color:#9e785a; background:#f7f1e9; }.gp-template-toolbar span { color:#857b73; font-size:.72rem; }
.gp-note-editor { border:1px solid #ddd5cd; border-radius:9px; overflow:hidden; background:#fff; }.gp-note-editor__toolbar { display:flex; align-items:center; gap:.2rem; padding:.32rem .4rem; border-bottom:1px solid #eee8e0; background:#f7f5f1; }.gp-note-editor__toolbar button { width:29px; height:27px; border:0; border-radius:5px; background:transparent; color:#544d46; cursor:pointer; }.gp-note-editor__toolbar button:hover { background:#e8e2da; }.gp-note-editor__toolbar label { display:block; margin-left:.18rem; }.gp-note-editor__toolbar input[type="color"] { width:26px; height:26px; padding:2px; border:0; border-radius:5px; cursor:pointer; }.gp-note-editor__body { min-height:110px; padding:.64rem; outline:0; color:#4b443e; font-size:.82rem; line-height:1.5; }.gp-note-editor__body:empty:before { content:attr(data-placeholder); color:#9d958c; pointer-events:none; }.gp-note-drawing { padding:.55rem; border-top:1px dashed #ddd5cd; background:#fbfaf8; }.gp-note-drawing canvas { display:block; width:100%; height:180px; border:1px solid #d7cec5; border-radius:6px; background:#fff; cursor:crosshair; touch-action:none; }.gp-note-drawing button { margin-top:.4rem; border:0; background:transparent; color:#a35d3d; font-size:.7rem; font-weight:700; cursor:pointer; }
.gp-note-mentions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.35rem; padding:.55rem; border-top:1px solid #eee8e0; background:#f8fbfa; }.gp-note-mentions>span { grid-column:1/-1; color:#587368; font-size:.66rem; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }.gp-note-mentions button { display:grid; gap:.04rem; min-width:0; padding:.42rem .5rem; border:1px solid #dbe8e1; border-radius:6px; background:#fff; color:#315f4e; font-size:.73rem; font-weight:750; text-align:left; cursor:pointer; }.gp-note-mentions button:hover { border-color:#6eaa8d; background:#f2faf5; }.gp-note-mentions button small { color:#8a8179; font-size:.6rem; font-weight:700; }.gp-note-mentions p { grid-column:1/-1; margin:0; color:#8a8179; font-size:.72rem; }.gp-note-selected-mentions { display:flex; flex-wrap:wrap; gap:.3rem; padding:.45rem .58rem 0; }.gp-note-selected-mentions:empty { display:none; }.gp-note-selected-mentions span { display:inline-flex; align-items:center; gap:.25rem; padding:.22rem .38rem; border-radius:99px; background:#e7f2eb; color:#336450; font-size:.67rem; font-weight:750; }.gp-note-selected-mentions button { width:15px; height:15px; padding:0; border:0; border-radius:50%; background:#c3ddce; color:#315f4e; font-size:.8rem; line-height:1; cursor:pointer; }
.gp-note-task-link { padding:.72rem; border:1px solid #d8e2dc; border-radius:8px; background:#f8fbf9; }.gp-note-task-link summary { color:#356452; font-size:.75rem; font-weight:750; cursor:pointer; }.gp-note-task-link__fields { display:grid; grid-template-columns:1fr 130px; gap:.6rem; margin-top:.7rem; }.gp-note-task-link__switch,.gp-note-task-link fieldset { grid-column:1/-1; }.gp-note-task-link__switch { display:flex !important; align-items:center; gap:.4rem; color:#356452 !important; }.gp-note-task-link__switch input { width:auto; }.gp-note-assignees { grid-column:1/-1; margin:0; padding:.1rem 0 0; border:0; }.gp-note-assignees legend { color:#4f685d; font-size:.7rem; font-weight:800; }.gp-note-assignees>p { margin:.18rem 0 .5rem; color:#827870; font-size:.67rem; line-height:1.35; }.gp-note-assignees>div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.45rem; }.gp-note-assignee { position:relative; display:flex !important; align-items:center; gap:.46rem; min-width:0; padding:.5rem; border:1px solid #d8e3dc; border-radius:8px; background:#fff; cursor:pointer; }.gp-note-assignee input { position:absolute; opacity:0; pointer-events:none; }.gp-note-assignee__avatar { display:grid; flex:0 0 27px; width:27px; height:27px; place-items:center; border-radius:50%; background:#e5efe9; color:#356452; font-size:.7rem; font-weight:800; }.gp-note-assignee__copy { display:grid; min-width:0; gap:.05rem; }.gp-note-assignee__copy strong { overflow:hidden; color:#39332e; font-size:.72rem; text-overflow:ellipsis; white-space:nowrap; }.gp-note-assignee__copy small { overflow:hidden; color:#8a8179; font-size:.61rem; text-overflow:ellipsis; white-space:nowrap; }.gp-note-assignee__check { display:none; margin-left:auto; color:#fff; font-size:.65rem; font-weight:900; }.gp-note-assignee:has(input:checked) { border-color:#5f9b7c; background:#f0f8f3; box-shadow:0 0 0 1px rgba(95,155,124,.12); }.gp-note-assignee:has(input:checked) .gp-note-assignee__avatar,.gp-note-assignee:has(input:checked) .gp-note-assignee__check { display:grid; place-items:center; background:#39775c; }.gp-note-assignee:has(input:checked) .gp-note-assignee__avatar { color:#fff; }.gp-note-assignee:focus-within { outline:2px solid #a6cdb7; outline-offset:2px; }.gp-quick-notes__list { display:grid; gap:.6rem; padding:1rem; }.gp-quick-notes__empty { margin:0; color:var(--muted); font-size:.79rem; line-height:1.5; }.gp-quick-note { display:grid; gap:.48rem; padding:.75rem .8rem; border:1px solid #eadfca; border-left:4px solid #c9a961; border-radius:10px; background:#fffaf0; }.gp-quick-note--coral { border-color:#f0d1c8; border-left-color:#d2765f; background:#fff7f4; }.gp-quick-note--menta { border-color:#cde3d8; border-left-color:#5c9a7b; background:#f4fbf7; }.gp-quick-note--lavanda { border-color:#ded6ee; border-left-color:#8874b2; background:#faf8ff; }.gp-quick-note strong { font-size:.82rem; }.gp-quick-note__content { margin:.18rem 0 0; color:#655d56; font-size:.76rem; line-height:1.4; }.gp-quick-note__content p { margin:.25rem 0; }.gp-quick-note__content ul,.gp-quick-note__content ol { margin:.3rem 0; padding-left:1.15rem; }.gp-quick-note__drawing { display:block; max-width:100%; max-height:180px; margin-top:.55rem; border:1px solid rgba(84,72,61,.15); border-radius:6px; background:#fff; }.gp-quick-note__tags { display:flex; flex-wrap:wrap; gap:.3rem; }.gp-quick-note__tags span { padding:.15rem .38rem; border-radius:99px; background:rgba(255,255,255,.7); color:#786d63; font-size:.64rem; }.gp-quick-note__references { display:flex; flex-wrap:wrap; gap:.35rem; }.gp-quick-note__references a { display:grid; gap:.03rem; padding:.3rem .42rem; border:1px solid #cbddeb; border-radius:6px; background:#f5faff; color:#356f9a; font-size:.68rem; font-weight:750; text-decoration:none; }.gp-quick-note__references small { color:#758697; font-size:.58rem; text-transform:uppercase; }.gp-quick-note__task { color:#356452; font-size:.7rem; font-weight:750; text-decoration:none; }.gp-quick-note form { display:flex; justify-content:flex-end; }.gp-quick-note button { border:0; border-radius:6px; background:transparent; color:#527969; font-size:.7rem; font-weight:750; cursor:pointer; }
@media (max-width:700px) { .gp-quick-notes-trigger { right:.85rem; bottom:.85rem; }.gp-quick-notes,.gp-quick-notes.is-expanded { right:.85rem; bottom:4.25rem; width:calc(100vw - 1.7rem); height:auto; max-height:calc(100vh - 5.1rem); }.gp-quick-notes__options,.gp-note-task-link__fields { grid-template-columns:1fr; } }

/* Reportes de pruebas: bandeja compartida de errores y mejoras. */
.gp-floating-tools { position:fixed; z-index:1050; right:1.35rem; bottom:1.35rem; display:flex; align-items:center; gap:.42rem; }
.gp-floating-tools>.gp-quick-notes-trigger { position:static; }
/* Reportar vive en la esquina contraria a las notas: es un botón redondo de solo icono,
   así que se ancla por su cuenta y no entra en la fila flotante de la derecha.
   Se apoya en el borde de los laterales en lugar de en el borde de la ventana, porque
   sobre ellos quedaría superpuesto. */
.gp-report-trigger { position:fixed; z-index:1050; left:calc(var(--sidebar-w) + .9rem); bottom:1.35rem; display:grid; place-items:center; width:44px; height:44px; padding:0; border:1px solid #d8c4b5; border-radius:50%; background:rgba(255,248,243,.78); box-shadow:0 12px 28px rgba(33,31,28,.16); color:#8a452d; font:inherit; cursor:pointer; opacity:.76; transition:opacity .16s ease,background-color .16s ease,border-color .16s ease,box-shadow .16s ease; }
.gp-report-trigger>span:first-child { display:grid; width:24px; height:24px; place-items:center; border-radius:50%; background:#b95739; color:#fff; font-size:.86rem; font-weight:900; }
.gp-report-trigger b { position:absolute; top:-2px; right:-2px; display:grid; min-width:18px; height:18px; place-items:center; border-radius:50%; border:2px solid #fff8f3; background:#f2d3c5; color:#7b3825; font-size:.65rem; }
.gp-report-trigger:hover,
.gp-report-trigger:focus-visible { opacity:1; background:#b95739; border-color:#9d472f; box-shadow:0 14px 30px rgba(94,47,32,.26); }
.gp-report-widget { position:fixed; z-index:1052; left:calc(var(--sidebar-w) + .9rem); bottom:4.8rem; width:min(500px,calc(100vw - 2rem)); max-height:calc(100vh - 6rem); overflow:auto; border:1px solid #e3d3c8; border-radius:16px; background:#fff; box-shadow:0 22px 54px rgba(33,31,28,.22); }
.gp-report-widget[hidden] { display:none; }
/* En las pantallas de proyecto hay un segundo lateral; a partir de 1100px se oculta y
   basta con el rail global, así que la regla vive dentro del mismo umbral. */
@media (min-width:1101px) {
  body:has(.gp-main-wrapper.with-project-sidebar) .gp-report-trigger,
  body:has(.gp-main-wrapper.with-project-sidebar) .gp-report-widget {
    left:calc(var(--sidebar-w) + var(--project-sidebar-w) + .9rem);
  }
}
/* Bajo 760px el rail global pasa a barra inferior de 58px: el botón sube por encima. */
@media (max-width:760px) {
  .gp-report-trigger { left:.85rem; bottom:calc(58px + .85rem); }
  .gp-report-widget { left:.85rem; bottom:calc(58px + 4.3rem); }
}
.gp-report-widget>header { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; padding:1rem; border-bottom:1px solid #eee4dc; background:#fffaf6; }
.gp-report-widget>header span { color:#a34f34; font-size:.62rem; font-weight:800; letter-spacing:.1em; }
.gp-report-widget h2 { margin:.16rem 0 0; font-size:1.02rem; }
.gp-report-widget>header button { width:30px; height:30px; border:0; border-radius:50%; background:#f1e9e3; color:#775e50; font-size:1.1rem; cursor:pointer; }
.gp-report-widget form { display:grid; gap:.75rem; padding:1rem; }
.gp-report-widget form>label { display:grid; gap:.3rem; color:#766c63; font-size:.7rem; font-weight:750; }
.gp-report-widget textarea { width:100%; resize:vertical; border:1px solid #ddd5cd; border-radius:8px; padding:.62rem; color:var(--ink); font:inherit; font-size:.82rem; line-height:1.45; }
.gp-report-kind { display:grid; grid-template-columns:1fr 1fr; gap:.5rem; margin:0; padding:0; border:0; }
.gp-report-kind legend { grid-column:1/-1; margin-bottom:.1rem; color:#766c63; font-size:.7rem; font-weight:750; }
.gp-report-kind label { position:relative; cursor:pointer; }
.gp-report-kind input { position:absolute; opacity:0; }
.gp-report-kind label>span { display:grid; gap:.05rem; padding:.65rem; border:1px solid #ddd5cd; border-radius:9px; background:#fff; }
.gp-report-kind b { color:#4f4640; font-size:.78rem; }.gp-report-kind small { color:#8a8179; font-size:.64rem; font-weight:500; }
.gp-report-kind label:has(input:checked)>span { border-color:#b65d41; background:#fff7f2; box-shadow:0 0 0 1px rgba(182,93,65,.12); }
.gp-report-kind label:focus-within>span { outline:2px solid #dca891; outline-offset:2px; }
.gp-report-capture-actions { display:flex; flex-wrap:wrap; gap:.45rem; }
.gp-report-capture-actions label { display:inline-flex; align-items:center; cursor:pointer; }.gp-report-capture-actions input { position:absolute; width:1px; height:1px; opacity:0; }
.gp-report-help { margin:-.3rem 0 0; color:#8a8179; font-size:.67rem; line-height:1.4; }
.gp-report-preview { position:relative; margin:0; overflow:hidden; border:1px solid #ded5cd; border-radius:9px; background:#f6f3f0; }
.gp-report-preview img { display:block; width:100%; max-height:220px; object-fit:contain; }
.gp-report-preview button { position:absolute; top:.45rem; right:.45rem; padding:.28rem .48rem; border:0; border-radius:6px; background:rgba(38,33,29,.85); color:#fff; font-size:.65rem; font-weight:700; cursor:pointer; }
.gp-report-crop-active { overflow:hidden !important; }
.gp-report-cropper { position:fixed; z-index:3000; inset:0; overflow:hidden; cursor:crosshair; touch-action:none; background:#211f1c; user-select:none; }
.gp-report-cropper__image { position:absolute; inset:0; width:100vw; height:100vh; }
.gp-report-cropper__shade { position:absolute; inset:0; background:rgba(28,25,22,.38); pointer-events:none; }
.gp-report-cropper__selection { position:absolute; border:2px solid #fff; border-radius:4px; box-shadow:0 0 0 9999px rgba(28,25,22,.46),0 0 0 1px rgba(104,52,34,.72); pointer-events:none; }
.gp-report-cropper__guide { position:fixed; z-index:1; top:1rem; left:50%; display:grid; gap:.12rem; min-width:min(390px,calc(100vw - 2rem)); padding:.72rem 1rem; transform:translateX(-50%); border:1px solid rgba(255,255,255,.26); border-radius:10px; background:rgba(33,31,28,.9); box-shadow:0 10px 28px rgba(0,0,0,.24); color:#fff; text-align:center; pointer-events:none; }
.gp-report-cropper__guide strong { font-size:.82rem; }.gp-report-cropper__guide span { color:#d9d2cc; font-size:.68rem; }
.gp-report-cropper__actions { position:fixed; z-index:2; right:1rem; bottom:1rem; display:flex; gap:.5rem; padding:.5rem; border-radius:10px; background:rgba(255,255,255,.94); box-shadow:0 10px 30px rgba(0,0,0,.25); cursor:default; }
.gp-report-widget form>.gp-btn { justify-self:end; }
.gp-report-widget>footer { display:grid; gap:.18rem; padding:.75rem 1rem; border-top:1px solid #eee4dc; background:#fcfaf8; }
.gp-report-widget>footer a { color:#8a452d; font-size:.74rem; font-weight:750; text-decoration:none; }.gp-report-widget>footer small { color:#8a8179; font-size:.64rem; }

/* Eliminar partida: acción discreta al final de la fila; se revela al pasar por encima. */
.gpc-del-btn { border:0; border-radius:6px; padding:.1rem .42rem; background:transparent; color:var(--muted); font-size:1rem; line-height:1; cursor:pointer; opacity:.35; transition:opacity .12s, color .12s; }
tr:hover .gpc-del-btn, .gpc-del-btn:focus-visible { opacity:1; color:var(--neg); }
.gpc-del-lock { color:var(--muted); font-size:.78rem; opacity:.45; cursor:help; }

.gp-report-inbox { display:grid; gap:1rem; }.gp-report-filters { display:flex; flex-wrap:wrap; gap:.4rem; }
.gp-report-filters a { padding:.4rem .68rem; border:1px solid var(--border); border-radius:99px; background:#fff; color:var(--muted); font-size:.73rem; font-weight:700; text-decoration:none; }
.gp-report-filters a.active { border-color:#83533f; background:#83533f; color:#fff; }
.gp-report-list { display:grid; gap:.85rem; }
.gp-report-card { display:grid; gap:.7rem; padding:1rem; border:1px solid #e3ddd7; border-left:4px solid #b95739; border-radius:12px; background:#fff; box-shadow:0 5px 16px rgba(42,35,30,.05); }
.gp-report-card--mejora { border-left-color:#4d8068; }
.gp-report-card__meta { display:flex; flex-wrap:wrap; align-items:center; gap:.35rem .6rem; color:#8a8179; font-size:.68rem; }
.gp-report-type { padding:.2rem .42rem; border-radius:99px; background:#f9e5dc; color:#94452e; font-weight:800; }.gp-report-card--mejora .gp-report-type { background:#e2f0e8; color:#376d56; }
.gp-report-card__comment { margin:0; color:#3e3833; font-size:.9rem; line-height:1.55; white-space:pre-wrap; }
.gp-report-page { overflow:hidden; color:#497363; font-size:.7rem; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.gp-report-shot { display:block; overflow:hidden; max-width:680px; border:1px solid #e3ddd7; border-radius:8px; background:#f6f3f0; }.gp-report-shot img { display:block; width:100%; max-height:360px; object-fit:contain; }
.gp-report-classify { display:flex; flex-wrap:wrap; align-items:end; gap:.55rem; padding-top:.2rem; }
.gp-report-classify label { display:grid; gap:.22rem; color:#766c63; font-size:.66rem; font-weight:700; }.gp-report-classify select { min-width:140px; padding:.42rem .5rem; border:1px solid var(--border); border-radius:7px; background:#fff; font:inherit; font-size:.75rem; }
.gp-report-tech summary { color:#8a8179; font-size:.68rem; cursor:pointer; }.gp-report-tech p { margin:.35rem 0 0; color:#8a8179; font-size:.65rem; overflow-wrap:anywhere; }
@media (max-width:700px) { .gp-floating-tools { right:.85rem; bottom:.85rem; }.gp-report-widget { width:calc(100vw - 1.7rem); max-height:calc(100vh - 5.1rem); }.gp-report-kind { grid-template-columns:1fr; }.gp-report-classify { align-items:stretch; }.gp-report-classify label,.gp-report-classify select { width:100%; } }
