/* Build 404 — page themes, action order, cold-call workflow and calendar refinements */

/* Keep the one-time hidden proxy capture invisible to the user. */
.guard-capturing-proxies-v404 #view{visibility:hidden!important}

/* Method and chase pills use the same text scale and compact dimensions as status pills. */
.method-pill,
.invoice-reminder{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:48px!important;
  min-height:20px!important;
  padding:4px 8px!important;
  border-radius:999px!important;
  font-size:8px!important;
  font-weight:850!important;
  line-height:1!important;
  letter-spacing:.25px!important;
  white-space:nowrap!important;
}
.invoice-actions .invoice-reminder{justify-self:center!important;align-self:center!important}

/* All requested top actions render as compact pills. */
#view .page-head .head-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
#view .page-head .head-actions>button,
#view .page-head .head-actions>a{
  min-height:30px!important;
  padding:0 13px!important;
  border-radius:999px!important;
  font-size:10px!important;
  font-weight:800!important;
  line-height:1!important;
  white-space:nowrap!important;
  box-shadow:none!important;
}

/* Page backgrounds only — panels/tables keep their existing surfaces. */
#view[data-guard-page]{min-height:calc(100vh - 34px);border-radius:18px}
#view[data-guard-page="jobs"]{background:#effcf4!important}
#view[data-guard-page="leads"]{background:#fff2f3!important}
#view[data-guard-page="callouts"]{background:#f7f3ff!important}
#view[data-guard-page="coldcall"]{background:#fffbea!important}
#view[data-guard-page="contracts"]{background:#eff6ff!important}
#view[data-guard-page="customers"]{background:#fff5eb!important}
#view[data-guard-page="invoices"]{background:#f3f4f6!important}
#view[data-guard-page="reports"]{background:#f8f1e8!important}
#view[data-guard-page="stock"],
#view[data-guard-page="prices"],
#view[data-guard-page="team"]{background:#f3f4f6!important}

/* Page-matched header action colours. */
#view[data-guard-page="jobs"] .page-head .head-actions>button{background:#dcfce7!important;border-color:#86efac!important;color:#166534!important}
#view[data-guard-page="leads"] .page-head .head-actions>button{background:#fee2e2!important;border-color:#fecaca!important;color:#991b1b!important}
#view[data-guard-page="callouts"] .page-head .head-actions>button{background:#ede9fe!important;border-color:#ddd6fe!important;color:#6d28d9!important}
#view[data-guard-page="coldcall"] .page-head .head-actions>button{background:#fef3c7!important;border-color:#fde68a!important;color:#854d0e!important}
#view[data-guard-page="contracts"] .page-head .head-actions>button{background:#dbeafe!important;border-color:#bfdbfe!important;color:#1d4ed8!important}
#view[data-guard-page="customers"] .page-head .head-actions>button{background:#ffedd5!important;border-color:#fed7aa!important;color:#9a3412!important}
#view[data-guard-page="invoices"] .page-head .head-actions>button,
#view[data-guard-page="stock"] .page-head .head-actions>button,
#view[data-guard-page="prices"] .page-head .head-actions>button,
#view[data-guard-page="team"] .page-head .head-actions>button{background:#e5e7eb!important;border-color:#d1d5db!important;color:#4b5563!important}
#view[data-guard-page="reports"] .page-head .head-actions>button{background:#ead8c2!important;border-color:#d7b996!important;color:#7c482b!important}

/* Add Prices to Calendar without recolouring the whole calendar page. */
#view[data-guard-page="calendar"] .page-head .head-actions>button{background:#edf4ea!important;border-color:#c8d9c2!important;color:#285b42!important}

/* Quick Calendar modal: selected day sits above both Month and Week. */
#modal .qcal-wrap .qcal-mode-month.qcal-mode-active,
#modal .qcal-wrap .qcal-mode-week.qcal-mode-active{
  display:flex!important;
  flex-direction:column!important;
}
#modal .qcal-wrap .qcal-mode-month.qcal-mode-active>#qcm-day-panel{
  order:-1!important;
  margin:0 0 14px!important;
}
#modal .qcal-wrap .qcal-mode-month.qcal-mode-active>.qcm-grid{order:0!important}
#modal .qcal-wrap .qcal-mode-week.qcal-mode-active>.guard-week-day-panel{
  order:-1!important;
  margin:0 0 14px!important;
}
#modal .qcal-wrap .qcal-mode-week.qcal-mode-active>.qcw-grid{order:0!important}

/* Cold-call form replacements. */
#modal #entity-form[data-guard-cold-call-workflow="404"] .guard-next-contact-v404{background:#f5f6f3!important;color:#59635d!important}
.guard-date-contacted-v404{font-size:10px!important;color:var(--muted)!important;font-weight:700!important}

/* Cold calls now appear on Month, Week and selected-day calendars. */
.qcm-event-coldcall,
.qcw-event-coldcall{
  background:#fef3c7!important;
  border-color:#fde68a!important;
  color:#854d0e!important;
}
.qcm-event-coldcall .qcm-etime,
.qcw-event-coldcall .qcw-etime{color:#9a6700!important;font-weight:900!important}
.qcm-event-coldcall{cursor:pointer}
.qcw-event-coldcall{cursor:pointer}
.qcl-card-coldcall .qcl-cs-accent.coldcall{background:#eab308!important}
.qcl-card-coldcall .qcl-cs-type,
.qcl-card-coldcall .qcl-cs-time{color:#854d0e!important}
.qcl-card-coldcall .qcl-badge-coldcall{background:#fef3c7!important;color:#854d0e!important}

@media(max-width:760px){
  #view[data-guard-page]{min-height:calc(100vh - 22px);border-radius:12px}
  #view .page-head .head-actions{gap:6px}
  #view .page-head .head-actions>button,
  #view .page-head .head-actions>a{min-height:28px!important;padding:0 10px!important;font-size:9px!important}
  #modal .qcal-wrap .qcal-mode-month.qcal-mode-active>#qcm-day-panel,
  #modal .qcal-wrap .qcal-mode-week.qcal-mode-active>.guard-week-day-panel{margin-bottom:10px!important}
}
