/*
 * Shared product UI layer
 *
 * Page-specific styles remain responsible for their layouts. This sheet
 * establishes the visual contract that every public page and dashboard
 * shares: readable density, predictable controls, quiet surfaces and a
 * mobile table treatment that never silently removes business data.
 */

:root {
  --content-gutter: clamp(16px, 3vw, 32px);
  --control-height: 44px;
  --control-radius: 12px;
  --card-radius: 18px;
  --card-shadow: 0 1px 2px rgba(15, 23, 42, .12), 0 12px 30px -24px rgba(15, 23, 42, .52);
  --card-shadow-hover: 0 2px 5px rgba(15, 23, 42, .14), 0 18px 40px -28px rgba(15, 23, 42, .56);
}

body {
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

/* A product surface should establish hierarchy without looking like a
   floating decorative object. This also neutralizes the competing lift
   behaviour from older page-specific visual layers. */
.glass,
.table-card {
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}

.glass:not(.dock),
.table-card {
  animation: none;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.glass:not(.dock):hover,
.table-card:hover {
  transform: none;
  box-shadow: var(--card-shadow-hover);
  border-color: var(--border-strong);
}

.main {
  padding-inline: var(--content-gutter);
}

.topbar {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.topbar h1 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  letter-spacing: -.015em;
}

.topbar .status-dot {
  margin-top: 6px;
}

.user-pill {
  min-height: 48px;
  padding: 7px 10px 7px 12px;
  gap: 10px;
  border-radius: 14px;
  background: var(--surface-strong);
}

.user-pill .user-profile-link {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.user-pill .user-profile-link > div:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill .user-divider {
  inline-size: 1px;
  block-size: 24px;
  background: var(--border);
  flex: 0 0 auto;
}

.user-pill .logout-link {
  color: var(--danger);
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.hero-banner {
  padding: clamp(22px, 3vw, 32px);
  margin-bottom: 24px;
  border-radius: var(--card-radius);
}

.hero-banner p {
  max-width: 66ch;
}

.btn-primary,
.btn-secondary {
  min-height: var(--control-height);
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--control-radius);
  font-weight: 700;
  line-height: 1.3;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-strong);
  border-color: var(--border-strong);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
}

.field > label,
.form-grid .field label {
  margin-bottom: 7px;
  color: var(--text-dim);
  font-weight: 700;
}

.field :is(input:not([type="checkbox"]):not([type="radio"]), select) {
  min-height: var(--control-height);
}

.field textarea {
  min-height: 112px;
  line-height: 1.75;
}

.table-card {
  padding: clamp(18px, 2.5vw, 24px);
}

.table-card h3 {
  margin-bottom: 16px;
  font-size: 1rem;
}

th {
  padding-block: 12px;
  font-weight: 700;
}

td {
  padding-block: 13px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding-inline: 10px;
  font-weight: 700;
  line-height: 1;
}

.status-badge.pending,
.req-status.pending {
  animation: none;
}

.empty-row td {
  padding-block: 38px;
}

.brand-mark {
  inline-size: 34px;
  block-size: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(225, 29, 72, .28);
}

@media (max-width: 900px) {
  .main {
    padding-inline: 16px;
  }

  .topbar {
    margin-bottom: 22px;
    padding-bottom: 14px;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: stretch;
  }

  .user-pill {
    justify-content: space-between;
  }

  /* Dense data tables opt into a native horizontal scroll. This preserves
     every business field on phones without making simple two-column cards
     scroll needlessly. Stacked verification results deliberately opt out. */
  :where(.table-card.table-scroll:not(.vf-stack)) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  :where(.table-card.table-scroll:not(.vf-stack)) table {
    min-width: 560px;
  }

  :where(.table-card.vf-stack) table {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .glass,
  .table-card,
  .btn-primary,
  .btn-secondary {
    transition: none !important;
  }
}
