:root {
  --lt-motion-duration: 480ms;
  --lt-motion-duration-fast: 220ms;
  --lt-motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --lt-motion-distance: 0.875rem;
}

html {
  scroll-behavior: smooth;
}

.lt-app-shell,
.lt-workspace,
.lt-main,
.lt-content-frame {
  min-width: 0;
}

.lt-app-shell {
  overflow-x: clip;
}

/* Progressive reveal: content remains fully visible without JavaScript. */
.lt-motion-ready [data-reveal] {
  opacity: 0;
  transform: translate3d(0, var(--lt-motion-distance), 0);
  transition:
    opacity var(--lt-motion-duration) var(--lt-motion-ease),
    transform var(--lt-motion-duration) var(--lt-motion-ease);
  transition-delay: var(--lt-reveal-delay, 0ms);
  will-change: opacity, transform;
}

.lt-motion-ready [data-reveal="fade"] {
  transform: none;
}

.lt-motion-ready [data-reveal="left"] {
  transform: translate3d(-0.75rem, 0, 0);
}

.lt-motion-ready [data-reveal="right"] {
  transform: translate3d(0.75rem, 0, 0);
}

.lt-motion-ready [data-reveal].lt-reveal-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Keep the established hidden/aria-hidden drawer overlay contract. */
.lt-app-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--lt-motion-duration-fast) ease;
}

.lt-app-overlay[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.lt-sidebar {
  transition: transform var(--lt-motion-duration-fast) var(--lt-motion-ease);
}

/* Dashboard-specific responsive composition. */
.lt-dashboard-title {
  font-size: 1.75rem;
  line-height: 1.25;
}

.lt-dashboard-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
}

.lt-dashboard-actions > a,
.lt-dashboard-actions > button,
.lt-dashboard-reconstruct-control,
.lt-dashboard-support-action,
.lt-mobile-touch {
  min-height: 2.75rem;
}

.lt-dashboard-actions > a,
.lt-dashboard-actions > button {
  justify-content: center;
}

.lt-dashboard-flow {
  margin-top: 1.75rem;
}

.lt-mobile-wrap {
  overflow-wrap: anywhere;
}

.lt-mobile-lote-list {
  display: grid;
  gap: 0.75rem;
}

.lt-mobile-lote-card {
  min-width: 0;
  border: 1px solid var(--lt-border);
  border-radius: var(--lt-radius-md);
  background: var(--lt-surface);
  padding: 1rem;
  box-shadow: var(--lt-shadow-sm);
}

.lt-mobile-lote-card__header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.lt-mobile-lote-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.875rem;
}

.lt-mobile-lote-card__field {
  min-width: 0;
}

.lt-mobile-lote-card__label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--lt-text-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lt-mobile-lote-card__value {
  display: block;
  overflow-wrap: anywhere;
  color: var(--lt-text-primary);
  font-size: 0.875rem;
  font-weight: 600;
}

.lt-mobile-lote-card__action {
  width: 100%;
  min-height: 2.75rem;
  margin-top: 0.875rem;
}

.lt-desktop-lote-table {
  display: none;
}

/* Progressive file picker used by batch import, Vault and contextual evidence. */
.lt-file-input {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  min-height: 2.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.375rem;
  transition:
    border-color var(--lt-motion-duration-fast) ease,
    box-shadow var(--lt-motion-duration-fast) ease;
}

.lt-file-input:focus-within {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgb(16 185 129 / 0.12);
}

.lt-file-input__button {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  background: #0f172a;
  padding: 0.5rem 0.75rem;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.25rem;
  white-space: nowrap;
}

.lt-file-input__name {
  min-width: 0;
  overflow: hidden;
  color: #475569;
  font-size: 0.8125rem;
  line-height: 1.25rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lt-file-input__native {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
}

.lt-file-input:has(.lt-file-input__native:disabled) {
  cursor: not-allowed;
  opacity: 0.6;
}

.lt-file-input:has(.lt-file-input__native:disabled) .lt-file-input__native {
  cursor: not-allowed;
}

@media (min-width: 640px) {
  .lt-dashboard-title {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }

  .lt-dashboard-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .lt-dashboard-actions > a,
  .lt-dashboard-actions > button {
    min-height: auto;
  }

  .lt-dashboard-flow {
    margin-top: 2rem;
  }

  .lt-mobile-lote-list {
    display: none;
  }

  .lt-desktop-lote-table {
    display: block;
  }
}

@media (max-width: 1023px) {
  .lt-sidebar {
    width: min(20rem, 88vw);
    max-width: calc(100vw - 1.5rem);
    box-shadow: 22px 0 48px -26px rgb(2 6 23 / 0.78);
  }

  .lt-sidebar__brandbar {
    min-height: 4rem;
  }

  .lt-nav-link {
    min-height: 2.75rem;
  }

  .lt-drawer-trigger,
  [data-app-drawer-close],
  .lt-user-avatar,
  .lt-session-action {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  .lt-sidebar__footer {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }
}

@media (max-width: 639px) {
  .lt-main {
    padding-inline: 0.75rem;
    padding-top: 1rem;
  }

  .lt-content-frame {
    width: 100%;
  }

  .lt-dashboard-cockpit {
    padding: 1.25rem;
  }

  .lt-dashboard-actions > :first-child {
    grid-column: 1 / -1;
  }

  /* Match the dashboard action hierarchy on the operations and evidence cockpits. */
  #operations-title ~ .mt-5,
  #evidence-title ~ .mt-5 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  #operations-title ~ .mt-5 > a,
  #evidence-title ~ .mt-5 > a {
    width: 100%;
    min-height: 2.75rem;
    justify-content: center;
  }

  .lt-mobile-lote-card__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .lt-file-input {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.375rem;
  }

  .lt-file-input__button {
    width: 100%;
  }

  .lt-file-input__name {
    padding: 0.125rem 0.5rem 0.25rem;
    text-align: center;
  }

  /* Preserve P1.7-I markup while making the map less vertically dominant. */
  #map {
    height: 20rem;
  }

  /* Consistent touch targets across Settings, Admin, Integrations and forms. */
  .lt-main form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  .lt-main form select,
  .lt-main form textarea,
  .lt-main form button,
  .lt-main .lt-control,
  .lt-main .lt-data-table__page {
    min-height: 2.75rem;
    max-width: 100%;
  }

  .lt-main .lt-data-table__toolbar,
  .lt-main .lt-data-table__toolbar-group,
  .lt-main .lt-data-table__search {
    min-width: 0;
  }

  .lt-main .lt-data-table__search {
    min-width: 100%;
  }
}

@supports not (overflow: clip) {
  .lt-app-shell {
    overflow-x: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .lt-motion-ready [data-reveal],
  .lt-motion-ready [data-reveal="fade"],
  .lt-motion-ready [data-reveal="left"],
  .lt-motion-ready [data-reveal="right"] {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }

  .lt-app-overlay,
  .lt-sidebar,
  .lt-file-input {
    transition: none;
  }
}