:root {
  --ink: #152027;
  --muted: #60707a;
  --line: #d9e1e5;
  --paper: #ffffff;
  --wash: #f4f7f5;
  --field: #1f6b44;
  --teal: #0f6f6d;
  --yellow: #f2ba3a;
  --steel: #273642;
  --danger: #b4443a;
  --shadow: 0 18px 50px rgba(19, 32, 40, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px max(20px, calc((100vw - 1180px) / 2));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand,
.public-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.brand-mark {
  min-width: 44px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--field);
  color: white;
  border-radius: 6px;
  font-weight: 900;
}

.public-nav a,
.nav-button {
  color: var(--steel);
  text-decoration: none;
  border: 0;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.nav-button {
  min-height: 40px;
  border-radius: 6px;
  padding: 9px 12px;
  background: var(--steel);
  color: white;
}

.hero {
  position: relative;
  min-height: calc(100vh - 70px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: white;
  background: #152027 url("assets/hero-sports-park.png") center / cover no-repeat;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 22, 27, 0.88), rgba(12, 22, 27, 0.58) 46%, rgba(12, 22, 27, 0.12));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 80px 0 70px;
}

.eyebrow {
  color: var(--yellow);
  margin: 0 0 10px;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  width: min(760px, 100%);
  margin-bottom: 22px;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  width: min(650px, 100%);
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.1rem;
  line-height: 1.6;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.primary-button,
.secondary-button,
.dark-button,
.light-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 14px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 900;
}

.primary-button {
  background: var(--yellow);
  color: #172027;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
}

.dark-button {
  background: var(--steel);
  color: white;
}

.light-button {
  background: #eef4f3;
  color: var(--steel);
  border-color: var(--line);
}

.service-strip {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: -36px auto 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.service-strip article {
  padding: 22px;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 6px;
}

.service-strip article:last-child {
  border-right: 0;
}

.service-strip strong {
  font-size: 1rem;
}

.service-strip span,
.section-heading p,
.service-grid p,
.contact-band p,
.portal-card p,
.document-grid p,
.record-card span,
.login-help {
  color: var(--muted);
  line-height: 1.55;
}

.public-page,
.contact-band {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.public-page {
  display: none;
  padding: 34px 0;
}

.public-page.is-active {
  display: block;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 20px;
}

.section-heading h2,
.contact-band h2,
.portal-topline h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: 0;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.service-grid article,
.contact-band,
.portal-card,
.document-grid article,
.record-card,
.metric-grid article,
.portal,
.login-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.service-grid article {
  padding: 22px;
}

.contact-band {
  margin-top: 24px;
  margin-bottom: 44px;
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.portal.hidden {
  display: none;
}

body.portal-mode .site-header,
body.portal-mode .hero,
body.portal-mode .service-strip,
body.portal-mode .public-page,
body.portal-mode .contact-band {
  display: none;
}

body.portal-mode {
  background: #f8faf9;
}

.portal {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 54px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 720px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.portal-sidebar {
  background: #17242d;
  color: white;
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.portal-site-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
}

.portal-site-switcher > span {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-site-button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: transparent;
  color: white;
  padding: 8px;
  cursor: pointer;
  font-weight: 800;
}

.portal-site-button.is-active {
  border-color: var(--yellow);
  background: var(--yellow);
  color: #172027;
}

.portal-tab {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 800;
}

.portal-tab.is-active {
  background: var(--yellow);
  color: #172027;
}

.portal-main {
  min-width: 0;
  padding: 24px;
  background: #f8faf9;
}

.portal-topline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.top-fuel-tracker {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 10px;
  width: min(460px, 100%);
}

.top-fuel-tracker article {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 111, 109, 0.28);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 28px rgba(19, 32, 40, 0.08);
}

.top-fuel-tracker span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.top-fuel-tracker strong {
  color: var(--field);
  font-size: 1.35rem;
  line-height: 1;
}

.portal-panel {
  display: none;
  min-width: 0;
}

.portal-panel.is-active {
  display: grid;
  gap: 16px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.metric-grid article,
.portal-card,
.record-card,
.document-grid article {
  padding: 18px;
}

.metric-grid strong {
  display: block;
  font-size: 2rem;
}

.dashboard-section-label {
  margin: 2px 0 -6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.equipment-status-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.equipment-status-card {
  display: grid;
  gap: 4px;
  min-height: 108px;
  padding: 18px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(19, 32, 40, 0.06);
}

.equipment-status-card strong {
  font-size: 2rem;
  line-height: 1;
}

.equipment-status-card span {
  color: var(--muted);
  font-weight: 900;
}

.equipment-status-card.is-active {
  border-color: var(--teal);
  box-shadow: 0 12px 30px rgba(15, 111, 109, 0.16);
}

.equipment-status-panels {
  display: grid;
  gap: 12px;
}

.equipment-status-list {
  display: grid;
  gap: 10px;
}

.equipment-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.equipment-status-row strong {
  display: block;
  margin-bottom: 3px;
}

.equipment-status-row span {
  color: var(--muted);
}

.fuel-history-list {
  max-height: 360px;
  overflow: auto;
}

.clean-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.portal-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 900;
  font-size: 0.82rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--ink);
  background: white;
}

textarea {
  resize: vertical;
}

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

.record-list {
  display: grid;
  gap: 10px;
}

.record-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.record-card strong {
  display: block;
  margin-bottom: 4px;
}

.record-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-line input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: var(--teal);
}

.admin-equipment-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
}

.admin-equipment-toolbar .eyebrow,
.admin-equipment-toolbar h3 {
  margin: 0;
}

.compact-checkbox {
  display: inline-flex;
  white-space: nowrap;
  color: var(--steel);
  cursor: pointer;
}

.admin-equipment-panel {
  min-width: 0;
}

.admin-equipment-panel > h3 {
  margin-bottom: 12px;
}

.admin-equipment-card {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 14px;
  overflow: hidden;
}

.admin-equipment-card-main {
  min-width: 0;
}

.admin-equipment-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.admin-equipment-card-head strong {
  min-width: 0;
  margin: 0;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.admin-equipment-card-head .status-pill {
  flex: 0 0 auto;
}

.admin-equipment-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}

.admin-equipment-meta div {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 6px;
  background: #f7faf9;
}

.admin-equipment-meta dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-equipment-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.admin-equipment-actions {
  justify-content: flex-start;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.admin-equipment-actions .light-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.78rem;
}

.chemical-admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(420px, 1.2fr);
  gap: 16px;
  align-items: start;
}

.chemical-editor,
.chemical-catalog {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.chemical-editor.is-editing {
  border-color: var(--teal);
  box-shadow: 0 10px 28px rgba(15, 111, 109, 0.1);
}

.chemical-editor-head,
.chemical-catalog-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.chemical-editor-head h3,
.chemical-catalog-head h3,
.chemical-editor-head p,
.chemical-catalog-head p {
  margin: 0;
}

.chemical-editor fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin: 0;
  background: #fbfdfc;
}

.chemical-editor legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 900;
  font-size: 0.82rem;
}

.chemical-catalog-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 0.7fr);
  gap: 10px;
  min-width: min(420px, 100%);
}

.spray-product-admin-list {
  max-height: 680px;
  overflow: auto;
}

.spray-history-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  overflow: hidden;
}

.spray-history-card summary {
  list-style: none;
  cursor: pointer;
}

.spray-history-card summary::-webkit-details-marker {
  display: none;
}

.spray-history-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
}

.spray-history-summary strong,
.spray-history-summary span {
  display: block;
}

.spray-history-summary p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.spray-history-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: white;
}

.spray-history-detail h4 {
  margin: 0 0 8px;
}

.spray-history-facts,
.spray-history-product-metrics {
  display: grid;
  gap: 8px;
}

.spray-history-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.spray-history-facts span,
.spray-history-product-metrics span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdfc;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.spray-history-facts strong,
.spray-history-product-metrics strong {
  color: var(--ink);
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.wide-history-section {
  grid-column: 1 / -1;
}

.spray-history-products {
  display: grid;
  gap: 10px;
}

.spray-history-product {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.spray-history-product > div:first-child span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.spray-history-product-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.chemical-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfc;
}

.chemical-card-main {
  min-width: 0;
}

.chemical-card-main strong,
.chemical-card-main span {
  display: block;
}

.chemical-card-main strong {
  line-height: 1.25;
}

.chemical-card-main span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.chemical-card-main p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.chemical-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.chemical-card-metrics span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  border-radius: 6px;
  background: white;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.chemical-card-metrics strong {
  color: var(--ink);
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.chemical-card .record-actions {
  justify-content: flex-start;
  padding-top: 2px;
}

.spray-workspace {
  display: grid;
  gap: 16px;
}

.spray-tools-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f9f8;
}

.spray-tool-tab {
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.spray-tool-tab.is-active {
  background: white;
  color: var(--teal);
  box-shadow: 0 4px 14px rgba(19, 37, 44, 0.08);
}

.spray-tool-panel {
  display: none;
}

.spray-tool-panel.is-active {
  display: grid;
  gap: 16px;
  align-items: start;
}

.spray-planner-card {
  display: grid;
  gap: 14px;
}

.spray-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.spray-summary span,
.spray-summary-button,
.spray-calculation > div,
.spray-product-breakdown article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  padding: 10px;
}

.spray-summary strong,
.spray-summary-button strong,
.spray-calculation strong {
  display: block;
  color: var(--ink);
  font-size: 1.1rem;
}

.spray-summary span,
.spray-summary-button,
.spray-calculation span,
.spray-product-breakdown span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.spray-summary-button {
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.spray-summary-button:hover,
.spray-summary-button[aria-expanded="true"] {
  border-color: var(--teal);
  background: #eef7f5;
}

.planned-quotes {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7faf9;
}

.planned-quotes[hidden] {
  display: none;
}

.spray-history-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.spray-site-filter-menu {
  position: relative;
}

.spray-site-filter-menu summary {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.spray-site-filter-menu summary::-webkit-details-marker {
  display: none;
}

.spray-site-filter-menu summary::after {
  content: "▾";
  margin-left: 12px;
}

.spray-site-filter-menu[open] summary {
  border-color: var(--teal);
}

.spray-site-filter-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  min-width: 210px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  box-shadow: 0 12px 30px rgba(19, 37, 44, 0.16);
}

.spray-site-filter-options label {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 9px;
  border-radius: 6px;
  color: var(--steel);
  font-size: 0.86rem;
  font-weight: 850;
  cursor: pointer;
}

.spray-site-filter-options label:hover {
  background: #eef7f5;
}

.spray-site-filter-options input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.spray-product-picker {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.spray-product-picker-head,
.spray-product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.spray-product-picker h4 {
  margin: 0;
}

.spray-product-rows {
  display: grid;
  gap: 10px;
}

.spray-calculation {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  background: transparent;
  border: 0;
}

.spray-product-breakdown {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.spray-product-breakdown article {
  display: grid;
  gap: 3px;
}

.spray-record-list {
  max-height: 720px;
  overflow: auto;
}

.status-pill {
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef4f3;
  color: var(--steel);
  font-size: 0.78rem;
  font-weight: 900;
}

.status-pill.danger {
  background: #fff0e9;
  color: var(--danger);
}

.status-pill.warning {
  background: #fff7df;
  color: #8a5e00;
}

.status-pill.ok {
  background: #e6f4ec;
  color: var(--field);
}

.equipment-workspace {
  display: grid;
  gap: 16px;
}

.equipment-tools-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f9f8;
}

.equipment-tool-tab {
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.equipment-tool-tab.is-active {
  background: white;
  color: var(--teal);
  box-shadow: 0 4px 14px rgba(19, 37, 44, 0.08);
}

.equipment-tool-panel {
  display: none;
}

.equipment-tool-panel.is-active {
  display: grid;
  gap: 16px;
}

.equipment-detail-layout,
.equipment-admin-grid,
.equipment-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.equipment-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.equipment-left,
.equipment-detail-panel {
  display: grid;
  gap: 16px;
}

.asset-lookup-card {
  border-color: rgba(15, 111, 109, 0.3);
  background: #f7fbfa;
}

.asset-lookup-card .portal-card-head {
  grid-template-columns: 1fr;
  margin-bottom: 14px;
}

.asset-lookup-selectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.asset-lookup-selectors.single-selector {
  grid-template-columns: 1fr;
}

.asset-lookup-selectors label {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.asset-lookup-selectors select {
  min-height: 52px;
  font-size: 1rem;
  font-weight: 900;
  border-color: rgba(15, 111, 109, 0.45);
  background: #ffffff;
}

.selected-asset-summary {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 111, 109, 0.22);
}

.selected-asset-summary h3 {
  margin-bottom: 12px;
  font-size: 1.45rem;
}

.portal-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.6fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.equipment-service-list {
  display: grid;
  gap: 8px;
  max-height: 480px;
  overflow: auto;
}

.equipment-history-list {
  max-height: 460px;
  overflow: auto;
}

.equipment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfc;
  cursor: pointer;
}

.equipment-row.is-active {
  border-color: var(--teal);
  box-shadow: 0 8px 22px rgba(15, 111, 109, 0.12);
}

.equipment-row strong {
  display: block;
  margin-bottom: 3px;
}

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

.prominent-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.fact-row {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdfc;
}

.prominent-facts .fact-row {
  min-height: 78px;
  padding: 14px;
  border-color: rgba(15, 111, 109, 0.24);
  background: white;
  box-shadow: 0 8px 24px rgba(19, 32, 40, 0.06);
}

.fact-row strong {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.prominent-facts .fact-row strong {
  color: var(--teal);
  font-size: 0.75rem;
}

.prominent-facts .fact-row span {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f9f8;
}

.checklist legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 900;
}

.checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checklist input {
  width: auto;
  min-height: auto;
}

.maintenance-form h3 {
  margin-bottom: 0;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 16px;
}

.admin-grid > * {
  min-width: 0;
}

.employee-admin-layout {
  grid-template-columns: minmax(460px, 1.2fr) minmax(300px, 0.8fr);
  align-items: start;
}

.employee-form {
  grid-template-columns: 1fr;
  align-content: start;
  gap: 10px;
}

.employee-form-head h3,
.employee-form-head p {
  margin: 0;
}

.employee-form-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.employee-form > label {
  align-content: start;
  min-width: 0;
}

.employee-form > label input,
.employee-form > label select {
  height: 42px;
}

.employee-account-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 12px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7faf9;
}

.employee-account-options legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.employee-account-options .checkbox-line {
  min-height: 30px;
  padding: 4px 0;
  color: var(--steel);
  line-height: 1.3;
}

.employee-form-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  padding-top: 2px;
}

.employee-form-actions button {
  width: 100%;
  min-width: 0;
}

.employee-list-card {
  align-self: start;
}

.employee-list-card > .record-list {
  max-height: 620px;
  padding: 14px;
  overflow-y: auto;
}

.admin-grid + .admin-grid,
.admin-grid + .portal-card,
.portal-card + .portal-form {
  margin-top: 16px;
}

.employee-permissions-card {
  min-width: 0;
  margin-top: 16px;
  overflow: hidden;
}

.permission-matrix-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.permission-matrix {
  width: 100%;
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
}

.permission-matrix th,
.permission-matrix td {
  padding: 12px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.permission-matrix tr:last-child th,
.permission-matrix tr:last-child td {
  border-bottom: 0;
}

.permission-matrix th:last-child,
.permission-matrix td:last-child {
  border-right: 0;
}

.permission-matrix thead th {
  background: #edf4f1;
  color: var(--field);
  font-size: 0.78rem;
  line-height: 1.2;
}

.permission-matrix .permission-employee {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 180px;
  background: white;
  text-align: left;
}

.permission-matrix thead .permission-employee {
  z-index: 2;
  background: #edf4f1;
}

.permission-employee strong,
.permission-employee span {
  display: block;
}

.permission-employee span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.permission-checkbox {
  width: 18px;
  min-height: 18px;
  accent-color: var(--teal);
  cursor: pointer;
}

.permission-checkbox:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.admin-expandable-list {
  align-self: start;
  padding: 0;
  overflow: hidden;
}

.admin-expandable-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 14px 16px;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.admin-expandable-list summary::-webkit-details-marker {
  display: none;
}

.admin-expandable-list summary::after {
  content: "▾";
  color: var(--teal);
  font-size: 1rem;
  transition: transform 160ms ease;
}

.admin-expandable-list[open] summary::after {
  transform: rotate(180deg);
}

.admin-expandable-list summary small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.admin-expandable-list[open] summary small {
  font-size: 0;
}

.admin-expandable-list[open] summary small::after {
  content: "Collapse list";
  font-size: 0.75rem;
}

.admin-expandable-list[open] summary {
  border-bottom: 1px solid var(--line);
  background: #f7faf9;
}

.admin-expandable-list .admin-equipment-list {
  max-height: 620px;
  padding: 14px;
  overflow-y: auto;
}

.fuel-admin-forms {
  display: grid;
  gap: 16px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: #fbfdfc;
}

.save-toast {
  position: fixed;
  z-index: 1000;
  right: 22px;
  bottom: 22px;
  padding: 12px 16px;
  border-radius: 9px;
  background: var(--teal);
  color: white;
  box-shadow: 0 12px 30px rgba(19, 37, 44, 0.24);
  font-weight: 900;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.save-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.facilities-workspace {
  display: grid;
  gap: 16px;
}

.facility-selectors {
  width: 100%;
}

.facility-selectors.asset-lookup-selectors,
.equipment-selectors.asset-lookup-selectors {
  grid-template-columns: minmax(220px, 0.8fr) minmax(360px, 1.2fr);
}

.facility-detail-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.facility-detail-layout > :only-child,
.equipment-detail-layout > :only-child {
  grid-column: 1 / -1;
}

.facility-history-list {
  max-height: 460px;
  overflow: auto;
}

.purchase-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
  gap: 16px;
  align-items: start;
}

.purchase-form input[type="file"] {
  padding: 8px;
  background: #fbfdfc;
}

.purchase-list {
  max-height: 620px;
  overflow: auto;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.login-dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  width: min(420px, calc(100% - 32px));
  box-shadow: var(--shadow);
}

.login-dialog::backdrop {
  background: rgba(8, 16, 20, 0.55);
}

.login-card {
  padding: 24px;
  display: grid;
  gap: 14px;
}

.close-button {
  justify-self: end;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #eef4f3;
  cursor: pointer;
  font-size: 1.4rem;
}

@media (max-width: 1100px) {
  .employee-admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .site-header,
  .public-nav,
  .section-heading,
  .contact-band,
  .portal-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header,
  .public-nav,
  .brand {
    flex-wrap: wrap;
  }

  .service-strip,
  .service-grid,
  .metric-grid,
  .equipment-status-dashboard,
  .equipment-status-row,
  .top-fuel-tracker,
  .document-grid,
  .admin-grid,
  .chemical-admin-layout,
  .chemical-editor-head,
  .chemical-catalog-head,
  .chemical-editor fieldset,
  .chemical-catalog-filters,
  .chemical-card,
  .chemical-card-metrics,
  .spray-history-summary,
  .spray-history-detail,
  .spray-history-facts,
  .spray-history-product-metrics,
  .facility-selectors,
  .asset-lookup-selectors,
  .facility-detail-layout,
  .equipment-dashboard,
  .equipment-main-grid,
  .equipment-detail-layout,
  .equipment-admin-grid,
  .equipment-workspace,
  .purchase-layout,
  .spray-workspace,
  .portal-card-head,
  .equipment-facts,
  .checklist,
  .spray-summary,
  .spray-calculation,
  .spray-product-picker-head,
  .spray-product-row,
  .portal-form,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .employee-admin-layout,
  .employee-account-options,
  .employee-form-actions {
    grid-template-columns: 1fr;
  }

  .facility-selectors.asset-lookup-selectors,
  .equipment-selectors.asset-lookup-selectors {
    grid-template-columns: 1fr;
  }

  .portal {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-brand,
  .portal-site-switcher {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 760px;
  }

  .service-strip {
    margin-top: 0;
  }

  .portal-sidebar,
  .record-card {
    grid-template-columns: 1fr;
  }

  .admin-equipment-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-equipment-meta {
    grid-template-columns: 1fr;
  }
}
