.project-work-card {
  padding: 26px;
}

.project-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-template {
  display: flex;
  flex-direction: column;
  min-height: 245px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f8fbf9);
}

.project-template-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-file-type {
  display: inline-flex;
  padding: 7px 9px;
  border-radius: 8px;
  background: #e3ebfa;
  color: #2455a4;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .7px;
}

.project-file-type.excel {
  background: #e4f2e9;
  color: #217346;
}
.project-file-type.pdf { background: #f8e7e7; color: #a12e2e; }

.project-language {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.project-template h3 {
  margin: 20px 0 8px;
  font-size: 17px;
}

.project-template p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.project-template-action {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-top: auto;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  border: 0;
  width: 100%;
}

.project-template-action:hover {
  background: var(--green2);
}

.project-work-note {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 11px;
  background: #edf4f1;
  color: var(--muted);
  font-size: 12px;
}

.project-original-link {
  margin-top: 10px;
  color: var(--green);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.project-original-link:hover { text-decoration: underline; }

.project-editor { padding: 26px; }
.project-editor-back {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green);
  font-weight: 800;
}
.project-editor form > button[type="submit"] { margin-top: 18px; }
.project-editor textarea { resize: vertical; }
.agreement-actions { display: flex; gap: 10px; margin-top: 18px; }
.agreement-preview-shell, .work-order-preview-shell {
  min-height: 520px;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #eef2f0;
}
.agreement-preview-shell > p, .work-order-preview-shell > p {
  margin: 0;
  padding: 90px 20px;
  color: var(--muted);
  text-align: center;
}
#agreement-pdf-preview, #work-order-pdf-preview, #order-sheet-pdf-preview, #mode-of-payment-pdf-preview { width: 100%; height: 820px; border: 0; background: white; display: block; }
.project-payment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 12px;
}
.project-payment-head h3 { margin: 0; }
.project-payment-row {
  display: grid;
  grid-template-columns: 55px 1.25fr 1.5fr 1fr 1fr 1fr 100px 38px;
  gap: 8px;
  margin-bottom: 9px;
  align-items: center;
}
.project-payment-row input { min-width: 0; }
.project-payment-row .remove-project-payment {
  width: 38px;
  min-width: 38px;
  padding: 9px;
  background: #f6e5e5;
  color: #9b2929;
}

@media (max-width: 1050px) {
  .project-payment-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
}

@media (max-width: 650px) {
  .project-template-grid {
    grid-template-columns: 1fr;
  }

  .project-template {
    min-height: 220px;
  }
}
