/*
 * UX and accessibility layer. This stays separate from the generated Tailwind
 * bundle so a safety fix is available immediately and remains readable in review.
 */
body.overlay-open,
body.nav-open { overflow: hidden; }

/* WCAG AA-safe action and supporting-text contrast on the dark surfaces. */
.btn-primary { background: #1d4ed8; color: #fff; }
.btn-primary:hover { background: #1e40af; }
.input::placeholder { color: #94a3b8; opacity: 1; }
.text-slate-500 { color: #94a3b8; }

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 100;
  transform: translateY(-200%);
  border-radius: .5rem;
  background: #fff;
  color: #0b0f16;
  padding: .5rem .75rem;
  font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }

.app-shell {
  display: grid;
  min-height: 100svh;
  grid-template-columns: 220px minmax(0, 1fr);
}
.sidebar { min-width: 0; }
.app-workspace { min-width: 0; }
.app-main { min-width: 0; }
.mobile-topbar { display: none; }
.nav-backdrop { display: none; }

.safety-strip {
  display: flex;
  align-items: center;
  min-height: 2.25rem;
  padding: .5rem 1.5rem;
  border-bottom: 1px solid #243043;
  font-size: .8125rem;
  font-weight: 700;
}
.safety-dry-run { background: #422006; color: #fde68a; }
.safety-live { background: #4c0519; color: #fecdd3; }
.safety-unknown { background: #3f2b04; color: #fef3c7; }

.table-action {
  border: 0;
  padding: 0;
  background: transparent;
  color: #8ab4ff;
  font: inherit;
  text-align: left;
  text-decoration: underline;
}
.table-action:hover { color: #c7ddff; }

@media (max-width: 767px) {
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    z-index: 60;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(19rem, calc(100vw - 3rem));
    transform: translateX(-105%);
    transition: transform .18s ease;
    overflow-y: auto;
  }
  .sidebar.is-open { transform: translateX(0); }
  .nav-open .nav-backdrop {
    display: block;
    position: fixed;
    z-index: 55;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(0, 0, 0, .58);
  }
  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    min-height: 3.5rem;
    padding: .5rem 1rem;
    border-bottom: 1px solid #243043;
    background: #111826;
  }
  .safety-strip { padding: .5rem 1rem; }
  .app-main { padding: 1rem; overflow-x: visible; }
  #toasts { right: 1rem; left: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.self-end { align-self: flex-end; }
.grow { flex-grow: 1; }
.border-l-amber-500 { border-left-color: #f59e0b; }
