/* Scope template clarity: customer action, compact item type, work order/notes, and reusable save. */
.painting-scope-template-heading .painting-template-item-type {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: 330px;
  margin: 0;
  padding: 10px;
  border: 1px solid #344757;
  border-radius: 10px;
  background: #0b151e;
}
.painting-scope-template-heading .painting-template-item-type legend {
  grid-column: 1 / -1;
  padding: 0 4px;
  color: #aebfd0;
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
}
.painting-scope-template-heading .painting-template-item-type label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #52677a;
  border-radius: 7px;
  color: #dbe7f3;
  cursor: pointer;
}
.painting-scope-template-heading .painting-template-item-type label:has(input:checked) {
  border-color: #ff7a18;
  background: #24170e;
  color: #fff;
}
.painting-scope-template-heading .painting-template-item-type input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #ff7a18;
}
.painting-scope-template-heading .painting-template-item-type span {
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
}
.painting-template-name-row {
  grid-template-columns: minmax(0, 1fr) !important;
  margin-top: 14px;
}
.painting-template-job-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 14px !important;
  padding-bottom: 14px !important;
  background: #09131c;
}
.painting-template-job-cards > button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 10px 14px;
  border: 1px solid #405466;
  border-radius: 9px;
  background: #0d1a25;
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.painting-template-job-cards > button:hover,
.painting-template-job-cards > button.active {
  border-color: #ff7a18;
  background: #20170f;
}
.painting-template-job-cards > button > svg:first-child {
  width: 40px;
  height: 40px;
  padding: 9px;
  border: 1px solid #ff7a18;
  border-radius: 9px;
  color: #ff8a28;
}
.painting-template-job-cards > button > svg:last-child { width: 18px; height: 18px; color: #ff8a28; }
.painting-template-job-cards span { display: grid; gap: 2px; }
.painting-template-job-cards small { color: #9fb0c1; font-size: 12px; }
.painting-template-job-cards strong { font-size: 15px; }
.painting-template-action-panel {
  padding-top: 16px !important;
  padding-bottom: 16px !important;
  background: #0d1a25;
}
.painting-template-action-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.painting-template-action-panel > header small { color: #ff983f; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.painting-template-action-panel > header button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #405466;
  border-radius: 7px;
  background: #0a141d;
  color: #fff;
}
.painting-template-action-panel > header button:hover { border-color: #ff7a18; color: #ff8a28; }
.painting-template-action-panel dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.painting-template-action-panel dl > div { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid #344757; border-radius: 7px; background: #08121a; }
.painting-template-action-panel dt { color: #91a6ba; font-size: 11px; text-transform: uppercase; }
.painting-template-action-panel dd { margin: 0; color: #fff; font-weight: 700; }
.painting-template-action-panel > p { margin: 12px 0 0; color: #bed0e2; }
.painting-template-notes-panel textarea { min-height: 110px; }
.painting-template-card-footer { grid-template-columns: 1fr !important; }
.painting-template-card-footer .painting-template-attachments { padding-right: 0; border-right: 0; }
.painting-template-bottom > div:first-child button { display: inline-flex; align-items: center; gap: 8px; color: #ff9b50; }
.painting-template-bottom > div:first-child button svg { width: 17px; height: 17px; }
.painting-template-save-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 8, 13, .78);
}
.painting-template-save-card {
  position: relative;
  width: min(100%, 520px);
  padding: 28px;
  border: 1px solid #536a7e;
  border-radius: 14px;
  background: #0b1721;
  box-shadow: 0 28px 75px rgba(0, 0, 0, .55);
}
.painting-template-save-card > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border: 1px solid #ff7a18;
  border-radius: 10px;
  color: #ff8a28;
  background: #20170f;
}
.painting-template-save-card > small { color: #ff983f; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.painting-template-save-card h2 { margin: 6px 44px 8px 0; color: #fff; font-size: 24px; line-height: 1.2; }
.painting-template-save-card p { margin: 0 0 18px; color: #aebfd0; line-height: 1.5; }
.painting-template-save-card label { display: grid; gap: 7px; color: #dce7f2; font-weight: 700; }
.painting-template-save-card input { min-height: 48px; border: 1px solid #ff7a18; border-radius: 8px; background: #08121a; color: #fff; }
.painting-template-save-card > div { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.painting-template-save-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #405466;
  border-radius: 7px;
  background: #0a141d;
  color: #fff;
}
.painting-customer-add-action {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  color: #ff8a28 !important;
  font-style: normal;
}
.painting-customer-add-action b { font-size: 12px; white-space: nowrap; }
.painting-customer-add-action svg { width: 15px; height: 15px; }
@media (max-width: 900px) {
  .painting-scope-template-heading { align-items: flex-end; }
  .painting-scope-template-heading .painting-template-item-type { min-width: 300px; }
  .painting-template-action-panel dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .painting-scope-template-heading { display: grid; }
  .painting-scope-template-heading .painting-template-item-type { width: 100%; min-width: 0; }
  .painting-template-job-cards { grid-template-columns: 1fr; }
  .painting-template-action-panel dl { grid-template-columns: 1fr; }
  .painting-template-bottom > div:first-child { align-items: flex-start; flex-direction: column; }
  .painting-template-save-card { padding: 24px 18px 18px; }
  .painting-template-save-card > div { display: grid; grid-template-columns: 1fr 1fr; }
}
