:root {
  /* Rubber Dynamics palette, taken from the logo: amber orange (the "R") and charcoal
     (the "D" swoosh and the wordmark) on white. */
  --brand: #e8892b;        /* the logo orange, for rules, glows and hover tints */
  --accent: #c05a10;       /* deeper orange: readable on white and under white text */
  --accent-soft: #f0a03c;  /* light end of the button and tab gradients */
  --ink: #232323;          /* charcoal wordmark */
  --sea: #2b2b2b;          /* charcoal: structural text like table heads and ghost buttons */
  --muted: #6b6b6b;
  --bg: #f6f6f6;
  --paper: rgba(255, 255, 255, 0.9);
  --panel: rgba(255, 255, 255, 0.82);
  --border: rgba(35, 35, 35, 0.12);
  --shadow: 0 18px 60px rgba(35, 35, 35, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(232, 137, 43, 0.13), transparent 32%),
    radial-gradient(circle at 100% 100%, rgba(35, 35, 35, 0.08), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f7f7f7 55%, #f0f0f0 100%);
}

/* The orange rule that sits under the logo, carried across the top of every page. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 4px;
  z-index: 40;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 60%, var(--accent-soft) 100%);
}

/* Selecting text keeps the brand tint instead of the browser's default blue. */
::selection {
  background: rgba(232, 137, 43, 0.32);
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.eyebrow,
.section-kicker,
.status-label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 0.98;
  max-width: 9ch;
}

.hero-copy {
  margin: 14px 0 0;
  max-width: 46rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.status-card,
.panel,
.result-card {
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.status-card {
  min-width: 240px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 246, 246, 0.9));
  border-radius: 22px;
  padding: 18px 18px 16px;
}

.status-value {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 700;
}

.grid-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.panel {
  background: var(--panel);
  border-radius: 24px;
  padding: 22px;
}

.panel-accent {
  background: linear-gradient(160deg, #ffffff, rgba(255, 255, 255, 0.8));
  border-top: 3px solid var(--brand);
}

#login-panel {
  grid-column: span 4;
}

body.signed-in #search-panel {
  grid-column: 1 / -1;
}

/* Signed out there is no session to search with, so the sign-in card is the only page and every
   tab page stays hidden. Stated in CSS as well as in app.js so the signed-out layout is what
   paints before the script runs, and what remains if the script never runs. */
body:not(.signed-in) [data-tab-panel] {
  display: none;
}

/* With the search gone the card centres, instead of sitting in the first four columns. */
body:not(.signed-in) #login-panel {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(460px, 100%);
}

/* Signed out the sign-in card is the whole page. Leaving the hero as a space-between row put the
   wordmark hard left against a centred card, which read as lopsided. Stack the hero into the same
   centred column as the card, and drop the session card- it can only ever say "Signed out" here,
   and the sign-in form directly below already says so. */
body:not(.signed-in) .hero {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

body:not(.signed-in) #session-card {
  display: none;
}

/* h1 carries `max-width: 9ch`, so its box is narrower than the copy under it and sat hard left of
   the centred column. Auto margins centre the box, and text-align centres the wrapped lines in it. */
body:not(.signed-in) h1 {
  margin-inline: auto;
}

#search-panel,
#admin-import-panel,
#admin-users-panel {
  grid-column: span 8;
}

/* Tab pages: only one is ever visible, so each takes the full row. */
#saved-panel,
#admin-users-panel,
#admin-import-panel,
#admin-materials-panel,
#admin-price-overrides-panel,
#help-panel {
  grid-column: 1 / -1;
}

.tab-bar {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.tab-button {
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.tab-button:hover {
  color: var(--sea);
  background: rgba(232, 137, 43, 0.1);
}

.tab-button.is-active {
  color: #ffffff;
  background: linear-gradient(150deg, var(--accent), #a94e0c);
}

.tab-button:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

/* How many items are saved, shown on the Saved tab itself. */
.tab-count {
  display: inline-block;
  min-width: 19px;
  margin-left: 5px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.64rem;
  line-height: 19px;
  font-weight: 700;
  text-align: center;
}

/* On the active tab the pill sits on the dark background, so it flips to the light one. */
.tab-button.is-active .tab-count {
  background: #ffffff;
  color: var(--sea);
}

.override-table .override-price {
  font-weight: 700;
}

.override-table .override-moved[data-direction="down"] {
  color: #1f7a4d;
}

.override-table .override-moved[data-direction="up"] {
  color: var(--accent);
}

.override-table .material-actions {
  text-align: right;
}

.override-table .material-actions button {
  padding: 3px 10px;
  font-size: 0.68rem;
}

/* A <td> must stay a table cell, so the stacking lives in an inner wrapper. */
.override-table .override-actions {
  white-space: nowrap;
}

.override-table .override-actions-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

/* The generic button rule gives a 46px-tall rounded box; this is a text link. */
.override-table .override-revert-all {
  min-height: 0;
  border-radius: 0;
  white-space: nowrap;
}

.override-table input {
  width: 100%;
  min-width: 5.5rem;
  padding: 3px 6px;
  font-size: 0.8rem;
}

.override-table .override-price-input {
  min-width: 4.5rem;
  text-align: right;
  font-weight: 700;
}

/* One cell per tier, so an item's whole price ladder sits in its row. The cell itself must
   stay a table cell or it drops out of the table layout — the stacking lives in this wrapper. */
.override-cell {
  vertical-align: top;
}

.override-cell-body {
  display: grid;
  gap: 2px;
  justify-items: end;
}

.tier-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

/* The global 46px control height is far too tall for a table row. */
.override-table input {
  min-height: 0;
  border-radius: 8px;
}

.override-cell .override-price-input::placeholder {
  color: rgba(107, 107, 107, 0.55);
  font-weight: 400;
}

.override-cell .override-times {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  justify-content: flex-end;
  justify-self: end;
  font-size: 0.62rem;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
}

.override-cell .override-times b {
  font-weight: 600;
  color: var(--sea);
}

/* An overridden tier is called out in green, red when it went up. */
.override-cell.is-overridden .override-price-input {
  color: #1f7a4d;
  border-color: rgba(31, 122, 77, 0.45);
}

.override-cell.is-overridden[data-direction="up"] .override-price-input {
  color: var(--accent);
  border-color: rgba(192, 90, 16, 0.45);
}

.link-button {
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.64rem;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  color: var(--accent);
}

/* Save toggle on a result row. It sits inside the SKU cell, so it has to undo the base button
   box (height, radius, shadow, lift) that is meant for standalone actions. */
.favorite-toggle {
  margin-left: 8px;
  padding: 3px 10px;
  min-height: 0;
  border-radius: 999px;
  border: 1px solid rgba(35, 35, 35, 0.22);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: none;
  vertical-align: middle;
}

.favorite-toggle:hover {
  transform: none;
  color: var(--sea);
  border-color: rgba(35, 35, 35, 0.42);
}

.favorite-toggle.is-saved {
  color: #ffffff;
  background: linear-gradient(150deg, #2e8f5c, #1f5c3c);
  border-color: #1f5c3c;
  box-shadow: 0 2px 7px rgba(31, 92, 60, 0.3);
}

.favorite-toggle.is-saved:hover {
  color: #ffffff;
  border-color: #17452c;
}

.favorite-toggle:disabled {
  opacity: 0.6;
}

/* A tier price the admin set by hand rather than imported. */
.tier-col[data-override="true"] .tier-price {
  color: var(--accent);
  border-bottom: 1px dotted currentColor;
}

.panel-heading {
  margin-bottom: 18px;
}

.stack-form {
  display: grid;
  gap: 14px;
}

/* A checkbox label reads as one line with its box, unlike the stacked text inputs. */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input[type="checkbox"] {
  flex: none;
  min-height: 0;
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--accent);
}

.inline-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

input,
select,
button {
  border-radius: 14px;
  border: 1px solid rgba(60, 60, 60, 0.15);
  min-height: 46px;
  font: inherit;
}

input,
select {
  background: rgba(255, 255, 255, 0.86);
  padding: 0 14px;
  color: var(--ink);
}

button {
  cursor: pointer;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: white;
  font-weight: 700;
  transition: transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 10px 22px rgba(192, 90, 16, 0.24);
}

button:hover {
  transform: translateY(-1px);
}

.ghost-button {
  background: transparent;
  color: var(--sea);
  box-shadow: none;
  border-color: rgba(35, 35, 35, 0.2);
}

.muted-note,
.empty-state {
  color: var(--muted);
}

.materials-filter {
  margin-top: 10px;
}

/* The paste box mimics the spreadsheet it was copied from, so columns line up on screen. */
.paste-table {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(60, 60, 60, 0.15);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  resize: vertical;
}

/* The help page is prose, so it gets a comfortable measure and room between its blocks. */
.help-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 60rem;
}

.help-lede,
.help-page p,
.help-page li {
  color: var(--muted);
  line-height: 1.65;
}

.help-page p {
  margin: 0;
}

.help-lede {
  font-size: 1.02rem;
}

.help-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
}

.help-section h3 {
  font-size: 1.1rem;
}

.help-page ul,
.help-page ol {
  margin: 0;
  padding-left: 20px;
}

.help-page li + li {
  margin-top: 6px;
}

.help-page strong {
  color: var(--ink);
}

.help-page code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(35, 35, 35, 0.08);
  font-size: 0.85em;
}

.results-grid,
.list-surface {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

/* Status line on the left, the refresh control on the right. */
.saved-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.saved-toolbar .muted-note {
  margin: 0;
}

.saved-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* A destructive action reads as a warning until you hover, then fills in. */
.danger-button {
  color: var(--accent);
  border-color: rgba(192, 90, 16, 0.4);
}

.danger-button:hover {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.diff-surface {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(35, 35, 35, 0.1);
}

.diff-surface h3,
.diff-surface h4 {
  margin: 0 0 10px;
}

.diff-surface h4 {
  margin-top: 16px;
  font-size: 0.95rem;
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.diff-stat {
  padding: 12px;
  border-radius: 14px;
  background: rgba(244, 244, 244, 0.72);
  border: 1px solid rgba(35, 35, 35, 0.08);
}

.diff-stat strong,
.diff-item strong,
.diff-item span {
  display: block;
}

.diff-item {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(35, 35, 35, 0.08);
  margin-top: 8px;
}

.diff-item span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 0.88rem;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 35, 35, 0.45);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(35, 35, 35, 0.12);
  box-shadow: 0 24px 80px rgba(35, 35, 35, 0.22);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: grid;
  gap: 10px;
  justify-items: end;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  cursor: pointer;
  max-width: min(420px, calc(100vw - 44px));
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
  color: #ffffff;
  background: linear-gradient(150deg, #3d3d3d, var(--ink));
  border: 1px solid rgba(35, 35, 35, 0.28);
  box-shadow: 0 16px 44px rgba(35, 35, 35, 0.22);
  opacity: 1;
  transition: opacity 200ms ease, transform 200ms ease;
  animation: toast-in 180ms ease-out;
}

.toast-error {
  background: linear-gradient(150deg, #d4741d, var(--accent));
  border-color: rgba(192, 90, 16, 0.32);
}

.toast-leaving {
  opacity: 0;
  transform: translateY(8px);
}

/* Slide only — opacity stays at 1 so the toast is readable even if the
   animation never advances (for example in a background tab). */
@keyframes toast-in {
  from {
    transform: translateY(10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(35, 35, 35, 0.1);
}

.summary-card strong,
.summary-card span {
  display: block;
}

.summary-card span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 0.9rem;
}

.result-card {
  background: var(--paper);
  border-radius: 20px;
  padding: 18px;
}

.result-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.result-sku {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
}

.result-meta {
  margin: 0;
  color: var(--muted);
}

.result-section {
  margin-bottom: 22px;
}

.result-section:last-child {
  margin-bottom: 0;
}

.result-section-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(35, 35, 35, 0.14);
}

.result-section-heading h3 {
  font-size: 1.05rem;
}

.result-section-heading .muted-note {
  margin: 0;
  font-size: 0.86rem;
}

.table-wrap {
  max-height: 65vh;
  overflow: auto;
  border: 1px solid rgba(35, 35, 35, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.price-table th,
.price-table td {
  padding: 5px 9px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid rgba(35, 35, 35, 0.08);
}

.price-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(242, 242, 242, 0.98);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sea);
}

.price-table tbody tr:last-child td {
  border-bottom: none;
}

.price-table tbody tr:hover {
  background: rgba(232, 137, 43, 0.09);
}

.price-table .num {
  text-align: right;
}

.price-table .sku-cell {
  font-weight: 600;
}

.price-table .material-cell {
  color: var(--muted);
}

.material-table input {
  width: 100%;
  min-width: 5.5rem;
  padding: 3px 6px;
  font-size: 0.8rem;
}

.material-table .leadtime-days {
  min-width: 4rem;
}

/* The day count, its effective date and the save chip share one cell. */
.material-table .material-leadtime {
  display: flex;
  align-items: center;
  gap: 6px;
}

.material-table .row-state,
.override-table .row-state {
  min-width: 4.6rem;
  margin-right: auto;
  font-size: 0.68rem;
  font-weight: 600;
  text-align: left;
  color: var(--muted);
}

.row-state-dirty {
  color: var(--accent);
}

.row-state-saving {
  color: var(--sea);
}

.row-state-saved {
  color: #1f7a4d;
}

.row-state-error {
  color: var(--accent);
}

.material-table .material-actions {
  text-align: right;
}

.material-table .material-actions button {
  padding: 3px 10px;
  font-size: 0.68rem;
}

.material-table tr.material-disabled td {
  color: var(--muted);
}

.status-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-on {
  color: #1f5c3c;
  background: rgba(46, 143, 92, 0.16);
}

.status-off {
  color: var(--accent);
  background: rgba(192, 90, 16, 0.14);
}

.tier-col {
  background: rgba(35, 35, 35, 0.03);
}

.tier-price {
  display: block;
}

.tier-lead,
.tier-min-qty {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
}

.price-stack,
.tiers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.price-chip,
.tier-chip,
.list-row {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(35, 35, 35, 0.1);
}

.price-chip {
  padding: 8px 10px;
  font-size: 0.82rem;
}

.tier-chip {
  padding: 12px;
}

.tier-chip strong,
.tier-chip span {
  display: block;
}

.tier-chip span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 0.85rem;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.upload-box {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px dashed rgba(35, 35, 35, 0.2);
}

/* Reference material for the CSV formats, folded away until it is needed. */
.help-details {
  margin: 10px 0 14px;
  font-size: 0.76rem;
}

.help-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--sea);
}

.help-details summary:hover {
  color: var(--accent);
}

.help-intro {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.help-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.72rem;
}

.help-table th,
.help-table td {
  padding: 5px 7px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(35, 35, 35, 0.08);
}

.help-table thead th {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sea);
}

.help-table th:first-child,
.help-table td:first-child {
  white-space: nowrap;
}

.help-table code,
.help-warning code {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(35, 35, 35, 0.08);
  font-size: 0.72rem;
}

.help-example {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(35, 35, 35, 0.06);
  border: 1px solid rgba(35, 35, 35, 0.08);
  font-size: 0.7rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
}

.help-warning {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.list-row {
  padding: 14px 16px;
}

.list-row strong,
.list-row span {
  display: block;
}

.list-row span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 0.9rem;
}

/* The admin's read-only view of one account's saved list, revealed under the account rows. */
.user-favorites {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* "Close" sits at the far end of the heading rule rather than inline with the title. */
.user-favorites .result-section-heading .list-actions {
  margin: 0 0 0 auto;
}

.list-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.84rem;
  border-radius: 12px;
}

.active-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sea);
  background: rgba(35, 35, 35, 0.1);
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .hero {
    flex-direction: column;
  }

  #login-panel,
  #search-panel,
  #admin-import-panel,
  #admin-users-panel {
    grid-column: 1 / -1;
  }
}
