:root {
  --color-bg: #f7f7f8;
  --color-surface: #ffffff;
  --color-border: #d7d9df;
  --color-border-subtle: #eceef2;
  --color-text: #20232a;
  --color-muted: #656b76;
  --color-link: #1c5fd1;
  --color-brand: #ed4401;
  --color-danger: #b42318;
  --color-success-bg: #e9f7ef;
  --color-success-text: #17663a;
  --color-error-bg: #fdeceb;
  --color-error-text: #9b1c13;
  --radius: 0.5rem;
  --app-shadow-sm: 0 1px 2px rgb(20 23 31 / 0.06);
}

body {
  margin: 0;
  background: var(--color-base-200, var(--color-bg));
  color: var(--color-base-content, var(--color-text));
  font-family: var(--font-sans, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

a {
  color: var(--color-link);
}

.form-field {
  display: grid;
  gap: 0.375rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-field__label {
  padding: 0;
  font-weight: 600;
}

.form-field__message {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.form-field__error {
  color: var(--color-danger);
}

.table-component__desktop {
  overflow-x: auto;
}

.table-component {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--app-shadow-sm);
}

.table-component th,
.table-component td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
  vertical-align: top;
}

.table-component th {
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.table-component__row:last-child td {
  border-bottom: 0;
}

.table-component__row--clickable,
.table-card--clickable {
  cursor: pointer;
}

.table-component__row--clickable:hover,
.table-card--clickable:hover {
  background: #f2f5fa;
}

.table-component__cell--left {
  text-align: left;
}

.table-component__cell--center {
  text-align: center;
}

.table-component__cell--right {
  text-align: right;
}

.table-component__sort-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
}

.table-component__empty {
  padding: 1.25rem;
  color: var(--color-muted);
  text-align: center;
}

.table-component__cards {
  display: none;
  gap: 0.75rem;
}

.table-card {
  padding: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--app-shadow-sm);
}

.table-card__heading {
  margin: 0 0 0.625rem;
  font-weight: 600;
}

.table-card__details {
  display: grid;
  grid-template-columns: minmax(0, 8rem) minmax(0, 1fr);
  gap: 0.375rem 0.75rem;
  margin: 0;
}

.table-card__details dt {
  color: var(--color-muted);
}

.table-card__details dd {
  min-width: 0;
  margin: 0;
}

.table-component__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
  color: var(--color-muted);
  font-size: 0.875rem;
}

@media (max-width: 767px) {
  .table-component__desktop {
    display: none;
  }

  .table-component__cards {
    display: grid;
  }
}

/* Dexter logo — the terminal cursor blinks subtly between two close colors.
   See app/components/logo_component.rb. */
@keyframes dexter-logo-blink {
  0%, 100% {
    fill: #ffffff;
  }
  50% {
    fill: #ffc2ac;
  }
}

.dexter-logo__cursor {
  animation: dexter-logo-blink 1.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .dexter-logo__cursor {
    animation: none;
  }
}
