/* Phase 0 baseline + the Phase 2 authenticated-shell layout (Ticket 2.1). Just the
   shell's structure — no design system, tokens, or component styles (those belong
   to later Phase 2 tickets / Blueprint §4 components). */
:root { color-scheme: light dark; }
body { margin: 0; font-family: system-ui, -apple-system, sans-serif; line-height: 1.5; }

/* Centered content container, shared by the authenticated shell and auth pages. */
.app-shell { max-width: 960px; margin: 0 auto; padding: 1rem; }

/* Authenticated shell header: brand on one side, navigation region on the other.
   Flex + wrap keeps the regions side-by-side on desktop and stacked (no overlap)
   on narrow/mobile widths. */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #8883;
  margin-bottom: 1rem;
}
.app-brand { font-weight: 600; }

/* Navigation region — links are added in Ticket 2.2. */
.app-nav { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Main content region. */
.app-main { min-width: 0; }

/* Ticket 2.3 table: a bounded, readable layout with a stable empty state. */
.table-container { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.data-table th,
.data-table td {
  padding: 0.625rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #8885;
}
.data-table th { font-weight: 600; }
.data-table-empty {
  height: 3rem;
  text-align: center;
  color: #777;
}

/* Ticket 2.5 pagination: one compact row below the shared table. */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.pagination-disabled {
  color: #777;
  opacity: 0.7;
  cursor: not-allowed;
}

/* Ticket 2.10 modal: the single server-rendered modal strategy (§4.9). Hidden until
   Alpine opens it — the partial's inline display:none guards the pre-Alpine flash and
   x-show then toggles display; this `.modal` rule supplies the shown (centered)
   layout. Minimal functional styling only — no theme system. Alpine toggles
   visibility, nothing else (R7). */
.modal {
  position: fixed;
  inset: 0;
  display: flex;               /* inline display:none keeps it hidden until x-show opens */
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-overlay { position: absolute; inset: 0; background: #0007; }
.modal-dialog {
  position: relative;
  max-width: 32rem;
  width: calc(100% - 2rem);
  max-height: calc(100% - 2rem);
  overflow: auto;
  padding: 1.25rem 1.5rem;
  background: Canvas;
  color: CanvasText;
  border: 1px solid #8886;
  border-radius: 0.5rem;
  box-shadow: 0 8px 30px #0006;
}
.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.modal-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  margin: 0.5rem 0 0;
}
.modal-summary dt { font-weight: 600; }
.modal-summary dd { margin: 0; }

/* Ticket 5.4 trial-visibility banner: an app-wide status strip at the top of the
   authenticated shell content (above flash). Reuses the shell's border/radius/alpha-grey
   conventions — no new palette, no new stylesheet. Two states only: trialing (low-key
   informational) and read_only (a prominent warning). */
.trial-banner {
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #8886;
  border-radius: 0.5rem;
}
.trial-banner--trialing {
  background: #8881;              /* subtle grey tint, informational */
}
.trial-banner--demo {
  background: #8881;              /* same low-key tint as trialing (ADR-020 demo) */
}
.trial-banner--read_only {
  background: #b3261e14;          /* faint warning tint (single accent, not a palette) */
  border-color: #b3261e88;       /* stronger warning border for prominence */
  font-weight: 600;
}
