/* Forms and buttons */
input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.58rem 0.72rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #abb7be;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #6f858f;
  outline: 3px solid rgba(244, 169, 0, 0.24);
  outline-offset: 1px;
}

textarea[readonly] {
  background: var(--ground);
  color: var(--ink-soft);
}

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

.form-grid label,
.report-form label,
form.card > label,
.login-card label {
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
  color: #53616b;
  font-size: 0.79rem;
  font-weight: 700;
}

.span2,
.form-grid .full {
  grid-column: 1 / -1;
}

.filters {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.filters input[type="search"] {
  min-width: 220px;
  flex: 1;
}

.filters select {
  width: auto;
  min-width: 150px;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.inline {
  display: inline;
}

.btn {
  width: auto;
  min-height: 42px;
  padding: 0.52rem 0.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: #27343c;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.btn:hover {
  border-color: #8e9da6;
  background: #f9fafb;
  color: #172127;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  border-color: var(--charcoal-900);
  background: var(--charcoal-900);
  color: #ffffff;
}

.btn-primary:hover {
  border-color: var(--charcoal-700);
  background: var(--charcoal-700);
  color: #ffffff;
}

.btn-small {
  min-height: 34px;
  padding: 0.35rem 0.65rem;
  font-size: 0.74rem;
}

.btn-copy {
  min-height: 34px;
  padding: 0.32rem 0.62rem;
  flex: none;
  font-size: 0.74rem;
}

.btn-link {
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--red);
  cursor: pointer;
  font-size: 0.75rem;
  text-decoration: underline;
}

/* Tabs */
.tabs {
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 2px solid var(--line);
}

.tab {
  min-height: 42px;
  margin-bottom: -2px;
  padding: 0.55rem 0.9rem;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}

.tab:hover {
  color: var(--ink);
}

.tab.on {
  border-bottom-color: var(--env-yellow);
  color: var(--ink);
}

.tab-pane {
  display: none;
}

.tab-pane.on {
  display: block;
}

/* Operations stepper */
.stepper {
  margin-bottom: 1.25rem;
  padding: 0.8rem 1rem;
  display: flex;
  gap: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.step {
  position: relative;
  min-width: 110px;
  padding-right: 1.2rem;
  display: flex;
  align-items: center;
  flex: 1;
  gap: 0.45rem;
}

.step:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: 0.3rem;
  width: 0.7rem;
  height: 2px;
  background: var(--line);
  content: "";
}

.step-dot {
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: #ebedef;
  color: #7d8992;
  font-size: 0.72rem;
  font-weight: 700;
}

.step-label {
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.15;
}

.step.done .step-dot {
  background: var(--ok-bg);
  color: var(--ok);
}

.step.done .step-label {
  color: var(--ink);
}

.step.now .step-dot {
  background: var(--charcoal-900);
  color: var(--env-yellow);
}

.step.now .step-label {
  color: var(--ink);
  font-weight: 700;
}

/* Operations calendar */
.cal {
  min-width: 900px;
  table-layout: fixed;
}

.cal th,
.cal td {
  border: 1px solid var(--line);
}

.cal td {
  height: 70px;
  padding: 0.3rem;
}

.cal-name {
  width: 140px;
}

.cal-today {
  background: var(--brand-100);
}

.cal-job {
  margin-bottom: 0.3rem;
  padding: 0.32rem 0.42rem;
  display: block;
  border-left: 3px solid currentColor;
  border-radius: 5px;
  color: inherit;
  font-size: 0.7rem;
  line-height: 1.3;
  text-decoration: none;
}

.cal-job:hover {
  filter: brightness(0.96);
}

.cal-addr {
  display: block;
  overflow: hidden;
  opacity: 0.8;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Operations pipeline */
.board-wrap {
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.board {
  min-width: max-content;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.board-col {
  width: 230px;
  padding: 0.6rem;
  flex: none;
  border-radius: var(--radius);
  background: #e9edf0;
}

.board-col-head {
  margin-bottom: 0.6rem;
  padding: 0 0.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.board-count {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 700;
}

.board-card {
  margin-bottom: 0.5rem;
  padding: 0.7rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink);
  font-size: 0.82rem;
  text-decoration: none;
}

.board-card:hover {
  border-color: #9dafb9;
  box-shadow: var(--shadow-sm);
}

.board-card b {
  font-weight: 650;
  line-height: 1.25;
}

.board-meta {
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.board-empty {
  padding: 0.8rem 0;
  color: #909ba3;
  font-size: 0.78rem;
  text-align: center;
}

.cancelled-line {
  padding: 0.3rem 0;
  display: block;
  color: var(--ink-soft);
  text-decoration: none;
}

.cancelled-line:hover {
  color: var(--brand-700);
}

/* Shared layout helpers */
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1.25rem;
}

.kv {
  margin: 0 0 1rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.3rem 1rem;
  font-size: 0.88rem;
}

.kv dt {
  color: var(--ink-soft);
}

.kv dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

/* The Endata work order panel on a job: two columns of the master's fields,
   one on a phone. */
.wo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
}

.wo-edit {
  margin: 0.25rem 0 0.75rem;
}

.wo-edit > summary {
  list-style: none;
  cursor: pointer;
  display: inline-block;
}

.wo-edit > summary::-webkit-details-marker {
  display: none;
}

.wo-edit[open] > summary {
  margin-bottom: 0.75rem;
}

.wo-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  border: 0;
  padding: 0;
  margin: 0;
}

.wo-flags label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

@media (max-width: 720px) {
  .wo-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.claim {
  white-space: pre-wrap;
}

.checklist {
  padding-left: 1.2rem;
  font-size: 0.9rem;
}

.checklist li {
  margin-bottom: 0.45rem;
}

.breakdown {
  max-width: 420px;
  margin-bottom: 0.8rem;
}

.breakdown .sum td,
.breakdown .sum th {
  font-weight: 700;
}

/* A row's own label in a key/value table: a <th scope="row"> for screen readers,
   drawn like the cell beside it (2 November 2026). */
th.th-plain {
  padding: 0.6rem 0.62rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  font-size: inherit;
  font-weight: 400;
  letter-spacing: inherit;
  text-transform: none;
  vertical-align: top;
}

tbody tr:last-child th.th-plain {
  border-bottom-color: transparent;
}

.copy-row {
  padding: 0.55rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.copy-row:last-child {
  border-bottom: 0;
}

.copy-label {
  width: 130px;
  flex: none;
  color: var(--ink-soft);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.copy-row code {
  min-width: 0;
  padding: 0.3rem 0.5rem;
  flex: 1;
  overflow-x: auto;
  border-radius: 4px;
  background: var(--ground);
  font-family: var(--mono);
  font-size: 0.8rem;
  /* `pre`, not `nowrap`, and it replaces it rather than sitting above it: both
     keep the name on one line, and only `pre` keeps its spaces. These names are
     copied into SharePoint and Synergy, and ENV's own folders carry two spaces
     after the number, so the screen showed one space while the Copy button put
     two on the clipboard. */
  white-space: pre;
}

/* Comments and documents */
.note-form {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.note-author {
  max-width: 200px;
}

.note-form .btn {
  align-self: flex-start;
}

.notes {
  max-height: 340px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow-y: auto;
}

.note-item {
  padding: 0.58rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--ground);
}

.note-item p {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  white-space: pre-wrap;
}

.note-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.78rem;
}

.upload-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.upload-form input[type="file"] {
  min-width: 220px;
  flex: 1;
}

.upload-form input[type="text"] {
  min-width: 200px;
  flex: 1;
}

.upload-form .btn {
  flex: none;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.9rem;
}

.photo {
  margin: 0;
}

.photo img {
  width: 100%;
  height: 130px;
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.photo figcaption {
  margin-top: 0.3rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.report-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.guide {
  max-width: 820px;
}

.guide p {
  margin: 0.4rem 0 0.8rem;
}

.guide-list,
.guide-steps {
  padding-left: 1.2rem;
}

.guide-list li {
  margin-bottom: 0.6rem;
}

.guide-steps li {
  margin-bottom: 0.75rem;
}

