/* Szablon projektu — Zadanie_szablon (scoped .tpl-proj-shell) */
.tpl-proj-shell {
  --tpl-accent: #4e73df;
  --tpl-accent-hover: #3b5cc9;
  font-size: 13px;
  color: #3f4254;
  background: #fff;
  border: 1px solid #e4e6ef;
  border-radius: 10px;
  padding: 10px 12px 12px;
}

.tpl-proj-shell .embz-toolbar {
  margin-bottom: 10px;
}

.tpl-proj-shell .embz-add-btn {
  border-color: var(--tpl-accent);
  background: var(--tpl-accent);
  color: #fff;
  font-weight: 600;
}

.tpl-proj-shell .embz-add-btn:hover {
  background: var(--tpl-accent-hover);
  border-color: var(--tpl-accent-hover);
}

.tpl-proj-shell .embz-table-wrap {
  border: 1px solid #e4e6ef;
  border-radius: 8px;
  overflow: auto;
  max-height: min(70vh, 720px);
}

#tplProjTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

#tplProjTable thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f8fa;
  color: #5e6278;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 8px 6px;
  border-bottom: 2px solid #e4e6ef;
  white-space: nowrap;
}

#tplProjTable tbody td {
  padding: 4px 6px;
  border-bottom: 1px solid #eff2f5;
  vertical-align: middle;
}

#tplProjTable tbody tr:hover td {
  background: #f9fbfd;
}

#tplProjTable tbody tr.embz-parent td {
  background: #fafbff;
  font-weight: 500;
}

#tplProjTable tbody tr.embz-parent:hover td {
  background: #f3f6fb;
}

#tplProjTable tfoot td {
  background: #f5f8fa;
  font-weight: 600;
  border-top: 2px solid #e4e6ef;
  padding: 8px 6px;
}

#tplProjTable .embz-empty {
  text-align: center;
  color: #a1a5b7;
  padding: 24px 12px;
}

.tpl-proj-inp,
.tpl-proj-date,
.tpl-proj-sel {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #e4e6ef;
  border-radius: 6px;
  font: inherit;
  color: #3f4254;
  background: #fff;
}

.tpl-proj-inp:focus,
.tpl-proj-date:focus,
.tpl-proj-sel:focus {
  outline: none;
  border-color: #009ef7;
  box-shadow: 0 0 0 2px rgba(0, 158, 247, 0.12);
}

.tpl-proj-kod {
  flex: 0 0 72px;
  max-width: 88px;
  font-weight: 600;
}

.tpl-proj-opis {
  flex: 1 1 auto;
  min-width: 120px;
}

.tpl-proj-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  white-space: nowrap;
}

.tpl-proj-btn-add,
.tpl-proj-btn-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid #e4e6ef;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}

.tpl-proj-btn-add {
  border-color: var(--tpl-accent);
  color: var(--tpl-accent);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  padding: 0 10px;
}

.tpl-proj-btn-add:hover {
  background: rgba(78, 115, 223, 0.1);
}

.tpl-proj-btn-del {
  color: #b42318;
  border-color: #fecaca;
}

.tpl-proj-btn-del:hover {
  background: #fef2f2;
}

#tplProjStatus {
  min-height: 1.2em;
  margin: 0 0 8px;
  font-size: 12px;
  color: #5e6278;
}

#tplProjStatus.error {
  color: #b42318;
}

.tpl-proj-meta-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 16px;
  margin: 0 0 12px;
  padding: 12px 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.tpl-proj-meta-card label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-bottom: 4px;
}

.tpl-proj-meta-card input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #e4e6ef;
  border-radius: 6px;
  font: inherit;
}
