/* ── Admin Panel ──────────────────────────────────────────────
   The storefront is a boutique; this is a control room. It keeps the same
   gold-on-charcoal identity but drops the calligraphic display face for
   Alexandria, a geometric Arabic face built for interfaces: even in colour,
   quiet at 13px, and it does not fight the numbers in a dense table. Every
   token is scoped to .adm-page, so nothing here can leak into the shop. */
.adm-page {
  --adm-font: "Alexandria", "Tajawal", "IBM Plex Sans Arabic", system-ui, sans-serif;

  --adm-bg: #0b0b0d;
  --adm-surface: #131316;
  --adm-surface-2: #191a1e;
  --adm-surface-3: #212127;
  --adm-line: rgba(255, 255, 255, 0.07);
  --adm-line-2: rgba(197, 164, 106, 0.24);

  --adm-ink: #f4f1ea;
  --adm-ink-2: rgba(234, 227, 215, 0.66);
  --adm-ink-3: rgba(234, 227, 215, 0.38);

  --adm-gold: #dfc79b;
  --adm-gold-2: #c5a46a;
  --adm-gold-dim: rgba(197, 164, 106, 0.12);

  --adm-ok: #6ddc9b;
  --adm-warn: #f0c164;
  --adm-bad: #f08c8c;
  --adm-info: #7fb2e5;

  --adm-r-sm: 10px;
  --adm-r-md: 14px;
  --adm-r-lg: 22px;

  /* ── Motion tokens ────────────────────────────────────────────
     Luxury reads as unhurried and settled, never bouncy: long ease-outs,
     no overshoot worth noticing. `--adm-spring` keeps a 12% settle for the
     two sliding indicators and nothing else. */
  --adm-t-fast: 160ms;
  --adm-t-base: 260ms;
  --adm-t-slow: 420ms;
  --adm-t-page: 620ms;
  --adm-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --adm-lux: cubic-bezier(0.16, 1, 0.3, 1);
  --adm-spring: cubic-bezier(0.34, 1.12, 0.44, 1);
  --adm-swift: cubic-bezier(0.4, 0, 0.2, 1);
  --adm-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.95);

  /* Raised on phones so the fixed tab bar never sits on top of content. */
  --adm-safe-bottom: 0px;

  min-height: 100vh;
  background:
    radial-gradient(115% 70% at 100% 0%, rgba(197, 164, 106, 0.075), transparent 62%),
    radial-gradient(90% 60% at 0% 100%, rgba(197, 164, 106, 0.045), transparent 58%),
    var(--adm-bg);
  color: var(--adm-ink);
  font-family: var(--adm-font);
  font-size: 15px;
  line-height: 1.6;
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  direction: rtl;
}
.adm-page :where(input, select, textarea, button, table) { font-family: var(--adm-font); }
.adm-page ::selection { background: rgba(197, 164, 106, 0.3); }

/* Every figure in the panel is a quantity, so they all line up in columns. */
.adm-page :where(.adm-stat__val, .adm-table td, .adm-ordcard__total, .adm-kv__v, .adm-pager__count) {
  font-variant-numeric: tabular-nums;
}

/* Icons are 1.5px stroke line art on currentColor — one visual weight for the
   whole panel, and they take the text colour of whatever they sit in. */
.adm-page .adm-i {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.16em;
  overflow: visible;
}


/* Focus is a visible ring everywhere, not a browser default nobody styled. */
.adm-page :focus-visible {
  outline: 2px solid var(--adm-gold-2);
  outline-offset: 2px;
  border-radius: 6px;
}

/* `hidden` means not rendered. Any component that sets its own `display` beats
   the UA rule for the attribute and stays on screen — which is why the login
   was showing "بيانات الدخول غير صحيحة" before anyone had typed anything. */
.adm-page [hidden] { display: none !important; }

/* ── Login ───────────────────────────────────────────────────── */
.adm-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1.15rem;
  position: relative;
  overflow: hidden;
}
/* A slow gold drift behind the card: the only decoration on an otherwise
   empty screen, and it tells you the page is alive before you type. */
.adm-login::before {
  content: '';
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 164, 106, 0.14), transparent 65%);
  filter: blur(20px);
  animation: adm-drift 18s var(--adm-ease) infinite alternate;
  pointer-events: none;
}
@keyframes adm-drift {
  from { transform: translate3d(-12%, -18%, 0) scale(0.9); }
  to   { transform: translate3d(14%, 12%, 0) scale(1.15); }
}

.adm-login__card {
  position: relative;
  width: min(400px, 100%);
  background: linear-gradient(170deg, var(--adm-surface-2), var(--adm-surface));
  border: 1px solid var(--adm-line-2);
  border-radius: var(--adm-r-lg);
  padding: 2.75rem 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.35rem;
  box-shadow: var(--adm-shadow);
  animation: adm-card-in 620ms var(--adm-spring) both;
}
@keyframes adm-card-in {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.adm-login__mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 17px;
  background: linear-gradient(145deg, var(--adm-gold), var(--adm-gold-2));
  color: #17140e;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 0 14px 30px -14px rgba(197, 164, 106, 0.9);
  animation: adm-mark-in 700ms var(--adm-spring) both 120ms;
}
@keyframes adm-mark-in {
  from { opacity: 0; transform: translateY(-10px) rotate(-12deg) scale(0.8); }
  to   { opacity: 1; transform: none; }
}
.adm-login__logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--adm-gold);
  letter-spacing: 0.24em;
  padding-inline-start: 0.24em;
  margin-top: -0.5rem;
}
.adm-login__title {
  margin: -1rem 0 0;
  font-size: 0.84rem;
  font-weight: 400;
  color: var(--adm-ink-3);
  letter-spacing: 0.02em;
}
.adm-login__form { width: 100%; display: flex; flex-direction: column; gap: 1rem; }
.adm-login__err {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--adm-r-sm);
  border: 1px solid rgba(240, 140, 140, 0.28);
  background: rgba(240, 140, 140, 0.09);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--adm-bad);
  animation: adm-shake 420ms var(--adm-ease) both;
}
.adm-login__err::before { content: '⚠'; opacity: 0.85; }
@keyframes adm-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  45% { transform: translateX(5px); }
  70% { transform: translateX(-3px); }
}
.adm-login__note {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--adm-ink-3);
  text-align: center;
}

/* ── Shell ───────────────────────────────────────────────────── */
.adm-shell {
  display: flex;
  min-height: 100vh;
  --adm-rail: 236px;
}
.adm-shell.is-collapsed { --adm-rail: 74px; }

.adm-sidebar {
  width: var(--adm-rail);
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--adm-surface-2), var(--adm-surface) 42%);
  border-inline-start: 1px solid var(--adm-line);
  display: flex;
  flex-direction: column;
  padding: 1.1rem 0 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 40;
  transition: width 280ms var(--adm-ease);
  scrollbar-width: thin;
  scrollbar-color: rgba(197, 164, 106, 0.25) transparent;
}

.adm-sidebar__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--adm-line);
}

/* Brand lockup — the mark stays when the rail collapses to icons. */
.adm-brand { display: flex; align-items: center; gap: 0.6rem; flex: 1; min-width: 0; }
.adm-brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--adm-gold), var(--adm-gold-2));
  color: #17140e;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 0 6px 16px -6px rgba(197, 164, 106, 0.7);
}
.adm-brand__text { min-width: 0; display: flex; flex-direction: column; }
.adm-brand__name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--adm-ink);
  letter-spacing: 0.16em;
}
.adm-brand__sub {
  font-size: 0.68rem;
  color: var(--adm-ink-3);
  margin-top: 0.12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 0 0.7rem;
  flex: 1;
}

/* Four labelled groups beat eleven flat links: the eye lands on a heading,
   not on the fourth item down. */
.adm-nav__group { display: flex; flex-direction: column; gap: 0.12rem; }
.adm-nav__groupLabel {
  padding: 0 0.7rem 0.35rem;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--adm-ink-3);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}

/* The one gold bar in the rail travels between items instead of blinking on
   and off in two places. Transform only, so it never triggers layout. */
.adm-nav__marker {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 3px;
  height: 0;
  border-radius: 3px;
  background: linear-gradient(var(--adm-gold), var(--adm-gold-2));
  box-shadow: 0 0 12px -2px rgba(197, 164, 106, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: transform 420ms var(--adm-spring), height var(--adm-t-base) var(--adm-ease),
              opacity var(--adm-t-base) var(--adm-ease);
}

.adm-nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--adm-r-sm);
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--adm-ink-2);
  cursor: pointer;
  border: none;
  background: none;
  text-align: right;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--adm-t-base) var(--adm-ease), color var(--adm-t-base) var(--adm-ease);
}
.adm-nav__item:hover { background: rgba(255, 255, 255, 0.045); color: var(--adm-ink); }
.adm-nav__item:hover .adm-nav__icon { transform: translateY(-1px); }
.adm-nav__item.is-active {
  background: var(--adm-gold-dim);
  color: var(--adm-gold);
  font-weight: 600;
}
.adm-nav__icon {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
  transition: transform 320ms var(--adm-spring);
}
.adm-nav__icon .adm-i { width: 19px; height: 19px; }
.adm-nav__item.is-active .adm-nav__icon .adm-i { stroke-width: 1.9; }


.adm-nav__logout {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: auto 0.7rem 0;
  padding: 0.62rem 0.7rem;
  border-radius: var(--adm-r-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(240, 140, 140, 0.72);
  cursor: pointer;
  border: none;
  background: none;
  text-align: right;
  width: calc(100% - 1.4rem);
  white-space: nowrap;
  overflow: hidden;
  transition: background 200ms var(--adm-ease), color 200ms var(--adm-ease);
}
.adm-nav__logout:hover { background: rgba(240, 140, 140, 0.1); color: var(--adm-bad); }

/* Collapsed rail — icons stay, labels go */
.adm-shell.is-collapsed .adm-nav__text,
.adm-shell.is-collapsed .adm-brand__text,
.adm-shell.is-collapsed .adm-nav__groupLabel,
.adm-shell.is-collapsed .adm-whoami__text { display: none; }
.adm-shell.is-collapsed .adm-nav__group { gap: 0.2rem; }
.adm-shell.is-collapsed .adm-sidebar__head {
  padding: 0 0.5rem 0.9rem;
  justify-content: center;
}
.adm-shell.is-collapsed .adm-nav { padding: 0 0.6rem; }
.adm-shell.is-collapsed .adm-nav__item,
.adm-shell.is-collapsed .adm-nav__logout,
.adm-shell.is-collapsed .adm-whoami {
  justify-content: center;
  gap: 0;
  padding-inline: 0;
}
.adm-shell.is-collapsed .adm-nav__logout { margin-inline: 0.6rem; width: calc(100% - 1.2rem); }

/* ── Content column ──────────────────────────────────────────── */
.adm-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.adm-main {
  flex: 1;
  min-width: 0;
  padding: 1.75rem 1.75rem calc(2.5rem + var(--adm-safe-bottom));
}

/* Sticky context bar: what am I looking at, and what does it do. */
.adm-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.75rem;
  border-bottom: 1px solid var(--adm-line);
  background: rgba(11, 11, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.adm-topbar__titles { flex: 1; min-width: 0; }
.adm-topbar__title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--adm-ink);
}
.adm-topbar__sub {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--adm-ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Re-typed on every tab change so the header feels connected to the content. */
.adm-topbar__titles.is-swap { animation: adm-title-in 420ms var(--adm-ease) both; }
@keyframes adm-title-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.adm-topbar__side { display: flex; align-items: center; gap: 0.5rem; flex: none; }
.adm-clock {
  font-size: 0.75rem;
  color: var(--adm-ink-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Hamburger — phones only */
.adm-burger {
  display: none;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--adm-line);
  background: var(--adm-surface-2);
  color: var(--adm-ink-2);
  cursor: pointer;
  transition: background 180ms var(--adm-ease), color 180ms var(--adm-ease);
}
.adm-burger:active { transform: scale(0.94); }
.adm-burger svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Backdrop behind the mobile drawer */
.adm-scrim {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(5, 5, 7, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 280ms var(--adm-ease);
}
.adm-scrim.is-open { opacity: 1; }

/* Sidebar toggle — lives in the rail's own header */
.adm-sidebar-toggle {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--adm-line-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--adm-ink-2);
  cursor: pointer;
  transition: background 180ms var(--adm-ease), border-color 180ms var(--adm-ease), color 180ms var(--adm-ease);
}
.adm-sidebar-toggle:hover {
  background: rgba(197, 164, 106, 0.18);
  border-color: rgba(197, 164, 106, 0.6);
  color: var(--adm-gold);
}
.adm-sidebar-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 320ms var(--adm-spring);
}
/* Chevron points at the edge the rail will move toward */
.adm-shell.is-collapsed .adm-sidebar-toggle svg { transform: rotate(180deg); }

@media (prefers-reduced-motion: reduce) {
  .adm-sidebar,
  .adm-sidebar-toggle svg { transition: none; }
}

/* ── Headings ────────────────────────────────────────────────── */
.adm-section-title {
  position: relative;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--adm-ink);
  margin: 0 0 1.15rem;
  padding-inline-start: 0.7rem;
  letter-spacing: -0.005em;
}
.adm-section-title::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(var(--adm-gold), transparent);
}
.adm-subtitle {
  margin: -0.7rem 0 1.25rem;
  padding-inline-start: 0.7rem;
  font-size: 0.79rem;
  line-height: 1.75;
  color: var(--adm-ink-3);
  max-width: 68ch;
}

/* ── Stats ───────────────────────────────────────────────────── */
.adm-stats {
  display: grid;
  /* auto-fit, not auto-fill: with four cards in a 1100px column auto-fill
     leaves a fifth empty track and the row reads as a gap. */
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.adm-stat {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: linear-gradient(160deg, var(--adm-surface-2), var(--adm-surface));
  border: 1px solid var(--adm-line);
  border-radius: var(--adm-r-md);
  padding: 1rem 1.05rem 1.05rem;
  transition: transform var(--adm-t-slow) var(--adm-ease), border-color var(--adm-t-slow) var(--adm-ease);
}
/* A gold sheen sweeps across on hover — the only reward for pointing at a number. */
.adm-stat::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(223, 199, 155, 0.12) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 900ms var(--adm-ease);
  pointer-events: none;
}
.adm-stat:hover { transform: translateY(-3px); border-color: var(--adm-line-2); }
.adm-stat:hover::after { transform: translateX(120%); }

.adm-stat__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
/* The icon sits in a tinted square, so four cards read as four categories
   rather than four identical grey boxes. */
.adm-stat__chip {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--adm-gold-dim);
  border: 1px solid rgba(197, 164, 106, 0.22);
  color: var(--adm-gold);
}
.adm-stat__chip .adm-i { width: 18px; height: 18px; }
.adm-stat--info .adm-stat__chip { background: rgba(127, 178, 229, 0.12); border-color: rgba(127, 178, 229, 0.26); color: var(--adm-info); }
.adm-stat--warn .adm-stat__chip { background: rgba(240, 193, 100, 0.13); border-color: rgba(240, 193, 100, 0.28); color: var(--adm-warn); }
.adm-stat--ok   .adm-stat__chip { background: rgba(109, 220, 155, 0.12); border-color: rgba(109, 220, 155, 0.26); color: var(--adm-ok); }

.adm-stat__delta {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  color: var(--adm-ink-3);
}
.adm-stat__delta.is-up   { background: rgba(109, 220, 155, 0.13); color: var(--adm-ok); }
.adm-stat__delta.is-down { background: rgba(240, 140, 140, 0.13); color: var(--adm-bad); }

.adm-stat__val {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--adm-ink);
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.adm-stat--gold .adm-stat__val { color: var(--adm-gold); }
.adm-stat__label {
  font-size: 0.76rem;
  color: var(--adm-ink-3);
  margin-top: 0.25rem;
}


/* ── Table ───────────────────────────────────────────────────── */
.adm-table-wrap {
  position: relative;
  overflow-x: auto;
  border-radius: var(--adm-r-md);
  border: 1px solid var(--adm-line);
  background: var(--adm-surface);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(197, 164, 106, 0.3) transparent;
}
.adm-table-wrap::-webkit-scrollbar { height: 8px; }
.adm-table-wrap::-webkit-scrollbar-track { background: transparent; }
.adm-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(197, 164, 106, 0.28);
  border-radius: 999px;
}

.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.adm-table th {
  text-align: right;
  padding: 0.7rem 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--adm-ink-3);
  background: var(--adm-surface-2);
  border-bottom: 1px solid var(--adm-line);
  white-space: nowrap;
}
.adm-table td {
  padding: 0.8rem 1rem;
  color: var(--adm-ink-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}
.adm-table tbody tr { transition: background 200ms var(--adm-ease); }
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tbody tr:hover { background: rgba(223, 199, 155, 0.045); }

/* ── Form ────────────────────────────────────────────────────── */
.adm-form { display: flex; flex-direction: column; gap: 1rem; max-width: 640px; }

.adm-field { display: flex; flex-direction: column; gap: 0.35rem; }
.adm-label { font-size: 0.78rem; font-weight: 500; color: var(--adm-ink-2); }

.adm-input, .adm-select, .adm-textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--adm-line);
  background: var(--adm-surface-2);
  color: var(--adm-ink);
  font-size: 0.9rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 200ms var(--adm-ease), box-shadow 200ms var(--adm-ease), background 200ms var(--adm-ease);
  -webkit-appearance: none;
  appearance: none;
}
.adm-input::placeholder, .adm-textarea::placeholder { color: var(--adm-ink-3); }
.adm-input:hover, .adm-select:hover, .adm-textarea:hover { border-color: rgba(255, 255, 255, 0.14); }
.adm-input:focus, .adm-select:focus, .adm-textarea:focus {
  outline: none;
  border-color: rgba(197, 164, 106, 0.55);
  background: var(--adm-surface-3);
  box-shadow: 0 0 0 3px rgba(197, 164, 106, 0.13);
}
.adm-textarea { min-height: 96px; padding: 0.7rem 0.9rem; resize: vertical; line-height: 1.65; }

.adm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.adm-form-actions { display: flex; gap: 0.75rem; margin-top: 0.5rem; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────────────────────── */
.adm-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0 1.3rem;
  min-height: 42px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 0.83rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 180ms var(--adm-spring), filter 180ms var(--adm-ease),
              background 180ms var(--adm-ease), border-color 180ms var(--adm-ease);
}
/* A light wipe on hover reads as "this is clickable" without changing colour. */
.adm-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%);
  transform: translateX(-130%);
  transition: transform 650ms var(--adm-ease);
}
.adm-btn:hover::after { transform: translateX(130%); }
.adm-btn:hover { filter: brightness(1.08); }
.adm-btn:active { transform: scale(0.96); }
.adm-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; filter: none; }
.adm-btn:disabled::after { display: none; }

.adm-btn--primary {
  background: linear-gradient(145deg, var(--adm-gold), var(--adm-gold-2));
  color: #191509;
  box-shadow: 0 10px 22px -14px rgba(197, 164, 106, 0.95);
}
.adm-btn--danger {
  background: rgba(240, 140, 140, 0.13);
  border-color: rgba(240, 140, 140, 0.32);
  color: var(--adm-bad);
}
.adm-btn--ghost {
  background: var(--adm-surface-2);
  border-color: var(--adm-line);
  color: var(--adm-ink-2);
}
.adm-btn--ghost:hover { border-color: var(--adm-line-2); color: var(--adm-ink); }

/* Square icon buttons for table rows — equal footprint, no emoji drift */
.adm-row-actions { display: inline-flex; gap: 0.35rem; }
.adm-icon-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 9px;
  border: 1px solid rgba(197,164,106,0.18);
  background: rgba(255,255,255,0.04);
  color: rgba(200,190,175,0.7);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.adm-icon-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.adm-icon-btn:hover {
  background: rgba(197,164,106,0.16);
  border-color: rgba(197,164,106,0.45);
  color: #dac89a;
}
.adm-icon-btn--danger:hover {
  background: rgba(200,80,80,0.16);
  border-color: rgba(200,80,80,0.42);
  color: #f0a0a0;
}
.adm-icon-btn:disabled { opacity: 0.4; cursor: default; }

/* Badge */
.adm-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}
.adm-badge--green  { background: rgba(100,200,130,0.15); color: #a7e4bd; }
.adm-badge--red    { background: rgba(220,80,80,0.15);  color: rgba(240,160,160,0.9); }
.adm-badge--yellow { background: rgba(220,180,60,0.15); color: rgba(240,220,120,0.9); }
.adm-badge--blue   { background: rgba(100,160,220,0.15); color: rgba(160,200,240,0.9); }
.adm-badge--purple { background: rgba(167,139,250,0.16); color: #cfc0fd; }
.adm-badge--cyan   { background: rgba(56,189,248,0.15);  color: #9fdcfb; }
.adm-badge--orange { background: rgba(251,146,60,0.16);  color: #f8c393; }

/* "Live now" pill — sits in a row of 38px buttons, so it matches their height */
.adm-prof-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(100,200,130,0.35);
  background: rgba(100,200,130,0.12);
  color: #a7e4bd;
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
}
.adm-prof-live__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #6ee7b7;
  box-shadow: 0 0 0 0 rgba(110,231,183,0.6);
  animation: adm-live-pulse 2s ease-out infinite;
}
@keyframes adm-live-pulse {
  70%  { box-shadow: 0 0 0 6px rgba(110,231,183,0); }
  100% { box-shadow: 0 0 0 0 rgba(110,231,183,0); }
}
@media (prefers-reduced-motion: reduce) {
  .adm-prof-live__dot { animation: none; }
}

/* ── Inventory: product list → per-product stock ─────────────────── */
.adm-inv-head { margin-bottom: 1rem; }
.adm-inv-sub {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
  color: rgba(200,190,175,0.5);
}
.adm-inv-toolbar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}
.adm-inv-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: rgba(200,190,175,0.7);
  cursor: pointer;
}
.adm-inv-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(200,190,175,0.4);
  font-size: 0.88rem;
}

.adm-inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.75rem;
}
.adm-inv-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(197,164,106,0.14);
  background: #161619;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}
.adm-inv-card:hover,
.adm-inv-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(218,195,154,0.42);
  background: #1a1a1e;
}
.adm-inv-card__thumb {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #1c1a18;
  border: 1px solid rgba(197,164,106,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
}
.adm-inv-card__body { flex: 1; min-width: 0; display: block; }
.adm-inv-card__name {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #f5f1ea;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-inv-card__meta {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: rgba(200,190,175,0.5);
}
.adm-inv-card__nums {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding-inline: 0.5rem;
}
.adm-inv-card__qty {
  font-size: 1.25rem;
  font-weight: 600;
  color: #dac89a;
  line-height: 1;
}
.adm-inv-card__qtyLabel {
  font-size: 0.68rem;
  color: rgba(200,190,175,0.4);
  margin-top: 0.2rem;
}
.adm-inv-card__chev {
  flex-shrink: 0;
  font-size: 1.4rem;
  color: rgba(197,164,106,0.45);
  line-height: 1;
}

.adm-inv-back {
  background: none;
  border: none;
  color: rgba(197,164,106,0.85);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0;
  margin-bottom: 0.75rem;
}
.adm-inv-back:hover { color: #dac89a; }

.adm-inv-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(197,164,106,0.14);
  background: linear-gradient(135deg, #17171a, #141416);
  margin-bottom: 0.85rem;
}
.adm-inv-hero__thumb {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #1c1a18;
  border: 1px solid rgba(197,164,106,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
}
.adm-inv-hero__info { flex: 1; min-width: 160px; }
.adm-inv-hero__name {
  margin: 0;
  font-size: 1.05rem;
  color: #f5f1ea;
  font-weight: 500;
}
.adm-inv-hero__meta {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  color: rgba(200,190,175,0.45);
}
.adm-inv-hero__stats { display: flex; gap: 0.5rem; flex-shrink: 0; }
.adm-inv-stat {
  min-width: 74px;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(197,164,106,0.1);
  text-align: center;
}
.adm-inv-stat--gold {
  background: rgba(197,164,106,0.09);
  border-color: rgba(197,164,106,0.3);
}
.adm-inv-stat__n {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
  color: #f5f1ea;
  line-height: 1.1;
}
.adm-inv-stat--gold .adm-inv-stat__n { color: #dac89a; }
.adm-inv-stat__l {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  color: rgba(200,190,175,0.45);
}
.adm-inv-hint {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  color: rgba(200,190,175,0.45);
}
.adm-inv-hint strong { color: #c5a46a; }

.adm-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(197,164,106,0.2);
  border-radius: 9px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}
.adm-stepper__btn {
  width: 28px;
  height: 30px;
  border: none;
  background: none;
  color: rgba(200,190,175,0.75);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.adm-stepper__btn:hover { background: rgba(197,164,106,0.14); color: #dac89a; }
.adm-stepper__input {
  width: 58px;
  height: 30px;
  border: none;
  border-inline: 1px solid rgba(197,164,106,0.14);
  background: none;
  color: #f5f1ea;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.adm-stepper__input::-webkit-outer-spin-button,
.adm-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
.adm-stepper__input:focus { outline: none; background: rgba(197,164,106,0.08); }
.adm-stepper__frozen { color: rgba(200,190,175,0.4); font-weight: 600; }

.adm-inv-reason {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.35rem 0;
}
.adm-inv-reason__label {
  font-size: 0.8rem;
  color: rgba(200,190,175,0.75);
  white-space: nowrap;
}
.adm-inv-reason__label strong { color: #e58b8b; }

/* Orders table — grouped cells instead of one column per field */
.adm-ord-ref {
  font-weight: 600;
  color: #dac89a;
  font-size: 0.82rem;
  white-space: nowrap;
}
.adm-ord-date {
  font-size: 0.72rem;
  color: rgba(200,190,175,0.4);
  margin-top: 0.15rem;
}
.adm-ord-customer {
  font-size: 0.84rem;
  color: #f5f1ea;
  white-space: nowrap;
}
.adm-ord-phone {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: rgba(200,190,175,0.6);
  text-decoration: none;
}
.adm-ord-phone:hover { color: #dac89a; text-decoration: underline; }

.adm-ord-products { min-width: 210px; }
.adm-ord-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.15rem 0;
}
.adm-ord-line__img {
  width: 30px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 6px;
  object-fit: cover;
  background: #1c1a18;
  border: 1px solid rgba(197,164,106,0.14);
}
.adm-ord-line__img--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  opacity: 0.35;
}
.adm-ord-line__txt { min-width: 0; }
.adm-ord-line__name {
  display: block;
  font-size: 0.8rem;
  color: #f5f1ea;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 190px;
}
.adm-ord-line__qty { color: rgba(200,190,175,0.5); }
.adm-ord-line__opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  margin-top: 0.18rem;
}
.adm-ord-line__more {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: rgba(200,190,175,0.4);
}
.adm-ord-line__none { color: rgba(200,190,175,0.3); }
.adm-ord-chip--sm { font-size: 0.66rem; padding: 0.02rem 0.4rem; }

.adm-ord-place {
  font-size: 0.8rem;
  color: #f5f1ea;
  white-space: nowrap;
}
.adm-ord-ship {
  font-size: 0.73rem;
  color: rgba(200,190,175,0.55);
  margin-top: 0.15rem;
  white-space: nowrap;
}
.adm-ord-grand {
  font-weight: 600;
  color: #dac89a;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Delivery profile ↔ products */
.adm-linkbox {
  background: #161619;
  border: 1px solid rgba(197,164,106,0.15);
  border-radius: 12px;
  padding: 1rem;
  max-width: 560px;
}
.adm-linkbox__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.adm-linkbox__title { margin: 0; font-size: 0.88rem; color: #f5f1ea; }
.adm-linkbox__hint {
  margin: 0 0 0.75rem;
  font-size: 0.76rem;
  color: rgba(200,190,175,0.45);
  line-height: 1.7;
}
.adm-link-list {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid rgba(197,164,106,0.1);
  border-radius: 10px;
}
.adm-link-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(197,164,106,0.07);
  cursor: pointer;
  font-size: 0.82rem;
}
.adm-link-row:last-child { border-bottom: none; }
.adm-link-row:hover { background: rgba(255,255,255,0.03); }
.adm-link-row__name {
  flex: 1;
  min-width: 0;
  color: #f5f1ea;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-link-row__sku { font-size: 0.7rem; color: rgba(200,190,175,0.35); }

/* Integrations */
.adm-integration {
  background: #161619;
  border: 1px solid rgba(197,164,106,0.15);
  border-radius: 16px;
  padding: 1.25rem;
  max-width: 720px;
}
.adm-integration__head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.adm-integration__logo {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: rgba(197,164,106,0.1);
  border: 1px solid rgba(197,164,106,0.2);
  font-size: 1.15rem;
}
.adm-integration__name { margin: 0; font-size: 0.95rem; color: #f5f1ea; }
.adm-integration__sub {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  color: rgba(200,190,175,0.5);
  line-height: 1.7;
}
.adm-integration__guide {
  border: 1px solid rgba(197,164,106,0.12);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: rgba(255,255,255,0.02);
}
.adm-integration__guide summary {
  cursor: pointer;
  font-size: 0.84rem;
  color: #dac89a;
}
.adm-integration__steps {
  margin: 0.75rem 0;
  padding-inline-start: 1.2rem;
  font-size: 0.8rem;
  color: rgba(200,190,175,0.7);
  line-height: 2;
}
.adm-integration__steps strong { color: #dac89a; }
.adm-integration__note {
  margin: 0 0 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: rgba(197,164,106,0.07);
  border: 1px solid rgba(197,164,106,0.14);
  font-size: 0.78rem;
  color: rgba(200,190,175,0.7);
  line-height: 1.9;
}
.adm-integration__note strong { color: #dac89a; }
.adm-integration__target {
  margin: 0.85rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: rgba(76,175,110,0.09);
  border: 1px solid rgba(76,175,110,0.24);
  color: #9fd8b0;
  font-size: 0.84rem;
}
.adm-integration__target a { color: #dac89a; font-weight: 600; }

/* Marketing — pixels */
.adm-px-channel {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.45rem 0;
}
.adm-px-state {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: rgba(200,190,175,0.55);
}
/* The written state is the one that cannot be misread at a glance */
.adm-toggle input:checked ~ .adm-px-state,
.adm-px-channel:has(input:checked) .adm-px-state {
  background: rgba(76,175,110,0.15);
  color: #9fd8b0;
}
.adm-px-token {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.adm-px-token__dots {
  font-family: monospace;
  letter-spacing: 2px;
  color: rgba(200,190,175,0.45);
  font-size: 0.9rem;
}
.adm-px-result {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0.75rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.7;
}
.adm-px-result.is-ok {
  background: rgba(76,175,110,0.09);
  border: 1px solid rgba(76,175,110,0.24);
  color: #9fd8b0;
}
.adm-px-result.is-bad {
  background: rgba(220,80,80,0.09);
  border: 1px solid rgba(220,80,80,0.26);
  color: #f0a3a3;
}
.adm-px-result span {
  font-family: monospace;
  font-size: 0.74rem;
  opacity: 0.75;
  overflow-wrap: anywhere;
  line-height: 1.9;
}
.adm-px-result.is-bad span {
  font-family: inherit;
  font-size: 0.79rem;
  opacity: 0.9;
}
.adm-px-triggers {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.adm-px-trigger {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}
.adm-px-trigger:hover { border-color: rgba(197,164,106,0.35); }
.adm-px-trigger.is-active {
  border-color: rgba(197,164,106,0.6);
  background: rgba(197,164,106,0.08);
}
.adm-px-trigger input { position: absolute; opacity: 0; pointer-events: none; }
.adm-px-trigger__label { font-size: 0.86rem; font-weight: 600; color: #e8e2d8; }
.adm-px-trigger.is-active .adm-px-trigger__label { color: #dac89a; }
.adm-px-trigger__hint { font-size: 0.74rem; color: rgba(200,190,175,0.5); line-height: 1.6; }
.adm-integration__code { position: relative; }
.adm-integration__code button {
  position: absolute;
  top: 0.5rem;
  inset-inline-start: 0.5rem;
  z-index: 2;
}
.adm-integration__code pre {
  margin: 0;
  padding: 0.85rem;
  max-height: 340px;
  overflow: auto;
  border-radius: 10px;
  background: #0f0f11;
  border: 1px solid rgba(197,164,106,0.12);
  color: rgba(200,190,175,0.8);
  font-size: 0.72rem;
  line-height: 1.6;
  white-space: pre;
}
#adm-int-error {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  background: rgba(200,80,80,0.12);
  border: 1px solid rgba(200,80,80,0.3);
  color: #f0a0a0;
  font-size: 0.82rem;
}

/* Settings */
.adm-set-lead {
  margin: -1rem 0 1.25rem;
  font-size: 0.82rem;
  color: rgba(200,190,175,0.5);
}
.adm-set-grid {
  display: grid;
  /* `min(…, 100%)` keeps the track from insisting on 300px inside a 290px
     column — html has overflow-x:hidden, so the excess is clipped, not
     scrollable, and the right edge of the card simply disappears at 320px. */
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1rem;
  align-items: start;
}
.adm-set-card {
  background: #161619;
  border: 1px solid rgba(197,164,106,0.15);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.adm-set-card__title {
  margin: 0;
  font-size: 0.9rem;
  color: #f5f1ea;
}
.adm-set-card__hint {
  margin: -0.45rem 0 0;
  font-size: 0.76rem;
  color: rgba(200,190,175,0.45);
  line-height: 1.6;
}
.adm-set-hint {
  font-size: 0.72rem;
  color: rgba(200,190,175,0.4);
}
.adm-set-err {
  font-size: 0.74rem;
  color: #f38b8b;
}
.adm-input.is-error,
.adm-textarea.is-error { border-color: rgba(220,120,120,0.7); }
#adm-set-error {
  margin: 1rem 0 0;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  background: rgba(200,80,80,0.12);
  border: 1px solid rgba(200,80,80,0.3);
  color: #f0a0a0;
  font-size: 0.82rem;
}

/* Order detail — one card per purchased line */
.adm-ord-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(197,164,106,0.08);
}
.adm-ord-item:last-child { border-bottom: none; }
.adm-ord-item__img {
  width: 46px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
  background: #1c1a18;
  border: 1px solid rgba(197,164,106,0.14);
}
.adm-ord-item__img--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  opacity: 0.35;
}
.adm-ord-item__body { flex: 1; min-width: 0; }
.adm-ord-item__name {
  margin: 0;
  font-size: 0.85rem;
  color: #f5f1ea;
}
.adm-ord-item__opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.28rem;
}
.adm-ord-item__opts--none {
  font-size: 0.72rem;
  color: rgba(200,190,175,0.3);
  font-style: italic;
}
.adm-ord-chip {
  font-size: 0.72rem;
  color: #dac89a;
  background: rgba(197,164,106,0.12);
  border: 1px solid rgba(197,164,106,0.28);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}
.adm-ord-item__sku {
  margin: 0.25rem 0 0;
  font-size: 0.68rem;
  color: rgba(200,190,175,0.3);
}
.adm-ord-item__nums {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}
.adm-ord-item__total { font-size: 0.85rem; font-weight: 600; color: #dac89a; }
.adm-ord-item__unit {
  font-size: 0.7rem;
  color: rgba(200,190,175,0.4);
  margin-top: 0.15rem;
}

/* Opening stock matrix on the product form */
.adm-stock-hint {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: rgba(200,190,175,0.42);
}
.adm-stock-fill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.adm-stock-total {
  font-size: 0.78rem;
  color: rgba(200,190,175,0.5);
  margin-inline-start: auto;
}
.adm-stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
}
.adm-stock-cell {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(197,164,106,0.14);
  background: rgba(255,255,255,0.02);
}
.adm-stock-cell__label {
  font-size: 0.8rem;
  color: #f5f1ea;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-stock-cell .adm-stepper { align-self: flex-start; }

@media (max-width: 768px) {
  .adm-stock-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .adm-stock-total { margin-inline-start: 0; flex-basis: 100%; }
}

@media (max-width: 768px) {
  .adm-inv-grid { grid-template-columns: 1fr; }
  .adm-inv-hero__stats { width: 100%; }
  .adm-inv-stat { flex: 1; min-width: 0; }
  .adm-inv-toolbar > * { flex: 1 1 100%; max-width: none !important; }
  .adm-inv-toolbar .adm-inv-check { flex-basis: auto; }
}

/* Product img preview */
.adm-img-preview {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  border: 1px solid rgba(197,164,106,0.18);
  background: #1c1a18;
  object-fit: contain;
  display: block;
}

/* Image Section Grid */
#adm-img-section {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
  gap: 0.75rem !important;
  margin-bottom: 1rem !important;
  flex-direction: unset !important;
}

.adm-img-card {
  transition: transform 150ms ease, border-color 150ms ease;
}

.adm-img-card:hover {
  transform: translateY(-2px);
  border-color: rgba(218,195,154,0.4) !important;
}

.adm-img-card img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  #adm-img-section {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
  }
}

/* Toggle switch */
.adm-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.82rem;
  color: rgba(200,190,175,0.7);
}
.adm-toggle input { display: none; }
.adm-toggle__track {
  width: 36px; height: 20px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  position: relative;
  transition: background 200ms ease;
}
.adm-toggle input:checked + .adm-toggle__track { background: rgba(197,164,106,0.7); }
.adm-toggle__track::after {
  content:''; position:absolute;
  top:2px; right:2px;
  width:16px; height:16px;
  border-radius:50%; background:#fff;
  transition: right 200ms ease;
}
.adm-toggle input:checked + .adm-toggle__track::after { right: calc(100% - 18px); }

/* Order status select — colour reflects the current status */
.adm-status-select {
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(197,164,106,0.2);
  background: rgba(255,255,255,0.04);
  color: #f5f1ea;
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

.adm-status-select[data-status="pending_confirmation"] { color:#f0b429; border-color:rgba(240,180,41,0.45);  background:rgba(240,180,41,0.12); }
.adm-status-select[data-status="no_answer_1"],
.adm-status-select[data-status="no_answer_2"],
.adm-status-select[data-status="no_answer_3"] { color:#f9a86a; border-color:rgba(251,146,60,0.45);  background:rgba(251,146,60,0.12); }
.adm-status-select[data-status="confirmed"]  { color:#7fb2e5; border-color:rgba(127,178,229,0.45); background:rgba(127,178,229,0.12); }
.adm-status-select[data-status="delivered"]  { color:#5fd98b; border-color:rgba(74,222,128,0.45);  background:rgba(74,222,128,0.12); }
.adm-status-select[data-status="cancelled"]  { color:#f38b8b; border-color:rgba(248,113,113,0.45); background:rgba(248,113,113,0.12); }

/* The native dropdown renders on the OS surface, so options need explicit colours */
.adm-status-select option { background:#1b1b20; font-weight:600; }
.adm-status-select option[value="pending_confirmation"] { color:#f0b429; }
.adm-status-select option[value="no_answer_1"],
.adm-status-select option[value="no_answer_2"],
.adm-status-select option[value="no_answer_3"] { color:#f9a86a; }
.adm-status-select option[value="confirmed"]  { color:#7fb2e5; }
.adm-status-select option[value="delivered"]  { color:#5fd98b; }
.adm-status-select option[value="cancelled"]  { color:#f38b8b; }

/* Notification toast — appended to <body>, so it cannot inherit the tokens
   scoped to .adm-page and spells its own values out. */
.adm-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(28, 28, 33, 0.96);
  border: 1px solid rgba(197, 164, 106, 0.28);
  color: #dfc79b;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  font-family: "IBM Plex Sans Arabic", "Tajawal", system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 500;
  z-index: 9999;
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.95);
  opacity: 0;
  transform: translate(-50%, 18px) scale(0.94);
  transition: opacity 320ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 420ms cubic-bezier(0.34, 1.4, 0.5, 1);
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 2rem);
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-toast.is-visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
@media (max-width: 860px) {
  .adm-toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
}

/* Who is signed in, and who is at their desk right now */
.adm-whoami {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  margin: 0 0.7rem 0.6rem;
  border-radius: var(--adm-r-sm);
  border: 1px solid var(--adm-line);
  background: var(--adm-gold-dim);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--adm-gold);
  white-space: nowrap;
  overflow: hidden;
}
.adm-whoami__dot,
.adm-presence {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 999px;
  background: rgba(200, 190, 175, 0.3);
}
/* The owner's own dot breathes, so "I am connected" needs no label. */
.adm-whoami__dot {
  background: var(--adm-ok);
  animation: adm-breathe 2.6s ease-in-out infinite;
}
@keyframes adm-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(109, 220, 155, 0.45); }
  50%      { box-shadow: 0 0 0 5px rgba(109, 220, 155, 0); }
}
.adm-presence.is-online {
  background: var(--adm-ok);
  box-shadow: 0 0 0 3px rgba(109, 220, 155, 0.18);
}

/* Shown in place of an image that failed to load — see the delegated `error`
   listener in adminPage.js, which replaced the old inline onerror handlers. */
.adm-img-broken {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(218, 195, 154, 0.4);
}

/* Rich text editor */
.adm-rte-toolbar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.6rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(197,164,106,0.18);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  flex-wrap: wrap;
}

.adm-rte-toolbar button {
  min-width: 28px;
  height: 28px;
  padding: 0 0.4rem;
  border: none;
  border-radius: 6px;
  background: none;
  color: rgba(218,195,154,0.7);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 180ms ease, color 180ms ease;
}
.adm-rte-toolbar button:hover { background: rgba(197,164,106,0.15); color: #dac89a; }

.adm-rte-sep {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.1);
  margin: 0 0.2rem;
  flex-shrink: 0;
}

.adm-rte {
  min-height: 160px;
  max-height: 380px;
  overflow-y: auto;
  padding: 0.85rem 1rem;
  border-radius: 0 0 10px 10px;
  border: 1px solid rgba(197,164,106,0.2);
  background: rgba(255,255,255,0.04);
  color: #f5f1ea;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.7;
  outline: none;
  transition: border-color 200ms ease;
}
.adm-rte:focus { border-color: rgba(197,164,106,0.45); background: rgba(255,255,255,0.06); }
.adm-rte h3 { font-size: 1rem; font-weight: 600; color: #dac89a; margin: 0.75rem 0 0.35rem; }
.adm-rte ul, .adm-rte ol { padding-inline-start: 1.5rem; margin: 0.35rem 0; }
.adm-rte li { margin-bottom: 0.25rem; }
.adm-rte p { margin: 0 0 0.5rem; }
.adm-rte:empty::before { content: 'اكتب الوصف الكامل للمنتج هنا...'; color: rgba(218,195,154,0.3); pointer-events: none; }

/* Tags (Sizes/Colors) */
.adm-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(218,195,154,0.15);
  border: 1px solid rgba(218,195,154,0.25);
  border-radius: 20px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  color: #dac89a;
  font-weight: 500;
}

.adm-tag-remove {
  background: none;
  border: none;
  color: rgba(218,195,154,0.7);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  line-height: 1;
  transition: color 150ms ease;
}

.adm-tag-remove:hover {
  color: #dac89a;
}

/* ── Bottom tab bar (phones) ─────────────────────────────────────
   A rail that wraps into two rows of chips is unusable with a thumb. On a
   phone the four screens actually used all day sit in a fixed bar at the
   bottom, and everything else lives one tap away in the drawer. */
.adm-tabbar {
  display: none;
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 45;
  padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  background: rgba(14, 14, 17, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--adm-line);
}
.adm-tabbar__inner { position: relative; display: flex; align-items: stretch; gap: 0.15rem; }

/* One pill slides between the tabs. Width and X are set from JS and animated
   on the compositor; the labels only cross-fade their colour underneath. */
.adm-tabbar__pill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 14px;
  background: var(--adm-gold-dim);
  border: 1px solid rgba(197, 164, 106, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: transform 400ms var(--adm-spring), width 400ms var(--adm-spring),
              opacity var(--adm-t-base) var(--adm-ease);
}
.adm-tabbar__btn {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  padding: 0.3rem 0.15rem;
  border: none;
  background: none;
  border-radius: 14px;
  color: var(--adm-ink-3);
  font-family: inherit;
  font-size: 0.66rem;
  font-weight: 500;
  cursor: pointer;
  overflow: hidden;
  transition: color var(--adm-t-base) var(--adm-ease);
  -webkit-tap-highlight-color: transparent;
}
.adm-tabbar__btn .adm-i {
  width: 21px;
  height: 21px;
  transition: transform 420ms var(--adm-spring), stroke-width var(--adm-t-base) var(--adm-ease);
}
.adm-tabbar__btn.is-active { color: var(--adm-gold); font-weight: 600; }
.adm-tabbar__btn.is-active .adm-i { transform: translateY(-2px) scale(1.08); stroke-width: 1.9; }
.adm-tabbar__label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Phones ──────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .adm-page { --adm-safe-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }

  .adm-shell { display: block; }

  /* The rail becomes a drawer that slides in from the start edge (right, RTL). */
  .adm-sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: min(292px, 84vw);
    height: 100dvh;
    z-index: 60;
    padding-top: calc(1rem + env(safe-area-inset-top, 0px));
    border-inline-start: none;
    border-inline-end: 1px solid var(--adm-line);
    box-shadow: -30px 0 60px -30px rgba(0, 0, 0, 0.9);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 380ms var(--adm-ease), visibility 380ms;
  }
  .adm-sidebar.is-open { transform: none; visibility: visible; }

  /* The drawer already collapses; the desktop rail toggle has no job here. */
  .adm-sidebar-toggle { display: none; }
  .adm-shell.is-collapsed .adm-nav__text,
  .adm-shell.is-collapsed .adm-brand__text,
  .adm-shell.is-collapsed .adm-whoami__text { display: revert; }
  .adm-shell.is-collapsed .adm-nav__item,
  .adm-shell.is-collapsed .adm-nav__logout,
  .adm-shell.is-collapsed .adm-whoami {
    justify-content: flex-start;
    gap: 0.7rem;
    padding-inline: 0.7rem;
  }
  .adm-shell.is-collapsed .adm-sidebar__head { padding: 0 1rem 1rem; justify-content: space-between; }

  /* Drawer entries are finger-sized and arrive in sequence. */
  .adm-sidebar.is-open .adm-nav__item {
    animation: adm-drawer-item 420ms var(--adm-ease) both;
    animation-delay: calc(var(--i, 0) * 32ms + 60ms);
  }
  @keyframes adm-drawer-item {
    from { opacity: 0; transform: translateX(18px); }
    to   { opacity: 1; transform: none; }
  }
  .adm-nav__item, .adm-nav__logout { min-height: 46px; font-size: 0.88rem; }

  .adm-burger { display: grid; }
  .adm-tabbar { display: block; }

  .adm-topbar { padding: 0.7rem 1rem; padding-top: calc(0.7rem + env(safe-area-inset-top, 0px)); }
  .adm-topbar__title { font-size: 1rem; }
  .adm-topbar__sub { font-size: 0.72rem; }
  .adm-clock { display: none; }

  .adm-main { padding: 1.15rem 1rem calc(1.5rem + var(--adm-safe-bottom)); }
  .adm-form-row { grid-template-columns: 1fr; }
  .adm-stats { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .adm-stat { padding: 0.9rem; border-radius: 14px; }
  .adm-stat__val { font-size: 1.3rem; }
  .adm-stat__label { font-size: 0.68rem; }

  /* Anything tappable clears the 44px target Apple and Google both ask for. */
  .adm-btn { min-height: 46px; flex: 1 1 auto; }
  .adm-icon-btn { width: 38px; height: 38px; }
  .adm-input, .adm-select, .adm-textarea { min-height: 48px; font-size: 16px; }
}

/* Rows become cards below the point where six columns stop fitting. */
@media (max-width: 640px) {
  .adm-table--cards { display: block; }
  .adm-table--cards thead { display: none; }
  .adm-table--cards tbody { display: flex; flex-direction: column; gap: 0.6rem; }
  .adm-table--cards tr {
    display: block;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--adm-line);
    border-radius: var(--adm-r-md);
    background: var(--adm-surface-2);
  }
  .adm-table--cards td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.3rem 0;
    border: none;
    text-align: start;
  }
  .adm-table--cards td::before {
    content: attr(data-label);
    flex: none;
    font-size: 0.7rem;
    color: var(--adm-ink-3);
  }
  .adm-table--cards td:not([data-label])::before { display: none; }
  .adm-table--cards td[data-label=""] { justify-content: flex-start; }
  .adm-table-wrap:has(.adm-table--cards) { border: none; background: none; overflow: visible; }

  /* A cell that carries a whole block (order lines, action buttons) needs the
     full width of the card rather than a value slot on one line. */
  .adm-table--cards .adm-ord-products {
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }
  .adm-table--cards .adm-ord-products::before { align-self: flex-start; }
  .adm-table--cards .adm-ord-line__name { max-width: none; }
  .adm-table--cards .adm-row-actions { flex: 1; justify-content: flex-end; }
  .adm-table--cards .adm-status-select { min-height: 34px; }
}

/* ── Skeletons ───────────────────────────────────────────────────
   A grey shape the size of the thing that is coming beats a spinner: the
   layout does not jump when the data lands. */
.adm-skel {
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.09) 37%, rgba(255, 255, 255, 0.04) 63%);
  background-size: 400% 100%;
  animation: adm-shimmer 1.5s ease-in-out infinite;
}
@keyframes adm-shimmer {
  from { background-position: 100% 50%; }
  to   { background-position: 0 50%; }
}
.adm-skel--stat { height: 92px; border-radius: var(--adm-r-md); }
.adm-skel--row { height: 46px; margin-bottom: 0.5rem; }
.adm-skel--line { height: 12px; }

/* ── Empty states ────────────────────────────────────────────── */
.adm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--adm-line);
  border-radius: var(--adm-r-md);
  background: rgba(255, 255, 255, 0.012);
  text-align: center;
  animation: adm-rise 520ms var(--adm-ease) both;
}
.adm-empty__icon { font-size: 1.8rem; opacity: 0.4; }
.adm-empty__title { font-size: 0.92rem; font-weight: 600; color: var(--adm-ink); }
.adm-empty__text { font-size: 0.8rem; line-height: 1.8; color: var(--adm-ink-3); max-width: 42ch; }

/* ── Motion ──────────────────────────────────────────────────────
   One entrance rule, applied to whatever a tab renders, plus a stagger so a
   list arrives as a sequence rather than a slab. */
@keyframes adm-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.adm-main > * { animation: adm-rise 480ms var(--adm-ease) both; }
.adm-main > *:nth-child(2) { animation-delay: 60ms; }
.adm-main > *:nth-child(3) { animation-delay: 110ms; }
.adm-main > *:nth-child(4) { animation-delay: 150ms; }
.adm-main > *:nth-child(n+5) { animation-delay: 180ms; }

.adm-stats > .adm-stat { animation: adm-rise 520ms var(--adm-ease) both; }
.adm-stats > .adm-stat:nth-child(1) { animation-delay: 40ms; }
.adm-stats > .adm-stat:nth-child(2) { animation-delay: 90ms; }
.adm-stats > .adm-stat:nth-child(3) { animation-delay: 140ms; }
.adm-stats > .adm-stat:nth-child(4) { animation-delay: 190ms; }
.adm-stats > .adm-stat:nth-child(n+5) { animation-delay: 230ms; }

.adm-table tbody tr { animation: adm-row-in 460ms var(--adm-ease) both; }
@keyframes adm-row-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.adm-table tbody tr:nth-child(1) { animation-delay: 40ms; }
.adm-table tbody tr:nth-child(2) { animation-delay: 75ms; }
.adm-table tbody tr:nth-child(3) { animation-delay: 110ms; }
.adm-table tbody tr:nth-child(4) { animation-delay: 145ms; }
.adm-table tbody tr:nth-child(5) { animation-delay: 180ms; }
.adm-table tbody tr:nth-child(6) { animation-delay: 210ms; }
.adm-table tbody tr:nth-child(7) { animation-delay: 235ms; }
.adm-table tbody tr:nth-child(n+8) { animation-delay: 255ms; }

/* Nothing above is worth a dropped frame or a headache. */
@media (prefers-reduced-motion: reduce) {
  .adm-page *,
  .adm-page *::before,
  .adm-page *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .adm-login::before { display: none; }
}

/* ══════════════════════════════════════════════════════════════════
   SHARED COMPONENT LAYER
   Everything below replaces markup that used to be written as inline
   `style="…"` strings inside adminPage.js. One rule per pattern, so a
   button in the orders toolbar and a button in the settings footer are
   the same button.
   ══════════════════════════════════════════════════════════════════ */

/* ── Buttons: sizes, variants, states ────────────────────────── */
.adm-btn--sm  { min-height: 36px; padding: 0 0.85rem; font-size: 0.79rem; border-radius: 9px; }
.adm-btn--xs  { min-height: 30px; padding: 0 0.6rem;  font-size: 0.75rem; border-radius: 8px; gap: 0.3rem; }
.adm-btn--block { width: 100%; }
.adm-btn--lg  { min-height: 50px; font-size: 0.9rem; padding: 0 1.6rem; }

.adm-btn--secondary {
  background: var(--adm-gold-dim);
  border-color: rgba(197, 164, 106, 0.34);
  color: var(--adm-gold);
}
.adm-btn--secondary:hover { border-color: rgba(197, 164, 106, 0.6); }

.adm-btn--outline {
  background: transparent;
  border-color: var(--adm-line-2);
  color: var(--adm-ink-2);
}
.adm-btn--outline:hover { color: var(--adm-ink); border-color: rgba(197, 164, 106, 0.55); }

.adm-btn--success {
  background: rgba(109, 220, 155, 0.13);
  border-color: rgba(109, 220, 155, 0.34);
  color: var(--adm-ok);
}

/* A button that is doing something must say so, and must refuse a second
   click while it does — the create-order form is one double-tap away from
   two identical orders otherwise. */
.adm-btn.is-loading {
  color: transparent !important;
  pointer-events: none;
}
.adm-btn.is-loading::before {
  content: '';
  position: absolute;
  top: 50%;
  inset-inline-start: 50%;
  width: 15px;
  height: 15px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  color: inherit;
  opacity: 0.85;
  animation: adm-spin 620ms linear infinite;
}
.adm-btn--primary.is-loading::before { border-color: #191509; border-top-color: transparent; }
@keyframes adm-spin { to { transform: rotate(360deg); } }

/* ── Page head: title on one side, actions on the other ──────── */
.adm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.adm-head .adm-section-title { margin: 0; }
.adm-head__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Toolbar: search + filters ───────────────────────────────── */
.adm-toolbar {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.85rem;
}
.adm-toolbar .adm-input,
.adm-toolbar .adm-select { min-height: 40px; font-size: 0.85rem; }

.adm-search { position: relative; flex: 1 1 220px; min-width: 0; }
.adm-search__icon {
  position: absolute;
  inset-inline-start: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--adm-ink-3);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
  transition: stroke 180ms var(--adm-ease);
}
.adm-search .adm-input { padding-inline-start: 2.3rem; padding-inline-end: 2.2rem; }
.adm-search .adm-input:focus ~ .adm-search__icon { stroke: var(--adm-gold-2); }
.adm-search__clear {
  position: absolute;
  inset-inline-end: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: none;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--adm-ink-3);
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms var(--adm-ease), color 160ms var(--adm-ease);
}
.adm-search__clear:hover { background: rgba(255, 255, 255, 0.14); color: var(--adm-ink); }
.adm-search.has-value .adm-search__clear { display: grid; }

/* Status filters as a scrollable chip row: on a phone a <select> hides the
   one thing the confirmateur is looking for. */
.adm-chips {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  margin-bottom: 0.85rem;
}
.adm-chips::-webkit-scrollbar { display: none; }
.adm-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 34px;
  padding: 0 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--adm-line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--adm-ink-2);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 180ms var(--adm-ease), border-color 180ms var(--adm-ease), color 180ms var(--adm-ease);
}
.adm-chip:hover { border-color: var(--adm-line-2); color: var(--adm-ink); }
.adm-chip.is-active {
  background: var(--adm-gold-dim);
  border-color: rgba(197, 164, 106, 0.5);
  color: var(--adm-gold);
  font-weight: 600;
}
.adm-chip__n {
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  padding: 0 0.32rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: inherit;
}
.adm-chip.is-active .adm-chip__n { background: rgba(197, 164, 106, 0.22); }

/* The queue chip is the one a confirmateur reaches for first. */
.adm-chip--open {
  border-color: rgba(240, 193, 100, 0.34);
  color: var(--adm-warn);
}
.adm-chip--open .adm-chip__n { background: rgba(240, 193, 100, 0.18); }
.adm-chip--open.is-active {
  background: rgba(240, 193, 100, 0.14);
  border-color: rgba(240, 193, 100, 0.6);
  color: #f7d494;
}

/* "3 filters on" + one tap to undo them */
.adm-filterbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: -0.35rem 0 0.85rem;
  font-size: 0.78rem;
  color: var(--adm-ink-3);
}
.adm-filterbar[hidden] { display: none; }

/* ── Panels ──────────────────────────────────────────────────── */
.adm-panel {
  background: var(--adm-surface);
  border: 1px solid var(--adm-line);
  border-radius: var(--adm-r-md);
  overflow: hidden;
}
.adm-panel__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--adm-line);
  background: rgba(255, 255, 255, 0.018);
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--adm-ink-2);
}
.adm-panel__head .adm-badge { margin-inline-start: auto; }
.adm-panel__body { padding: 0.95rem; }

/* Label/value pairs — the order detail is mostly this */
.adm-kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem 1rem;
}
.adm-kv__k {
  display: block;
  font-size: 0.7rem;
  color: var(--adm-ink-3);
  margin-bottom: 0.15rem;
}
.adm-kv__v { font-size: 0.85rem; color: var(--adm-ink); overflow-wrap: anywhere; }
.adm-kv__v a { color: var(--adm-gold); }

/* ── Status badges: one vocabulary, colour plus a dot plus words ──
   Colour alone fails for the ~8% of people who cannot separate red from
   green, so every badge carries its label and a shape. */
.adm-badge[data-status] {
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border: 1px solid transparent;
  white-space: nowrap;
}
.adm-badge[data-status]::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}
.adm-badge[data-status="pending_confirmation"] {
  color: #f0c164; background: rgba(240, 193, 100, 0.13); border-color: rgba(240, 193, 100, 0.3);
}
.adm-badge[data-status="no_answer_1"],
.adm-badge[data-status="no_answer_2"],
.adm-badge[data-status="no_answer_3"] {
  color: #f9a86a; background: rgba(251, 146, 60, 0.14); border-color: rgba(251, 146, 60, 0.3);
}
.adm-badge[data-status="confirmed"] {
  color: #8fbdea; background: rgba(127, 178, 229, 0.13); border-color: rgba(127, 178, 229, 0.3);
}
.adm-badge[data-status="delivered"] {
  color: #6ddc9b; background: rgba(109, 220, 155, 0.13); border-color: rgba(109, 220, 155, 0.32);
}
.adm-badge[data-status="cancelled"] {
  color: #f08c8c; background: rgba(240, 140, 140, 0.13); border-color: rgba(240, 140, 140, 0.3);
}

/* ── Modal ───────────────────────────────────────────────────── */
.adm-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.adm-modal[hidden] { display: none; }
.adm-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 8, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: adm-fade-in 200ms var(--adm-ease) both;
}
.adm-modal__dialog {
  position: relative;
  width: min(660px, 100%);
  max-height: calc(100dvh - 2.5rem);
  display: flex;
  flex-direction: column;
  background: var(--adm-surface-2);
  border: 1px solid var(--adm-line-2);
  border-radius: var(--adm-r-lg);
  box-shadow: var(--adm-shadow);
  overflow: hidden;
  animation: adm-modal-in 240ms var(--adm-ease) both;
}
.adm-modal--sm .adm-modal__dialog { width: min(420px, 100%); }
.adm-modal.is-closing .adm-modal__dialog { animation: adm-modal-out 150ms var(--adm-ease) both; }
.adm-modal.is-closing .adm-modal__scrim { animation: adm-fade-out 150ms var(--adm-ease) both; }
@keyframes adm-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes adm-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes adm-modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.975); }
  to   { opacity: 1; transform: none; }
}
@keyframes adm-modal-out {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateY(8px) scale(0.985); }
}

.adm-modal__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--adm-line);
  flex: none;
}
.adm-modal__titles { flex: 1; min-width: 0; }
.adm-modal__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--adm-ink);
  letter-spacing: -0.01em;
}
.adm-modal__sub { margin: 0.2rem 0 0; font-size: 0.76rem; color: var(--adm-ink-3); }
.adm-modal__close {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--adm-line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--adm-ink-2);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms var(--adm-ease), color 160ms var(--adm-ease);
}
.adm-modal__close:hover { background: rgba(255, 255, 255, 0.09); color: var(--adm-ink); }
.adm-modal__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overscroll-behavior: contain;
}
/* A column flex container squashes its children before it will scroll, so a
   tall order detail arrived as a stack of empty title bars. */
.adm-modal__body > * { flex: none; }
.adm-modal__text { margin: 0; font-size: 0.86rem; line-height: 1.85; color: var(--adm-ink-2); }
.adm-modal__text strong { color: var(--adm-ink); }
.adm-modal__foot {
  flex: none;
  display: flex;
  gap: 0.55rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 0.85rem 1.15rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--adm-line);
  background: var(--adm-surface);
}

/* On a phone a centred box wastes the top half of the screen and puts the
   buttons where the thumb is not. A sheet from the bottom does neither. */
@media (max-width: 640px) {
  .adm-modal { padding: 0; align-items: flex-end; }
  .adm-modal__dialog {
    width: 100%;
    max-height: 92dvh;
    border-radius: var(--adm-r-lg) var(--adm-r-lg) 0 0;
    border-bottom: none;
    animation: adm-sheet-in 280ms var(--adm-ease) both;
  }
  .adm-modal.is-closing .adm-modal__dialog { animation: adm-sheet-out 180ms var(--adm-ease) both; }
  .adm-modal__foot .adm-btn { flex: 1 1 auto; }
  .adm-modal--sm .adm-modal__dialog { width: 100%; }
}
@keyframes adm-sheet-in  { from { transform: translateY(100%); } to { transform: none; } }
@keyframes adm-sheet-out { from { transform: none; } to { transform: translateY(100%); } }

/* The tab bar must not float over a modal. */
.adm-page:has(.adm-modal:not([hidden])) .adm-tabbar { display: none; }

/* ── Section blocks inside modals and long forms ─────────────── */
.adm-sec {
  border: 1px solid var(--adm-line);
  border-radius: var(--adm-r-md);
  background: var(--adm-surface);
  overflow: hidden;
}
.adm-sec__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--adm-line);
  background: rgba(255, 255, 255, 0.018);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--adm-ink-2);
}
.adm-sec__head .adm-badge { margin-inline-start: auto; }
.adm-sec__body { padding: 0.85rem; }

/* Collapsible variant — <details>, so it works without a line of JS */
details.adm-sec > summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding-inline-end: 2rem;
}
details.adm-sec > summary::-webkit-details-marker { display: none; }
details.adm-sec > summary::after {
  content: '⌄';
  position: absolute;
  inset-inline-end: 0.85rem;
  top: 50%;
  transform: translateY(-60%);
  font-size: 0.95rem;
  color: var(--adm-ink-3);
  transition: transform 240ms var(--adm-ease);
}
details.adm-sec[open] > summary::after { transform: translateY(-30%) rotate(180deg); }
details.adm-sec[open] > .adm-sec__body { animation: adm-reveal 240ms var(--adm-ease) both; }
@keyframes adm-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

/* ── Money summary rows ──────────────────────────────────────── */
.adm-sum { display: flex; flex-direction: column; gap: 0.4rem; }
.adm-sumrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.83rem;
  color: var(--adm-ink-2);
}
.adm-sumrow__v { font-variant-numeric: tabular-nums; color: var(--adm-ink); }
.adm-sumrow--total {
  margin-top: 0.25rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--adm-line);
  font-size: 0.95rem;
  font-weight: 700;
}
.adm-sumrow--total .adm-sumrow__v { color: var(--adm-gold); font-size: 1.05rem; }

/* ── Status timeline ─────────────────────────────────────────── */
.adm-timeline { display: flex; flex-direction: column; gap: 0.1rem; }
.adm-timeline__row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
}
.adm-timeline__row:last-child { border-bottom: none; }
.adm-timeline__at {
  flex: none;
  min-width: 108px;
  font-size: 0.72rem;
  color: var(--adm-ink-3);
  font-variant-numeric: tabular-nums;
}
.adm-timeline__what { font-size: 0.79rem; color: var(--adm-ink-2); }
.adm-timeline__note { display: block; font-size: 0.74rem; color: var(--adm-ink-3); margin-top: 0.15rem; }

/* ── Orders as cards (phones and small tablets) ──────────────── */
/* `.adm-only-wide` only ever hides, so a plain class is enough. The card list
   owns its own breakpoint rather than borrowing a utility, because a utility
   declared earlier in the file loses `display` to the component rule. */
@media (max-width: 720px) {
  .adm-only-wide { display: none !important; }
}

.adm-ordcards { display: none; flex-direction: column; gap: 0.6rem; }
@media (max-width: 720px) {
  .adm-ordcards { display: flex; }
}
.adm-ordcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--adm-line);
  border-radius: var(--adm-r-md);
  background: linear-gradient(165deg, var(--adm-surface-2), var(--adm-surface));
  animation: adm-rise 340ms var(--adm-ease) both;
  animation-delay: calc(var(--i, 0) * 28ms);
  transition: border-color 200ms var(--adm-ease);
}
.adm-ordcards.is-settled .adm-ordcard { animation: none; }
.adm-ordcard:active { border-color: var(--adm-line-2); }

/* An order still waiting on a decision carries a gold edge, so a thumb
   scrolling a 60-order list finds the work without reading a word. */
.adm-ordcard.is-open {
  border-color: rgba(240, 193, 100, 0.32);
  background: linear-gradient(165deg, rgba(240, 193, 100, 0.055), var(--adm-surface));
}
.adm-ordcard.is-open::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--adm-warn);
}

/* Where they stopped last time. */
.adm-ordcard.is-resume {
  border-color: rgba(197, 164, 106, 0.6);
  box-shadow: 0 0 0 1px rgba(197, 164, 106, 0.2), 0 14px 34px -28px rgba(0, 0, 0, 0.9);
}
.adm-ordcard__resume {
  align-self: flex-start;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--adm-gold-dim);
  border: 1px solid rgba(197, 164, 106, 0.4);
  color: var(--adm-gold);
  font-size: 0.68rem;
  font-weight: 600;
}
.adm-ordcard__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}
.adm-ordcard__ref {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--adm-gold);
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}
.adm-ordcard__date { margin-top: 0.15rem; font-size: 0.72rem; color: var(--adm-ink-3); }
.adm-ordcard__who { display: flex; flex-direction: column; gap: 0.15rem; }
.adm-ordcard__name { font-size: 0.92rem; font-weight: 600; color: var(--adm-ink); }
.adm-ordcard__contact {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.15rem;
}
.adm-ordcard__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 36px;
  padding-inline-end: 0.4rem;
  font-size: 0.84rem;
  color: var(--adm-gold);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.adm-ordcard__phone .adm-i { width: 15px; height: 15px; }
.adm-ordcard__meta { font-size: 0.78rem; color: var(--adm-ink-2); line-height: 1.7; }
.adm-ordcard__meta span { color: var(--adm-ink-3); }
.adm-ordcard__items {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
}
.adm-ordcard__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--adm-line);
}
.adm-ordcard__total {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--adm-gold);
  font-variant-numeric: tabular-nums;
}
.adm-ordcard__totalLabel { display: block; font-size: 0.68rem; font-weight: 400; color: var(--adm-ink-3); }
.adm-ordcard__actions { display: flex; gap: 0.4rem; align-items: center; }
.adm-ordcard__statusrow { display: flex; align-items: center; gap: 0.55rem; }
.adm-ordcard__statusrow .adm-kv__k { margin: 0; flex: none; }
.adm-ordcard .adm-status-select { min-height: 40px; flex: 1; min-width: 0; padding-inline: 0.6rem; }

/* Visible to a screen reader, invisible to everyone else. */
.adm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Restricted admin shell — orders and nothing else ─────────
   A rail with one link in it is an insult to the screen it occupies. The
   confirmateur gets a bar, a centred column, and a thumb-height tab bar. */
.adm-shell--lite { display: block; }
.adm-lite-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.25rem;
  padding-top: calc(0.7rem + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--adm-line);
  background: rgba(11, 11, 13, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.adm-lite-bar__brand { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.adm-lite-bar__who { min-width: 0; display: flex; flex-direction: column; }
.adm-lite-bar__name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--adm-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-lite-bar__role { font-size: 0.7rem; color: var(--adm-ink-3); }
.adm-lite-bar__spacer { flex: 1; }

/* Segmented control replaces the rail on laptops */
.adm-seg {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.22rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--adm-line);
}
.adm-seg__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 34px;
  padding: 0 0.85rem;
  border: none;
  border-radius: 9px;
  background: none;
  color: var(--adm-ink-2);
  font-family: inherit;
  font-size: 0.81rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 200ms var(--adm-ease), color 200ms var(--adm-ease);
}
.adm-seg__btn:hover { color: var(--adm-ink); }
.adm-seg__btn.is-active {
  background: var(--adm-gold-dim);
  color: var(--adm-gold);
  font-weight: 600;
}
.adm-shell--lite .adm-main {
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
  padding-top: 1.5rem;
}
@media (max-width: 860px) {
  .adm-lite-bar { padding-inline: 1rem; }
  .adm-seg { display: none; }
  .adm-shell--lite .adm-main { padding-top: 1.1rem; }
}

/* Account screen — the third thing a confirmateur ever needs */
.adm-account {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 480px;
  margin-inline: auto;
  text-align: center;
  align-items: center;
}
.adm-account__avatar {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--adm-gold), var(--adm-gold-2));
  color: #17140e;
  font-size: 1.6rem;
  font-weight: 700;
  box-shadow: 0 12px 28px -14px rgba(197, 164, 106, 0.8);
}
.adm-account__name { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--adm-ink); }
.adm-account__role { margin: 0; font-size: 0.8rem; color: var(--adm-ink-3); }
.adm-account__rows { width: 100%; }

/* ── Manual / phone order form ───────────────────────────────── */
.adm-mo { display: flex; flex-direction: column; gap: 0.85rem; }
.adm-mo__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}
.adm-mo__grid--wide { grid-template-columns: 1fr; }
.adm-mo__line {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  padding: 0.75rem;
  border: 1px solid var(--adm-line);
  border-radius: var(--adm-r-md);
  background: rgba(255, 255, 255, 0.018);
  animation: adm-rise 260ms var(--adm-ease) both;
}
.adm-mo__lineHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--adm-ink-3);
}
.adm-mo__lineGrid {
  display: grid;
  grid-template-columns: 2fr 1.4fr auto;
  gap: 0.6rem;
  align-items: end;
}
@media (max-width: 620px) {
  .adm-mo__lineGrid { grid-template-columns: 1fr; align-items: stretch; }
}
.adm-mo__qty { display: flex; flex-direction: column; gap: 0.35rem; }
.adm-mo__qty .adm-stepper { align-self: flex-start; }
.adm-mo__qty .adm-stepper__btn { width: 38px; height: 44px; font-size: 1.15rem; }
.adm-mo__qty .adm-stepper__input { height: 44px; width: 56px; }

.adm-mo__foot {
  position: sticky;
  bottom: calc(var(--adm-safe-bottom, 0px));
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--adm-line-2);
  border-radius: var(--adm-r-md);
  background: rgba(20, 20, 24, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 -14px 34px -26px rgba(0, 0, 0, 0.95);
}
.adm-mo__footTotal { flex: 1 1 130px; min-width: 0; }
.adm-mo__footLabel { display: block; font-size: 0.68rem; color: var(--adm-ink-3); }
.adm-mo__footValue {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--adm-gold);
  font-variant-numeric: tabular-nums;
}
.adm-mo__foot .adm-btn { flex: 1 1 150px; }
.adm-mo__note { margin: 0; font-size: 0.74rem; line-height: 1.8; color: var(--adm-ink-3); }

/* ── Form feedback ───────────────────────────────────────────── */
.adm-help { font-size: 0.72rem; line-height: 1.6; color: var(--adm-ink-3); }
.adm-error {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--adm-bad);
}
.adm-error[hidden] { display: none; }
.adm-error::before { content: '⚠'; flex: none; opacity: 0.85; }
.adm-input.is-invalid,
.adm-select.is-invalid,
.adm-textarea.is-invalid {
  border-color: rgba(240, 140, 140, 0.65);
  background: rgba(240, 140, 140, 0.05);
}
.adm-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--adm-r-sm);
  border: 1px solid rgba(240, 140, 140, 0.28);
  background: rgba(240, 140, 140, 0.08);
  color: var(--adm-bad);
  font-size: 0.8rem;
  line-height: 1.7;
  animation: adm-rise 260ms var(--adm-ease) both;
}
.adm-alert[hidden] { display: none; }

/* ── Pagination ──────────────────────────────────────────────── */
.adm-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
}
.adm-pager__count { font-size: 0.78rem; color: var(--adm-ink-3); font-variant-numeric: tabular-nums; }
.adm-pager__nav { display: flex; gap: 0.4rem; align-items: center; }
.adm-pager__at { font-size: 0.78rem; color: var(--adm-ink-2); font-variant-numeric: tabular-nums; min-width: 3.5em; text-align: center; }

/* ── Bulk bar ────────────────────────────────────────────────── */
.adm-bulkbar {
  display: none;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.85rem;
  margin-bottom: 0.75rem;
  border-radius: var(--adm-r-sm);
  border: 1px solid rgba(197, 164, 106, 0.24);
  background: var(--adm-gold-dim);
  animation: adm-rise 220ms var(--adm-ease) both;
}
.adm-bulkbar.is-open { display: flex; }
.adm-bulkbar__count { font-size: 0.82rem; font-weight: 600; color: var(--adm-gold); }

/* ── Empty state CTA ─────────────────────────────────────────── */
.adm-empty__cta { margin-top: 0.6rem; }

/* ── Table refinements ───────────────────────────────────────── */
.adm-table td { line-height: 1.6; }
.adm-table tbody tr:last-child td { border-bottom: none; }

/* Product rows */
.adm-prod-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: #1c1a18;
  border: 1px solid var(--adm-line);
}
.adm-prod-thumb--ph { background: var(--adm-gold-dim); }
.adm-prod-name { font-weight: 600; color: var(--adm-ink); }

/* In card mode the row's headline is a title, not a value in a label pair. */
@media (max-width: 640px) {
  .adm-table--cards .adm-td--title { font-size: 0.98rem; font-weight: 600; padding-bottom: 0.15rem; }
  .adm-table--cards .adm-row-actions { flex: 1; justify-content: flex-end; flex-wrap: wrap; }
}
/* Rows animate in once. Replaying the stagger on every keystroke of a search
   box turns a filter into a slideshow. */
.adm-table.is-settled tbody tr { animation: none; }
.adm-table-wrap { position: relative; }
.adm-table-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--adm-ink-3);
  font-size: 0.85rem;
}

/* ── Toast ───────────────────────────────────────────────────── */
.adm-toast {
  white-space: normal;
  text-align: center;
  line-height: 1.65;
  border-radius: 16px;
  max-width: min(520px, calc(100vw - 2rem));
  text-overflow: clip;
}
.adm-toast--ok  { border-color: rgba(109, 220, 155, 0.34); color: #a7e4bd; }
.adm-toast--err { border-color: rgba(240, 140, 140, 0.34); color: #f0a0a0; }

/* ── Skeletons ───────────────────────────────────────────────── */
.adm-skel--card { height: 118px; border-radius: var(--adm-r-md); margin-bottom: 0.6rem; }

/* Entrance is for content, not for a fixed overlay that is already animating. */
.adm-main > .adm-modal { animation: none; }

/* ── Phones: the shared layer's own adjustments ──────────────── */
@media (max-width: 860px) {
  .adm-head { gap: 0.6rem; }
  .adm-head__actions { width: 100%; }
  .adm-head__actions .adm-btn { flex: 1 1 auto; }
  .adm-toolbar .adm-input,
  .adm-toolbar .adm-select { min-height: 44px; font-size: 16px; }
  .adm-chip { min-height: 38px; padding: 0 0.9rem; font-size: 0.8rem; }
  .adm-btn--sm { min-height: 42px; }
  .adm-btn--xs { min-height: 36px; }
  .adm-kv { grid-template-columns: 1fr 1fr; }
  .adm-timeline__at { min-width: 92px; }
}
@media (max-width: 400px) {
  .adm-kv { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .adm-toast { transition-duration: 1ms !important; }
  .adm-modal__scrim,
  .adm-modal__dialog,
  .adm-ordcard,
  .adm-mo__line { animation: none !important; }
  .adm-btn.is-loading::before { animation-duration: 1200ms !important; }
}

/* ══════════════════════════════════════════════════════════════════
   DASHBOARD + MOTION
   ══════════════════════════════════════════════════════════════════ */

/* ── Touch/click ink ─────────────────────────────────────────────
   Grows from the exact point of contact and fades. transform+opacity
   only, and it deletes itself on animationend. */
.adm-ink {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(223, 199, 155, 0.4), rgba(223, 199, 155, 0) 70%);
  transform: scale(0);
  opacity: 0.9;
  pointer-events: none;
  animation: adm-ink 560ms var(--adm-ease) forwards;
}
@keyframes adm-ink {
  to { transform: scale(1); opacity: 0; }
}

/* ── Hero ────────────────────────────────────────────────────── */
.adm-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.1rem;
  border: 1px solid var(--adm-line);
  border-radius: var(--adm-r-lg);
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(197, 164, 106, 0.14), transparent 60%),
    linear-gradient(150deg, var(--adm-surface-2), var(--adm-surface));
  overflow: hidden;
  position: relative;
}
/* A slow gold breath behind the greeting — the panel looks awake. */
.adm-hero::before {
  content: '';
  position: absolute;
  inset-inline-end: -18%;
  top: -70%;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 164, 106, 0.2), transparent 65%);
  animation: adm-breathe-slow 9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes adm-breathe-slow {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50%      { transform: scale(1.22); opacity: 1; }
}
.adm-hero__text { position: relative; min-width: 0; }
.adm-hero__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--adm-ink-3);
}
.adm-hero__title {
  margin: 0.2rem 0 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--adm-ink);
  line-height: 1.25;
}
.adm-hero__sub { margin: 0.3rem 0 0; font-size: 0.84rem; color: var(--adm-ink-2); }
.adm-hero__actions { position: relative; display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Callout: the one thing that needs doing right now ───────── */
.adm-callout {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.05rem;
  margin-bottom: 1.1rem;
  border: 1px solid rgba(240, 193, 100, 0.3);
  border-radius: var(--adm-r-md);
  background: rgba(240, 193, 100, 0.07);
}
.adm-callout__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  background: rgba(240, 193, 100, 0.15);
  color: var(--adm-warn);
}
.adm-callout__icon .adm-i {
  width: 19px;
  height: 19px;
  animation: adm-nudge 2.6s var(--adm-ease) infinite;
}
@keyframes adm-nudge {
  0%, 72%, 100% { transform: none; }
  78% { transform: translateY(-2px); }
  85% { transform: translateY(1px); }
}
.adm-callout__text { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; }
.adm-callout__text strong { font-size: 0.88rem; color: var(--adm-warn); }
.adm-callout__text span { font-size: 0.78rem; line-height: 1.7; color: var(--adm-ink-2); }

/* ── Two-up dashboard row ────────────────────────────────────── */
.adm-dash-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}
@media (max-width: 980px) {
  .adm-dash-row { grid-template-columns: 1fr; }
}
.adm-panel__head .adm-i { width: 17px; height: 17px; color: var(--adm-gold-2); }
.adm-panel__value {
  margin-inline-start: auto;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--adm-gold);
}
.adm-panel__head .adm-btn { margin-inline-start: auto; }

/* ── Bar chart ───────────────────────────────────────────────── */
.adm-chart {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: end;
  gap: 0.45rem;
  height: 156px;
}
.adm-chart__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  height: 100%;
  min-width: 0;
}
.adm-chart__bar {
  position: relative;
  width: 100%;
  max-width: 34px;
  height: var(--h);
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, rgba(197, 164, 106, 0.55), rgba(197, 164, 106, 0.14));
  border: 1px solid rgba(197, 164, 106, 0.28);
  transform-origin: bottom;
  animation: adm-grow 700ms var(--adm-ease) both;
  animation-delay: calc(var(--i) * 70ms);
  transition: filter var(--adm-t-base) var(--adm-ease);
}
.adm-chart__bar.is-peak {
  background: linear-gradient(180deg, var(--adm-gold), rgba(197, 164, 106, 0.28));
  border-color: rgba(223, 199, 155, 0.6);
  box-shadow: 0 0 18px -6px rgba(223, 199, 155, 0.8);
}
.adm-chart__col:hover .adm-chart__bar { filter: brightness(1.25); }
@keyframes adm-grow {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}
/* The value appears on hover, so seven numbers do not fight for 40px each. */
.adm-chart__tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translate(-50%, 4px);
  padding: 0.18rem 0.45rem;
  border-radius: 7px;
  background: var(--adm-surface-3);
  border: 1px solid var(--adm-line-2);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--adm-gold);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--adm-t-fast) var(--adm-ease), transform var(--adm-t-fast) var(--adm-ease);
}
.adm-chart__col:hover .adm-chart__tip { opacity: 1; transform: translate(-50%, 0); }
.adm-chart__x { font-size: 0.68rem; color: var(--adm-ink-3); }

/* ── Horizontal breakdown bars ───────────────────────────────── */
.adm-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.adm-bars__row {
  display: grid;
  grid-template-columns: minmax(88px, auto) 1fr auto;
  align-items: center;
  gap: 0.6rem;
  animation: adm-rise 420ms var(--adm-ease) both;
  animation-delay: calc(var(--i) * 60ms);
}
.adm-bars__label { min-width: 0; }
.adm-bars__track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.adm-bars__fill {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: 999px;
  background: var(--adm-gold-2);
  transform-origin: right;
  animation: adm-fill 760ms var(--adm-ease) both;
  animation-delay: calc(var(--i) * 60ms + 120ms);
}
@keyframes adm-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.adm-bars__fill[data-status="pending_confirmation"] { background: #f0c164; }
.adm-bars__fill[data-status="no_answer_1"],
.adm-bars__fill[data-status="no_answer_2"],
.adm-bars__fill[data-status="no_answer_3"] { background: #f9a86a; }
.adm-bars__fill[data-status="confirmed"]  { background: #7fb2e5; }
.adm-bars__fill[data-status="delivered"]  { background: #6ddc9b; }
.adm-bars__fill[data-status="cancelled"]  { background: #f08c8c; }
.adm-bars__n { font-size: 0.82rem; font-weight: 700; color: var(--adm-ink); min-width: 1.6em; text-align: center; }

/* ── Activity feed ───────────────────────────────────────────── */
.adm-feed { list-style: none; margin: 0; padding: 0.35rem 0; }
.adm-feed__row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  animation: adm-rise 420ms var(--adm-ease) both;
  animation-delay: calc(var(--i) * 55ms);
  transition: background var(--adm-t-base) var(--adm-ease);
}
.adm-feed__row:last-child { border-bottom: none; }
.adm-feed__row:hover { background: rgba(223, 199, 155, 0.04); }
.adm-feed__avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 12px;
  background: var(--adm-gold-dim);
  border: 1px solid rgba(197, 164, 106, 0.22);
  color: var(--adm-gold);
  font-size: 0.9rem;
  font-weight: 600;
}
.adm-feed__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-feed__name {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--adm-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-feed__meta {
  font-size: 0.72rem;
  color: var(--adm-ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-feed__side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.28rem; flex: none; }
.adm-feed__amount { font-size: 0.86rem; font-weight: 700; color: var(--adm-gold); }

/* ── Skeletons for the new shapes ────────────────────────────── */
.adm-skel--hero  { height: 116px; border-radius: var(--adm-r-lg); margin-bottom: 1.1rem; }
.adm-skel--panel { height: 210px; border-radius: var(--adm-r-md); }

/* ── Phones ──────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .adm-hero {
    padding: 1rem;
    border-radius: var(--adm-r-md);
    align-items: stretch;
    flex-direction: column;
    gap: 0.85rem;
  }
  .adm-hero__title { font-size: 1.3rem; }
  .adm-hero__actions .adm-btn { flex: 1 1 auto; }
  .adm-stats { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .adm-stat { padding: 0.8rem 0.85rem 0.9rem; }
  .adm-stat__chip { width: 32px; height: 32px; border-radius: 10px; }
  .adm-stat__chip .adm-i { width: 16px; height: 16px; }
  .adm-stat__val { font-size: 1.3rem; }
  .adm-stat__label { font-size: 0.7rem; }
  .adm-stat__delta { font-size: 0.65rem; padding: 0.1rem 0.35rem; }
  .adm-chart { height: 132px; gap: 0.3rem; }
  .adm-chart__bar { border-radius: 6px 6px 3px 3px; }
  .adm-bars__row { grid-template-columns: minmax(74px, auto) 1fr auto; gap: 0.45rem; }
  .adm-feed__row { padding: 0.6rem 0.75rem; }
  .adm-callout { padding: 0.8rem 0.85rem; }
  .adm-callout .adm-btn { flex: 1 1 100%; }
}
@media (max-width: 360px) {
  .adm-stats { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .adm-ink { display: none; }
  .adm-hero::before,
  .adm-callout__icon .adm-i { animation: none !important; }
  .adm-chart__bar,
  .adm-bars__fill,
  .adm-bars__row,
  .adm-feed__row { animation: none !important; opacity: 1 !important; transform: none !important; }
  .adm-nav__marker,
  .adm-tabbar__pill { transition-duration: 1ms !important; }
}

/* ── Icon sizing inside the shared controls ──────────────────── */
.adm-btn .adm-i { width: 17px; height: 17px; }
.adm-btn--xs .adm-i { width: 15px; height: 15px; }
.adm-seg__btn .adm-i { width: 17px; height: 17px; }
.adm-icon-btn .adm-i { width: 17px; height: 17px; stroke-width: 1.7; }
.adm-burger .adm-i { width: 20px; height: 20px; }
.adm-nav__logout .adm-i { width: 19px; height: 19px; }

/* ── WhatsApp: the channel COD orders are actually confirmed on ──
   Green is the one place the panel steps outside its gold palette, because
   this control is recognised by colour before it is read. */
.adm-btn--wa {
  background: rgba(37, 211, 102, 0.12);
  border-color: rgba(37, 211, 102, 0.34);
  color: #6ee7a0;
  text-decoration: none;
}
.adm-btn--wa:hover {
  background: rgba(37, 211, 102, 0.2);
  border-color: rgba(37, 211, 102, 0.6);
  color: #8ff0b8;
}
.adm-icon-btn--wa { color: rgba(110, 231, 160, 0.75); border-color: rgba(37, 211, 102, 0.24); }
.adm-icon-btn--wa:hover {
  background: rgba(37, 211, 102, 0.16);
  border-color: rgba(37, 211, 102, 0.5);
  color: #8ff0b8;
}

/* Ripple needs a clipping, positioned host. */
.adm-seg__btn,
.adm-chip { position: relative; overflow: hidden; }

/* ── Sidebar identity block ──────────────────────────────────── */
.adm-whoami__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.adm-whoami__name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--adm-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-whoami__role { font-size: 0.68rem; font-weight: 400; color: var(--adm-ink-3); }

/* A count riding inside a button label. */
.adm-btn__count {
  display: inline-grid;
  place-items: center;
  min-width: 1.4em;
  height: 1.4em;
  padding: 0 0.35em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.75em;
  font-weight: 700;
}
.adm-btn--primary .adm-btn__count { background: rgba(25, 21, 9, 0.16); }

/* Numbered step marker on a long form's sections. */
.adm-step {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 7px;
  background: var(--adm-gold-dim);
  border: 1px solid rgba(197, 164, 106, 0.3);
  color: var(--adm-gold);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ══════════════════════════════════════════════════════════════════
   LUXURY MOTION
   Slow, gold, and never bouncy. Every rule below animates transform,
   opacity or background-position — nothing that forces a layout.
   ══════════════════════════════════════════════════════════════════ */

/* A gold light passes across the greeting once the panel settles. */
.adm-hero__title {
  background: linear-gradient(100deg,
    var(--adm-ink) 38%, var(--adm-gold) 47%, #fff6e2 50%, var(--adm-gold) 53%, var(--adm-ink) 62%);
  background-size: 280% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: adm-sheen 7s var(--adm-lux) 900ms infinite;
}
@keyframes adm-sheen {
  0%   { background-position: 100% 0; }
  45%, 100% { background-position: 0 0; }
}

/* The gold rule beside a section title draws itself downward. */
.adm-section-title::before {
  transform-origin: top;
  animation: adm-draw 620ms var(--adm-lux) both;
}
@keyframes adm-draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* A hairline of gold under the sticky header, brightest in the middle. */
.adm-topbar::after,
.adm-lite-bar::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(197, 164, 106, 0.55), transparent);
  opacity: 0.85;
  pointer-events: none;
}
.adm-topbar, .adm-lite-bar { position: sticky; }

/* Surfaces lift on hover and pick up a gold rim rather than a drop shadow —
   a shadow reads as plastic, a rim reads as metal. */
.adm-panel,
.adm-ordcard {
  transition: transform var(--adm-t-slow) var(--adm-lux),
              border-color var(--adm-t-slow) var(--adm-ease),
              box-shadow var(--adm-t-slow) var(--adm-ease);
}
.adm-panel:hover {
  border-color: rgba(197, 164, 106, 0.28);
  box-shadow: 0 18px 40px -32px rgba(0, 0, 0, 0.9);
}
.adm-stat {
  transition: transform var(--adm-t-slow) var(--adm-lux),
              border-color var(--adm-t-slow) var(--adm-ease),
              box-shadow var(--adm-t-slow) var(--adm-ease);
}
.adm-stat:hover {
  box-shadow: 0 20px 44px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(197, 164, 106, 0.16) inset;
}

/* The metric chip breathes once, right after the number lands. */
.adm-stat__chip {
  animation: adm-halo 1.6s var(--adm-lux) both;
  animation-delay: calc(var(--i, 0) * 90ms + 620ms);
}
@keyframes adm-halo {
  0%   { box-shadow: 0 0 0 0 rgba(197, 164, 106, 0); }
  35%  { box-shadow: 0 0 0 7px rgba(197, 164, 106, 0.16); }
  100% { box-shadow: 0 0 0 12px rgba(197, 164, 106, 0); }
}

/* The brand mark catches the light on arrival. */
.adm-brand__mark {
  position: relative;
  overflow: hidden;
}
.adm-brand__mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, 0.65) 50%, transparent 58%);
  transform: translateX(-130%);
  animation: adm-glint 6s var(--adm-lux) 1.4s infinite;
}
@keyframes adm-glint {
  0%, 82%  { transform: translateX(-130%); }
  92%, 100% { transform: translateX(130%); }
}

/* Entrances are longer and travel less: content arrives, it does not fly in. */
@keyframes adm-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.adm-main > * { animation: adm-rise var(--adm-t-page) var(--adm-lux) both; }
.adm-stats > .adm-stat { animation: adm-rise 620ms var(--adm-lux) both; }
.adm-table tbody tr { animation: adm-row-in 520ms var(--adm-lux) both; }

/* The sheen on a button is a slow pass of light, not a flash. */
.adm-btn::after {
  background: linear-gradient(100deg, transparent 42%, rgba(255, 255, 255, 0.16) 50%, transparent 58%);
  transition: transform 900ms var(--adm-lux);
}

@media (prefers-reduced-motion: reduce) {
  /* Clipping the text to a paused gradient would leave it unreadable. */
  .adm-hero__title {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--adm-ink);
    animation: none !important;
  }
  .adm-brand__mark::after,
  .adm-stat__chip { animation: none !important; }
  .adm-section-title::before { animation: none !important; transform: none !important; }
}

/* ── Typography scale ────────────────────────────────────────── */
.adm-section-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.adm-topbar__title { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.025em; }
.adm-modal__title { letter-spacing: -0.02em; }
.adm-label { font-weight: 500; letter-spacing: 0.005em; }
.adm-table th { font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.adm-brand__name { font-weight: 700; letter-spacing: 0.18em; }


/* ── Announcement strip editor ──────────────────────────────────────────── */
.adm-ann-text {
  min-height: 9.5rem;
  line-height: 2;
  font-size: 0.95rem;
  /* One message per line is the whole mental model, so the lines are spaced
     far enough apart to be counted at a glance. */
}

.adm-ann-meter {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.35rem;
}

.adm-ann-count {
  flex: none;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: rgba(200, 190, 175, 0.6);
  transition: color 200ms ease;
}

.adm-ann-count.is-over {
  color: #e5806f;
  font-weight: 600;
}

.adm-ann-speeds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 0.6rem;
}

/* The preview is the real strip, not a drawing of it: same markup, same
   stylesheet. A mock-up that drifts from the thing it previews is worse than
   no preview, because it is believed. */
.adm-ann-preview {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(197, 164, 106, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 30px -22px rgba(0, 0, 0, 0.9);
  background: rgba(12, 11, 10, 0.6);
  min-height: 40px;
}

/* The strip sizes its copies to the viewport so the marquee cannot show bare
   track. Inside a card that is far wider than the card, which is correct —
   the frame simply crops it, exactly as the header does. */
.adm-ann-preview .announce {
  border-bottom: 0;
  animation: none;
}

.adm-ann-off {
  margin: 0;
  padding: 0.85rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(200, 190, 175, 0.55);
}
