.taiga-project-extra-fields {
  background: #fff;
  border-top: 1px solid #d8dee9;
  margin: 1.75rem 0;
  padding-top: 1.75rem;
}

.taiga-project-extra-fields h3 {
  color: #14358f;
  font-size: 1.45rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
}

.taiga-project-extra-grid {
  display: grid;
  gap: 2.75rem 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Applies to both <label> (regular fields) and <div> (file field) */
.taiga-project-extra-field {
  color: #5f6b7a;
  display: flex;
  flex-direction: column;
  font-size: .85rem;
  gap: .35rem;
  min-width: 0;
}

.taiga-project-extra-field-wide {
  grid-column: 1 / -1;
}

/* Local (6th) — afasta de Monitores(as) */
.taiga-project-extra-grid > *:nth-child(6) {
  margin-top: 1.5rem;
}

/* Valor total (7th) e Média mensal (8th) — afastam de Local */
.taiga-project-extra-grid > *:nth-child(7),
.taiga-project-extra-grid > *:nth-child(8) {
  margin-top: 1.5rem;
}

.taiga-project-extra-grid input,
.taiga-project-extra-grid select,
.taiga-project-extra-grid textarea {
  border: 1px solid #d8dee9;
  border-radius: 6px;
  color: #111827;
  font-size: .95rem;
  min-height: 2.25rem;
  padding: .45rem .55rem;
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}

.taiga-project-extra-grid input:focus,
.taiga-project-extra-grid select:focus,
.taiga-project-extra-grid textarea:focus {
  border-color: #008aa8;
  box-shadow: 0 0 0 3px rgba(0, 138, 168, .12);
  outline: none;
}

.taiga-project-extra-grid textarea {
  min-height: 5.25rem;
  resize: vertical;
}

/* ── File upload area ── */
.taiga-project-extra-file {
  display: block;
  overflow: hidden;
}

/* Hide the native browser file picker — only our custom button is shown */
.taiga-project-extra-file input[type="file"] {
  display: none;
}

.taiga-project-extra-file-header {
  align-items: center;
  background: #edf1f6;
  display: flex;
  justify-content: space-between;
  min-height: 3rem;
  padding-left: 1rem;
}

.taiga-project-extra-file-counter {
  color: #4d5870;
  font-size: 1rem;
  font-weight: 700;
}

.taiga-project-extra-file-button {
  align-items: center;
  background: #6fe4d3;
  border: 0;
  border-radius: 0;
  color: #173247;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.65rem;
  font-weight: 400;
  height: 3rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 3rem;
}

.taiga-project-extra-file-button:hover {
  background: #58d8c6;
}

.taiga-project-extra-file-list {
  border: 2px dashed #d8e1ed;
  display: grid;
  gap: .5rem;
  list-style: none;
  margin: .5rem 0 0;
  min-height: 3rem;
  padding: .75rem;
  place-items: center;
}

.taiga-project-extra-file-list-over {
  background: #eef7fa;
  border-color: #6fe4d3;
}

.taiga-project-extra-file-list li {
  align-items: center;
  background: #fff;
  border: 1px solid #d8e1ed;
  border-radius: 6px;
  color: #27405c;
  display: flex;
  font-size: .85rem;
  gap: .5rem;
  justify-content: space-between;
  max-width: 100%;
  padding: .35rem .65rem;
  width: 100%;
  word-break: break-all;
}

.taiga-project-extra-file-list-empty {
  background: none !important;
  border: none !important;
  color: #7a8699;
  font-style: italic;
  font-size: 1rem !important;
  font-weight: 700;
  justify-content: center !important;
  min-height: 1.5rem;
  padding: 0 !important;
  text-align: center;
}

.taiga-project-extra-file-remove {
  background: none;
  border: none;
  color: #7a8699;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 .2rem;
  flex-shrink: 0;
}

.taiga-project-extra-file-remove:hover {
  color: #c0392b;
}

/* ── Project view: tech sheet ── */
body > .taiga-project-tech-sheet {
  display: none !important;
}

.taiga-project-tech-sheet {
  background: #fff;
  border-top: 1px solid #d8dee9;
  margin: 2rem 0;
  padding: 2rem 0 1rem;
}

.taiga-project-tech-section {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 240px 1fr;
  margin-bottom: 2rem;
}

.taiga-project-tech-section h2 {
  color: #14358f;
  font-size: 2rem;
  font-weight: 400;
  margin: 0;
}

.taiga-project-tech-items {
  display: grid;
  gap: 1.4rem 3rem;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.taiga-project-tech-item strong {
  color: #0b0c10;
  display: block;
  font-size: 1rem;
  line-height: 1.45;
  margin-top: .35rem;
}

.taiga-project-tech-label {
  color: #687386;
  display: block;
  font-size: .82rem;
}

/* ── Documents rendering ── */
.taiga-project-tech-item-documents {
  grid-column: 1 / -1;
}

.taiga-project-tech-documents {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: .5rem;
}

.taiga-project-tech-document-link {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d8e1ed;
  border-radius: 6px;
  color: #008aa8;
  display: inline-flex;
  font-size: .95rem;
  font-weight: 500;
  gap: .5rem;
  padding: .65rem .85rem;
  text-decoration: none;
  transition: all .2s ease;
  width: fit-content;
}

.taiga-project-tech-document-link::before {
  content: "📄";
  font-size: 1.2rem;
}

.taiga-project-tech-document-size {
  color: #7a8699;
  font-size: .8rem;
  font-weight: 400;
  margin-left: .25rem;
}

.taiga-project-tech-document-link:hover {
  background: #e8f4f8;
  border-color: #008aa8;
  box-shadow: 0 2px 8px rgba(0, 138, 168, .15);
  transform: translateY(-1px);
}

.taiga-project-tech-document-link:active {
  transform: translateY(0);
}

.taiga-project-tech-document-text {
  color: #687386;
  font-size: .95rem;
}

.taiga-project-tech-documents-content strong {
  color: #687386;
  font-weight: 400;
}

.taiga-project-extra-save-btn {
  background: #008aa8;
  border: 0;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 700;
  margin-top: 1.5rem;
  min-height: 2.4rem;
  padding: 0 1.5rem;
  text-transform: uppercase;
}

.taiga-project-extra-save-btn:hover { background: #00748d; }
.taiga-project-extra-save-btn:disabled { opacity: .6; cursor: default; }

@media (max-width: 900px) {
  .taiga-project-extra-grid,
  .taiga-project-tech-section,
  .taiga-project-tech-items,
  .taiga-project-extra-file {
    grid-template-columns: 1fr;
  }
}
