
/* Payout account and portable history */
.dolo-payouts {
  display: grid;
  gap: 1rem;
}

.dolo-payouts__account,
.dolo-payouts__history {
  min-width: 0;
  overflow: hidden;
}

.dolo-payouts__account {
  padding: 1rem;
}

.dolo-payouts__section-heading,
.dolo-payouts__live-heading,
.dolo-payouts__history-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dolo-payouts__section-heading {
  margin-bottom: 1rem;
}

.dolo-payouts__section-heading > div,
.dolo-payouts__live-heading > div,
.dolo-payouts__history-heading > div {
  min-width: 0;
}

.dolo-payouts__section-heading .dolo-type-section-title,
.dolo-payouts__live-heading h3 {
  margin: 0.18rem 0 0;
}

.dolo-payouts__section-heading .dolo-type-body-small,
.dolo-payouts__live-heading p {
  margin: 0.3rem 0 0;
  color: var(--dolo-text-muted);
  line-height: 1.55;
}

.dolo-payouts__account > .dolo-attention-banner {
  margin-bottom: 1rem;
}

.dolo-payouts__connection-state {
  border: 1px solid var(--dolo-divider);
  border-radius: calc(var(--dolo-radius-card) - 0.25rem);
  background: var(--dolo-surface-subtle);
}

.dolo-payouts__live {
  display: grid;
  gap: 1rem;
  border-top: 1px solid var(--dolo-divider);
  padding-top: 1rem;
}

.dolo-payouts__live-heading {
  align-items: center;
}

.dolo-payouts__live-heading h3 {
  color: var(--dolo-text);
  font-family: var(--dolo-font-display);
  font-size: 0.9rem;
  font-weight: 800;
}

.dolo-payouts__live-heading p {
  font-size: 0.72rem;
}

.dolo-payouts__stripe-grid {
  display: grid;
  gap: 0.75rem;
}

.dolo-payouts__stripe-surface {
  min-width: 0;
  min-height: 8.5rem;
  overflow: hidden;
  border: 1px solid var(--dolo-border);
  border-radius: calc(var(--dolo-radius-card) - 0.25rem);
  background: var(--dolo-surface-raised);
}

.dolo-payouts__stripe-surface:last-child {
  min-height: 13rem;
}

.dolo-payouts__loading {
  display: grid;
  min-height: inherit;
  place-content: center;
  justify-items: center;
  gap: 0.65rem;
  padding: 2rem;
  color: var(--dolo-text-muted);
  font-size: 0.72rem;
  text-align: center;
}

.dolo-payouts__loading span {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--dolo-border-strong);
  border-top-color: var(--dolo-brand);
  border-radius: 50%;
  animation: dolo-payouts-spin 0.8s linear infinite;
}

.dolo-payouts__loading p {
  margin: 0;
}

.dolo-payouts__stripe-error {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  border: 1px solid var(--dolo-status-danger-border);
  border-radius: calc(var(--dolo-radius-card) - 0.25rem);
  background: var(--dolo-status-danger-background);
  padding: 1rem;
  color: var(--dolo-status-danger);
}

.dolo-payouts__stripe-error[hidden],
.dolo-payouts__stripe-grid[hidden] {
  display: none;
}

.dolo-payouts__stripe-error > span {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 0.65rem;
  background: var(--dolo-surface-raised);
  font-size: 1.1rem;
}

.dolo-payouts__stripe-error strong {
  display: block;
  color: var(--dolo-text);
  font-size: 0.78rem;
}

.dolo-payouts__stripe-error p {
  margin: 0.2rem 0 0;
  color: var(--dolo-text-soft);
  font-size: 0.7rem;
  line-height: 1.5;
}

.dolo-payouts__stripe-error .dolo-button {
  grid-column: 1 / -1;
  width: 100%;
}

.dolo-payouts__history-heading {
  align-items: center;
}

.dolo-payouts__count {
  flex: 0 0 auto;
  border: 1px solid var(--dolo-border);
  border-radius: 999px;
  background: var(--dolo-surface-subtle);
  padding: 0.35rem 0.65rem;
  color: var(--dolo-text-soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.dolo-payouts__history > .dolo-attention-banner {
  margin: 0.75rem;
}

.dolo-payouts__table col[data-column="payout"] {
  width: 26%;
}

.dolo-payouts__table col[data-column="date"] {
  width: 20%;
}

.dolo-payouts__table col[data-column="destination"] {
  width: 38%;
}

.dolo-payouts__table col[data-column="status"] {
  width: 16%;
}

.dolo-payouts__failure-row td,
.dolo-payouts__failure-row:nth-child(even) > td,
.dolo-payouts__failure-row:hover > td {
  border-bottom-color: var(--dolo-status-danger-border);
  background: var(--dolo-status-danger-background);
  color: var(--dolo-status-danger);
  font-size: 0.68rem;
  white-space: normal;
}

.dolo-payouts__failure-row td {
  padding-block: 0.6rem;
}

.dolo-payouts__failure-row .dolo-icon {
  margin-inline-end: 0.35rem;
  vertical-align: -0.1em;
}

.dolo-payouts__failure {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  border-top: 1px solid var(--dolo-status-danger-border);
  background: var(--dolo-status-danger-background);
  padding: 0.75rem 1rem;
  color: var(--dolo-status-danger);
  font-size: 0.68rem;
  line-height: 1.5;
}

.dolo-payouts__failure strong {
  color: inherit;
}

.dolo-payouts__empty {
  border-top: 1px solid var(--dolo-divider);
}

@keyframes dolo-payouts-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 48rem) {
  .dolo-payouts__account {
    padding: 1.25rem;
  }

  .dolo-payouts__stripe-grid {
    grid-template-columns: minmax(15rem, 0.72fr) minmax(0, 1.28fr);
  }

  .dolo-payouts__stripe-error {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }

  .dolo-payouts__stripe-error .dolo-button {
    grid-column: auto;
    width: auto;
  }

  .dolo-payouts__cards {
    display: none;
  }

  .dolo-payouts__table-wrap {
    display: block;
  }
}

@media (max-width: 35rem) {
  .dolo-payouts__section-heading,
  .dolo-payouts__live-heading,
  .dolo-payouts__history-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .dolo-payouts__section-heading .dolo-status-badge,
  .dolo-payouts__history-heading .dolo-payouts__count {
    align-self: flex-start;
  }

  .dolo-payouts__live-heading .dolo-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dolo-payouts__loading span {
    animation: none;
  }
}

@media (forced-colors: active) {
  .dolo-payouts__connection-state,
  .dolo-payouts__stripe-surface,
  .dolo-payouts__stripe-error,
  .dolo-payouts__count,
  .dolo-payouts__failure {
    border: 1px solid CanvasText;
  }
}

/* Expense workspace */
.dolo-expenses-index,
.dolo-expense-workspace,
.dolo-expense-form {
  display: grid;
  min-width: 0;
  gap: 1rem;
  color: var(--dolo-text);
}

.dolo-expenses-index {
  container: expenses-index / inline-size;
  grid-template-columns: minmax(0, 1fr);
  padding-block-end: 1.5rem;
}

.dolo-expenses-index__header,
.dolo-expenses-index__header-actions,
.dolo-expenses-index__section-heading,
.dolo-expenses-index__panel-heading,
.dolo-expenses-index__toolbar,
.dolo-expense-capture__intro,
.dolo-expense-capture__form,
.dolo-expense-form__section-heading,
.dolo-expense-form__actions,
.dolo-expense-detail__receipt > header,
.dolo-expense-detail__actions,
.dolo-receipt-scan__actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.dolo-expenses-index__header,
.dolo-expenses-index__section-heading,
.dolo-expenses-index__panel-heading,
.dolo-expense-detail__receipt > header {
  align-items: flex-start;
  justify-content: space-between;
}

.dolo-expenses-index__header > div:first-child {
  max-width: 46rem;
}

.dolo-expenses-index__header .dolo-type-label,
.dolo-expenses-index__header .dolo-type-page-title,
.dolo-expenses-index__header .dolo-type-body,
.dolo-expenses-index__section-heading p,
.dolo-expenses-index__section-heading h2,
.dolo-expenses-index__panel-heading p,
.dolo-expenses-index__panel-heading h2,
.dolo-expense-capture p,
.dolo-expense-capture h2 {
  margin: 0;
}

.dolo-expenses-index__header .dolo-type-body {
  margin-top: 0.35rem;
  color: var(--dolo-text-muted);
}

.dolo-expenses-index__header-actions {
  width: 100%;
}

.dolo-expenses-index__header-actions > * {
  flex: 1 1 auto;
}

.dolo-expense-capture {
  display: grid;
  min-width: 0;
  gap: 0.9rem;
  border-color: var(--dolo-status-info-border);
  background: linear-gradient(135deg, var(--dolo-info-soft), var(--dolo-surface-raised) 72%);
  padding: 1rem;
  scroll-margin-top: 5.5rem;
}

.dolo-expense-capture__intro {
  align-items: flex-start;
}

.dolo-expense-capture__icon,
.dolo-expense-form__section-heading > span,
.dolo-expense-detail__hero-icon,
.dolo-receipt-scan__icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
}

.dolo-expense-capture__icon,
.dolo-expense-form__section-heading > span {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: var(--dolo-surface-raised);
  color: var(--dolo-info);
  box-shadow: var(--dolo-shadow-low);
}

.dolo-expense-capture__intro > div,
.dolo-expense-form__section-heading > div,
.dolo-expense-detail__hero > div,
.dolo-expense-detail__receipt > header > div,
.dolo-expense-detail__purpose > div,
.dolo-expense-detail__receipt-file > div,
.dolo-expense-detail__receipt-missing > div {
  min-width: 0;
}

.dolo-expense-capture__intro .dolo-type-body-small {
  margin-top: 0.2rem;
  color: var(--dolo-text-muted);
}

.dolo-expense-capture__form {
  align-items: end;
}

.dolo-expense-capture__field {
  flex: 1 1 18rem;
}

.dolo-expense-capture input[type="file"],
.dolo-receipt-attachment input[type="file"] {
  min-height: 3rem;
  padding: 0.35rem;
  color: var(--dolo-text-muted);
  font-size: 0.7rem;
}

.dolo-expense-capture input[type="file"]::file-selector-button,
.dolo-receipt-attachment input[type="file"]::file-selector-button {
  min-height: 2.25rem;
  margin-inline-end: 0.65rem;
  border: 0;
  border-radius: 0.55rem;
  background: var(--dolo-brand-soft);
  padding-inline: 0.8rem;
  color: var(--dolo-action-quiet);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.dolo-expense-capture__assurance,
.dolo-expense-form__assurance,
.dolo-expense-detail__boundary {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  color: var(--dolo-text-muted);
  font-size: 0.67rem;
  line-height: 1.5;
}

.dolo-expense-capture__assurance > .dolo-icon,
.dolo-expense-form__assurance > .dolo-icon {
  flex: 0 0 auto;
  margin-top: 0.05rem;
  color: var(--dolo-success);
}

.dolo-expenses-index__summary {
  display: grid;
  min-width: 0;
  gap: 0.8rem;
}

.dolo-expenses-index__metrics {
  display: grid;
  min-width: 0;
  gap: 0.75rem;
}

.dolo-expenses-index__drafts,
.dolo-expenses-index__records {
  min-width: 0;
  margin-top: 1rem;
  overflow: visible;
}

.dolo-expenses-index__panel-heading {
  padding: 1rem;
  border-bottom: 1px solid var(--dolo-divider);
}

.dolo-expenses-index__panel-heading .dolo-type-body-small {
  margin-top: 0.15rem;
  color: var(--dolo-text-muted);
}

.dolo-expenses-index__count {
  display: inline-flex;
  min-height: 1.75rem;
  align-items: center;
  border-radius: 999px;
  background: var(--dolo-neutral-soft);
  padding-inline: 0.65rem;
  color: var(--dolo-text-soft);
  font-size: 0.66rem;
  font-weight: 800;
}

.dolo-expenses-index__draft-list {
  display: grid;
}

.dolo-expenses-index__draft {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  min-height: 4.5rem;
  padding: 0.75rem 1rem;
  color: inherit;
  text-decoration: none;
}

.dolo-expenses-index__draft + .dolo-expenses-index__draft {
  border-top: 1px solid var(--dolo-divider);
}

.dolo-expenses-index__draft:hover,
.dolo-expenses-index__draft:focus-visible {
  outline: 0;
  background: var(--dolo-surface-subtle);
}

.dolo-expenses-index__draft:focus-visible {
  box-shadow: inset 0 0 0 3px var(--dolo-focus);
}

.dolo-expenses-index__draft-icon,
.dolo-expenses-index__expense-icon {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.7rem;
  background: var(--dolo-danger-soft);
  color: var(--dolo-danger);
}

.dolo-expenses-index__draft-icon {
  background: var(--dolo-info-soft);
  color: var(--dolo-info);
}

.dolo-expenses-index__draft-copy,
.dolo-expenses-index__draft-amount,
.dolo-expenses-index__expense-link > span:last-child,
.dolo-expenses-index__card-copy {
  display: grid;
  min-width: 0;
  gap: 0.1rem;
}

.dolo-expenses-index__draft-copy strong,
.dolo-expenses-index__draft-copy small,
.dolo-expenses-index__expense-link strong,
.dolo-expenses-index__expense-link small,
.dolo-expenses-index__card-copy strong,
.dolo-expenses-index__card-copy small,
.dolo-expenses-index__card-copy > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dolo-expenses-index__draft-copy strong,
.dolo-expenses-index__expense-link strong,
.dolo-expenses-index__card-copy strong {
  color: var(--dolo-text);
  font-size: 0.74rem;
}

.dolo-expenses-index__draft-copy small,
.dolo-expenses-index__draft-amount small,
.dolo-expenses-index__expense-link small,
.dolo-expenses-index__card-copy small,
.dolo-expenses-index__card-copy > span {
  color: var(--dolo-text-muted);
  font-size: 0.64rem;
}

.dolo-expenses-index__draft-amount,
.dolo-expenses-index__draft > .dolo-status-badge {
  display: none;
}

.dolo-expenses-index__draft-arrow {
  color: var(--dolo-text-muted);
}

.dolo-expenses-index__filters {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--dolo-divider);
}

.dolo-expenses-index__toolbar {
  align-items: stretch;
}

.dolo-expenses-index__search {
  flex: 1 1 16rem;
}

.dolo-expenses-index__filter-sheet-trigger {
  display: inline-flex;
}

.dolo-expenses-index__filter-disclosure--desktop {
  display: none;
}

.dolo-expenses-filter-sheet-page,
.dolo-expenses-filter-sheet,
.dolo-expenses-filter-sheet__form,
.dolo-expenses-filter-sheet__fields {
  display: grid;
  min-width: 0;
  gap: 1rem;
}

.dolo-expenses-filter-sheet__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  border-top: 1px solid var(--dolo-divider);
  padding-top: 1rem;
}

.dolo-expenses-index__filter-disclosure {
  position: relative;
}

.dolo-expenses-index__filter-disclosure > summary {
  list-style: none;
  cursor: pointer;
}

.dolo-expenses-index__filter-disclosure > summary::-webkit-details-marker {
  display: none;
}

.dolo-expenses-index__filter-count {
  display: grid;
  min-width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  border-radius: 999px;
  background: var(--dolo-brand);
  color: var(--dolo-brand-text);
  font-size: 0.6rem;
}

.dolo-expenses-index__filter-panel {
  display: grid;
  min-width: min(100%, 19rem);
  gap: 0.75rem;
  margin-top: 0.5rem;
  border: 1px solid var(--dolo-border);
  border-radius: var(--dolo-radius-card);
  background: var(--dolo-surface-raised);
  padding: 0.9rem;
  box-shadow: var(--dolo-shadow-overlay);
}

.dolo-expenses-index__filter-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.dolo-expenses-index__table-wrap {
  display: none;
  overflow-x: auto;
}

.dolo-expenses-index__table {
  width: 100%;
  min-width: 57rem;
  border-collapse: collapse;
}

.dolo-expenses-index__table th,
.dolo-expenses-index__table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--dolo-divider);
  color: var(--dolo-text-soft);
  font-size: 0.68rem;
  text-align: start;
  vertical-align: middle;
}

.dolo-expenses-index__table th {
  background: var(--dolo-surface-subtle);
  color: var(--dolo-text-muted);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dolo-expenses-index__table tbody tr:hover {
  background: var(--dolo-surface-subtle);
}

.dolo-expenses-index__expense-link {
  display: flex;
  min-width: 15rem;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
}

.dolo-expenses-index__expense-link:hover strong {
  text-decoration: underline;
  text-underline-offset: 0.15rem;
}

.dolo-expenses-index__numeric {
  font-variant-numeric: tabular-nums;
  text-align: end !important;
  white-space: nowrap;
}

.dolo-expenses-index__numeric strong {
  color: var(--dolo-text);
}

.dolo-expenses-index__actions-heading,
.dolo-expenses-index__actions-cell {
  text-align: end !important;
}

.dolo-expenses-index__actions-cell {
  overflow: visible;
}

.dolo-expenses-index__cards {
  display: grid;
}

.dolo-expenses-index__card + .dolo-expenses-index__card {
  border-top: 1px solid var(--dolo-divider);
}

.dolo-expenses-index__card > a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.65rem;
  min-height: 4.75rem;
  padding: 0.75rem 1rem;
  color: inherit;
  text-decoration: none;
}

.dolo-expenses-index__card > a:hover,
.dolo-expenses-index__card > a:focus-visible {
  outline: 0;
  background: var(--dolo-surface-subtle);
}

.dolo-expenses-index__card > a:focus-visible {
  box-shadow: inset 0 0 0 3px var(--dolo-focus);
}

.dolo-expenses-index__card-amount {
  color: var(--dolo-text);
  font-family: var(--dolo-font-mono);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.dolo-expenses-index__card-arrow {
  color: var(--dolo-text-muted);
}

.dolo-expenses-index__card-actions {
  border-top: 1px solid var(--dolo-divider);
}

.dolo-expenses-index__empty {
  margin: 1rem;
}

.dolo-vendor-expense-row + .dolo-vendor-expense-row {
  border-top: 1px solid var(--dolo-divider);
}

.dolo-vendor-expense-row > a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.75rem;
  padding: 0.75rem 1rem;
  color: inherit;
  text-decoration: none;
}

.dolo-vendor-expense-row > a:hover,
.dolo-vendor-expense-row > a:focus-visible {
  outline: 0;
  background: var(--dolo-surface-subtle);
}

.dolo-vendor-expense-row > a:focus-visible {
  box-shadow: inset 0 0 0 3px var(--dolo-focus);
}

.dolo-vendor-expense-row__date {
  display: grid;
  min-width: 0;
  gap: 0.15rem;
}

.dolo-vendor-expense-row__date strong,
.dolo-vendor-expense-row__amount {
  color: var(--dolo-text);
}

.dolo-vendor-expense-row__date small,
.dolo-vendor-expense-row__category,
.dolo-vendor-expense-row__arrow {
  color: var(--dolo-text-muted);
}

.dolo-vendor-expense-row__date small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dolo-vendor-expense-row__purpose,
.dolo-vendor-expense-row__category {
  display: none;
}

.dolo-vendor-expense-row__amount {
  font-family: var(--dolo-font-mono);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.dolo-expense-workspace {
  padding-block-end: 1.5rem;
}

.dolo-expense-workspace__state {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--dolo-border);
  border-radius: 999px;
  background: var(--dolo-surface-raised);
  padding: 0.45rem 0.75rem;
  color: var(--dolo-text-muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.dolo-expense-form__layout,
.dolo-expense-form__evidence {
  display: grid;
  min-width: 0;
  gap: 1rem;
}

.dolo-expense-review {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  border: 1px solid var(--dolo-danger-border);
  border-radius: var(--dolo-radius-card);
  background: var(--dolo-danger-soft);
  padding: 0.9rem 1rem;
  color: var(--dolo-danger);
}

.dolo-expense-review__icon {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 0.65rem;
  background: var(--dolo-surface-raised);
}

.dolo-expense-review h2,
.dolo-expense-review p {
  margin: 0;
}

.dolo-expense-review h2 {
  color: var(--dolo-text);
  font-family: var(--dolo-font-display);
  font-size: 0.82rem;
}

.dolo-expense-review p,
.dolo-expense-review li {
  font-size: 0.68rem;
  line-height: 1.5;
}

.dolo-expense-review > div > p {
  margin-top: 0.2rem;
}

.dolo-expense-review ul {
  margin: 0.5rem 0 0;
  padding-inline-start: 1rem;
}

.dolo-expense-review {
  border-color: var(--dolo-status-warning-border);
  background: var(--dolo-warning-soft);
  color: var(--dolo-warning);
}

.dolo-expense-review__preserved {
  color: var(--dolo-text-soft);
}

.dolo-expense-review__ready {
  color: var(--dolo-success) !important;
  font-weight: 800;
}

.dolo-expense-form__section {
  min-width: 0;
  padding: 1rem;
}

.dolo-expense-form__section-heading {
  align-items: flex-start;
  margin-bottom: 1rem;
}

.dolo-expense-form__section-heading > span {
  background: var(--dolo-brand-soft);
  color: var(--dolo-warning);
}

.dolo-expense-form__section-heading h2,
.dolo-expense-form__section-heading p {
  margin: 0;
}

.dolo-expense-form__section-heading h2 {
  font-family: var(--dolo-font-display);
  font-size: 0.88rem;
}

.dolo-expense-form__section-heading p {
  margin-top: 0.15rem;
  color: var(--dolo-text-muted);
  font-size: 0.67rem;
  line-height: 1.45;
}

.dolo-expense-form__grid {
  display: grid;
  min-width: 0;
  gap: 0.85rem;
}

.dolo-expense-form__attention {
  margin-top: 0.3rem;
  color: var(--dolo-warning);
}

.dolo-autocomplete {
  position: relative;
}

.dolo-autocomplete__search-icon {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 0.8rem;
  z-index: 1;
  display: grid;
  color: var(--dolo-text-muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.dolo-autocomplete__input {
  padding-inline-start: 2.35rem;
}

.dolo-autocomplete__results {
  position: absolute;
  inset: calc(100% + 0.25rem) 0 auto;
  z-index: 60;
  overflow-y: auto;
  max-height: 18rem;
  border: 1px solid var(--dolo-border-strong);
  border-radius: var(--dolo-radius-control);
  background: var(--dolo-surface-raised);
  box-shadow: var(--dolo-shadow-overlay);
}

.dolo-autocomplete__option {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  border: 0;
  background: transparent;
  padding: 0.7rem 0.75rem;
  color: var(--dolo-text);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.dolo-autocomplete__option + .dolo-autocomplete__option {
  border-top: 1px solid var(--dolo-divider);
}

.dolo-autocomplete__option:hover,
.dolo-autocomplete__option:focus-visible {
  outline: 0;
  background: var(--dolo-brand-soft);
}

.dolo-autocomplete__avatar {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 0.55rem;
  background: var(--dolo-neutral-soft);
  color: var(--dolo-text-muted);
  font-size: 0.62rem;
  font-weight: 850;
}

.dolo-autocomplete__copy {
  display: grid;
  min-width: 0;
  gap: 0.1rem;
}

.dolo-autocomplete__copy strong,
.dolo-autocomplete__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dolo-autocomplete__copy strong {
  font-size: 0.72rem;
}

.dolo-autocomplete__copy small,
.dolo-autocomplete__empty {
  color: var(--dolo-text-muted);
  font-size: 0.65rem;
}

.dolo-autocomplete__empty {
  margin: 0;
  padding: 0.85rem;
}

.dolo-receipt-attachment {
  display: grid;
  gap: 0.75rem;
}

.dolo-receipt-attachment__attached {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--dolo-status-success-border);
  border-radius: var(--dolo-radius-control);
  background: var(--dolo-success-soft);
  padding: 0.75rem;
}

.dolo-receipt-attachment__attached[hidden],
.dolo-receipt-attachment__empty[hidden] {
  display: none;
}

.dolo-receipt-attachment__icon {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 0.65rem;
  background: var(--dolo-surface-raised);
  color: var(--dolo-success);
}

.dolo-receipt-attachment__copy {
  display: grid;
  min-width: 0;
  gap: 0.1rem;
}

.dolo-receipt-attachment__copy strong {
  font-size: 0.73rem;
}

.dolo-receipt-attachment__copy small {
  color: var(--dolo-text-muted);
  font-size: 0.65rem;
  line-height: 1.4;
}

.dolo-receipt-attachment__actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.dolo-receipt-attachment__actions .dolo-button {
  min-height: 2.25rem;
  padding-inline: 0.65rem;
}

.dolo-expense-form__assurance {
  margin: 0;
}

.dolo-expense-form__actions,
.dolo-expense-detail__actions,
.dolo-receipt-scan__actions {
  justify-content: flex-end;
}

.dolo-expense-detail {
  display: grid;
  min-width: 0;
  gap: 1rem;
  color: var(--dolo-text);
}

.dolo-expense-detail__hero {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.9rem;
}

.dolo-expense-detail__hero-icon {
  width: 4rem;
  height: 4rem;
  border: 1px solid var(--dolo-status-danger-border);
  border-radius: 1rem;
  background: var(--dolo-danger-soft);
  color: var(--dolo-danger);
  font-size: 1.5rem;
}

.dolo-expense-detail__hero h1,
.dolo-expense-detail__hero h2,
.dolo-expense-detail__hero h3,
.dolo-expense-detail__hero p {
  margin: 0;
}

.dolo-expense-detail__hero h1,
.dolo-expense-detail__hero h2,
.dolo-expense-detail__hero h3 {
  overflow-wrap: anywhere;
  font-family: var(--dolo-font-display);
  font-size: 1.05rem;
}

.dolo-expense-detail__hero p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.7rem;
  margin-top: 0.25rem;
}

.dolo-expense-detail__hero p strong {
  font-family: var(--dolo-font-display);
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
}

.dolo-expense-detail__hero p span {
  color: var(--dolo-text-muted);
  font-size: 0.68rem;
}

.dolo-expense-detail__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--dolo-border);
  border-radius: var(--dolo-radius-card);
  background: var(--dolo-surface-subtle);
}

.dolo-expense-detail__facts > div {
  min-width: 0;
  padding: 0.75rem;
  border-inline-end: 1px solid var(--dolo-divider);
}

.dolo-expense-detail__facts > div:last-child {
  border-inline-end: 0;
}

.dolo-expense-detail__facts dt {
  color: var(--dolo-text-muted);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dolo-expense-detail__facts dd {
  margin: 0.2rem 0 0;
  overflow: hidden;
  font-size: 0.68rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dolo-expense-detail__purpose {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  border-radius: var(--dolo-radius-control);
  background: var(--dolo-info-soft);
  padding: 0.8rem;
}

.dolo-expense-detail__purpose > span {
  color: var(--dolo-info);
}

.dolo-expense-detail__purpose h2,
.dolo-expense-detail__purpose p {
  margin: 0;
}

.dolo-expense-detail__purpose h2 {
  font-size: 0.72rem;
}

.dolo-expense-detail__purpose p {
  margin-top: 0.15rem;
  color: var(--dolo-text-soft);
  font-size: 0.68rem;
  line-height: 1.5;
}

.dolo-expense-detail__receipt {
  overflow: hidden;
}

.dolo-expense-detail__receipt > header {
  padding: 0.8rem;
  border-bottom: 1px solid var(--dolo-divider);
}

.dolo-expense-detail__receipt > header p,
.dolo-expense-detail__receipt > header h2 {
  margin: 0;
}

.dolo-expense-detail__receipt-image {
  display: block;
  width: 100%;
  max-height: 24rem;
  background: var(--dolo-surface-subtle);
  object-fit: contain;
}

.dolo-expense-detail__receipt-file,
.dolo-expense-detail__receipt-missing {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
}

.dolo-expense-detail__receipt-file > span,
.dolo-expense-detail__receipt-missing > span {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: 0.75rem;
  background: var(--dolo-neutral-soft);
  color: var(--dolo-text-muted);
  font-size: 1.25rem;
}

.dolo-expense-detail__receipt-file strong,
.dolo-expense-detail__receipt-file small {
  display: block;
}

.dolo-expense-detail__receipt-file strong {
  overflow-wrap: anywhere;
  font-size: 0.72rem;
}

.dolo-expense-detail__receipt-file small,
.dolo-expense-detail__receipt-missing p {
  margin-top: 0.15rem;
  color: var(--dolo-text-muted);
  font-size: 0.65rem;
  line-height: 1.45;
}

.dolo-expense-detail__receipt-missing h3,
.dolo-expense-detail__receipt-missing p {
  margin: 0;
}

.dolo-expense-detail__receipt-missing h3 {
  font-size: 0.75rem;
}

.dolo-expense-detail__boundary {
  margin: 0;
  border-radius: var(--dolo-radius-control);
  background: var(--dolo-warning-soft);
  padding: 0.7rem;
  color: var(--dolo-warning);
}

.dolo-expense-detail__boundary > .dolo-icon {
  flex: 0 0 auto;
  margin-top: 0.05rem;
}

.dolo-expense-detail__more {
  position: relative;
}

.dolo-expense-detail__more > summary {
  list-style: none;
  cursor: pointer;
}

.dolo-expense-detail__more > summary::-webkit-details-marker {
  display: none;
}

.dolo-expense-detail__more > div {
  position: absolute;
  inset: auto 0 calc(100% + 0.4rem) auto;
  z-index: 70;
  min-width: 12rem;
  border: 1px solid var(--dolo-border);
  border-radius: var(--dolo-radius-control);
  background: var(--dolo-surface-raised);
  padding: 0.35rem;
  box-shadow: var(--dolo-shadow-overlay);
}

.dolo-expense-detail__more form,
.dolo-expense-detail__more button {
  width: 100%;
}

.dolo-receipt-scan {
  display: grid;
  min-height: min(60vh, 34rem);
  place-items: center;
  padding-block: 1rem;
}

.dolo-receipt-scan__card {
  width: min(100%, 34rem);
  padding: 1.25rem;
  text-align: center;
}

.dolo-receipt-scan__icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 0.8rem;
  border-radius: 1rem;
  background: var(--dolo-info-soft);
  color: var(--dolo-info);
  font-size: 1.5rem;
}

.dolo-receipt-scan__icon[data-tone="danger"] {
  background: var(--dolo-danger-soft);
  color: var(--dolo-danger);
}

.dolo-receipt-scan__card p,
.dolo-receipt-scan__card h1 {
  margin: 0;
}

.dolo-receipt-scan__card .dolo-type-body {
  margin-top: 0.4rem;
  color: var(--dolo-text-muted);
}

.dolo-receipt-scan__progress {
  height: 0.5rem;
  overflow: hidden;
  margin-top: 1rem;
  border-radius: 999px;
  background: var(--dolo-neutral-soft);
}

.dolo-receipt-scan__progress span {
  display: block;
  width: 48%;
  height: 100%;
  border-radius: inherit;
  background: var(--dolo-brand);
  animation: dolo-receipt-reading 1.5s ease-in-out infinite alternate;
}

.dolo-receipt-scan__note {
  margin-top: 0.75rem !important;
  color: var(--dolo-text-muted);
  font-size: 0.65rem;
}

.dolo-receipt-scan__actions {
  margin-top: 1rem;
}

@keyframes dolo-receipt-reading {
  to { transform: translateX(108%); }
}

@media (prefers-reduced-motion: reduce) {
  .dolo-receipt-scan__progress span {
    width: 70%;
    animation: none;
  }
}

@media (min-width: 36rem) {
  .dolo-expenses-index__header-actions {
    width: auto;
  }

  .dolo-expenses-index__header-actions > * {
    flex: 0 0 auto;
  }

  .dolo-expense-capture,
  .dolo-expense-form__section,
  .dolo-receipt-scan__card {
    padding: 1.25rem;
  }

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

  .dolo-expense-form__full {
    grid-column: 1 / -1;
  }

  .dolo-expense-form__amount {
    grid-column: 1 / -1;
    width: min(100%, 20rem);
  }

  .dolo-receipt-attachment__attached {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .dolo-receipt-attachment__actions {
    grid-column: auto;
    justify-content: flex-end;
  }
}

@media (min-width: 42rem) {
  .dolo-expenses-index__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dolo-expenses-index__draft {
    grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  }

  .dolo-expenses-index__draft-amount,
  .dolo-expenses-index__draft > .dolo-status-badge {
    display: grid;
  }

  .dolo-expenses-index__draft > .dolo-status-badge {
    display: inline-flex;
  }

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

  .dolo-expenses-index__filter-actions {
    grid-column: 1 / -1;
  }

}

@media (min-width: 64rem) {
  .dolo-vendor-expense-row > a {
    grid-template-columns: minmax(10rem, 3fr) minmax(12rem, 4fr) minmax(8rem, 2fr) minmax(6rem, 2fr) auto;
  }

  .dolo-vendor-expense-row__date small {
    display: none;
  }

  .dolo-vendor-expense-row__purpose,
  .dolo-vendor-expense-row__category {
    display: block;
    min-width: 0;
  }

  .dolo-vendor-expense-row__amount {
    text-align: end;
  }

  .dolo-expenses-index {
    gap: 1.25rem;
  }

  .dolo-expenses-index__filter-sheet-trigger {
    display: none;
  }

  .dolo-expenses-index__filter-disclosure--desktop {
    display: block;
  }

  .dolo-expenses-index__filter-panel {
    position: absolute;
    inset: calc(100% + 0.25rem) 0 auto auto;
    z-index: 40;
    width: 34rem;
    margin-top: 0;
  }

  .dolo-expense-form__layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(20rem, 0.75fr);
    align-items: start;
  }

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

@container expenses-index (min-width: 58rem) {
  .dolo-expenses-index__metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dolo-expenses-index__table-wrap {
    display: block;
  }

  .dolo-expenses-index__cards {
    display: none;
  }
}
