/* BWC Offer Portal - premium design layer.
   Loaded after styles.css and treated as the authoritative look-and-feel for
   this portal. It reuses the existing brand palette tokens (--yellow, --burnt,
   --choc, --butter, --ink, --head, --line, ...) as-is and refines every surface:
   layout rhythm, typography, cards, forms, tables, buttons, navigation and
   feedback. No new brand colours are introduced and no external fonts or assets
   are referenced (Content-Security-Policy safe). */

:root {
  --page-max: 1120px;

  /* Neutral surfaces refined for a calmer, more professional canvas. */
  --app-bg: #f6f1e7;
  --surface: #ffffff;
  --surface-soft: #fffaf1;
  --surface-sunk: #faf4e8;
  --hairline: #ece1cd;
  --hairline-soft: #f3ebda;

  /* Radii */
  --r-card: 18px;
  --r-field: 11px;
  --r-pill: 999px;

  /* Depth - layered, soft, warm-tinted shadows. */
  --sh-1: 0 1px 2px rgba(68, 38, 25, 0.05);
  --sh-2: 0 1px 2px rgba(68, 38, 25, 0.05), 0 6px 18px rgba(68, 38, 25, 0.06);
  --sh-3: 0 2px 6px rgba(68, 38, 25, 0.06), 0 18px 40px rgba(68, 38, 25, 0.10);
  --ring: 0 0 0 3px rgba(255, 193, 14, 0.42);

  --ease: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------- Base ----------------------------------- */
body {
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--app-bg);
  background-image:
    radial-gradient(1100px 460px at 50% -8%, rgba(255, 193, 14, 0.12), transparent 72%),
    radial-gradient(900px 500px at 100% 0%, rgba(132, 213, 247, 0.08), transparent 70%),
    repeating-linear-gradient(45deg, rgba(157, 92, 47, 0.028) 0 1px, transparent 1px 38px),
    repeating-linear-gradient(-45deg, rgba(157, 92, 47, 0.028) 0 1px, transparent 1px 38px);
}

::selection { background: rgba(255, 193, 14, 0.5); color: var(--choc); }

/* --------------------------------- Top bar -------------------------------- */
.topbar {
  gap: 1rem;
  padding: 0.6rem clamp(1rem, 4vw, 2.2rem);
  background: rgba(255, 253, 248, 0.86);
  backdrop-filter: saturate(1.3) blur(10px);
  -webkit-backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--hairline);
  box-shadow: var(--sh-1);
}
.brand { gap: 0.75rem; }
.brand-logo { height: 34px; }
.brand-sub {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--burnt);
  border-left: 1px solid var(--hairline);
  padding-left: 0.75rem;
}
.topbar nav { gap: 0.1rem; align-items: center; }
.topbar nav a {
  position: relative;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--head);
  padding: 0.46rem 0.82rem;
  border-radius: var(--r-pill);
  transition: background var(--ease), color var(--ease);
}
.topbar nav a:hover { background: var(--butter); color: var(--burnt); }
.topbar nav a[aria-current="page"] {
  background: var(--choc);
  color: #fff7e9;
}
.who {
  margin-left: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--head);
  background: var(--butter);
  border: 1px solid #f0e7b8;
  padding: 0.34rem 0.72rem;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.topbar nav form.inline { margin-left: 0.15rem; }

/* --------------------------------- Layout --------------------------------- */
.container {
  max-width: var(--page-max);
  margin: 2.1rem auto 3.5rem;
  padding: 0 clamp(1rem, 4vw, 2.2rem);
}

/* Page header: title (with optional status) on the left, actions on the right. */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}
.page-head .page-titles { min-width: 0; }
.page-actions { display: flex; gap: 0.55rem; flex-wrap: wrap; align-items: center; }

h1 {
  font-size: clamp(1.5rem, 3.4vw, 1.75rem);
  font-weight: 760;
  letter-spacing: -0.022em;
  color: var(--head);
  line-height: 1.15;
  margin: 0 0 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.page-sub {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.15rem 0 0;
  max-width: 74ch;
}
/* When a page has no .page-head wrapper, keep the bare h1 spacing sensible. */
.container > h1 { margin-bottom: 0.35rem; }
.container > h1 + .hint,
.container > h1 + .page-sub { margin-bottom: 1.6rem; }

h2 {
  font-size: 1.06rem;
  font-weight: 720;
  color: var(--head);
  letter-spacing: -0.01em;
  margin: 0 0 1.1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--hairline-soft);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
h2 .hint { font-weight: 500; }
h3 { font-size: 0.96rem; font-weight: 700; color: var(--head); margin: 1rem 0 0.5rem; }

/* ---------------------------------- Cards --------------------------------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: clamp(1.3rem, 3vw, 1.85rem);
  margin-bottom: 1.35rem;
  box-shadow: var(--sh-2);
}
.card.narrow { max-width: 470px; }
.card.soft { background: var(--surface-soft); }

/* A card that is itself a form: give its action row breathing room. */
form.card { display: block; }

/* --------------------------- Sectioned form groups ------------------------ */
/* Used inside the request form to break a long stack into readable groups. */
.form-section { padding: 0.2rem 0 0.4rem; }
.form-section + .form-section {
  margin-top: 1.3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--hairline-soft);
}
.section-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--burnt);
  margin: 0 0 1rem;
}

/* ---------------------------------- Forms --------------------------------- */
/* Fields lay out on a fixed, left-packed column grid with a capped track width
   so every control is the same tidy size and lines up on the same columns,
   instead of stretching to fill the whole card. */
.row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 20rem));
  justify-content: start;
  gap: 1rem 1.3rem;
  align-items: end;
  margin-bottom: 1rem;
}
.row:last-child { margin-bottom: 0; }
@media (max-width: 900px) { .row { grid-template-columns: repeat(2, minmax(0, 20rem)); } }
@media (max-width: 560px) { .row { grid-template-columns: minmax(0, 22rem); } }

/* Cap standalone controls to a single column width so a lone field (Offer name,
   remarks, ...) aligns with the grid rather than spanning the entire card.
   Textareas may run to two column widths for comfortable multi-line input. */
.card input,
.card select,
.card textarea,
.filters input,
.filters select { max-width: 20rem; }
.card textarea { max-width: 41.3rem; }
.card .role-form select { max-width: none; }
/* Buttons sitting inside a field row keep their natural width and sit on the
   field baseline rather than stretching across a grid track. */
.row > button,
.row > .btn,
.row > .role-form { grid-column: auto; width: auto; justify-self: start; align-self: end; }

/* Dedicated action bar for forms - separated from the fields. */
.form-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.4rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--hairline-soft);
}

label {
  display: block;
  font-size: 0.79rem;
  font-weight: 680;
  letter-spacing: 0.01em;
  color: var(--head);
  margin-bottom: 1rem;
}
.row label { margin-bottom: 0; }
/* Required marker sits before the label text so it never adds height after the
   control. A trailing marker made required fields taller than optional ones,
   which pushed optional controls out of alignment in a bottom-aligned row. */
.req::before { content: "*"; color: var(--danger); font-weight: 800; margin-right: 0.28rem; }

input,
select,
textarea {
  width: 100%;
  margin-top: 0.42rem;
  min-height: 2.75rem;
  padding: 0.62rem 0.78rem;
  border: 1px solid var(--hairline);
  border-radius: var(--r-field);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--surface-soft);
  color: var(--ink);
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}
select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--burnt) 50%),
    linear-gradient(135deg, var(--burnt) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.1rem;
}
select[multiple] { min-height: 8.5rem; padding: 0.35rem; background-image: none; }
textarea { min-height: 5rem; resize: vertical; line-height: 1.5; }
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--burnt);
  background: #fff;
  box-shadow: var(--ring);
}
input::placeholder,
textarea::placeholder { color: #c6b7a6; }
input[type="date"] { min-height: 2.75rem; }

/* -------------------------------- Buttons --------------------------------- */
button,
.btn {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 680;
  min-height: 2.75rem;
  padding: 0 1.2rem;
  border-radius: var(--r-field);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--ease), border-color var(--ease), box-shadow var(--ease),
    transform 0.05s ease, color var(--ease);
}
/* Primary - chocolate, with a subtle depth lift on hover. */
button {
  border: 1px solid var(--choc);
  background: linear-gradient(180deg, #55321f, var(--choc));
  color: #fff7e9;
  box-shadow: var(--sh-1);
}
button:hover {
  background: linear-gradient(180deg, #6c4127, var(--burnt));
  border-color: var(--burnt);
  box-shadow: var(--sh-2);
  transform: translateY(-1px);
}
button:active { transform: translateY(0); box-shadow: var(--sh-1); }
button:focus-visible { outline: none; box-shadow: var(--ring); }

/* Secondary - outline. */
.btn {
  border: 1px solid var(--hairline);
  background: #fff;
  color: var(--burnt);
  box-shadow: var(--sh-1);
}
.btn:hover {
  background: var(--butter);
  border-color: #ecdcb8;
  box-shadow: var(--sh-2);
  transform: translateY(-1px);
}

button.danger {
  background: linear-gradient(180deg, #ef6338, var(--danger));
  border-color: var(--danger);
  color: #fff;
}
button.danger:hover { background: linear-gradient(180deg, #e04a24, #c83d1c); border-color: #c83d1c; }

/* Ghost / link button. */
button.link,
.btn.link {
  background: none;
  border: none;
  color: var(--accent);
  min-height: auto;
  padding: 0.32rem 0.45rem;
  font-weight: 680;
  box-shadow: none;
}
button.link:hover {
  background: none;
  color: var(--choc);
  text-decoration: underline;
  box-shadow: none;
  transform: none;
}

/* Inline forms (a single control or button embedded in a cell or bar). */
form.inline { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; }
form.inline input,
form.inline select { width: auto; margin: 0; }

/* Stacked inline actions inside a table cell (reset password / enable-disable). */
.row-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; }
.row-actions form.inline { margin: 0; }

/* Compact role editor in the users table. */
.role-form { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; }
.role-form select { width: auto; margin: 0; min-height: 2.35rem; padding: 0.35rem 1.9rem 0.35rem 0.55rem; }
.role-form button { min-height: 2.35rem; padding: 0 0.85rem; font-size: 0.85rem; }
.role-tag {
  display: inline-block;
  padding: 0.2rem 0.62rem;
  border-radius: var(--r-pill);
  background: var(--butter);
  border: 1px solid #f0e7b8;
  color: var(--head);
  font-size: 0.8rem;
  font-weight: 700;
}

/* ----------------------------- Store scope grid --------------------------- */
.scope-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.4rem;
}
.scope-filter {
  border: 1px solid var(--hairline);
  border-radius: var(--r-field);
  padding: 0.7rem 0.85rem 0.85rem;
  margin: 0;
  min-width: 0;
  background: var(--surface-soft);
}
.scope-filter legend {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--burnt);
  padding: 0 0.35rem;
}
.scope-filter select {
  margin-top: 0.5rem;
  max-width: none;
  min-height: 9.5rem;
  background: #fff;
}
.scope-filter select:disabled { background: var(--surface-sunk); color: var(--muted); cursor: not-allowed; opacity: 0.75; }
.scope-all {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--head);
}
.scope-all input { width: auto; min-height: 0; margin: 0; }
.scope-count { color: var(--burnt); font-weight: 700; }
@media (max-width: 760px) { .scope-grid { grid-template-columns: 1fr; } }

/* --------------------------- Filter / toolbar bars ------------------------ */
/* A filter form reads as a slim control strip, not a heavy card. */
.filters {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.35rem;
  box-shadow: var(--sh-1);
}
.filters .row { margin-bottom: 0; align-items: end; }
.filters .filter-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1rem 0 0;
  padding-top: 0.95rem;
  border-top: 1px solid var(--hairline-soft);
  color: var(--muted);
  font-size: 0.85rem;
}
.filters .filter-meta .spacer { margin-left: auto; }

/* ------------------------------ Data tables ------------------------------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--sh-1);
  -webkit-overflow-scrolling: touch;
}
.table-wrap .grid { border: none; border-radius: 0; box-shadow: none; }

table.grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--sh-1);
}
table.grid thead th {
  text-align: left;
  font-size: 0.71rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--burnt);
  padding: 0.72rem 0.9rem;
  background: var(--surface-sunk);
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}
table.grid tbody td {
  padding: 0.72rem 0.9rem;
  border-bottom: 1px solid var(--hairline-soft);
  vertical-align: middle;
  color: var(--ink);
}
table.grid tbody tr:last-child td { border-bottom: none; }
table.grid tbody tr { transition: background var(--ease); }
table.grid tbody tr:hover td { background: #fffaf0; }

/* Key/value detail tables (request view, masters) get a tinted label column. */
table.grid tr > th:first-child {
  text-align: left;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  width: 1%;
  padding: 0.72rem 1.4rem 0.72rem 0.9rem;
  background: var(--surface-sunk);
  border-bottom: 1px solid var(--hairline-soft);
  vertical-align: top;
}

/* ------------------------------- Status pills ----------------------------- */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.72rem;
  border-radius: var(--r-pill);
  font-size: 0.73rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
}
.badge-status.draft { background: #f1e9d9; color: #7a6650; border-color: #e6dcc6; }
.badge-status.pending,
.badge-status.pending_approval { background: #fff2c9; color: #8a6400; border-color: #f1e09c; }
.badge-status.returned,
.badge-status.rejected { background: #ffe0d3; color: #a3381a; border-color: #f6c1ad; }
.badge-status.approved { background: #d8f1e0; color: #1c6b3a; border-color: #b7e2c6; }
.badge-status.cancelled { background: #e9e3dd; color: #837469; border-color: #ddd4ca; }
h1 .badge-status { font-size: 0.72rem; padding: 0.28rem 0.8rem; }

/* --------------------------------- Flash ---------------------------------- */
.flash {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1.1rem;
  border-radius: var(--r-field);
  margin-bottom: 1.4rem;
  font-size: 0.93rem;
  border: 1px solid transparent;
  box-shadow: var(--sh-1);
}
.flash.ok { background: #e2f4e8; color: #1c6b3a; border-color: #bfe4cc; }
.flash.err { background: #ffe6db; color: #a3381a; border-color: #f6c6b3; }
.flash strong { font-weight: 750; }
.flash ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.flash li { margin: 0.15rem 0; }

/* --------------------------------- Notices -------------------------------- */
.error {
  background: #ffe6db;
  border: 1px solid #f6c6b3;
  color: #a3381a;
  padding: 0.75rem 0.95rem;
  border-radius: var(--r-field);
  margin-bottom: 1rem;
  font-size: 0.92rem;
}

/* --------------------------- Store chips (view) --------------------------- */
.store-list { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.55rem; }
.store-chip {
  display: inline-block;
  padding: 0.16rem 0.55rem;
  border-radius: var(--r-pill);
  background: var(--surface-sunk);
  border: 1px solid var(--hairline);
  font-size: 0.78rem;
  color: var(--ink);
}

/* ----------------------- Store admin: dense filters + table --------------- */
.store-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.6rem 0.85rem;
}
.store-filter-grid label {
  margin: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}
.store-filter-grid input,
.store-filter-grid select {
  margin-top: 0.28rem;
  min-height: 2.15rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.86rem;
  max-width: none;
}

/* Compact data table variant to fit more rows per page. */
.grid.compact thead th { padding: 0.48rem 0.62rem; font-size: 0.66rem; letter-spacing: 0.05em; }
.grid.compact tbody td { padding: 0.4rem 0.62rem; font-size: 0.82rem; }
.grid.compact tbody tr:hover td { background: #fffaf0; }
.grid.compact .badge-status { font-size: 0.66rem; padding: 0.14rem 0.5rem; }
.grid.compact .badge-status::before { width: 5px; height: 5px; }
.grid.compact button.link { font-size: 0.8rem; padding: 0.2rem 0.3rem; }

/* --------------------------------- Pager ---------------------------------- */
.pager {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.2rem;
}

/* ------------------------------ Empty states ------------------------------ */
.empty {
  text-align: center;
  color: var(--muted);
  padding: 2.6rem 1.5rem;
}
.empty .empty-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 0.9rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-sunk);
  border: 1px solid var(--hairline);
  color: var(--burnt);
  font-size: 1.4rem;
}
.empty .empty-title { font-weight: 720; color: var(--head); font-size: 1rem; margin-bottom: 0.25rem; }
.empty .empty-sub { font-size: 0.9rem; max-width: 46ch; margin: 0 auto; }

/* -------------------------------- Timeline -------------------------------- */
.timeline { list-style: none; padding: 0; margin: 0.2rem 0 0; }
.timeline li {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.5rem;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 0.92rem;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.15rem;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 193, 14, 0.2);
}
.timeline li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 1.9rem;
  bottom: -0.75rem;
  width: 1px;
  background: var(--hairline);
}
.timeline li:last-child { border-bottom: none; }
.timeline li:last-child::after { display: none; }
.timeline strong { color: var(--head); font-weight: 700; text-transform: capitalize; }
.timeline .when { color: var(--muted); font-size: 0.78rem; margin-top: 0.2rem; }

/* --------------------------------- Hints ---------------------------------- */
.hint { color: var(--muted); font-size: 0.86rem; line-height: 1.55; }
p.hint { margin: 0 0 1rem; }
.hint code, code {
  background: var(--butter);
  border: 1px solid #f0e7b8;
  border-radius: 6px;
  padding: 0.06rem 0.38rem;
  font-size: 0.85em;
  color: var(--choc);
}

/* --------------------------- Auth (login / reset) ------------------------- */
body.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-image:
    radial-gradient(900px 500px at 50% -10%, rgba(255, 193, 14, 0.2), transparent 68%),
    radial-gradient(700px 460px at 85% 110%, rgba(132, 213, 247, 0.14), transparent 70%),
    repeating-linear-gradient(45deg, rgba(157, 92, 47, 0.03) 0 1px, transparent 1px 38px),
    repeating-linear-gradient(-45deg, rgba(157, 92, 47, 0.03) 0 1px, transparent 1px 38px);
}
.auth-main { width: 100%; margin: 0; padding: 0; }
.auth-card {
  max-width: 410px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 22px;
  padding: 2.6rem 2.3rem 2.2rem;
  box-shadow: var(--sh-3);
  text-align: center;
}
.auth-card .badge { width: 96px; height: auto; margin: 0 auto 1.2rem; display: block; }
.auth-card h1 { display: block; justify-content: center; font-size: 1.55rem; margin-bottom: 0.25rem; }
.auth-card .lead { color: var(--muted); margin: 0 0 1.7rem; font-size: 0.96rem; }
.auth-card form { text-align: left; }
.auth-card label { color: var(--head); margin-bottom: 1.15rem; }
.auth-card button[type="submit"] { width: 100%; margin-top: 0.5rem; min-height: 2.9rem; font-size: 1rem; }
.auth-card .error { text-align: left; }
.auth-foot { color: var(--muted); font-size: 0.78rem; margin: 1.8rem 0 0; }
body.auth .footer { display: none; }

/* --------------------------------- Footer --------------------------------- */
.footer {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--hairline);
  margin-top: 2.5rem;
  font-size: 0.84rem;
}

/* --------------------------- Small-screen tuning -------------------------- */
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; row-gap: 0.5rem; }
  .topbar nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.2rem; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-actions { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .who { display: none; }
}

/* ------------------------------- Motion ----------------------------------- */
.card, .flash { animation: rise 0.28s cubic-bezier(0.4, 0, 0.2, 1) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Keep the Reports approval-trail cell on a single line (scrolls with the table). */
.grid td.nowrap { white-space: nowrap; }
