.icon-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  display: grid;
  place-items: center;
}
.icon-btn:active {
  background: var(--surface-2);
}
.primary,
.secondary,
.danger {
  min-height: 48px;
  border-radius: 15px;
  padding: 12px 16px;
  font-weight: 750;
}
.primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}
.secondary {
  border: 1px solid var(--border);
  background: var(--surface);
}
.danger {
  border: 1px solid var(--danger-border);
  background: var(--danger-soft);
  color: var(--danger);
}
.danger.subtle-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger-border);
}
.danger.subtle-danger:active {
  background: color-mix(in srgb, var(--danger) 12%, var(--danger-soft));
}
.field {
  display: grid;
  gap: 7px;
}
.field > span,
.field label {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 650;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 15px;
  padding: 13px;
  outline: none;
}
.field textarea {
  min-height: 92px;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  background: var(--surface-2);
  padding: 5px;
  border-radius: 15px;
}
.segmented button {
  border: 0;
  background: transparent;
  border-radius: 11px;
  padding: 10px;
}
.segmented button.active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 750;
}
.check-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 4px;
}
.check-row input {
  margin-top: 3px;
}
.work-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.work-row-head {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.work-row-head strong {
  font-size: 1rem;
}
.work-row label {
  display: grid;
  gap: 4px;
}
.work-row label span {
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: capitalize;
}
.work-row input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 10px;
  text-align: right;
}
.work-row output {
  font-weight: 750;
  white-space: nowrap;
  margin-left: auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 620px) {
  .work-row-head {
    align-items: center;
  }
}

/* Compact three-column capture used by elevation details. */
.detail-input-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.compact-field {
  min-width: 0;
}

.compact-field > span {
  min-height: 2.15em;
  display: flex;
  align-items: flex-end;
  line-height: 1.08;
}

.compact-field input {
  padding: 12px 9px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 360px) {
  .detail-input-grid {
    gap: 7px;
  }

  .compact-field > span {
    font-size: 0.72rem;
  }

  .compact-field input {
    padding-inline: 7px;
  }
}

.sheet-close-btn {
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
}
.sheet-close-btn:hover {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2));
}

