.tech-private-badge,
.tech-eyebrow {
  display: block;
  color: #8b6d3d;
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .13em;
}

#content:has(.tech-editor-layout) {
  max-width: 1720px;
}

.tech-create-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .8fr);
  gap: 28px;
  align-items: center;
  margin-top: 18px;
  border-top: 3px solid #14273e;
}

.tech-create-card h3 {
  margin: 5px 0 6px;
  font-size: 1.25rem;
}

.tech-create-card p {
  margin: 0;
  color: var(--muted);
}

.tech-source-actions {
  display: grid;
  gap: 10px;
}

.tech-source-actions select,
.tech-document-grid input,
.tech-document-grid select,
.tech-section-card input,
.tech-section-card select,
.tech-section-card textarea,
.tech-final-notes textarea {
  width: 100%;
  border: 1px solid #cfd7e1;
  border-radius: 9px;
  background: #fff;
  padding: 9px 10px;
}

.tech-source-actions select {
  min-height: 45px;
}

.tech-cell-note {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .72rem;
}

.tech-list td:nth-child(4) {
  font-weight: 800;
  white-space: nowrap;
}

.tech-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf2f7;
  color: #42536a;
  font-size: .7rem;
  font-weight: 800;
}

.tech-status.aceptado {
  background: #e9f7ef;
  color: #17643f;
}

.tech-status.enviado {
  background: #eef3ff;
  color: #2d58b4;
}

.tech-status.en-revisión {
  background: #fff6df;
  color: #8b640d;
}

.tech-editor-head .tech-back {
  display: block;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: none;
  color: #52667e;
  font: inherit;
  font-weight: 700;
}

.tech-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.tech-editor-main {
  min-width: 0;
  grid-row: 2;
}

.tech-document-card {
  border-top: 3px solid #14273e;
}

.tech-document-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.tech-document-grid label,
.tech-text-field,
.tech-section-notes label {
  display: grid;
  gap: 6px;
}

.tech-document-grid label > span,
.tech-text-field > span,
.tech-section-notes label > span,
.tech-presentation label > span,
.tech-line-fields label > span,
.tech-line-kind label > span {
  color: #4c5b6d;
  font-size: .72rem;
  font-weight: 800;
}

.tech-document-grid .wide {
  grid-column: span 2;
}

.tech-document-grid input,
.tech-document-grid select {
  min-height: 43px;
}

.tech-document-grid input:disabled {
  background: #f3f5f8;
  color: #5b6a7d;
}

.tech-activation-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding-top: 20px;
}

.tech-activation-check input {
  width: auto;
  min-height: 0;
}

.tech-text-field {
  margin-top: 14px;
}

.tech-text-field textarea,
.tech-section-notes textarea {
  min-height: 78px;
  resize: vertical;
}

.tech-section-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin: 28px 0 13px;
}

.tech-section-toolbar h3 {
  margin: 4px 0 3px;
  font-size: 1.35rem;
}

.tech-section-toolbar p {
  margin: 0;
  color: var(--muted);
}

.tech-sections {
  display: grid;
  gap: 15px;
}

.tech-section-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 32px #1018280d;
}

.tech-section-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 130px auto;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  background: #f7f9fb;
  border-bottom: 1px solid var(--line);
}

.tech-section-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #14273e;
  color: #fff;
  font: normal 14px Georgia, serif;
}

.tech-section-title {
  display: grid;
  gap: 7px;
}

.tech-section-title input {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 1.06rem;
  font-weight: 850;
}

.tech-section-title textarea {
  min-height: 42px;
  padding: 7px 9px;
  resize: vertical;
  color: #607085;
  font-size: .8rem;
}

.tech-section-total {
  text-align: right;
}

.tech-section-total small,
.tech-section-total strong {
  display: block;
}

.tech-section-total small {
  color: var(--muted);
  font-size: .66rem;
}

.tech-section-total strong {
  margin-top: 4px;
  font-size: 1.02rem;
}

.tech-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.tech-row-actions button {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #d7dee7;
  border-radius: 7px;
  background: #fff;
  color: #4a5a6d;
  font-weight: 800;
}

.tech-row-actions button:hover:not(:disabled) {
  border-color: #aeb9c7;
  background: #f3f6f9;
}

.tech-row-actions button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.tech-presentation {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.tech-section-scope {
  display: grid;
  grid-template-columns: minmax(280px, 480px) auto minmax(180px, 1fr);
  gap: 14px;
  align-items: end;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: #fffdf8;
}

.tech-section-measure {
  display: grid;
  grid-template-columns: minmax(110px, .7fr) minmax(160px, 1.3fr);
  gap: 10px;
}

.tech-section-measure label {
  display: grid;
  gap: 5px;
}

.tech-section-measure label > span {
  color: #4c5b6d;
  font-size: .72rem;
  font-weight: 800;
}

.tech-section-scope input {
  min-height: 39px;
}

.tech-scope-check {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 39px;
  padding: 7px 9px;
  border: 1px solid #dfd2b8;
  border-radius: 8px;
  background: #fff;
  font-size: .7rem;
  font-weight: 750;
  white-space: nowrap;
}

.tech-scope-check input {
  width: auto;
  min-height: 0;
  margin: 0;
}

.tech-section-scope > small {
  align-self: center;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.45;
}

.tech-presentation > label {
  display: grid;
  gap: 5px;
}

.tech-presentation select {
  min-height: 39px;
}

.tech-checks {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.tech-checks label,
.tech-mini-check {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  background: #f8fafc;
  font-size: .68rem;
  font-weight: 700;
}

.tech-checks input,
.tech-mini-check input {
  width: auto;
  margin: 0;
}

.tech-lines-wrap {
  padding: 14px 18px 18px;
  background: #f7f9fb;
}

.tech-lines {
  display: grid;
  gap: 11px;
}

.tech-line-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid #dfe5ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px #14273e08;
  transition: border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.tech-line-card:focus-within {
  border-color: #9db7de;
  box-shadow: 0 0 0 3px #2858d710;
}

.tech-line-head {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 11px;
  border-bottom: 1px solid #edf0f4;
}

.tech-line-kind {
  display: flex;
  align-items: end;
  gap: 8px;
}

.tech-line-kind label {
  display: grid;
  flex: 1;
  gap: 4px;
}

.tech-line-kind select {
  min-height: 38px;
  padding-block: 7px;
}

.tech-line-total {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  min-width: 0;
}

.tech-line-total > span {
  color: var(--muted);
  font-size: .66rem;
  font-weight: 700;
}

.tech-line-total > strong {
  min-width: 88px;
  color: #17263a;
  font-size: .95rem;
  text-align: right;
  white-space: nowrap;
}

.tech-line-fields {
  display: grid;
  grid-template-columns: minmax(140px, 1.05fr) minmax(220px, 1.8fr) minmax(130px, 1.1fr) 82px 82px 116px 116px 88px;
  gap: 10px;
  align-items: start;
  margin-top: 12px;
}

.tech-line-fields label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.tech-line-fields input,
.tech-line-fields select,
.tech-line-fields textarea {
  display: block;
  min-width: 0;
  min-height: 39px;
  padding: 8px 9px;
  font-size: .78rem;
}

.tech-line-fields textarea {
  min-height: 54px;
  resize: vertical;
}

.tech-line-description {
  grid-column: 1 / -1;
}

.tech-origin {
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center;
  min-height: 24px;
  margin-bottom: 7px !important;
  padding: 3px 6px;
  border-radius: 5px;
  background: #eef3ff;
  color: #3157aa !important;
  font-size: .57rem !important;
  font-weight: 800;
}

.tech-origin.modified {
  background: #fff4d9;
  color: #8c6100 !important;
}

.tech-origin.manual {
  background: #edf8f2;
  color: #1e6948 !important;
}

.tech-line-hidden {
  border-style: dashed;
  opacity: .55;
  background: #fafafa;
}

.tech-line-hidden:focus-within {
  opacity: 1;
}

.tech-section-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
}

.tech-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px 18px;
  background: #f8fafc;
}

.tech-section-actions .btn {
  padding: 8px 11px;
  font-size: .72rem;
}

.tech-add-section {
  width: 100%;
  margin-top: 14px;
  border-style: dashed;
  background: transparent;
}

.tech-final-notes {
  margin-top: 18px;
}

.tech-final-notes .tech-section-notes {
  padding: 0 0 15px;
  border: 0;
}

.tech-summary {
  position: static;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  align-content: start;
  overflow: hidden;
  padding: 18px;
}

.tech-summary-heading {
  grid-column: span 2;
  min-width: 0;
}

.tech-summary h3 {
  margin: 5px 0 10px;
  font-size: 1.1rem;
}

.tech-investment-summary {
  grid-column: span 4;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 7px;
  width: 100%;
  min-width: 0;
}

.tech-investment-summary > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e0e6ed;
  border-radius: 9px;
  background: #fafbfd;
}

.tech-investment-summary .main {
  border-color: #14273e;
  background: #14273e;
  color: #fff;
}

.tech-investment-summary span,
.tech-investment-summary strong {
  display: block;
}

.tech-investment-summary span {
  min-height: 25px;
  color: var(--muted);
  font-size: .66rem;
  overflow-wrap: anywhere;
}

.tech-investment-summary .main span {
  color: #c9d5e3;
}

.tech-investment-summary strong {
  margin-top: 4px;
  font-size: .76rem;
  white-space: nowrap;
}

.tech-source-summary {
  padding: 10px 11px;
  border-radius: 10px;
  background: #f2f6fa;
}

.tech-source-summary span,
.tech-source-summary strong,
.tech-source-summary small {
  display: block;
}

.tech-source-summary span {
  color: var(--muted);
  font-size: .66rem;
}

.tech-source-summary strong {
  margin: 3px 0;
  font: normal 18px Georgia, serif;
}

.tech-source-summary small {
  color: #647489;
  font-size: .68rem;
  overflow-wrap: anywhere;
}

.tech-summary dl {
  grid-column: span 4;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.tech-summary dl > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e0e6ed;
  border-radius: 9px;
  background: #fafbfd;
}

.tech-summary dt,
.tech-summary dd {
  display: block;
  margin: 0;
}

.tech-summary dt {
  min-height: 28px;
  color: var(--muted);
  font-size: .69rem;
}

.tech-summary dd {
  margin-top: 5px;
  font-size: .8rem;
  font-weight: 850;
  white-space: nowrap;
}

.tech-summary dl .total {
  border-color: #14273e;
  background: #14273e;
  color: #fff;
}

.tech-summary dl .total dt {
  color: #c9d5e3;
}

.tech-summary dl .total dd {
  font: normal 17px Georgia, serif;
}

.tech-internal-numbers {
  grid-column: span 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 11px;
  border: 1px solid #e0e6ec;
  border-radius: 10px;
}

.tech-internal-numbers div {
  min-width: 0;
}

.tech-internal-numbers span,
.tech-internal-numbers strong {
  display: block;
}

.tech-internal-numbers span {
  color: var(--muted);
  font-size: .66rem;
}

.tech-internal-numbers strong {
  margin-top: 4px;
  font-size: .75rem;
  overflow-wrap: anywhere;
}

.tech-summary-actions {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tech-summary-actions .btn {
  width: 100%;
}

.tech-secure-note {
  grid-column: 1 / -1;
  display: block;
  color: var(--muted);
  font-size: .66rem;
  line-height: 1.5;
}

.tech-save-status {
  align-self: center;
  color: #66778b;
  font-size: .72rem;
  font-weight: 700;
}

.tech-mini-check {
  width: max-content;
}

.tech-list .table-actions {
  white-space: normal;
}

.tech-list .linkbtn {
  padding: 4px;
  border: 0;
  background: none;
  color: #42658f;
  font-size: .7rem;
  font-weight: 750;
}

.empty-state {
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state strong {
  color: var(--ink);
  font-size: 1rem;
}

.empty-state span {
  margin-top: 5px;
}

.danger-link {
  color: #b42318 !important;
}

@media (min-width: 1800px) {
  .tech-editor-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .tech-editor-main {
    grid-column: 1;
    grid-row: 1;
  }

  .tech-summary {
    position: sticky;
    top: 20px;
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: 1fr;
    align-items: stretch;
    align-content: start;
    padding: 20px;
  }

  .tech-summary-heading,
  .tech-investment-summary,
  .tech-summary dl,
  .tech-internal-numbers,
  .tech-summary-actions,
  .tech-secure-note {
    grid-column: 1;
  }

  .tech-summary dl,
  .tech-internal-numbers,
  .tech-summary-actions {
    grid-template-columns: 1fr;
  }

  .tech-investment-summary {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tech-investment-summary .main {
    grid-column: 1 / -1;
  }

  .tech-investment-summary > div {
    display: flex;
    min-height: 56px;
    flex-direction: column;
    justify-content: space-between;
  }

  .tech-investment-summary span {
    min-height: 0;
  }

  .tech-summary dl > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
  }

  .tech-summary dt {
    min-height: 0;
  }

  .tech-summary dd {
    margin-top: 0;
    text-align: right;
  }

  .tech-internal-numbers div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }

  .tech-internal-numbers strong {
    margin-top: 0;
    text-align: right;
  }
}

@media (max-width: 1400px) {
  .tech-line-fields {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .tech-line-ref {
    grid-column: span 2;
  }

  .tech-line-name {
    grid-column: span 2;
  }

  .tech-line-group {
    grid-column: span 2;
  }

  .tech-line-qty,
  .tech-line-unit {
    grid-column: span 1;
  }

  .tech-line-sale,
  .tech-line-cost,
  .tech-line-discount {
    grid-column: span 2;
  }
}

@media (max-width: 1200px) {
  .tech-document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tech-create-card {
    grid-template-columns: 1fr;
  }

  .tech-section-scope {
    grid-template-columns: minmax(280px, 1fr) auto;
  }

  .tech-section-scope > small {
    grid-column: 1 / -1;
  }
}

@media (max-width: 950px) {
  .tech-summary {
    grid-template-columns: 1fr;
  }

  .tech-summary-heading,
  .tech-investment-summary,
  .tech-summary dl,
  .tech-internal-numbers,
  .tech-summary-actions,
  .tech-secure-note {
    grid-column: 1;
  }

  .tech-summary dl {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .tech-investment-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .tech-document-grid {
    grid-template-columns: 1fr;
  }

  .tech-document-grid .wide {
    grid-column: auto;
  }

  .tech-section-head {
    grid-template-columns: 38px 1fr auto;
  }

  .tech-section-total {
    grid-column: 2 / 3;
    text-align: left;
  }

  .tech-section-head > .tech-row-actions {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .tech-presentation {
    grid-template-columns: 1fr;
  }

  .tech-section-scope,
  .tech-section-measure {
    grid-template-columns: 1fr;
  }

  .tech-section-scope > small {
    grid-column: auto;
  }

  .tech-scope-check {
    white-space: normal;
  }

  .tech-checks {
    justify-content: flex-start;
  }

  .tech-line-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tech-line-kind {
    align-items: center;
  }

  .tech-line-total {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .tech-line-head > .tech-row-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .tech-line-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tech-line-ref,
  .tech-line-name,
  .tech-line-group,
  .tech-line-qty,
  .tech-line-unit,
  .tech-line-sale,
  .tech-line-cost,
  .tech-line-discount {
    grid-column: span 1;
  }

  .tech-line-description {
    grid-column: 1 / -1;
  }

  .tech-section-notes {
    grid-template-columns: 1fr;
  }

  .tech-section-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .tech-section-toolbar .btn {
    width: 100%;
  }

  .tech-summary dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tech-investment-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tech-summary dl .total {
    grid-column: 1 / -1;
  }

  .tech-internal-numbers {
    grid-template-columns: 1fr;
  }

  .tech-editor-head .admin-actions {
    display: grid;
    width: 100%;
  }

  .tech-list {
    min-width: 850px;
  }
}

@media (max-width: 520px) {
  .tech-lines-wrap,
  .tech-section-actions,
  .tech-section-notes,
  .tech-presentation,
  .tech-section-head {
    padding-inline: 12px;
  }

  .tech-line-head,
  .tech-line-fields,
  .tech-investment-summary,
  .tech-summary dl,
  .tech-summary-actions {
    grid-template-columns: 1fr;
  }

  .tech-line-head > *,
  .tech-line-fields > *,
  .tech-investment-summary > *,
  .tech-summary dl .total {
    grid-column: 1 !important;
  }

  .tech-line-total {
    flex-wrap: wrap;
  }

  .tech-line-kind {
    align-items: end;
  }
}
