html {
  background: #0A0F17;
  color-scheme: dark;
}

.node-theme {
  margin: 0;
  min-height: 100vh;
  background: var(--node-background);
  color: var(--node-text);
}

.node-theme button,
.node-theme input {
  font: inherit;
}

.node-theme button {
  color: inherit;
}

.app-shell {
  width: 100%;
  max-width: 760px;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px 18px;
  background: var(--node-background);
  border-bottom: 1px solid var(--node-border);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 16px;
  font-weight: 650;
}

.brand img {
  flex: none;
  border-radius: var(--node-radius-s);
}

.subtitle,
.muted {
  color: var(--node-text-muted);
}

.subtitle {
  margin-top: 3px;
  font-size: 12px;
}

.api-status {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 12px;
  color: var(--node-text-muted);
}

.api-status > span:first-child {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--node-warning);
}

.api-status.ok > span:first-child {
  background: var(--node-success);
}

.api-status.error > span:first-child {
  background: var(--node-error);
}

main {
  padding: 18px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.search-wrap {
  margin-bottom: 22px;
}

.search-wrap input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 12px 2px;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: 18px;
}

.section-heading span {
  color: var(--node-text-muted);
  font-size: 13px;
}

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

.card-list > .node-state {
  grid-column: 1 / -1;
}

.node-theme button.card {
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

button.card:active {
  border-color: var(--app-active);
}

.card-top {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.card h3,
.context-card h1 {
  margin: 0;
}

.node-theme .card-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.node-theme .node-state--error {
  color: var(--node-error);
}

.card h3 {
  font-size: 16px;
}

.context-card {
  margin-bottom: 22px;
}

.context-card h1 {
  margin-top: 4px;
  font-size: 21px;
}

.eyebrow {
  color: var(--app-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.card-meta {
  margin-top: 7px;
  color: var(--node-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.type-code {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--app-accent);
  font-size: 12px;
  font-weight: 800;
}

.node-theme .back.node-button {
  min-height: 36px;
  margin: -4px 0 10px;
  color: var(--app-accent);
}

.empty {
  padding: 32px 18px;
  text-align: center;
  color: var(--node-text-muted);
}

.hidden {
  display: none !important;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 760px;
  height: calc(66px + env(safe-area-inset-bottom));
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--node-panel);
  border-top: 1px solid var(--node-border);
}

.nav-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  justify-content: center;
  color: var(--node-text-muted);
  background: none;
  border: 0;
  font-size: 11px;
}

.nav-item.active {
  color: var(--app-active);
  background: var(--app-active-background);
}

.nav-item.disabled {
  opacity: .35;
}

.nav-icon {
  font-size: 20px;
}

@media (min-width: 720px) {
  main {
    padding: 24px;
  }

  .card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.node-theme .auth-card {
  max-width: 420px;
  margin: 8vh auto 0;
  padding: 22px;
}

.auth-card h1 {
  margin: 8px 0;
}

.auth-card form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.auth-card label {
  display: grid;
  gap: 7px;
  color: var(--node-text-muted);
  font-size: 13px;
}

.node-theme .auth-card .node-input {
  min-height: 48px;
}

.login-error {
  margin-top: 16px;
  color: var(--node-error);
  font-size: 13px;
}

.top-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.customer-add {
  width: 100%;
  margin: 0 0 14px;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.node-theme .small-button.node-button {
  min-height: 36px;
}

.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .65);
}

.node-theme .modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h2 {
  margin: 5px 0 0;
}

.node-theme .icon-button.node-button {
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: var(--node-radius-l);
  font-size: 24px;
}

.modal form {
  display: grid;
  gap: 16px;
}

.modal form label {
  display: grid;
  gap: 7px;
  color: var(--node-text-muted);
  font-size: 13px;
}

.node-theme .modal form .node-input {
  min-height: 44px;
}

.toggle-row {
  grid-template-columns: 1fr auto !important;
  align-items: center;
  min-height: 46px;
}

.toggle-row input {
  width: 22px;
  height: 22px;
}

@media (min-width: 720px) {
  .modal {
    align-items: center;
    padding: 24px;
  }

  .node-theme .modal-card {
    max-width: 520px;
  }
}

.node-theme .modal form textarea.node-input {
  resize: vertical;
  min-height: 90px;
}
.work-choice-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.work-choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
}

.work-choice > input {
  width: 22px;
  height: 22px;
  margin-top: 5px;
}

.work-choice-content {
  display: grid;
  gap: 8px;
}

.work-choice-title {
  font-weight: 700;
}

.work-choice-meta {
  color: var(--node-text-muted);
  font-size: 12px;
}

.node-theme .work-choice select.node-input {
  min-height: 42px;
}

.task-switcher {
  display: flex;
  gap: 8px;
  padding-bottom: 6px;
  overflow-x: auto;
}

.task-pill {
  flex: 0 0 auto;
  min-width: 108px;
  padding: 12px;
}

.task-pill strong {
  display: block;
  color: var(--app-accent);
  font-size: 14px;
}

.task-pill span {
  display: block;
  margin-top: 3px;
  color: var(--node-text-muted);
  font-size: 11px;
}

.work-order-card-number {
  color: var(--app-accent);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}
.report-task-workspace {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.task-pill {
  appearance: none;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.task-pill.active {
  outline: 1px solid var(--app-active);
  outline-offset: -1px;
}

.task-pill.active strong {
  color: var(--app-active);
}

.report-task-form {
  display: grid;
  gap: 14px;
}

.report-task-form label {
  display: grid;
  gap: 7px;
}

.report-task-form .node-input {
  min-height: 48px;
}

.report-task-form textarea {
  resize: vertical;
}

.report-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.report-progress-bar {
  height: 8px;
  overflow: hidden;
  background: var(--node-background);
  border-radius: 999px;
}

.report-progress-fill {
  width: 0;
  height: 100%;
  background: var(--app-accent);
  border-radius: inherit;
  transition: width .2s ease;
}

.progress-input-row {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 12px;
  align-items: center;
}

.progress-input-row input {
  width: 100%;
}

.progress-input-row .progress-slider {
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--app-accent);
}

.progress-input-row span {
  text-align: right;
  font-weight: 700;
}
.report-runtime {
  display: grid;
  gap: 14px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--node-border);
}

.compact-button {
  width: auto;
  min-height: 42px;
  padding: 9px 14px;
}

.report-template-meta {
  padding: 10px 12px;
  color: var(--node-text-muted);
  font-size: 12px;
}

.autosave-status {
  font-size: 12px;
  color: var(--node-text-muted);
}

.report-form-container {
  display: grid;
  gap: 18px;
}

.report-section {
  overflow: hidden;
  padding: 0;
}

.report-section-header {
  padding: 14px;
  border-bottom: 1px solid var(--node-border);
}

.report-section-header h3 {
  margin: 0;
}

.report-section-description {
  margin-top: 5px;
  color: var(--node-text-muted);
  font-size: 12px;
}

.report-section-fields {
  display: grid;
}

.report-field {
  display: grid;
  gap: 7px;
  padding: 14px;
  border-bottom: 1px solid var(--node-border);
}

.report-field:last-child {
  border-bottom: 0;
}

.report-field-label {
  font-weight: 650;
  line-height: 1.35;
}

.report-required {
  color: var(--app-accent);
}

.report-field-help {
  color: var(--node-text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.report-field input[type="text"],
.report-field input[type="number"],
.report-field input[type="date"],
.report-field input[type="time"],
.report-field textarea,
.report-field select {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
}

.report-field textarea {
  min-height: 100px;
  resize: vertical;
}

.report-field-group {
  padding: 10px 14px;
  color: var(--app-accent);
  background: var(--node-background);
  border-bottom: 1px solid var(--node-border);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.report-multi-choice {
  display: grid;
  gap: 9px;
}

.report-check-option {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 38px;
}

.report-check-option input {
  width: 20px;
  height: 20px;
}

.node-theme .report-unsupported {
  padding: 10px;
  color: var(--node-text-muted);
  font-size: 12px;
  border-style: dashed;
}

.report-save-error {
  color: var(--node-error);
}
.report-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.report-calculated input {
  opacity: .85;
  cursor: default;
}

.report-validation-error {
  border-inline-start: 2px solid var(--node-error);
}

.report-validation-error .node-input[aria-invalid="true"] {
  border-color: var(--node-error);
}

.report-validation-message {
  padding: 10px 12px;
  font-size: 13px;
}

.report-validation-message.ok {
  color: var(--node-success);
}

.report-validation-message.error {
  color: var(--node-error);
}
.node-theme .report-standard-text.node-input {
  width: 100%;
  min-height: 44px;
  margin-bottom: 7px;
  padding: 9px 11px;
}
