/* Account pages: sign in, the admin area and the no-access notice.
   Tokens, fonts, buttons and the 7.35° slant come from main.css. */

.account { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.account h1 { color: var(--navy); }

/* Logo block with the slanted white backing, as in the footer */
.auth__logo {
  position: relative;
  isolation: isolate;
  display: inline-block;
  width: fit-content;
  margin-bottom: clamp(28px, 4vw, 48px);
  padding: 12px 24px;
}
.auth__logo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--white);
  transform: skewX(calc(var(--slant) * -1));
  box-shadow: 0 14px 34px -22px rgba(6, 24, 58, 0.5);
}
.auth__logo img { width: 210px; }

/* Sign in: form panel beside a navy picture panel */
.auth { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth__panel {
  display: grid;
  align-content: center;
  width: 100%;
  max-width: 580px;
  margin-inline: auto;
  padding: clamp(32px, 6vw, 96px) var(--gutter);
  justify-self: end;
}
.auth h1 { margin-bottom: 10px; font-size: clamp(46px, 6vw, 76px); }
.auth__lead { margin-bottom: 26px; color: var(--muted); }

.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field span { font: 700 13.5px/1.2 var(--body); letter-spacing: 0.05em; text-transform: uppercase; color: var(--navy); }
.field input {
  box-sizing: border-box;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--white);
  color: var(--text);
  font: 400 17px/1.3 var(--body);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--sky); }

.auth__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-top: 10px; }

.notice {
  position: relative;
  isolation: isolate;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 22px;
  padding: 11px 20px 11px 16px;
  color: var(--ink);
  font: 700 15px/1.35 var(--body);
  --bg: var(--sun);
}
.notice::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bg);
  transform: skewX(calc(var(--slant) * -1));
}
.notice--error { --bg: #ffd7d1; color: #7a1d14; }

.auth__side {
  position: relative;
  display: grid;
  align-content: end;
  overflow: hidden;
  padding: clamp(32px, 6vw, 80px) clamp(32px, 6vw, 80px) clamp(32px, 6vw, 80px) clamp(64px, 10vw, 140px);
  background: var(--navy);
  color: var(--white);
}
.auth__side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.auth__side::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -8%;
  width: 16%;
  background: var(--paper);
  transform: skewX(calc(var(--slant) * -1));
  z-index: 2;
}
.auth__side::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 24, 58, 0.92) 0%, rgba(6, 42, 92, 0.55) 45%, rgba(6, 42, 92, 0.15) 100%);
  z-index: 1;
}
.auth__side p, .auth__side small { position: relative; z-index: 3; }
.auth__side p {
  max-width: 14ch;
  font-family: var(--display);
  font-style: italic;
  font-weight: 850;
  font-stretch: 106%;
  letter-spacing: -0.025em;
  line-height: 0.98;
  font-size: clamp(40px, 5vw, 76px);
}
.auth__side small { display: block; margin-top: 18px; font: 400 17px/1.5 var(--body); color: #c2d2ea; }

/* ===== Admin frame: the bar, a section's tabs and the account menu (app/admin.php) ===== */
/* An icon's size is --icon, set where it differs, and is also its min-width: Safari leaves an icon's plain width out
   when it works out how far the link or button holding it may shrink, so without the min-width a squeezed tab or
   button came out an icon too narrow there and its words spilled over the edge (the owner's iPhone, 26 November 2026). */
.icon { flex: none; width: var(--icon, 20px); min-width: var(--icon, 20px); height: var(--icon, 20px); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.admin__top { position: relative; z-index: 20; background: var(--white); box-shadow: 0 1px 0 var(--line); }
/* Above the bar only while maintenance mode closes the shop (app/maintenance.php). */
.admin__closed { padding: 9px var(--gutter); background: var(--sun); color: var(--ink); font: 700 14.5px/1.4 var(--body); text-align: center; }
.admin__bar { display: flex; align-items: stretch; gap: 0 clamp(14px, 2vw, 30px); min-height: 72px; }
.admin__logo { display: flex; align-items: center; flex: none; }
.admin__logo img { width: 150px; }
.logout { display: inline-flex; margin: 0; }

/* Four places to go. The one you are in is a navy block cut on the logo's slant; it stands on the navy row beneath
   it (the section's tabs, or the home page's greeting), so the two read as one. Neither these nor the tabs may shrink
   (flex: none): Safari works out the smallest width of a link like these without its icon, so one that is allowed to
   shrink ends up an icon's width too narrow there and its name spills out of its block. */
.admin__nav { display: flex; gap: 2px; }
.admin__nav a { position: relative; isolation: isolate; flex: none; display: inline-flex; align-items: center; gap: 9px; padding: 8px 18px 0; color: var(--muted); font: 700 16px/1.2 var(--body); text-decoration: none; white-space: nowrap; transition: color 0.15s; }
.admin__nav a::before { content: ""; position: absolute; inset: 10px 0 0; z-index: -1; background: transparent; transform: skewX(calc(var(--slant) * -1)); transition: background-color 0.15s; }
.admin__nav a:hover { color: var(--navy); }
.admin__nav a:hover::before { background: var(--sky); }
.admin__nav a.is-current { color: var(--white); }
.admin__nav a.is-current::before { background: var(--navy); }
.admin__nav a:focus-visible, .admin__tabs a:focus-visible, .admin__find:focus-visible, .admin__site:focus-visible, .admin__me summary:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.admin__count { padding: 2px 8px; background: var(--sun); color: var(--ink); font: 800 12.5px/1.4 var(--body); white-space: nowrap; }
.admin__count[hidden] { display: none; } /* always in the page, so admin.js can show it when an order becomes new */

/* Find, the way to the public site, and who is signed in */
.admin__tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.admin__find { display: inline-flex; align-items: center; gap: 9px; min-width: 168px; min-height: 44px; padding: 0 10px 0 12px; border: 2px solid var(--line); background: var(--paper); color: var(--muted); font: 600 15px/1.2 var(--body); transition: border-color 0.15s, color 0.15s; }
.admin__find:hover { border-color: var(--blue); color: var(--navy); }
.admin__find[hidden], .home__find[hidden] { display: none; }
.admin__find kbd, .home__find kbd, .find__keys kbd { margin-left: auto; padding: 1px 7px; border: 1px solid #c9d1de; border-bottom-width: 2px; background: var(--white); color: var(--muted); font: 700 12px/1.5 var(--body); }
.admin__site { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; background: var(--sky); color: var(--navy); font: 700 15px/1.2 var(--body); text-decoration: none; white-space: nowrap; transition: background-color 0.15s; }
.admin__site:hover { background: #d3e4fa; }
.admin__site .icon { --icon: 17px; stroke-width: 2.4; }
.site-link svg { flex: none; display: inline-block; vertical-align: -2px; width: 15px; height: 15px; margin-left: 8px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.admin__me { position: relative; }
.admin__me summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 8px 4px 4px; color: var(--navy); font: 700 15px/1.2 var(--body); list-style: none; cursor: pointer; transition: background-color 0.15s; }
.admin__me summary::-webkit-details-marker { display: none; }
.admin__me summary:hover, .admin__me[open] summary { background: var(--sky); }
.admin__me summary i { display: grid; place-items: center; width: 36px; height: 36px; background: var(--blue); color: var(--white); font: italic 850 17px/1 var(--display); }
.admin__me.is-current summary i { background: var(--navy); box-shadow: 0 4px 0 var(--sun); }
.admin__me summary span { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin__me summary .icon { --icon: 15px; stroke-width: 2.6; transition: rotate 0.15s; }
.admin__me[open] summary .icon { rotate: 180deg; }
.admin__me-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; min-width: 236px; padding: 8px; background: var(--white); box-shadow: 0 0 0 1px var(--line), 0 26px 50px -22px rgba(6, 24, 58, 0.55); }
.admin__me-menu p { margin-bottom: 6px; padding: 8px 12px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.admin__me-menu p b { color: var(--navy); overflow-wrap: anywhere; }
.admin__me-menu .logout { display: block; }
.admin__me-menu a, .admin__me-menu button { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 46px; padding: 8px 12px; color: var(--navy); font: 700 15.5px/1.2 var(--body); text-align: left; text-decoration: none; }
.admin__me-menu a:hover, .admin__me-menu button:hover { background: var(--sky); }
.admin__me-menu a[aria-current] { box-shadow: inset 4px 0 0 var(--sun); }
.admin__me-menu .icon { color: var(--blue); }

/* A section's pages, as tabs on a navy row. The page you are on is a yellow block on the same slant. */
.admin__tabs { background: var(--navy); }
.admin__tabs .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.admin__tabs .wrap::-webkit-scrollbar { display: none; }
.admin__tabs a { position: relative; isolation: isolate; flex: none; display: inline-flex; align-items: center; gap: 9px; min-height: 54px; padding: 0 18px; color: #c5d5ec; font: 700 15.5px/1.2 var(--body); text-decoration: none; white-space: nowrap; transition: color 0.15s; }
.admin__tabs a::before { content: ""; position: absolute; inset: 8px 0; z-index: -1; background: transparent; transform: skewX(calc(var(--slant) * -1)); transition: background-color 0.15s; }
.admin__tabs a:hover { color: var(--white); }
.admin__tabs a:hover::before { background: rgba(255, 255, 255, 0.1); }
.admin__tabs a.is-current { color: var(--ink); }
.admin__tabs a.is-current::before { background: var(--sun); }
.admin__tabs a:focus-visible { outline-color: var(--white); }
.admin__tabs a.is-current .admin__count { background: var(--ink); color: var(--white); }
.admin__tabs .icon { --icon: 19px; }

.admin__main { flex: 1; display: grid; align-content: center; justify-items: start; gap: 14px; padding-block: clamp(48px, 9vw, 140px); }
.admin__main h1 { font-size: clamp(42px, 6.4vw, 86px); }
.admin__main > p { max-width: 54ch; color: var(--muted); }
.admin__foot { padding-block: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* Narrower laptops and tablets: the tools keep their place and drop their words. */
@media (max-width: 1239px) {
  .admin__find { min-width: 0; }
  .admin__find kbd, .admin__site span:not(.visually-hidden), .admin__me summary span { display: none; }
  .admin__site { padding: 0 13px; }
  .admin__nav a { padding-inline: 14px; }
}
/* Phones and small tablets: the logo and the tools on one row, the four places sharing the row beneath. */
@media (max-width: 859px) {
  .admin__bar { flex-wrap: wrap; min-height: 0; }
  .admin__logo { min-height: 60px; }
  .admin__logo img { width: 138px; }
  .admin__nav { order: 3; flex: 0 0 100%; gap: 0; }
  .admin__nav a { flex: 1 1 0; justify-content: center; gap: 7px; min-height: 48px; padding: 0 6px; font-size: 15px; }
  .admin__nav a::before { inset: 0; }
  .admin__nav .icon { --icon: 18px; }
  .admin__tabs a { min-height: 50px; padding: 0 14px; font-size: 15px; }
}
/* Phones: the tabs share the row, so every page of the section is in sight and nothing has to be scrolled to. They
   lose their icons, the lettering eases down with the screen, and on the narrowest screens a long name takes two lines. */
@media (max-width: 599px) {
  .admin__tabs .wrap { gap: 2px; overflow-x: visible; }
  .admin__tabs a { flex: 1 1 auto; justify-content: center; gap: 7px; min-height: 52px; padding: 8px clamp(6px, 2.4vw, 12px); font-size: clamp(13.5px, 3.75vw, 15px); line-height: 1.15; text-align: center; white-space: normal; }
  .admin__tabs a::before { inset: 6px 0; }
  .admin__tabs .icon { display: none; }
}
@media (max-width: 429px) {
  .admin__nav .icon { display: none; }
  .admin__find span { display: none; }
  .admin__find { padding: 0 11px; }
}

/* No-access and other plain notices */
.plain { flex: 1; display: grid; place-items: center; padding: clamp(32px, 6vw, 96px) var(--gutter); }
.plain__panel { display: grid; justify-items: start; max-width: 620px; }
.plain h1 { margin-bottom: 14px; font-size: clamp(38px, 5.4vw, 64px); }
.plain__lead { margin-bottom: 26px; color: var(--muted); }
.plain__lead b { color: var(--navy); }
.plain__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; }

@media (max-width: 899px) {
  .auth { grid-template-columns: 1fr; }
  .auth__side { display: none; }
  .auth__panel { justify-self: center; max-width: 540px; }
}
@media (max-width: 599px) {
  .auth__logo img { width: 160px; }
}

/* Admin: list and form pages sit at the top rather than centred */
.admin__main--top { align-content: start; gap: 0; grid-template-columns: minmax(0, 1fr); padding-block: clamp(28px, 4vw, 56px) clamp(48px, 8vw, 120px); } /* one column that never grows past the page, whatever a child's minimum width */
.admin__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; width: 100%; margin-bottom: 26px; }
.admin__head h1 { font-size: clamp(36px, 4.8vw, 60px); }
.admin__head .eyebrow { margin-bottom: 10px; }
.notice ul { margin: 6px 0 0; padding-left: 18px; list-style: disc; font-weight: 400; }
.notice li + li { margin-top: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hint { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }
/* Catalogue: a pointer to the one-off eBay import, shown while that migration is open. */
.catalogue__ebay { margin: -6px 0 20px; font-size: 14px; color: var(--muted); }
.catalogue__ebay a { color: var(--blue); font-weight: 600; }

/* ===== Admin home (admin/index.php): the greeting, what is waiting, and a card for each section ===== */
.home { flex: 1; }
.home__hero { position: relative; overflow: hidden; background: var(--navy); color: var(--white); }
.home__hero::after { content: ""; position: absolute; inset: 0 -6% 0 auto; width: 38%; background: var(--navy-2); transform: skewX(calc(var(--slant) * -1)); opacity: 0.55; }
.home__hello { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 28px clamp(28px, 5vw, 72px); padding-block: clamp(28px, 3.8vw, 52px); }
.account .home__hero h1 { color: var(--white); font-size: clamp(36px, 4.2vw, 58px); }
.home__hello .eyebrow { margin-bottom: 14px; }
.home__lead { max-width: 44ch; margin-top: 14px; color: #c5d5ec; font-size: 18px; }
.home__find { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; max-width: 520px; min-height: 70px; margin-top: 26px; padding: 10px 16px 10px 18px; background: var(--white); color: var(--navy); text-align: left; box-shadow: 6px 6px 0 var(--blue); transition: box-shadow 0.15s, translate 0.15s; }
.home__find:hover { translate: -2px -2px; box-shadow: 8px 8px 0 var(--sun); }
.home__find:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.home__find .icon { --icon: 24px; color: var(--blue); stroke-width: 2.4; }
.home__find b { display: block; font: 700 17.5px/1.25 var(--body); }
.home__find small { display: block; overflow: hidden; color: var(--muted); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }

/* What is waiting: one row for each job, the urgent ones marked in yellow, reminders in pale blue. */
.waiting { padding: 20px 22px 14px; background: var(--white); color: var(--text); box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.6); }
.waiting h2 { margin-bottom: 8px; color: var(--navy); font-size: 28px; }
.waiting__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-inline: -22px; padding: 13px 20px 13px 22px; border-top: 1px solid var(--line); box-shadow: inset 6px 0 0 var(--sun); color: var(--text); font-size: 16px; line-height: 1.4; text-decoration: none; transition: background-color 0.15s; }
.waiting__row--note { box-shadow: inset 6px 0 0 #b5cbeb; }
.waiting__row > .icon { --icon: 22px; margin-left: 6px; color: var(--blue); }
.waiting__text b { color: var(--navy); }
.waiting__go { display: inline-flex; align-items: center; gap: 3px; color: var(--blue); font-weight: 700; white-space: nowrap; }
.waiting__go .icon { --icon: 16px; stroke-width: 2.6; transition: translate 0.15s; }
.waiting__row:hover { background: #fff8e3; }
.waiting__row--note:hover { background: var(--sky); }
.waiting__row:hover .waiting__go .icon { translate: 3px 0; }
.waiting__row:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.waiting--clear { padding-bottom: 20px; box-shadow: inset 6px 0 0 #1a7a3b, 0 30px 60px -34px rgba(0, 0, 0, 0.6); }
.waiting__clear { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.waiting__clear .icon { --icon: 24px; color: #1a7a3b; stroke-width: 2.6; }

/* One card for each section of the menu: what it is, its number, and every page inside it with where it stands. */
.home__body { padding-block: clamp(26px, 3.6vw, 48px) clamp(40px, 6vw, 88px); }
.home__title { margin-bottom: 16px; color: var(--navy); font-size: clamp(26px, 2.8vw, 36px); }
/* Three columns: Orders with Users beneath it, then Products and Website at full height. */
.areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto; gap: 18px; width: 100%; }
.area { display: flex; flex-direction: column; min-width: 0; background: var(--white); color: var(--text); box-shadow: 0 1px 0 var(--line), 0 16px 34px -30px rgba(6, 24, 58, 0.5); }
.area--orders { grid-area: 1 / 1; }
.area--users { grid-area: 2 / 1; }
.area--products { grid-area: 1 / 2 / span 2; }
.area--website { grid-area: 1 / 3 / span 2; }
.area__head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 3px 16px; padding: 22px 24px 0; }
.area__icon { position: relative; isolation: isolate; grid-row: span 2; display: grid; place-items: center; width: 54px; height: 54px; color: var(--white); }
.area__icon::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--blue); transform: skewX(calc(var(--slant) * -1)); }
.area__icon .icon { --icon: 27px; }
.area h3 { color: var(--navy); font: italic 850 30px/1 var(--display); font-stretch: 106%; letter-spacing: -0.02em; }
.area__head p { color: var(--muted); font-size: 14.5px; line-height: 1.4; }
.area__figure { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 128px; padding: 16px 24px 18px; }
.area__figure p { display: grid; gap: 3px; min-width: 0; }
.area__figure b { color: var(--navy); font: italic 850 48px/1 var(--display); letter-spacing: -0.02em; }
.area__figure--name b { font-size: 32px; line-height: 1.2; }
.area__figure span { color: var(--navy); font-weight: 700; }
.area__figure small { color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.area__pages { flex: 1; display: grid; grid-auto-rows: 1fr; border-top: 1px solid var(--line); }
.area__head + .area__pages { margin-top: 20px; }
.area__pages li { display: grid; }
.area__pages li:last-child a { border-bottom: 0; }
.area__foot { display: flex; flex-wrap: wrap; gap: 10px 14px; padding: 16px 24px 20px; border-top: 1px solid var(--line); }
.area__foot .btn { padding-inline: 20px; }
.area__pages a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "icon name state go" "icon about about go"; align-content: center; align-items: center; gap: 2px 12px; min-height: 76px; padding: 13px 16px 13px 24px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; transition: background-color 0.15s; }
.area__pages a > .icon:first-child { grid-area: icon; align-self: start; --icon: 22px; margin-top: 2px; color: var(--blue); }
.area__name { grid-area: name; color: var(--navy); font-size: 17px; font-weight: 700; line-height: 1.3; }
.area__state { grid-area: state; justify-self: end; color: var(--muted); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.area__state--due { padding: 2px 9px; background: var(--sun); color: var(--ink); font-weight: 800; }
.area__about { grid-area: about; color: var(--muted); font-size: 14px; line-height: 1.4; }
.area__go { grid-area: go; --icon: 18px; color: #a3afc2; stroke-width: 2.6; transition: translate 0.15s, color 0.15s; }
.area__pages a:hover { background: var(--sky); }
.area__pages a:hover .area__go { translate: 3px 0; color: var(--blue); }
.area__pages a:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }

/* The live look in miniature, drawn like the cards on the Shop appearance page (.theme__*) at about half the size. */
.look-mini { flex: none; width: 128px; border: 1px solid var(--card-line); background: var(--t-light); }
.look-mini .theme__strip { height: 11px; }
.look-mini .theme__strip b { padding: 0 6px; font-size: 5.5px; line-height: 1.5; }
.look-mini .theme__head { gap: 4px; padding: 5px 7px; }
.look-mini .theme__head img { width: 44px; }
.look-mini .theme__head i { width: 9px; height: 2px; }
.look-mini .theme__hero { height: 50px; }
.look-mini .theme__hero::before { box-shadow: 3px 0 0 var(--t-accent); }
.look-mini .theme__hero span { left: 8px; top: 13px; height: 5px; box-shadow: 0 9px 0 rgba(255, 255, 255, 0.55), 0 20px 0 3px var(--sun); }

/* Two columns: Orders over Users beside Products, then Website across the full width. */
@media (max-width: 1099px) {
  .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto auto; }
  .area--website { grid-area: 3 / 1 / auto / span 2; }
}
@media (max-width: 859px) {
  .home__hello { grid-template-columns: minmax(0, 1fr); }
  .home__hero::after { display: none; }
  .home__find { max-width: none; }
}
@media (max-width: 699px) {
  .areas { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .area--orders, .area--users, .area--products, .area--website { grid-area: auto; }
  .area__figure { min-height: 0; }
  .waiting__row { grid-template-columns: auto minmax(0, 1fr); padding-right: 16px; }
  .waiting__go { grid-column: 2; }
}

/* ===== Find box (app/admin.php, assets/scripts/admin.js): every job in the admin area behind one field ===== */
.find { width: min(640px, calc(100vw - 24px)); max-width: none; max-height: min(76vh, 700px); margin: 10vh auto auto; padding: 0; border: 0; background: var(--white); color: var(--text); box-shadow: 0 44px 90px -30px rgba(6, 24, 58, 0.75); overflow: hidden; }
.find::backdrop { background: rgba(6, 24, 58, 0.6); }
.find[open] { display: flex; }
.find__box { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.find__field { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 2px solid var(--line); }
.find__field .icon { --icon: 24px; color: var(--blue); stroke-width: 2.4; }
.find__field input { flex: 1; min-width: 0; height: 66px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--text); font: 400 19px/1.3 var(--body); outline: none; appearance: none; -webkit-appearance: none; }
.find__field input::-webkit-search-cancel-button, .find__field input::-webkit-search-decoration { -webkit-appearance: none; }
.find__list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 10px; }
.find__group { padding: 14px 12px 6px; color: var(--muted); font: 700 12.5px/1.2 var(--body); letter-spacing: 0.06em; text-transform: uppercase; }
.find__job { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 12px; color: var(--navy); font-size: 16.5px; font-weight: 600; line-height: 1.3; text-decoration: none; }
.find__job small { color: var(--muted); font-size: 13px; font-weight: 400; white-space: nowrap; }
.find:not(.is-searching) .find__job[data-words] small { display: none; }
.find__job.is-active { background: var(--sky); box-shadow: inset 4px 0 0 var(--blue); }
.find__job:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.find__job--search { justify-content: flex-start; color: var(--blue); }
.find__job--search .icon { --icon: 18px; stroke-width: 2.4; }
.find__job--search b { color: var(--navy); overflow-wrap: anywhere; }
.find__job[hidden], .find__group[hidden], .find__none[hidden] { display: none; }
.find__none { padding: 18px 12px 10px; color: var(--muted); }
.find__keys { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.find__keys kbd { margin-left: 0; }
.find__keys kbd:nth-of-type(3), .find__keys kbd:nth-of-type(4) { margin-left: 10px; }
@media (hover: none), (max-width: 699px) { .find__keys { display: none; } .find { margin-top: 12px; max-height: calc(100dvh - 24px); } }

/* Admin: tables */
.table-wrap { width: 100%; overflow-x: auto; background: var(--white); box-shadow: 0 1px 0 var(--line), 0 16px 34px -30px rgba(6, 24, 58, 0.4); }
.table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15.5px; }
.table th, .table td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { background: var(--sky); color: var(--navy); font: 700 13px/1.2 var(--body); letter-spacing: 0.05em; text-transform: uppercase; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(230, 240, 252, 0.45); }
.table td b { color: var(--navy); }
.table td:nth-child(3), .table td:nth-child(4) { white-space: nowrap; }
.table td.actions { text-align: right; white-space: nowrap; }
.table td.actions > * { display: inline-block; vertical-align: middle; }
.table td.actions > * + * { margin-left: 18px; }
.table td.actions form { margin-block: 0; } /* the gap between two actions stays, so Edit and Delete never touch */
.you { margin-left: 8px; color: var(--muted); font-size: 12.5px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.06em; }
.danger { color: #b3261e; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.danger:hover { color: #7a1d14; }

.role {
  position: relative;
  isolation: isolate;
  display: inline-block;
  padding: 3px 12px 3px 10px;
  font: italic 800 12.5px/1.4 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.role::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg); transform: skewX(calc(var(--slant) * -1)); }
.role--admin { --bg: var(--navy); color: var(--white); }
.role--customer { --bg: var(--sky); color: var(--navy); }

/* Admin: forms */
.form-card { width: 100%; max-width: 600px; padding: clamp(20px, 3vw, 36px); background: var(--white); box-shadow: 0 1px 0 var(--line), 0 16px 34px -30px rgba(6, 24, 58, 0.4); }
.form-card .field { margin-bottom: 22px; }
.field legend { padding: 0; margin-bottom: 8px; }
.field--error > span, .field--error legend span { color: #b3261e; }
.field--error input { border-color: #e0938b; }
.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.roles label { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 12px 14px; border: 2px solid var(--line); background: var(--white); cursor: pointer; }
.roles label:has(input:checked) { border-color: var(--blue); background: var(--sky); }
.roles label:has(input:disabled) { cursor: default; opacity: 0.75; }
.roles input { margin: 0; accent-color: var(--blue); }
.roles span { font-weight: 700; color: var(--navy); }
.roles small { grid-column: 2; font-size: 13.5px; color: var(--muted); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-top: 6px; }

@media (max-width: 599px) {
  .roles { grid-template-columns: 1fr; }
}

/* ===== Catalogue and products (admin) ===== */
.admin__head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

/* Supplier switch */
.switcher { display: inline-flex; border: 2px solid var(--line); background: var(--white); }
.switcher a { padding: 12px 22px; color: var(--muted); font: 700 15px/1.2 var(--body); text-decoration: none; }
.switcher a + a { border-left: 2px solid var(--line); }
.switcher a:hover { color: var(--navy); }
.switcher a.is-current { background: var(--navy); color: var(--white); }

/* The one action per supplier */
.action-card { width: 100%; margin-bottom: 26px; padding: clamp(18px, 3vw, 28px); background: var(--white); box-shadow: 0 1px 0 var(--line), 0 16px 34px -30px rgba(6, 24, 58, 0.4); }
.action-card__form { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.action-card--split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 40px; }
.action-card__info .lastrun { margin-top: 0; padding-top: 0; border-top: 0; }
.action-card__info .hint { margin-top: 10px; }
.lastrun p { margin: 0; }
.lastrun__when { color: var(--navy); font-weight: 700; }
.lastrun__when + p, .lastrun__when + ul { margin-top: 4px; }
.action-card .hint { margin-top: 12px; max-width: 70ch; }
.steps { margin: 0 0 16px; padding-left: 22px; color: var(--text); line-height: 1.5; }
.steps li + li { margin-top: 4px; }
.file-pick input[type="file"] { font: 400 15px/1.3 var(--body); color: var(--text); max-width: 100%; }
.file-pick input[type="file"]::file-selector-button { margin-right: 12px; padding: 10px 18px; border: 2px solid var(--navy); border-radius: 0; background: var(--white); color: var(--navy); font: 700 14px/1.2 var(--body); cursor: pointer; }
.lastrun { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text); font-size: 15px; line-height: 1.5; }
.lastrun--problem { color: #7a1d14; }
/* LPD Home keeps two histories side by side: its stock check and its product file. */
.action-card__info .lastrun + .lastrun { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.lastrun__label { color: var(--muted); font: 700 12px/1.4 var(--body); letter-spacing: 0.06em; text-transform: uppercase; }
.lastrun p + p, .lastrun .report + p { margin-top: 4px; }
.lastrun__earlier { color: var(--text); }
.notice p + p, .notice .report + p { margin-top: 8px; }
/* A quieter second way to do the job, folded away under the main button until asked for. */
.more-way { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.more-way > summary { display: inline-flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer; color: var(--navy); font: 700 15px/1.3 var(--body); list-style: none; }
.more-way > summary::-webkit-details-marker { display: none; }
.more-way > summary::before { content: ""; width: 7px; height: 7px; margin-left: 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: -45deg; transition: rotate 0.2s; }
.more-way[open] > summary::before { rotate: 45deg; }
.more-way > summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.more-way > summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.more-way__body { padding-top: 12px; }
.more-way__why { margin: 0 0 12px; max-width: 70ch; color: var(--text); font-size: 15px; line-height: 1.5; }
.more-way[open] > .more-way__body { animation: more-way-in 0.3s ease-out; }
@keyframes more-way-in { from { opacity: 0; translate: 0 -8px; } }
/* Where the browser can animate to an automatic height, the panel slides open and shut. */
@supports (interpolate-size: allow-keywords) {
  .more-way { interpolate-size: allow-keywords; }
  .more-way::details-content { block-size: 0; overflow: clip; transition: block-size 0.3s ease, content-visibility 0.3s allow-discrete; }
  .more-way[open]::details-content { block-size: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .more-way[open] > .more-way__body { animation: none; }
  .more-way::details-content, .more-way > summary::before { transition: none; }
}
.btn.is-busy { opacity: 0.7; pointer-events: none; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; width: 100%; margin-bottom: 14px; }
.filters input[type="search"], .filters select {
  box-sizing: border-box; min-height: 44px; padding: 8px 14px; border: 2px solid var(--line); border-radius: 0;
  background: var(--white); color: var(--text); font: 400 15px/1.3 var(--body);
  transition: border-color 0.15s;
}
.filters input[type="search"]:hover, .filters select:hover { border-color: #b9c3d3; }
.filters input[type="search"]:focus, .filters select:focus { outline: none; border-color: var(--blue); }
.filters input[type="search"]:focus-visible, .filters select:focus-visible { box-shadow: 0 0 0 3px var(--sky); }
.filters__search { flex: 1 1 240px; max-width: 420px; }
.filters__search input { width: 100%; }
.filters input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
.filters select {
  min-width: 170px; max-width: 260px; padding-right: 38px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23062a5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.filters select::-ms-expand { display: none; }
.filters .check { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--navy); }
.filters .check input { accent-color: var(--blue); width: 18px; height: 18px; }
.totals { margin: 0 0 14px; color: var(--navy); font-weight: 700; }
/* A list with nothing to show fills the white panel its table would have filled. */
.empty-list {
  display: grid; justify-items: center; gap: 8px;
  width: 100%; padding: clamp(36px, 6vw, 64px) 24px;
  background: var(--white); text-align: center;
  box-shadow: 0 1px 0 var(--line), 0 16px 34px -30px rgba(6, 24, 58, 0.4);
}
.empty-list__icon { box-sizing: content-box; padding: 16px; margin-bottom: 8px; border-radius: 50%; background: var(--sky); color: var(--navy); }
.empty-list__title { margin: 0; font: 800 21px/1.25 var(--body); color: var(--navy); }
.empty-list__text { max-width: 46ch; margin: 0; color: var(--muted); }
.empty-list .btn { margin-top: 14px; }

/* Lists */
.table--catalogue, .table--products { min-width: 820px; }
.table td.thumb { width: 72px; padding-right: 0; }
.table .thumb img { display: block; width: 72px; height: 72px; object-fit: cover; background: var(--sky); }
.table .thumb a { display: block; }
.thumb__none { display: grid; place-items: center; width: 72px; height: 72px; background: var(--sky); color: var(--muted); font-size: 11px; text-align: center; }
.table td.cell-name { min-width: 220px; width: 32%; }
.table--catalogue td.code { max-width: 200px; white-space: normal; overflow-wrap: anywhere; }
.in-shop { color: var(--navy); font-weight: 700; text-decoration: none; white-space: nowrap; }
.in-shop::before { content: "\2713"; margin-right: 6px; color: #1f9d55; }
.in-shop:hover { text-decoration: underline; text-underline-offset: 3px; }
.in-shop__code { color: var(--muted); font-weight: 400; font-size: 13px; }
.table .code { font: 600 13.5px/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--muted); }
.table td .code { display: block; margin-top: 2px; }
.table td.cost, .table th.cost { color: var(--muted); font-size: 13.5px; }
.table td .name { display: block; color: var(--navy); font-weight: 700; text-decoration: none; }
.table td .name:hover { text-decoration: underline; text-underline-offset: 3px; }
.flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.flag { display: inline-block; padding: 2px 8px; background: #fff1c4; color: #6b4a00; font: 700 11.5px/1.4 var(--body); letter-spacing: 0.03em; text-transform: uppercase; }
.flag--promo { margin-left: 8px; background: var(--sun); color: var(--ink); vertical-align: middle; }
.flag--ending { margin-left: 8px; background: #ffe1dc; color: #7a1d14; vertical-align: middle; }
.cell-note { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; line-height: 1.35; white-space: nowrap; }
.table--catalogue td, .table--products td { white-space: normal; }
.table--products td.status { white-space: nowrap; }
.btn--row { min-height: 38px; padding: 8px 18px; font-size: 14px; }
.btn--row:hover { translate: 0; }
.table .actions form { margin: 0; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; color: var(--muted); font-size: 15px; }

/* Active/Inactive switch in the list */
.toggle { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: var(--muted); font: 700 14px/1 var(--body); cursor: pointer; }
.toggle__knob { position: relative; width: 44px; height: 24px; border-radius: 12px; background: #c9d3e3; transition: background 0.2s; }
.toggle__knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(6, 24, 58, 0.35); transition: translate 0.2s; }
.toggle.is-on { color: var(--navy); }
.toggle.is-on .toggle__knob { background: #1f9d55; }
.toggle.is-on .toggle__knob::after { translate: 20px 0; }
.toggle:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.toggle.is-busy { opacity: 0.55; pointer-events: none; }

/* Product page */
.product-grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 24px; width: 100%; align-items: start; }
.form-card.photos, .form-card.product-form, .form-card.ebay-form { max-width: none; }
.photos h2 { margin-bottom: 14px; font-size: 24px; }
.photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin: 0 0 12px; padding: 0; list-style: none; }
.photo { position: relative; aspect-ratio: 1; background: var(--sky); cursor: grab; outline: 2px solid transparent; transition: outline-color 0.15s; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.photo:first-child { outline-color: var(--sun); }
.photo__main { position: absolute; left: 0; bottom: 0; display: none; padding: 2px 8px; background: var(--sun); color: var(--ink); font: 700 11px/1.4 var(--body); letter-spacing: 0.04em; text-transform: uppercase; }
.photo:first-child .photo__main { display: block; }
.photo__move { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.photo:hover .photo__move, .photo:focus-within .photo__move { opacity: 1; }
@media (hover: none) { .photo__move { opacity: 1; } }
.photo__move button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0 0 2px; border: 0; border-radius: 50%; background: rgba(6, 24, 58, 0.78); color: var(--white); font: 700 18px/1 var(--body); cursor: pointer; }
.photo__move button:hover { background: var(--blue); }
.photo:first-child .photo__move button[data-move="-1"], .photo:last-child .photo__move button[data-move="1"] { visibility: hidden; }
.has-js .photo-add__go { display: none; }
.photo-add__hint { flex-basis: 100%; margin: 0; }
.photo.is-dragging { opacity: 0.5; }
.photo.is-over { outline-color: var(--blue); }
.photo__remove { position: absolute; top: 4px; right: 4px; margin: 0; }
.photo__remove button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: rgba(6, 24, 58, 0.78); color: var(--white); font: 700 16px/1 var(--body); cursor: pointer; }
.photo__remove button:hover { background: #b3261e; }
.photo-add { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 14px 0 0; }
.photo-add__pick { position: relative; overflow: hidden; cursor: pointer; }
.photo-add__pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-fetch { display: grid; gap: 8px; justify-items: start; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.photo-fetch .hint { margin: 0; }

.editor { border: 2px solid var(--line); background: var(--white); }
.editor:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px var(--sky); }
.editor__bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--paper); }
.editor__bar button { min-width: 34px; padding: 6px 10px; border: 0; background: none; color: var(--navy); font: 600 14px/1.2 var(--body); cursor: pointer; }
.editor__bar button:hover { background: var(--sky); }
.editor__area { min-height: 180px; padding: 12px 16px; color: var(--text); font: 400 16px/1.5 var(--body); outline: none; }
.editor__area p, .editor__area ul, .editor__area ol { margin: 0 0 10px; }
.editor__area ul, .editor__area ol { padding-left: 22px; }
.editor__area h2, .editor__area h3, .editor__area h4 { margin: 0 0 8px; font-size: 1.1em; }
.editor__area table { border-collapse: collapse; margin-bottom: 10px; }
.editor__area td, .editor__area th { padding: 4px 8px; border: 1px solid var(--line); }
.editor textarea { box-sizing: border-box; display: block; width: 100%; padding: 12px 16px; border: 0; color: var(--text); font: 400 15px/1.5 ui-monospace, Menlo, Consolas, monospace; resize: vertical; }
.has-js .editor__bar + .editor__area[hidden] { display: block; }
.has-js .editor textarea { display: none; }
.editor__bar { display: none; }
.has-js .editor__bar { display: flex; }

.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; align-items: start; }
.field-row .field { align-content: start; margin-bottom: 22px; }
.field--readonly output { display: block; min-height: 56px; padding: 15px 16px; box-sizing: border-box; border: 2px dashed var(--line); background: var(--paper); color: var(--navy); font: 700 17px/1.3 var(--body); }

.status .switch { display: inline-flex; align-items: center; gap: 14px; cursor: pointer; }
.status .switch input { position: absolute; width: 1px; height: 1px; min-height: 0; margin: -1px; padding: 0; opacity: 0; overflow: hidden; }
.switch__track { position: relative; width: 72px; height: 40px; border-radius: 20px; background: #c9d3e3; transition: background 0.2s; }
.switch__knob { position: absolute; top: 4px; left: 4px; width: 32px; height: 32px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 4px rgba(6, 24, 58, 0.35); transition: translate 0.2s; }
.switch input:checked + .switch__track { background: #1f9d55; }
.switch input:checked + .switch__track .switch__knob { translate: 32px 0; }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--sky); outline-offset: 3px; }
.switch__text { font: 700 20px/1 var(--body); color: var(--navy); }

/* eBay migration page */
.store-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.store-card { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 16px 18px; border: 2px solid var(--line); background: var(--white); cursor: pointer; }
.store-card:has(input:checked) { border-color: var(--blue); background: var(--sky); }
.store-card input { margin: 0; accent-color: var(--blue); width: 18px; height: 18px; }
.store-card b { font: italic 850 22px/1.1 var(--display); color: var(--navy); }
.store-card small { grid-column: 2; color: var(--muted); font-size: 13.5px; }
.ebay-form .steps { margin-top: 6px; }
.runs { width: 100%; margin-top: 30px; }
.runs h2 { margin-bottom: 10px; font-size: 22px; }
.run-list { margin: 0; padding: 0; list-style: none; background: var(--white); box-shadow: 0 1px 0 var(--line), 0 16px 34px -30px rgba(6, 24, 58, 0.4); }
.run { display: grid; grid-template-columns: 220px 1fr auto; gap: 8px 20px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 15px; }
.run:last-child { border-bottom: 0; }
.run__when { color: var(--muted); }
.run__report { color: var(--text); line-height: 1.45; }
.run--rejected .run__report, .run--failed .run__report { color: #7a1d14; }
.run form { margin: 0; }
.runs--close { padding-top: 10px; }
.runs--close .hint { max-width: 70ch; margin-bottom: 14px; }

@media (max-width: 899px) {
  .product-grid { grid-template-columns: 1fr; }
  .run { grid-template-columns: 1fr; }
}
@media (max-width: 599px) {
  .switcher a { padding: 10px 14px; font-size: 14px; }
  .store-cards { grid-template-columns: 1fr; }
  .filters select { max-width: 100%; flex: 1 1 100%; }
}

/* ===== Review pass: feedback, reports, focus, wide and narrow screens ===== */
.price-hint { display: block; min-height: 1.3em; margin-top: 6px; color: var(--navy); font-size: 14px; font-weight: 700; }
.price-hint:empty { display: none; }

.notice p { margin: 0; }
.notice .report { margin: 8px 0 0; padding-left: 18px; list-style: disc; font-weight: 400; }
.notice .report li + li { margin-top: 3px; }
.notice .report__more { margin-top: 6px; font-weight: 400; }
.lastrun .report { margin: 6px 0 0; padding-left: 18px; }
.lastrun .report li + li { margin-top: 2px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; translate: -50% 16px;
  max-width: min(92vw, 560px); padding: 12px 18px; background: var(--navy); color: var(--white);
  font: 700 15px/1.4 var(--body); box-shadow: 0 18px 40px -18px rgba(6, 24, 58, 0.7);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, translate 0.2s;
}
.toast.is-shown { opacity: 1; translate: -50% 0; }
.toast--error { background: #b3261e; }

.btn:focus-visible, .link-btn:focus-visible, .switcher a:focus-visible, .in-shop:focus-visible, .table td .name:focus-visible, .editor__bar button:focus-visible, .photo__remove button:focus-visible, .photo__move button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.photo-add__pick:focus-within { outline: 3px solid var(--blue); outline-offset: 3px; } /* the real file input is invisible, so its visible button shows the keyboard focus */

/* Wide screens: the list no longer scrolls inside its box, so the header can stick while the page scrolls. */
@media (min-width: 1000px) {
  .table-wrap { overflow: visible; }
  .table th { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--line); }
  .action-card--split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
}

/* Phones: each row becomes a card with the photo on the left and labelled values underneath the name. */
@media (max-width: 699px) {
  .table-wrap { overflow: visible; background: none; box-shadow: none; }
  .table--stack { min-width: 0; font-size: 15px; }
  .table--stack thead { display: none; }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; }
  .table--stack tr { position: relative; margin-bottom: 12px; padding: 14px 16px 14px 104px; min-height: 100px; background: var(--white); box-shadow: 0 1px 0 var(--line), 0 16px 34px -30px rgba(6, 24, 58, 0.4); }
  .table--stack tr:hover td { background: none; }
  .table--stack td { padding: 2px 0; border: 0; width: auto; min-width: 0; max-width: none; }
  .table--stack td.thumb { position: absolute; left: 16px; top: 14px; width: 72px; padding: 0; }
  /* The name cell needs its own reset: ".table td.cell-name" (220px minimum) is stronger than the row above and was
     pushing every card past the edge of a narrow phone. */
  .table--stack td.cell-name { min-width: 0; width: auto; margin-bottom: 6px; overflow-wrap: anywhere; }
  .table--stack td.cell-name b, .table--stack td .name { font-size: 16px; }
  .table--stack td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; }
  .table--stack td.code { display: block; font-size: 13px; }
  .table--stack td.status, .table--stack td.actions { margin-top: 10px; }
  .table--stack td.actions { text-align: left; }
  .table--stack .flags { margin-top: 4px; }
  .table--users tr { padding-left: 16px; min-height: 0; }
  .table--users td.cell-name { margin-bottom: 2px; }
  .table--users td.actions > * + *, .table--users td.actions > a + form { margin-left: 26px; } /* the form needs the stronger selector: ".table td.actions form" resets its margin */
  /* Edit and Delete get a full 44 px touch height and a clear gap between them */
  .table--users td.actions { margin-top: 0; }
  .table--users td.actions a, .table--users td.actions button { display: inline-flex; align-items: center; min-height: 44px; }
  .btn--row { min-height: 44px; padding: 10px 22px; font-size: 15px; }
}

/* Narrow phones: a little less padding round the photo, so names and values keep a readable width at 320px. */
@media (max-width: 379px) {
  .table--stack tr { padding: 12px 12px 12px 88px; }
  .table--stack td.thumb { left: 12px; top: 12px; width: 64px; }
  .table--stack .thumb img, .table--stack .thumb__none { width: 64px; height: 64px; }
  .table--users tr { padding-left: 12px; }
}

/* Tablets: the catalogue and products lists keep the card rows instead of an 820px table that hid its last column
   off to the side. The facts sit on one line and the action stays at the right edge of every row, so Add to our
   shop, In our shop, the status switch and Edit are always in view. */
@media (min-width: 700px) and (max-width: 999px) {
  .table-wrap:has(.table--catalogue, .table--products) { overflow: visible; background: none; box-shadow: none; }
  :is(.table--catalogue, .table--products) { min-width: 0; }
  :is(.table--catalogue, .table--products) thead { display: none; }
  :is(.table--catalogue, .table--products), :is(.table--catalogue, .table--products) :is(tbody, tr, td) { display: block; }
  :is(.table--catalogue, .table--products) tr { position: relative; margin-bottom: 12px; padding: 14px 210px 14px 104px; min-height: 100px; background: var(--white); box-shadow: 0 1px 0 var(--line), 0 16px 34px -30px rgba(6, 24, 58, 0.4); }
  :is(.table--catalogue, .table--products) tr:hover td { background: none; }
  :is(.table--catalogue, .table--products) td { padding: 2px 0; border: 0; width: auto; min-width: 0; max-width: none; }
  :is(.table--catalogue, .table--products) td.thumb { position: absolute; left: 16px; top: 14px; width: 72px; padding: 0; }
  :is(.table--catalogue, .table--products) td.cell-name { min-width: 0; width: auto; margin-bottom: 6px; }
  :is(.table--catalogue, .table--products) td[data-label] { display: inline-block; margin-right: 18px; }
  :is(.table--catalogue, .table--products) td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; }
  .table--catalogue td.code { display: block; margin-right: 0; }
  :is(.table--catalogue, .table--products) td.actions { position: absolute; right: 18px; top: 50%; translate: 0 -50%; text-align: right; }
  .table--products td.status { position: absolute; right: 18px; top: 18px; }
  .table--products td.actions { top: auto; bottom: 16px; translate: 0; }
  .table--products td.actions a { display: inline-flex; align-items: center; min-height: 40px; }
}

/* No price, no Active: the switch shows as blocked and says why. */
.toggle.is-blocked { color: var(--muted); cursor: not-allowed; }
.toggle.is-blocked .toggle__knob { background: #eef1f6; outline: 1.5px dashed #b9c3d3; outline-offset: -1.5px; }
.toggle.is-blocked .toggle__knob::after { background: #f7f8fb; box-shadow: none; }
.status.is-blocked .switch { cursor: not-allowed; }
.status.is-blocked .switch__track { background: #eef1f6; outline: 1.5px dashed #b9c3d3; outline-offset: -1.5px; }
.status.is-blocked .switch__text { color: var(--muted); }
.status__why { color: #7a1d14; }

/* Product form: the shop fields */
.field.checkbox { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; }
.field.checkbox input { width: 20px; height: 20px; margin: 0; accent-color: var(--blue); }
.field.checkbox .hint { grid-column: 2; }
.field select { min-height: 46px; padding: 8px 38px 8px 14px; border: 2px solid var(--line); background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6' fill='none' stroke='%23062a5c' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center / 14px; appearance: none; -webkit-appearance: none; font: inherit; color: var(--text); }
.field select:focus { outline: none; border-color: var(--blue); }

/* ===== Homepage offers (admin) ===== */
.btn--second { --bg: var(--sky); color: var(--navy); }
.btn--second:hover { --bg: #d3e4fa; }
.btn--publish { --bg: #1a7a3b; color: var(--white); }
.btn--publish:hover { --bg: #15642f; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; translate: 0; }
.notice__link { margin-left: 6px; color: inherit; font-weight: 800; text-underline-offset: 3px; white-space: nowrap; }
.notice--info { --bg: var(--sky); color: var(--navy); }
.state-ok { display: inline-block; padding: 2px 8px; background: #dff3e5; color: #135c2c; font: 700 11.5px/1.4 var(--body); letter-spacing: 0.03em; text-transform: uppercase; }
.state-ok::before { content: "\2713\00a0"; }
.is-out { color: #b3261e; font-weight: 700; }

/* The three offers */
.admin__main > .offers__intro { max-width: 92ch; margin: 0 0 22px; color: var(--muted); }
.offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; width: 100%; }
.offer-card { display: flex; flex-direction: column; min-width: 0; background: var(--white); box-shadow: 0 1px 0 var(--line), 0 16px 34px -30px rgba(6, 24, 58, 0.5); }
.offer-card--changed { box-shadow: 0 0 0 2px var(--sun), 0 16px 34px -30px rgba(6, 24, 58, 0.5); }
.offer-card__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy-2); }
.offer-card__media img { width: 100%; height: 100%; object-fit: cover; }
.offer-card__media--cutout { background: var(--white); box-shadow: inset 0 -1px 0 var(--line); }
.offer-card__media--cutout img { object-fit: contain; padding: 5%; }
.offer-card__empty { position: absolute; inset: 0; display: grid; place-items: center; color: #c9daf3; font-weight: 700; }
.offer-card__num { position: absolute; left: 0; top: 14px; padding: 5px 16px 5px 14px; background: var(--navy); color: var(--white); font: italic 800 14px/1.2 var(--display); letter-spacing: 0.03em; text-transform: uppercase; }
.offer-card__body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.offer-card__role { margin: 0; color: var(--blue); font: italic 800 13.5px/1.2 var(--display); letter-spacing: 0.03em; text-transform: uppercase; }
.offer-card__headline { margin: 0 0 4px; font-size: clamp(26px, 2.4vw, 34px); color: var(--navy); }
.offer-card__product, .offer-card__facts, .offer-card__state { margin: 0; font-size: 14.5px; line-height: 1.4; }
.offer-card__product b { color: var(--navy); }
.offer-card__product .code { display: block; margin-top: 2px; font: 600 13px/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--muted); }
.offer-card__facts { color: var(--text); }
.offer-card__state { color: var(--muted); }
.offer-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: auto; padding-top: 12px; }

/* One offer: the form beside its status */
/* Parts the script shows and hides keep the hidden attribute's meaning, whatever their display. */
.offer-edit [hidden] { display: none !important; }
.offer-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 24px; width: 100%; align-items: start; }
.form-card.offer-form, .form-card.side-card { max-width: none; }
.step { padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.step h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 26px; color: var(--navy); }
.step__n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: var(--white); font: 800 16px/1 var(--body); font-style: normal; letter-spacing: 0; }
.step--error h2 { color: #b3261e; }
.step--error .step__n { background: #b3261e; }
.step h3 { margin: 18px 0 8px; font: 700 13.5px/1.2 var(--body); letter-spacing: 0.05em; text-transform: uppercase; color: var(--navy); }
.step h3:first-child { margin-top: 0; }

.chosen { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 16px 12px 12px; border: 2px solid var(--line); background: var(--paper); }
.chosen img { width: 72px; height: 72px; object-fit: cover; background: var(--sky); }
.chosen b { display: block; color: var(--navy); line-height: 1.3; }
.chosen .code, .result .code { display: block; margin-top: 3px; font: 600 13px/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--muted); }
.chosen .link-btn, .finder-box .link-btn, .side-card .link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; }
.finder-box { margin-top: 14px; padding: 16px; border: 2px solid var(--blue); background: var(--white); }
.finder-box__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.finder-box__search { flex: 1 1 240px; }
.finder-box input[type="search"], .finder-box select {
  box-sizing: border-box; width: 100%; min-height: 46px; padding: 8px 14px; border: 2px solid var(--line); border-radius: 0;
  background-color: var(--white); color: var(--text); font: 400 16px/1.3 var(--body);
}
.finder-box select {
  min-width: 170px; padding-right: 38px; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23062a5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.finder-box input[type="search"]:focus, .finder-box select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--sky); }
.results { display: grid; gap: 6px; max-height: 420px; margin: 12px 0 0; padding: 0; overflow-y: auto; list-style: none; }
.result__pick { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%; padding: 8px 14px 8px 8px; border: 2px solid var(--line); background: var(--white); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.result__pick:hover:not(:disabled), .result__pick:focus-visible { border-color: var(--blue); background: var(--sky); outline: none; }
.result__pick img { width: 56px; height: 56px; object-fit: cover; background: var(--sky); }
.result__text b { display: block; color: var(--navy); line-height: 1.3; }
.result__facts { display: grid; justify-items: end; gap: 2px; text-align: right; white-space: nowrap; }
.result__facts b { color: var(--navy); font-size: 17px; }
.result__facts small { color: var(--muted); font-size: 13px; }
.result.is-current .result__pick { border-color: var(--sun-deep); }
.result--taken .result__pick { opacity: 0.55; cursor: not-allowed; }
.result__why { display: block; margin: 4px 0 4px 10px; color: #7a1d14; font-size: 13.5px; }

.picture { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 24px; align-items: start; }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.picks:empty { display: none; }
.pick { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sky); cursor: pointer; outline: 3px solid transparent; outline-offset: -3px; transition: outline-color 0.15s; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pick--cutout { background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.pick--cutout img { object-fit: contain; }
.pick:hover { outline-color: #9fc3f1; }
.pick:has(input:checked) { outline-color: var(--blue); }
.pick:has(input:focus-visible) { outline-color: var(--sun-deep); }
.pick__on { position: absolute; left: 0; bottom: 0; display: none; padding: 3px 9px; background: var(--blue); color: var(--white); font: 700 11px/1.4 var(--body); letter-spacing: 0.04em; text-transform: uppercase; }
.pick__on::before { content: "\2713\00a0"; }
.pick:has(input:checked) .pick__on { display: block; }
.pick__live { position: absolute; right: 0; top: 0; padding: 3px 8px; background: #1a7a3b; color: var(--white); font: 700 10.5px/1.4 var(--body); letter-spacing: 0.03em; text-transform: uppercase; }
.photo-add__pick.is-busy { opacity: 0.6; pointer-events: none; }
.crop { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy-2); }
.crop img { width: 100%; height: 100%; object-fit: cover; }
.crop--cutout { background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.crop--cutout img { object-fit: contain; padding: 6%; }
.crop__none { position: absolute; inset: 0; display: grid; place-items: center; color: #c9daf3; font-weight: 700; }
.focus { display: grid; gap: 6px; margin-top: 12px; }
.focus > span:first-child { font: 700 13.5px/1.2 var(--body); letter-spacing: 0.05em; text-transform: uppercase; color: var(--navy); }
.focus__row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; color: var(--muted); }
.focus input[type="range"] { width: 100%; accent-color: var(--blue); }

.field textarea {
  box-sizing: border-box; width: 100%; min-height: 96px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 0;
  background: var(--white); color: var(--text); font: 400 17px/1.45 var(--body); resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--sky); }
.field--error textarea { border-color: #e0938b; }
.field--count .hint { margin-top: 0; }
.field-row--headline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field .with-suffix { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; font: inherit; letter-spacing: 0; text-transform: none; }
.field .with-suffix output { padding: 0 4px 0 12px; color: var(--muted); font: 700 17px/1.3 var(--body); white-space: nowrap; }
/* Length guidance: a word and a mark as well as the colour. */
.count { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.count::before { display: grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; color: var(--white); font: 800 12px/1 var(--body); }
.count--ok { color: #135c2c; }
.count--ok::before { content: "\2713"; background: #1a7a3b; }
.count--long { color: #7a5200; }
.count--long::before { content: "!"; background: #d18b00; }
.count--over { color: #b3261e; }
.count--over::before { content: "\2715"; background: #b3261e; }
.offer-form__actions { margin-top: 0; }
.offer-form__actions .hint { flex-basis: 100%; margin: 0; }

.offer-side { display: grid; gap: 18px; position: sticky; top: 18px; }
.side-card { padding: 22px 22px 24px; }
.side-card h2 { margin-bottom: 12px; font-size: 22px; color: var(--navy); }
.side-card__state { margin: 0 0 14px; font-size: 15px; line-height: 1.45; }
.side-card__state .flag, .side-card__state .state-ok { margin-right: 4px; }
.side-card__problems { margin-bottom: 16px; padding: 12px 14px; background: #ffe9e5; color: #7a1d14; font-size: 14.5px; line-height: 1.4; }
.side-card__problems ul { margin: 6px 0 0; padding-left: 18px; list-style: disc; }
.side-card__problems li + li { margin-top: 4px; }
.side-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.side-card__actions form { margin: 0; }
.facts { display: grid; gap: 0; margin: 0 0 12px; }
.facts div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { color: var(--navy); font-weight: 700; }

/* Product page: what a published offer is holding in place */
.photo__hero { position: absolute; left: 0; top: 0; padding: 2px 7px; background: #1a7a3b; color: var(--white); font: 700 10px/1.4 var(--body); letter-spacing: 0.03em; text-transform: uppercase; }
.status__hero { color: var(--navy); }

/* Draft preview: a bar in the admin-only colour over the real homepage in a frame */
.account--preview { height: 100vh; height: 100dvh; background: #1b2230; }
.preview-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 10px clamp(12px, 2vw, 24px); background: var(--admin); color: var(--white); font-size: 15px; }
.preview-bar p { margin: 0; }
.preview-bar__what { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-right: auto; }
.preview-bar__tag { padding: 4px 9px; border-radius: 5px; background: var(--white); color: var(--admin); font: 700 11.5px/1.3 var(--body); letter-spacing: 0.08em; text-transform: uppercase; }
.preview-bar__note { opacity: 0.92; }
.preview-bar__sizes { display: inline-flex; padding: 3px; border-radius: 9px; background: rgba(0, 0, 0, 0.22); }
.preview-bar__sizes button { min-height: 34px; padding: 5px 16px; border-radius: 7px; color: var(--white); font: 700 14px/1.2 var(--body); }
.preview-bar__sizes button.is-current { background: var(--white); color: var(--admin-deep); }
.preview-bar__actions { display: flex; align-items: center; gap: 16px; }
.preview-bar__actions form { margin: 0; }
.preview-bar__back { color: var(--white); font-weight: 700; text-underline-offset: 3px; }
.preview-bar__publish { min-height: 38px; padding: 7px 18px; border-radius: 8px; background: var(--white); color: var(--admin-deep); font: 800 14.5px/1.2 var(--body); }
.preview-bar__publish:hover { background: #fbeffd; }
.preview-bar__publish:disabled { opacity: 0.5; cursor: not-allowed; }
.preview-bar :focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.preview-bar__warn { flex-basis: 100%; padding: 8px 12px; border-radius: 6px; background: #fff; color: #7a1d14; font-size: 14.5px; line-height: 1.4; }
.preview-stage { flex: 1; min-height: 0; display: grid; }
.preview-frame { width: 100%; height: 100%; border: 0; background: var(--paper); }
.preview-stage--phone { place-items: center; padding: 16px; overflow: auto; }
.preview-stage--phone .preview-frame { width: 390px; height: min(844px, 100%); border-radius: 18px; box-shadow: 0 0 0 8px #0b0f17, 0 30px 60px -20px rgba(0, 0, 0, 0.7); }

@media (max-width: 1099px) {
  .offers { grid-template-columns: 1fr; max-width: 640px; }
  .offer-edit { grid-template-columns: 1fr; }
  .offer-side { position: static; }
}
@media (max-width: 699px) {
  .picture { grid-template-columns: 1fr; }
  .field-row--headline { grid-template-columns: 1fr; }
  .chosen { grid-template-columns: 56px minmax(0, 1fr); }
  .chosen img { width: 56px; height: 56px; }
  .chosen .link-btn { grid-column: 1 / -1; justify-self: start; }
  .result__pick { grid-template-columns: 56px minmax(0, 1fr); }
  .result__facts { grid-column: 2; justify-items: start; text-align: left; }
  .preview-bar__note { display: none; }
}
/* A background message that carries a link stays clickable. */
.toast--linked { pointer-events: auto; }
.toast__link { margin-left: 4px; color: inherit; font-weight: 800; text-underline-offset: 3px; white-space: nowrap; }

/* ===== Categories (admin) ===== */
.cat-intro { max-width: 76ch; margin: -8px 0 16px; color: var(--muted); }
.cat-facts { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; margin: 0 0 22px; padding: 0; list-style: none; }
.cat-facts li { padding: 7px 14px; background: var(--white); color: var(--muted); font-size: 14.5px; box-shadow: 0 1px 0 var(--line); }
.cat-facts b { color: var(--navy); font-weight: 800; }
.cat-facts li:has(a) { padding: 0; background: #fff1c4; box-shadow: none; }
.cat-facts a { display: block; padding: 7px 14px; color: #6b4a00; font-weight: 600; text-decoration: none; }
.cat-facts a b { color: inherit; }
.cat-facts a:hover { background: var(--sun); color: var(--ink); }

/* Text inputs and selects on this page share one look */
.panel__field { display: grid; gap: 6px; flex: 1 1 260px; min-width: 0; max-width: 460px; }
.panel__field span { font: 700 13px/1.2 var(--body); letter-spacing: 0.05em; text-transform: uppercase; color: var(--navy); }
.panel__field input, .panel__field select, .sub-new input {
  box-sizing: border-box; width: 100%; min-height: 44px; padding: 8px 14px; border: 2px solid var(--line); border-radius: 0;
  background: var(--white); color: var(--text); font: 400 16px/1.3 var(--body);
}
.panel__field select {
  padding-right: 38px; cursor: pointer; appearance: none; -webkit-appearance: none;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6' fill='none' stroke='%23062a5c' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
}
.panel__field input:focus, .panel__field select:focus, .sub-new input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--sky); }

.cat-new { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 18px; width: 100%; margin-bottom: 22px; padding: clamp(16px, 2.4vw, 24px); background: var(--white); box-shadow: 0 1px 0 var(--line), 0 16px 34px -30px rgba(6, 24, 58, 0.4); }
.cat-new .panel__error { flex-basis: 100%; }

.cats { display: grid; gap: 14px; width: 100%; margin: 0; padding: 0; list-style: none; }
.cat { background: var(--white); box-shadow: 0 1px 0 var(--line), 0 16px 34px -30px rgba(6, 24, 58, 0.4); scroll-margin-top: 16px; }
.cat:target { box-shadow: 0 0 0 2px var(--sun), 0 16px 34px -30px rgba(6, 24, 58, 0.4); }

/* One row: name, how many products, then the actions on the right */
.group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 8px clamp(14px, 2.4vw, 24px); }
.group--category { padding-block: 14px 12px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(230, 240, 252, 0.6), rgba(230, 240, 252, 0)); }
.group__name { min-width: 0; margin: 0; overflow-wrap: anywhere; color: var(--navy); font: 700 16.5px/1.3 var(--body); letter-spacing: 0; text-transform: none; }
.group--category .group__name { font: italic 850 clamp(24px, 2.6vw, 30px)/1.1 var(--display); letter-spacing: -0.01em; }
.group__count { flex: none; padding: 3px 10px; background: var(--sky); color: var(--navy); font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.group__count b { font-weight: 800; }
a.group__count:hover { background: var(--navy); color: var(--white); }
.group__count--none { background: none; padding-inline: 0; color: var(--muted); }
.group__actions { display: flex; flex-wrap: wrap; gap: 0 4px; margin-left: auto; }
.group__order { display: flex; flex: none; margin: 0 -2px 0 -8px; }
.nudge { display: grid; place-items: center; width: 30px; height: 36px; padding: 0; border: 0; background: none; color: var(--blue); cursor: pointer; }
.nudge svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nudge:hover:not(:disabled) { background: var(--sky); color: var(--navy); }
.nudge:focus-visible { outline: 3px solid var(--blue); outline-offset: -1px; }
.nudge:disabled { color: #c3cedd; cursor: default; }

.act { min-height: 40px; padding: 8px 10px; border: 0; background: none; color: var(--blue); font: 700 14.5px/1.2 var(--body); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; cursor: pointer; }
.act:hover { color: var(--navy); text-decoration-color: currentColor; }
.act:focus-visible { outline: 3px solid var(--blue); outline-offset: -1px; }
.act[aria-expanded="true"] { background: var(--sky); color: var(--navy); }
.act--danger { color: #b3261e; }
.act--danger:hover { color: #7a1d14; }
.act--blocked { color: var(--muted); font-weight: 600; }
.act--quiet { color: var(--muted); }
.act--add { flex: none; padding-inline: 14px; background: var(--sky); color: var(--navy); text-decoration: none; }
.act--add:hover { background: var(--navy); color: var(--white); }
.btn--danger { --bg: #b3261e; color: var(--white); }
.btn--danger:hover { --bg: #8f1e17; }

.cat__subs { margin: 0; padding: 6px 0 10px; list-style: none; }
.cat__sub { margin-left: clamp(14px, 2.4vw, 24px); border-left: 3px solid var(--sky); scroll-margin-top: 16px; }
.cat__sub .group { padding-left: 14px; }
.cat__sub + .cat__sub { border-top: 1px solid var(--line); }
.cat__sub:target { border-left-color: var(--sun); background: #fffaf0; }
.cat__sub--loose { padding: 10px 14px; color: var(--muted); font-size: 14.5px; }
.cat__sub--loose a { color: var(--blue); font-weight: 700; }
.cat__sub--add { padding: 10px clamp(14px, 2.4vw, 24px) 4px 14px; border-top: 0 !important; }
.sub-new { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sub-new label { flex: 1 1 220px; max-width: 340px; }
.sub-new input { min-height: 40px; font-size: 15px; }
.sub-new .panel__error { flex-basis: 100%; }

/* The form an action opens, right under its row. Without the script every form simply shows. */
.panel { display: grid; gap: 10px; margin: 0; padding: 16px clamp(14px, 2.4vw, 24px) 18px; background: var(--paper); box-shadow: inset 0 3px 0 var(--sun); }
.panel__row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 18px; }
.has-js .panel:not(.is-open) { display: none; }
.cat__sub .panel { padding-left: 14px; }
.panel__lead, .panel__note, .panel__error { margin: 0; }
.panel__lead { color: var(--text); }
.panel__lead b { color: var(--navy); }
.panel__note { max-width: 78ch; color: var(--muted); font-size: 14px; line-height: 1.45; }
.panel__note:empty { display: none; }
.panel__note[data-move-summary] { color: var(--navy); font-weight: 700; font-size: 15px; }
.panel__error { color: #7a1d14; font-weight: 700; }
.panel__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }

@media (max-width: 599px) {
  .group__name { flex: 1 1 auto; }
  .group__actions { flex-basis: 100%; margin-left: -10px; }
  .act { min-height: 44px; }
  .nudge { width: 38px; height: 44px; }
  .panel__field, .sub-new label { max-width: none; flex-basis: 100%; }
  .cat-new .btn { width: 100%; }
}

/* Product form and list: the category fields */
.suggested { display: grid; gap: 8px; margin: -8px 0 22px; padding: 12px 16px; background: #fff7dc; box-shadow: inset 4px 0 0 var(--sun); color: #5c4200; font-size: 14.5px; line-height: 1.45; }
.suggested b { color: #3d2c00; }
.suggested label { display: inline-flex; align-items: center; gap: 10px; min-height: 32px; font-weight: 700; color: #3d2c00; cursor: pointer; }
.suggested input { width: 20px; height: 20px; margin: 0; accent-color: var(--blue); }
.hint--changed { color: var(--navy); font-weight: 700; }
.flag--guess { background: var(--sky); color: var(--navy); }

/* Settings: one card per theme. The picture on each card is drawn here from the theme's own colours (--t-*, set on
   the card), with its seasonal label cut on the logo's slant like the real one. */
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; width: 100%; }
.theme { display: flex; flex-direction: column; background: var(--white); border: 2px solid var(--card-line); border-radius: 12px; overflow: hidden; }
.theme.is-live { border-color: #1a7a3b; box-shadow: 0 0 0 3px rgba(26, 122, 59, 0.16); }
.theme__look { background: var(--t-light); border-bottom: 1px solid var(--card-line); }
.theme__strip { display: flex; align-items: center; justify-content: center; height: 22px; background: var(--t-dark); }
.theme__strip b { position: relative; isolation: isolate; padding: 1px 12px; color: var(--t-tag-ink); font: italic 900 9.5px/1.4 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.theme__strip b::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--t-tag); transform: skewX(calc(var(--slant) * -1)); }
.theme__head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--white); }
.theme__head img { width: 84px; margin-right: auto; }
.theme__head i { width: 22px; height: 4px; background: #c9ced8; }
.theme__hero { position: relative; height: 96px; overflow: hidden; background: linear-gradient(120deg, #d9d4c8, #f1ede4); }
.theme__hero::before { content: ""; position: absolute; inset: 0 auto 0 -20px; width: calc(46% + 20px); background: var(--t-dark); box-shadow: 5px 0 0 var(--t-accent); transform-origin: 0 0; transform: skewX(calc(var(--slant) * -1)); }
.theme__hero span { position: absolute; left: 14px; top: 26px; width: 26%; height: 9px; background: var(--white); box-shadow: 0 16px 0 rgba(255, 255, 255, 0.55), 0 36px 0 6px var(--sun); }
.theme__body { display: flex; flex-direction: column; flex: 1; gap: 8px; padding: 16px 18px 18px; }
.theme__body h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 26px; }
.theme__live { padding: 3px 10px; border-radius: 5px; background: #1a7a3b; color: var(--white); font: 700 12px/1.4 var(--body); letter-spacing: 0.04em; text-transform: uppercase; }
.theme__body p { color: var(--muted); font-size: 15.5px; line-height: 1.45; }
.theme__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: auto; padding-top: 8px; min-height: 52px; }
.theme__actions form { margin: 0; }
.theme__now { color: #1a7a3b; font-weight: 700; font-size: 15px; }
@media (max-width: 899px) { .themes { grid-template-columns: 1fr; max-width: 460px; } }

/* Settings → Logo: one card for each logo, in the theme cards' frame. The new logo is shown once for each look, in
   that look's colours; the original, which never changes, once. Both pictures are the same height. */
.logos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; width: 100%; }
.logo-card__look { display: grid; grid-auto-rows: 1fr; gap: 1px; height: 246px; background: var(--card-line); border-bottom: 1px solid var(--card-line); }
.logo-card__look figure { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 0 22px; background: var(--white); }
.logo-card__look img { width: min(236px, 58%); height: auto; }
.logo-card__look figcaption { color: var(--muted); font: 600 14.5px/1.35 var(--body); text-align: right; }
.logo-card__look figcaption b { display: block; color: #1a7a3b; font-size: 12.5px; letter-spacing: 0.04em; text-transform: uppercase; }
.logo-card__look--one img { width: min(320px, 66%); }
@media (max-width: 899px) { .logos { grid-template-columns: 1fr; max-width: 560px; } }

/* Orders and baskets (admin/orders.php, admin/order.php, admin/baskets.php) */
.pay-state, .basket-state { display: inline-block; padding: 3px 10px; font: 700 12.5px/1.4 var(--body); letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
.pay-state--paid, .basket-state--converted { background: #dff3e4; color: #135c2c; }
.pay-state--pending { background: #fff1c4; color: #6b4a00; }
.pay-state--failed { background: #ffe1dc; color: #7a1d14; }
.pay-state--cancelled, .basket-state--empty { background: #eceff4; color: var(--muted); }
.basket-state--active { background: var(--sky); color: var(--navy); }
.flag--sandbox { background: #ebe5ff; color: #44318d; vertical-align: middle; }
.guest, .status-none { color: var(--muted); }
.status-none { font-size: 14px; }
.cell-link { margin-left: 8px; font-weight: 700; color: var(--blue); text-underline-offset: 3px; white-space: nowrap; }
.table--orders td:nth-child(3), .table--baskets td:nth-child(6), .table--baskets td:nth-child(7) { white-space: nowrap; }
.table--orders td.cell-name, .table--baskets td.cell-name { width: auto; min-width: 0; white-space: nowrap; }
.table--orders td.status form { margin: 0; }
/* The status an order has reached, chosen in the list. Its colour follows the status so a column of them reads at a glance. */
.status-pick {
  min-width: 148px; min-height: 40px; padding: 7px 36px 7px 12px; border: 2px solid var(--line); border-radius: 0;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23062a5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--navy); font: 700 14.5px/1.2 var(--body); cursor: pointer; appearance: none; -webkit-appearance: none;
  transition: border-color 0.15s, background-color 0.15s;
}
.status-pick:focus { outline: none; box-shadow: 0 0 0 3px var(--sky); }
.status-pick--new { border-color: var(--sun-deep); background-color: #fff6d6; }
.status-pick--preparing { border-color: #7fb0ea; background-color: var(--sky); }
.status-pick--dispatched { border-color: #9c8ee0; background-color: #f1eeff; }
.status-pick--completed { border-color: #6fbf87; background-color: #e8f6ec; }
.status-pick--cancelled { border-color: #c5ccd8; background-color: #f3f5f8; color: var(--muted); }
.status-pick.is-busy { opacity: 0.6; pointer-events: none; }

/* One order, one basket */
.order-status { display: grid; gap: 16px; max-width: none; margin-bottom: 24px; }
.order-status h2, .order-card h2 { font-size: 22px; color: var(--navy); }
.order-status__now { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.order-status__sum { margin-left: 8px; color: var(--muted); font-size: 15px; }
.order-status__form { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 32px; }
.status-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.status-step {
  min-height: 48px; padding: 10px 22px; border: 2px solid rgba(6, 42, 92, 0.24); background: var(--white);
  color: var(--navy); font: 700 15.5px/1.2 var(--body); cursor: pointer; transition: border-color 0.15s, background-color 0.15s;
}
button.status-step:hover { border-color: var(--blue); background: var(--sky); }
.status-step.is-current { border-color: var(--navy); background: var(--navy); color: var(--white); cursor: default; }
.status-step.is-current::before { content: "\2713\00a0"; color: var(--sun); }
.status-step.is-cancelled { display: inline-block; min-height: 0; margin-right: 10px; padding: 6px 14px; border-color: #b3261e; background: #b3261e; font-size: 14px; }
.status-step.is-cancelled::before { content: none; }
.order-status__cancel { max-width: 340px; }
.order-status__cancel button.danger { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; cursor: pointer; }
.order-status__cancel .hint { margin-top: 4px; }
.order-status__changed, .order-status__unpaid { margin: 0; }
.order-status__unpaid { max-width: 70ch; color: var(--text); }
.order-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; width: 100%; align-items: start; }
.order-side { display: grid; gap: 24px; min-width: 0; }
.order-card { max-width: none; min-width: 0; }
.order-card h2 { margin-bottom: 14px; }
.order-card__note { margin: 0 0 12px; font-size: 15px; color: var(--text); }
.order-card__sub { margin: 16px 0 8px; font: 700 13px/1.2 var(--body); letter-spacing: 0.05em; text-transform: uppercase; color: var(--navy); }
.table-wrap--inner { box-shadow: none; border: 1px solid var(--line); }
.table--lines { min-width: 0; }
.table--lines td:nth-child(n+2), .table--lines th:nth-child(n+2) { text-align: right; white-space: nowrap; }
.table--lines td.cell-name { width: auto; min-width: 0; }
.order-totals { display: grid; gap: 8px; width: min(100%, 320px); margin: 16px 0 12px auto; }
.order-totals div { display: flex; justify-content: space-between; gap: 16px; font-size: 15.5px; }
.order-totals dd { font-weight: 700; color: var(--navy); }
.order-totals__total { padding-top: 10px; border-top: 2px solid var(--navy); font-size: 18px; font-weight: 800; color: var(--navy); }
.facts--wide div { grid-template-columns: 104px minmax(0, 1fr); }
.facts--wide dd { overflow-wrap: anywhere; }
.facts--wide dd a { color: var(--blue); text-underline-offset: 3px; }
.facts__plain { font-weight: 400 !important; color: var(--text) !important; }
.facts__code { font: 600 14px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.attempts { display: grid; gap: 10px; margin: 0 0 12px; padding: 0; list-style: none; }
.attempts li { display: grid; gap: 2px; padding: 10px 12px; background: var(--paper); font-size: 14.5px; }
.attempts b { color: var(--navy); }
.attempts span { color: var(--muted); overflow-wrap: anywhere; }
.attempts small { color: #7a1d14; }
@media (max-width: 999px) {
  .order-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 699px) {
  /* Phone cards for lists without a photo: no room is kept for one. */
  .table--stack.table--plain tr { min-height: 0; padding: 14px 16px; }
  .table--stack.table--plain td[data-label] { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 3px 0; }
  .table--stack.table--plain td .cell-note { white-space: normal; }
  .table--stack.table--plain td.status { margin-top: 10px; }
  .status-pick { width: 100%; max-width: 260px; }
  .status-steps { width: 100%; }
  .status-step { flex: 1 1 calc(50% - 8px); }
  .table--lines th, .table--lines td { padding: 10px 10px; font-size: 14.5px; }
}
