/* FieldOps assigned-work lists and task completion */
.dolo-field-ops-tasks,
.dolo-field-ops-task-detail {
  display: grid;
  width: min(100%, 56rem);
  min-width: 0;
  gap: 1rem;
  margin-inline: auto;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  color: var(--dolo-text);
}

.dolo-field-ops-tasks__filter {
  justify-content: flex-end;
}

.dolo-field-ops-task-group {
  display: grid;
  min-width: 0;
  gap: 0.7rem;
}

.dolo-field-ops-task-group__heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.65rem;
  padding-inline: 0.15rem;
}

.dolo-field-ops-task-group__heading > span {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  border-radius: 0.7rem;
  background: var(--dolo-brand-soft);
  color: var(--dolo-action-primary);
  place-items: center;
}

.dolo-field-ops-task-group[data-tone="danger"] .dolo-field-ops-task-group__heading > span {
  background: var(--dolo-danger-soft);
  color: var(--dolo-danger);
}

.dolo-field-ops-task-group__heading p,
.dolo-field-ops-task-group__heading h2 {
  margin: 0;
}

.dolo-field-ops-task-list {
  display: grid;
  min-width: 0;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dolo-field-ops-task-card {
  min-width: 0;
}

.dolo-field-ops-task-card__link {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.75rem;
  border: 1px solid var(--dolo-border);
  border-radius: var(--dolo-radius-card);
  background: var(--dolo-surface-raised);
  box-shadow: var(--dolo-shadow-card);
  padding: 0.9rem;
  color: inherit;
  text-decoration: none;
  transition:
    border-color var(--dolo-motion),
    background var(--dolo-motion),
    box-shadow var(--dolo-motion),
    transform var(--dolo-motion);
}

.dolo-field-ops-task-card[data-tone="danger"] .dolo-field-ops-task-card__link {
  border-color: var(--dolo-danger-border);
  background: color-mix(in srgb, var(--dolo-danger-soft) 58%, var(--dolo-surface-raised));
}

.dolo-field-ops-task-card__link:hover {
  border-color: var(--dolo-brand-border);
  box-shadow: var(--dolo-shadow-high);
  transform: translateY(-1px);
}

.dolo-field-ops-task-card__link:focus-visible {
  outline: 3px solid var(--dolo-focus);
  outline-offset: 2px;
}

.dolo-field-ops-task-card__state {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: var(--dolo-brand-soft);
  color: var(--dolo-action-primary);
  font-size: 1.2rem;
  place-items: center;
}

.dolo-field-ops-task-card[data-tone="danger"] .dolo-field-ops-task-card__state {
  background: var(--dolo-danger-soft);
  color: var(--dolo-danger);
}

.dolo-field-ops-task-card__content,
.dolo-field-ops-task-card__heading,
.dolo-field-ops-task-card__heading > span {
  display: grid;
  min-width: 0;
}

.dolo-field-ops-task-card__content {
  gap: 0.65rem;
}

.dolo-field-ops-task-card__heading {
  gap: 0.5rem;
}

.dolo-field-ops-task-card__heading > span {
  gap: 0.15rem;
}

.dolo-field-ops-task-card__heading strong,
.dolo-field-ops-task-card__heading small {
  overflow-wrap: anywhere;
}

.dolo-field-ops-task-card__heading strong {
  color: var(--dolo-text);
  font-family: var(--dolo-font-display);
  font-size: 0.82rem;
  line-height: 1.35;
}

.dolo-field-ops-task-card__heading small {
  color: var(--dolo-text-muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.dolo-field-ops-task-card__heading .dolo-status-badge {
  width: max-content;
}

.dolo-field-ops-task-card__meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  color: var(--dolo-text-muted);
  font-size: 0.64rem;
  font-weight: 650;
  line-height: 1.45;
}

.dolo-field-ops-task-card__meta > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.3rem;
}

.dolo-field-ops-task-card__meta > span[data-tone="danger"] {
  color: var(--dolo-danger);
}

.dolo-field-ops-task-card__meta > span[data-tone="warning"] {
  color: var(--dolo-warning);
}

.dolo-field-ops-task-card__meta .dolo-icon {
  flex: 0 0 auto;
  font-size: 0.85rem;
}

.dolo-field-ops-task-card__disclosure {
  align-self: center;
  color: var(--dolo-text-muted);
  font-size: 1rem;
}

.dolo-field-ops-tasks__empty {
  padding: 1.25rem;
}

.dolo-field-ops-push {
  padding: 1rem;
}

.dolo-field-ops-push__content {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}

.dolo-field-ops-push__content > span {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: var(--dolo-brand-soft);
  color: var(--dolo-action-primary);
  font-size: 1.15rem;
  place-items: center;
}

.dolo-field-ops-push__content h2,
.dolo-field-ops-push__content p {
  margin: 0;
}

.dolo-field-ops-push__content h2 {
  font-family: var(--dolo-font-display);
  font-size: 0.82rem;
}

.dolo-field-ops-push__content p {
  margin-top: 0.15rem;
  color: var(--dolo-text-muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.dolo-field-ops-push__content .dolo-button {
  grid-column: 1 / -1;
  justify-content: center;
  width: 100%;
}

.dolo-field-ops-task-detail .dolo-task-page__panel {
  min-width: 0;
}

.dolo-field-ops-task-detail__facts dd {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.dolo-field-ops-evidence-form {
  display: grid;
  min-width: 0;
  align-items: end;
  gap: 0.75rem;
  margin-top: 0.45rem;
  border-top: 1px solid var(--dolo-divider);
  padding-top: 1rem;
}

.dolo-field-ops-evidence-form__field input[type="file"] {
  min-width: 0;
  height: auto;
  padding: 0.55rem;
  color: var(--dolo-text-muted);
  font-size: 0.7rem;
}

.dolo-field-ops-evidence-form .dolo-button {
  justify-content: center;
  width: 100%;
}

@media (min-width: 40rem) {
  .dolo-field-ops-task-card__link {
    gap: 0.9rem;
    padding: 1rem 1.1rem;
  }

  .dolo-field-ops-task-card__heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .dolo-field-ops-push__content {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .dolo-field-ops-push__content .dolo-button {
    grid-column: auto;
    width: auto;
  }

  .dolo-field-ops-evidence-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dolo-field-ops-evidence-form .dolo-button {
    width: auto;
  }
}

@media (forced-colors: active) {
  .dolo-field-ops-task-card__state,
  .dolo-field-ops-task-group__heading > span,
  .dolo-field-ops-push__content > span {
    border: 1px solid CanvasText;
  }
}

/* Core and FieldOps account profiles */
.dolo-profile,
.dolo-profile-form,
.dolo-profile__sections {
  display: grid;
  min-width: 0;
  gap: 1rem;
}

.dolo-profile {
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  color: var(--dolo-text);
}

.dolo-profile__layout {
  display: grid;
  min-width: 0;
  align-items: start;
  gap: 1rem;
}

.dolo-profile__identity,
.dolo-profile__section,
.dolo-profile-form__section,
.dolo-field-ops-profile__access {
  min-width: 0;
  padding: 1rem;
}

.dolo-profile__identity {
  display: grid;
  align-content: start;
  gap: 0.8rem;
}

.dolo-profile__identity-icon {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  background: var(--dolo-brand-soft);
  color: var(--dolo-action-primary);
  place-items: center;
}

.dolo-profile__identity-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.dolo-profile__identity h2,
.dolo-profile__identity p,
.dolo-profile__section-heading h2,
.dolo-profile__section-heading p,
.dolo-profile__privacy-note,
.dolo-profile__business,
.dolo-field-ops-profile__sign-out strong,
.dolo-field-ops-profile__sign-out p {
  margin: 0;
}

.dolo-profile__identity h2 {
  margin-top: 0.2rem;
  overflow-wrap: anywhere;
  font-family: var(--dolo-font-display);
  font-size: 1.12rem;
  line-height: 1.25;
}

.dolo-profile__identity > div > p:last-child,
.dolo-profile__business {
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
  color: var(--dolo-text-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.dolo-profile__business {
  border-top: 1px solid var(--dolo-divider);
  padding-top: 0.8rem;
  font-weight: 700;
}

.dolo-profile__section,
.dolo-profile-form__section,
.dolo-field-ops-profile__access {
  display: grid;
  gap: 1rem;
}

.dolo-profile__section-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 0.7rem;
}

.dolo-profile__section-heading > span {
  display: grid;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  background: var(--dolo-brand-soft);
  color: var(--dolo-action-primary);
  place-items: center;
}

.dolo-profile__section-heading > div {
  min-width: 0;
}

.dolo-profile__section-heading h2 {
  color: var(--dolo-text);
  font-family: var(--dolo-font-display);
  font-size: 0.92rem;
  line-height: 1.3;
}

.dolo-profile__section-heading p {
  margin-top: 0.2rem;
  color: var(--dolo-text-muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.dolo-profile__facts {
  display: grid;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--dolo-border);
  border-radius: var(--dolo-radius-control);
  background: var(--dolo-surface-subtle);
}

.dolo-profile__facts > div {
  min-width: 0;
  padding: 0.75rem;
  border-bottom: 1px solid var(--dolo-divider);
}

.dolo-profile__facts > div:last-child {
  border-bottom: 0;
}

.dolo-profile__facts dt {
  color: var(--dolo-text-muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dolo-profile__facts dd {
  margin: 0.2rem 0 0;
  overflow-wrap: anywhere;
  color: var(--dolo-text);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.45;
}

.dolo-profile__privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  color: var(--dolo-text-muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.dolo-profile__privacy-note svg {
  flex: 0 0 auto;
  margin-top: 0.05rem;
  color: var(--dolo-success);
}

.dolo-profile-form__grid {
  display: grid;
  min-width: 0;
  align-items: start;
  gap: 0.9rem;
}

.dolo-field-ops-profile__access {
  margin-top: 1rem;
}

.dolo-field-ops-profile__sign-out {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.8rem;
  border-top: 1px solid var(--dolo-divider);
  padding-top: 1rem;
}

.dolo-field-ops-profile__sign-out p {
  margin-top: 0.2rem;
  color: var(--dolo-text-muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.dolo-field-ops-profile__sign-out form,
.dolo-field-ops-profile__sign-out .dolo-button {
  width: 100%;
}

.dolo-field-ops-profile__sign-out .dolo-button {
  justify-content: center;
}

@media (min-width: 42rem) {
  .dolo-profile__identity,
  .dolo-profile__section,
  .dolo-profile-form__section,
  .dolo-field-ops-profile__access {
    padding: 1.2rem;
  }

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

  .dolo-profile__facts > div {
    border-right: 1px solid var(--dolo-divider);
  }

  .dolo-profile__facts > div:nth-child(2n) {
    border-right: 0;
  }

  .dolo-profile__facts > div:nth-last-child(2):nth-child(odd) {
    border-bottom: 0;
  }

  .dolo-profile__facts > div:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    border-right: 0;
  }

  .dolo-profile__facts--preferences > div {
    border-bottom: 0;
  }

  .dolo-profile-form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dolo-profile-form__wide {
    grid-column: 1 / -1;
  }

  .dolo-field-ops-profile__sign-out {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .dolo-field-ops-profile__sign-out form,
  .dolo-field-ops-profile__sign-out .dolo-button {
    width: auto;
  }
}

@media (min-width: 64rem) {
  .dolo-profile__layout {
    grid-template-columns: minmax(14rem, 0.55fr) minmax(0, 1.45fr);
  }

  .dolo-profile__identity {
    position: sticky;
    top: 5.5rem;
  }
}

@media (forced-colors: active) {
  .dolo-profile__facts,
  .dolo-profile__identity-icon,
  .dolo-profile__section-heading > span {
    border: 1px solid CanvasText;
  }
}
