/* ==========================================================================
   JJL Publishing House — Operations Admin V2
   --------------------------------------------------------------------------
   Standalone stylesheet (does NOT depend on store.css or the current admin).
   Identity carried over from the existing admin: deep navy, warm gold, cream,
   Georgia for editorial moments, a plain system sans for everything you work in.

   1 Tokens        5 Buttons & forms     9 Order detail
   2 Base          6 Status & tones     10 Dashboard & lists
   3 Shell         7 Cards & tables     11 Settings & health
   4 Top bar       8 Overlays           12 Responsive
   ========================================================================== */

/* 1 · Tokens -------------------------------------------------------------- */
:root {
  --av-navy: #0a2136;
  --av-navy-deep: #051220;
  --av-cream: #f7f2ea;
  --av-gold: #c99a4a;
  --av-gold-light: #e0bd72;
  --av-gold-dark: #8f6630;

  --av-bg: #f4f1ea;            /* warm gray page */
  --av-surface: #ffffff;
  --av-surface-2: #faf8f3;     /* table heads, quiet fills */
  --av-line: #e6e0d3;
  --av-line-strong: #d5ccb9;
  --av-ink: #1c1a16;
  --av-muted: #635c50;         /* 6:1 on white */

  --av-serif: Georgia, "Times New Roman", serif;
  --av-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, Arial, sans-serif;

  --av-radius: 10px;
  --av-radius-sm: 7px;
  --av-shadow: 0 1px 2px rgba(10, 33, 54, .05), 0 3px 12px rgba(10, 33, 54, .04);
  --av-shadow-lift: 0 10px 30px rgba(10, 33, 54, .16);

  --av-sidebar: 236px;
  --av-topbar: 60px;
  --av-max: 1440px;
  --av-control: 38px;          /* button / input height */
  --av-row: 48px;              /* table row */
}

/* status tones — one definition, used by pills, callouts, KPI accents, timeline, stepper */
[class*="--green"] { --t-bg: #e8f3ec; --t-fg: #1c5a37; --t-bd: #b9d8c4; --t-solid: #2d7a4d; }
[class*="--gold"]  { --t-bg: #fbf1dc; --t-fg: #7a5410; --t-bd: #e6d09b; --t-solid: #b8842a; }
[class*="--blue"],
[class*="--info"]  { --t-bg: #e8f0f8; --t-fg: #1c4b73; --t-bd: #bcd2e6; --t-solid: #2f6a9c; }
[class*="--red"]   { --t-bg: #fbebe9; --t-fg: #8a2a22; --t-bd: #e8b7b1; --t-solid: #b3372c; }
[class*="--gray"]  { --t-bg: #efece6; --t-fg: #57514a; --t-bd: #d9d4c9; --t-solid: #8a8479; }

/* 2 · Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body.av-body { margin: 0; background: var(--av-bg); color: var(--av-ink); font: 400 14px/1.5 var(--av-sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
code, .av-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.av-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.av-muted { color: var(--av-muted); }
.av-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 2px solid var(--av-gold-dark); outline-offset: 2px; border-radius: 4px; }
.av-sidebar :focus-visible, .av-toasts :focus-visible { outline-color: var(--av-gold-light); }
.av-skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--av-gold); color: var(--av-navy); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.av-skip:focus { top: 8px; }
.av-icon { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.av-icon--xs { width: 14px; height: 14px; }
.av-icon--lg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; } }

/* 3 · Shell --------------------------------------------------------------- */
.av-shell { display: grid; grid-template-columns: var(--av-sidebar) minmax(0, 1fr); min-height: 100vh; }
.av-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--av-navy); color: rgba(255, 255, 255, .78); border-right: 1px solid rgba(201, 154, 74, .2); z-index: 40; }
.av-sidebar__top { display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 18px; min-height: var(--av-topbar); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.av-sidebar__close { display: none; background: none; border: 0; color: #fff; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; align-items: center; justify-content: center; }
.av-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: #fff; }
.av-brand img { width: 34px; height: 34px; }
.av-brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.av-brand__name { font-family: var(--av-serif); font-size: 15px; font-weight: 700; letter-spacing: .005em; }
.av-brand__sub { font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--av-gold-light); margin-top: 2px; }

.av-nav { padding: 14px 10px; flex: 1 1 auto; overflow-y: auto; }
.av-nav ul { display: grid; gap: 2px; }
.av-nav__link { position: relative; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 8px; color: rgba(255, 255, 255, .74); text-decoration: none; font-weight: 500; transition: background-color .15s, color .15s; }
.av-nav__link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.av-nav__link.is-active { background: rgba(201, 154, 74, .13); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--av-gold); }
.av-nav__link.is-active .av-icon { color: var(--av-gold-light); }
.av-nav__badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: rgba(224, 189, 114, .18); color: var(--av-gold-light); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.av-sidebar__foot { padding: 10px 10px 12px; border-top: 1px solid rgba(255, 255, 255, .08); display: grid; gap: 8px; }
.av-nav__link--store { color: var(--av-gold-light); }
.av-nav__ext { margin-left: auto; opacity: .8; }

.av-main-col { min-width: 0; display: flex; flex-direction: column; }
.av-main { flex: 1 1 auto; padding: 26px clamp(16px, 2.4vw, 36px) 56px; }
.av-main:focus { outline: none; }
.av-container { max-width: var(--av-max); margin-inline: auto; }
.av-backdrop { display: none; }

/* 4 · Top bar ------------------------------------------------------------- */
.av-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; min-height: var(--av-topbar); padding: 0 clamp(16px, 2.4vw, 36px); background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--av-line); }
.av-topbar .av-topbar__nav { display: none; }
.av-topbar__context { display: flex; align-items: center; gap: 6px; color: var(--av-muted); font-size: 13px; white-space: nowrap; }
.av-topbar__page { color: var(--av-ink); font-weight: 600; }
.av-topbar__end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.av-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.av-chip--preview { background: var(--av-cream); color: var(--av-gold-dark); border: 1px dashed var(--av-gold); }

.av-gsearch { position: relative; flex: 1 1 380px; max-width: 520px; margin-left: 12px; }
.av-gsearch > .av-icon { position: absolute; left: 12px; top: 10px; color: var(--av-muted); pointer-events: none; }
.av-gsearch input { width: 100%; height: var(--av-control); padding: 0 40px 0 38px; border: 1px solid var(--av-line-strong); border-radius: 999px; background: var(--av-surface-2); }
.av-gsearch input::placeholder { color: #776f61; }
.av-gsearch input:focus { background: #fff; border-color: var(--av-gold-dark); outline: 2px solid rgba(201, 154, 74, .35); outline-offset: 0; }
.av-gsearch__kbd { position: absolute; right: 12px; top: 8px; height: 22px; min-width: 22px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--av-line-strong); border-radius: 6px; background: #fff; color: var(--av-muted); font: 600 11px var(--av-sans); }
.av-gsearch__hints { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff; border: 1px solid var(--av-line); border-radius: var(--av-radius); box-shadow: var(--av-shadow-lift); padding: 12px 14px; z-index: 50; }
.av-gsearch:focus-within .av-gsearch__hints { display: block; }
.av-gsearch__hint-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--av-muted); margin-bottom: 6px; }
.av-gsearch__hints li { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--av-muted); }
.av-gsearch__hints li strong { color: var(--av-ink); font-weight: 600; }
.av-gsearch__hints li em { font-style: normal; margin-left: 6px; color: #776f61; }
.av-gsearch__hints .av-icon { color: var(--av-gold-dark); }

.av-menu { position: relative; display: inline-block; }
.av-menu__panel { position: absolute; z-index: 60; min-width: 210px; padding: 6px; background: #fff; color: var(--av-ink); border: 1px solid var(--av-line); border-radius: var(--av-radius); box-shadow: var(--av-shadow-lift); }
.av-menu__panel--right { right: 0; top: calc(100% + 6px); }
.av-menu__panel--left { left: 0; top: calc(100% + 6px); }
.av-menu__panel--up { left: 0; right: 0; bottom: calc(100% + 8px); }
.av-menu__panel a, .av-menu__panel button[role="menuitem"] { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border: 0; background: none; border-radius: 7px; text-align: left; text-decoration: none; cursor: pointer; font-size: 13.5px; }
.av-menu__panel a:hover, .av-menu__panel button[role="menuitem"]:hover { background: var(--av-surface-2); }
.av-menu__panel .av-icon { color: var(--av-muted); }
.av-menu__panel [data-danger] { color: #8a2a22; }
.av-menu__panel [data-danger] .av-icon { color: inherit; }
.av-menu__panel hr { border: 0; border-top: 1px solid var(--av-line); margin: 5px 0; }
.av-bell__count { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #b3372c; color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; box-sizing: content-box; }
.av-notif { min-width: 330px; }
.av-notif__title { padding: 8px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--av-muted); }
.av-notif__item { align-items: flex-start !important; padding: 8px 10px !important; }
.av-notif__item > span { display: grid; gap: 1px; }
.av-notif__item small { color: var(--av-muted); font-size: 12.5px; line-height: 1.35; }
.av-notif__item .av-icon { margin-top: 2px; color: var(--t-solid) !important; }
.av-notif__all { justify-content: center; margin-top: 4px; border-top: 1px solid var(--av-line); border-radius: 0 0 7px 7px !important; color: var(--av-gold-dark); font-weight: 600; }
.av-notif__empty { padding: 12px 10px; color: var(--av-muted); }

.av-profile__btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left; color: inherit; }
.av-profile__btn:hover { background: rgba(127, 127, 127, .1); }
.av-avatar { width: 32px; height: 32px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--av-gold); color: var(--av-navy); font-weight: 800; font-size: 13px; }
.av-profile__who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.av-profile__name { font-weight: 600; font-size: 13.5px; }
.av-profile__role { font-size: 11.5px; opacity: .7; }
.av-profile__chev { margin-left: auto; opacity: .6; }
.av-profile--sidebar { display: block; }
.av-profile--sidebar .av-menu { display: block; }
.av-profile--sidebar .av-profile__btn { color: #fff; }
.av-profile--top .av-profile__chev { margin-left: 2px; }
.av-profile--top .av-profile__who { display: none; }
.av-profile--top .av-profile__btn { width: auto; padding: 4px 6px; }

/* 5 · Buttons & forms ----------------------------------------------------- */
.av-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--av-control); padding: 0 16px; border: 1px solid transparent; border-radius: 8px; font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s, box-shadow .15s; position: relative; }
.av-btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.av-btn--primary { background: var(--av-navy); color: #fff; }
.av-btn--primary:hover { background: #12324f; }
.av-btn--gold { background: linear-gradient(135deg, var(--av-gold-light), var(--av-gold)); color: #1f1505; box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset; }
.av-btn--gold:hover { filter: brightness(1.04); box-shadow: 0 4px 14px rgba(201, 154, 74, .35); }
.av-btn--secondary { background: #fff; border-color: var(--av-line-strong); color: var(--av-ink); }
.av-btn--secondary:hover { background: var(--av-surface-2); border-color: #c4baa3; }
.av-btn--ghost { background: transparent; color: inherit; }
.av-btn--ghost:hover { background: rgba(127, 127, 127, .12); }
.av-btn--danger { background: #fff; border-color: #e0aaa4; color: #8a2a22; }
.av-btn--danger:hover { background: #fbebe9; }
.av-btn--danger-solid { background: #a8322a; color: #fff; }
.av-btn--danger-solid:hover { background: #8f2820; }
.av-btn[disabled], .av-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; filter: none; }
.av-btn[disabled]:hover { background: revert-layer; }
.av-icon-btn { width: var(--av-control); padding: 0; }
.av-btn--sm.av-icon-btn { width: 32px; }
.av-btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

.av-field { display: grid; gap: 6px; }
.av-field > span, .av-field > label { font-size: 12.5px; font-weight: 600; color: var(--av-ink); }
.av-field small { color: var(--av-muted); font-size: 12.5px; }
.av-input, .av-select, .av-textarea { width: 100%; height: var(--av-control); padding: 0 12px; border: 1px solid var(--av-line-strong); border-radius: 8px; background: #fff; }
.av-select { padding-right: 30px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23635c50' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.av-textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.av-input:focus, .av-select:focus, .av-textarea:focus { border-color: var(--av-gold-dark); outline: 2px solid rgba(201, 154, 74, .35); outline-offset: 0; }
.av-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.av-form-grid .is-wide { grid-column: 1 / -1; }
.av-check-field { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.av-check-field input { width: 16px; height: 16px; accent-color: var(--av-navy); }

.av-search { position: relative; flex: 1 1 260px; max-width: 420px; }
.av-search > .av-icon { position: absolute; left: 12px; top: 10px; color: var(--av-muted); pointer-events: none; }
.av-search input { width: 100%; height: var(--av-control); padding: 0 12px 0 38px; border: 1px solid var(--av-line-strong); border-radius: 8px; background: #fff; }
.av-search input:focus { border-color: var(--av-gold-dark); outline: 2px solid rgba(201, 154, 74, .35); outline-offset: 0; }
.av-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--av-line); }
.av-toolbar__spacer { margin-left: auto; }
.av-toolbar__note { color: var(--av-muted); font-size: 13px; }

/* 6 · Status & tones ------------------------------------------------------ */
.av-status { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border-radius: 999px; background: var(--t-bg); color: var(--t-fg); border: 1px solid var(--t-bd); font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1; }
.av-status .av-icon { width: 13px; height: 13px; stroke-width: 2.2; }
.av-status--lg { height: 28px; font-size: 13px; }
.av-pills { display: inline-flex; flex-wrap: wrap; gap: 6px; }

.av-callout { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--av-radius); background: var(--t-bg); border: 1px solid var(--t-bd); color: var(--t-fg); }
.av-callout > .av-icon { margin-top: 2px; color: var(--t-solid); }
.av-callout__body { flex: 1 1 auto; min-width: 0; }
.av-callout__title { font-weight: 700; }
.av-callout__text { color: var(--av-ink); opacity: .86; }
.av-callout__title + .av-callout__text { margin-top: 2px; }
.av-callout__action { flex: 0 0 auto; align-self: center; }

/* 7 · Cards & tables ------------------------------------------------------ */
.av-card { background: var(--av-surface); border: 1px solid var(--av-line); border-radius: var(--av-radius); box-shadow: var(--av-shadow); min-width: 0; }
.av-card__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--av-line); min-height: 56px; }
.av-card__title { font-family: var(--av-serif); font-size: 18px; font-weight: 600; letter-spacing: -.005em; line-height: 1.25; }
.av-card__sub { color: var(--av-muted); font-size: 13px; margin-top: 1px; }
.av-card__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.av-card__body { padding: 18px 20px; }
.av-card--flush > .av-card__body { padding: 0; }
.av-card__foot { padding: 12px 20px; border-top: 1px solid var(--av-line); background: var(--av-surface-2); border-radius: 0 0 var(--av-radius) var(--av-radius); color: var(--av-muted); font-size: 13px; }
.av-card--flush > .av-card__body > .av-table-wrap { border-radius: 0 0 var(--av-radius) var(--av-radius); }
.av-stack { display: grid; gap: 20px; }
.av-stack--sm { gap: 12px; }

.av-page-header { margin-bottom: 22px; }
.av-page-header__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.av-page-header__title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.av-page-header h1 { font-family: var(--av-serif); font-size: clamp(26px, 2.2vw, 32px); font-weight: 600; letter-spacing: -.015em; line-height: 1.15; color: var(--av-navy); }
.av-page-header__sub { margin-top: 5px; color: var(--av-muted); font-size: 14.5px; }
.av-page-header__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.av-crumbs { margin-bottom: 8px; }
.av-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 13px; color: var(--av-muted); }
.av-crumbs li { display: inline-flex; align-items: center; gap: 2px; }
.av-crumbs a { color: var(--av-muted); text-decoration: none; }
.av-crumbs a:hover { color: var(--av-navy); text-decoration: underline; }
.av-crumbs [aria-current] { color: var(--av-ink); font-weight: 600; }

.av-tabs { border-bottom: 1px solid var(--av-line); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.av-tabs ul { display: flex; gap: 4px; min-width: max-content; }
.av-tabs a, .av-tabs button { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; color: var(--av-muted); text-decoration: none; font-weight: 600; font-size: 14px; border: 0; background: none; cursor: pointer; border-radius: 8px 8px 0 0; white-space: nowrap; }
.av-tabs a:hover, .av-tabs button:hover { color: var(--av-navy); background: rgba(255, 255, 255, .6); }
.av-tabs a.is-active, .av-tabs button[aria-selected="true"] { color: var(--av-navy); }
.av-tabs a.is-active::after, .av-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--av-gold); }
.av-tabs__count { min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: #ebe6db; color: #4c463b; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.is-active > .av-tabs__count, [aria-selected="true"] > .av-tabs__count { background: var(--av-navy); color: #fff; }
.av-tabs__count--red { background: #fbebe9; color: #8a2a22; }
.is-active > .av-tabs__count--red { background: #a8322a; color: #fff; }
.av-tabpanel[hidden] { display: none; }

.av-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.av-table-wrap:focus-visible { outline-offset: -2px; }
.av-table { width: 100%; border-collapse: collapse; }
.av-table th { position: relative; padding: 0 16px; height: 40px; background: var(--av-surface-2); border-bottom: 1px solid var(--av-line); text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .03em; color: var(--av-muted); white-space: nowrap; text-transform: uppercase; }
.av-table td { padding: 8px 16px; height: var(--av-row); border-bottom: 1px solid #efeadf; vertical-align: middle; }
.av-table tbody tr:last-child td { border-bottom: 0; }
.av-table .is-num, .av-table th.is-num { text-align: right; }
.av-table--rows tbody tr[data-href] { cursor: pointer; }
.av-table--rows tbody tr:hover td { background: #fbf9f4; }
.av-table td a.av-link { font-weight: 700; color: var(--av-navy); text-decoration: none; }
.av-table td a.av-link:hover { text-decoration: underline; color: var(--av-gold-dark); }
.av-table .av-cell-sub { display: block; color: var(--av-muted); font-size: 12.5px; line-height: 1.3; }
.av-table .av-cell-title { display: block; font-weight: 600; line-height: 1.3; }
.av-table .is-nowrap { white-space: nowrap; }
.av-table .col-items { min-width: 230px; }
.av-table .is-actions { width: 1%; white-space: nowrap; text-align: right; }
.av-table tr.is-detail > td { background: var(--av-surface-2); height: auto; padding: 14px 16px 16px; }
.av-table-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--av-line); color: var(--av-muted); font-size: 13px; }
.av-bookcell { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.av-bookcell__t { display: block; font-weight: 600; line-height: 1.3; }
.av-bookcell__s { display: block; color: var(--av-muted); font-size: 12.5px; line-height: 1.3; }
.av-cover { width: var(--s, 44px); height: var(--s, 44px); flex: 0 0 auto; border-radius: 5px; object-fit: cover; background: var(--av-cream); border: 1px solid var(--av-line); box-shadow: 0 1px 3px rgba(10, 33, 54, .12); }
.av-cover--blank { display: inline-flex; align-items: center; justify-content: center; background: var(--av-navy); color: var(--av-gold-light); font: 700 calc(var(--s) * .3) var(--av-serif); border-color: var(--av-navy); }
.av-share { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.av-share__bar { flex: 1 1 auto; height: 6px; border-radius: 999px; background: #ece7db; overflow: hidden; }
.av-share__bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--av-gold), var(--av-gold-light)); border-radius: inherit; }

.av-empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 40px 20px; }
.av-empty__icon { width: 44px; height: 44px; border-radius: 50%; background: var(--av-cream); color: var(--av-gold-dark); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.av-empty__title { font-family: var(--av-serif); font-size: 17px; font-weight: 600; }
.av-empty__text { color: var(--av-muted); max-width: 46ch; }
.av-empty__action { margin-top: 10px; }

.av-dl { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 8px 16px; }
.av-dl dt { color: var(--av-muted); font-size: 13px; }
.av-dl dd { font-weight: 500; min-width: 0; overflow-wrap: break-word; }
.av-dl--tight { grid-template-columns: max-content minmax(0, 1fr); gap: 9px 18px; }
.av-sum { display: grid; gap: 9px; }
.av-sum > div { display: flex; justify-content: space-between; gap: 16px; }
.av-sum dt { color: var(--av-muted); }
.av-sum dd { font-variant-numeric: tabular-nums; }
.av-sum .is-total { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--av-line); font-size: 16px; font-weight: 700; }
.av-sum .is-total dt { color: var(--av-ink); }
.av-sum .is-total dd { font-family: var(--av-serif); font-size: 22px; letter-spacing: -.01em; }
.av-sum .is-discount dd { color: #1c5a37; }
.av-address { font-style: normal; line-height: 1.55; }
.av-code { display: block; padding: 10px 12px; border-radius: 8px; background: var(--av-navy-deep); color: #e8dfc8; overflow-x: auto; white-space: pre; font-size: 12.5px; }

/* 8 · Overlays & feedback -------------------------------------------------- */
dialog.av-modal, dialog.av-drawer { border: 0; padding: 0; color: var(--av-ink); background: #fff; box-shadow: var(--av-shadow-lift); }
dialog.av-modal::backdrop, dialog.av-drawer::backdrop { background: rgba(5, 18, 32, .5); }
dialog.av-modal { width: min(560px, calc(100vw - 32px)); border-radius: 14px; max-height: calc(100vh - 48px); overflow: hidden; }
dialog.av-modal[open] { display: flex; }
dialog.av-modal > form, dialog.av-modal > div { display: flex; flex-direction: column; width: 100%; min-height: 0; }
dialog.av-modal--sm { width: min(440px, calc(100vw - 32px)); }
dialog.av-modal--lg { width: min(720px, calc(100vw - 32px)); }
.av-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 8px; }
.av-modal__head h2 { font-family: var(--av-serif); font-size: 21px; font-weight: 600; color: var(--av-navy); }
.av-modal__head p { margin-top: 4px; color: var(--av-muted); }
.av-modal__body { padding: 12px 22px 20px; overflow-y: auto; display: grid; gap: 16px; align-content: start; }
.av-modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--av-line); background: var(--av-surface-2); }
dialog.av-drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(420px, 100vw); border-radius: 0; }
dialog.av-drawer[open] { display: flex; animation: av-slide .18s ease-out; }
dialog.av-drawer > form { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.av-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 14px 22px; border-bottom: 1px solid var(--av-line); }
.av-drawer__head h2 { font-family: var(--av-serif); font-size: 20px; font-weight: 600; color: var(--av-navy); }
.av-drawer__body { flex: 1 1 auto; overflow-y: auto; padding: 20px 22px; display: grid; gap: 16px; align-content: start; }
.av-drawer__foot { display: flex; justify-content: space-between; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--av-line); background: var(--av-surface-2); }
@keyframes av-slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.av-toasts { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.av-toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--av-navy); color: #fff; border-left: 4px solid var(--av-gold); box-shadow: var(--av-shadow-lift); animation: av-slide .18s ease-out; }
.av-toast .av-icon { color: var(--av-gold-light); margin-top: 2px; }
.av-toast small { display: block; opacity: .72; margin-top: 2px; font-size: 12px; }

.av-timeline { position: relative; display: grid; }
.av-timeline__item { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 14px; padding-bottom: 20px; }
.av-timeline__item:last-child { padding-bottom: 0; }
.av-timeline__item::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--av-line); }
.av-timeline__item:last-child::before { display: none; }
.av-timeline__dot { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--t-bg); color: var(--t-solid); border: 1px solid var(--t-bd); }
.av-timeline__dot .av-icon { width: 16px; height: 16px; }
.av-timeline__title { font-weight: 600; line-height: 1.35; padding-top: 5px; }
.av-timeline__detail { color: var(--av-muted); font-size: 13px; }
.av-timeline__meta { display: grid; justify-items: end; padding-top: 4px; color: var(--av-muted); font-size: 12.5px; text-align: right; white-space: nowrap; }

/* 9 · Order detail --------------------------------------------------------- */
.av-order-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.av-order-main, .av-order-side { display: grid; gap: 20px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.av-order-main > *, .av-order-side > *, .av-stack > * { min-width: 0; }
.av-order-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; color: var(--av-muted); }
.av-order-meta strong { color: var(--av-ink); font-weight: 600; }
.av-order-meta .sep { opacity: .5; }
.av-order-meta a { color: var(--av-navy); font-weight: 600; text-decoration: none; }
.av-order-meta a:hover { text-decoration: underline; }

.av-progress-card .av-card__body { padding: 22px 24px 20px; display: grid; gap: 20px; }
.av-stepper { display: grid; grid-template-columns: repeat(6, minmax(92px, 1fr)); overflow-x: auto; padding-bottom: 2px; }
.av-step { position: relative; display: grid; justify-items: center; align-content: start; gap: 8px; text-align: center; padding: 0 4px; min-width: 92px; }
.av-step::before { content: ""; position: absolute; top: 17px; left: -50%; right: 50%; height: 3px; border-radius: 3px; background: var(--av-line-strong); }
.av-step:first-child::before { display: none; }
.av-step--done::before, .av-step--current::before, .av-step--blocked-gold::before, .av-step--blocked-red::before { background: #2d7a4d; }
.av-step__dot { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 2px solid var(--av-line-strong); color: var(--av-muted); font-weight: 700; }
.av-step__dot .av-icon { width: 18px; height: 18px; stroke-width: 2.4; }
.av-step--done .av-step__dot { background: #2d7a4d; border-color: #2d7a4d; color: #fff; }
.av-step--current .av-step__dot { border-color: var(--av-gold); color: var(--av-gold-dark); box-shadow: 0 0 0 5px rgba(201, 154, 74, .2); }
.av-step--blocked-gold .av-step__dot { border-color: #b8842a; background: #fbf1dc; color: #7a5410; box-shadow: 0 0 0 5px rgba(184, 132, 42, .2); }
.av-step--blocked-red .av-step__dot { border-color: #b3372c; background: #fbebe9; color: #8a2a22; box-shadow: 0 0 0 5px rgba(179, 55, 44, .16); }
.av-step__label { font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.av-step--todo .av-step__label { color: var(--av-muted); font-weight: 500; }
.av-step__state { font-size: 12px; color: var(--av-muted); min-height: 16px; }
.av-step--current .av-step__state { color: var(--av-gold-dark); font-weight: 700; }
.av-step--blocked-gold .av-step__state { color: #7a5410; font-weight: 700; }
.av-step--blocked-red .av-step__state { color: #8a2a22; font-weight: 700; }
.av-nextstep { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--av-radius); background: var(--av-cream); border: 1px solid rgba(201, 154, 74, .35); }
.av-nextstep__label { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--av-gold-dark); }
.av-nextstep__title { font-family: var(--av-serif); font-size: 18px; font-weight: 600; color: var(--av-navy); }
.av-nextstep__text { color: var(--av-muted); font-size: 13.5px; }
.av-fact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.av-fact { min-width: 0; }
.av-fact > span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--av-muted); margin-bottom: 3px; }
.av-fact > div { font-weight: 500; overflow-wrap: anywhere; }
.av-ship-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--av-line); }
.av-note { display: grid; gap: 4px; padding: 10px 12px; border-radius: 8px; background: var(--av-surface-2); border: 1px solid var(--av-line); }
.av-note small { color: var(--av-muted); }

/* 10 · Dashboard & lists ---------------------------------------------------- */
.av-date-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--av-line-strong); border-radius: 999px; background: #fff; color: var(--av-muted); font-weight: 500; white-space: nowrap; }
.av-date-chip .av-icon { color: var(--av-gold-dark); }
.av-grid { display: grid; gap: 16px; }
.av-grid--kpi { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.av-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.av-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.av-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.av-section { margin-top: 28px; }
.av-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.av-section__title { font-family: var(--av-serif); font-size: 20px; font-weight: 600; color: var(--av-navy); letter-spacing: -.005em; }
.av-section__sub { color: var(--av-muted); font-size: 13.5px; }
.av-link-more { display: inline-flex; align-items: center; gap: 4px; color: var(--av-gold-dark); font-weight: 600; text-decoration: none; white-space: nowrap; }
.av-link-more:hover { text-decoration: underline; }

.av-kpi { --k: var(--av-line-strong); position: relative; display: grid; gap: 6px; align-content: start; padding: 16px 18px 14px; background: #fff; border: 1px solid var(--av-line); border-radius: var(--av-radius); box-shadow: var(--av-shadow); text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s, border-color .15s; overflow: hidden; }
.av-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--k); }
.av-kpi:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(10, 33, 54, .1); border-color: var(--av-line-strong); }
.av-kpi--neutral { --k: var(--av-navy); }
.av-kpi--gold { --k: #b8842a; }
.av-kpi--green { --k: #2d7a4d; }
.av-kpi--red { --k: #b3372c; background: #fffafa; border-color: #efc9c4; }
.av-kpi__label { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--av-muted); }
.av-kpi__label .av-icon { width: 15px; height: 15px; color: var(--k); }
.av-kpi__value { font-family: var(--av-serif); font-size: 38px; line-height: 1; font-weight: 500; letter-spacing: -.02em; color: var(--av-navy); font-variant-numeric: tabular-nums; }
.av-kpi--red .av-kpi__value { color: #8a2a22; }
.av-kpi__foot { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--av-muted); }
.av-kpi:hover .av-kpi__foot { color: var(--av-navy); }
.av-kpi--money .av-kpi__value { font-size: 32px; }

.av-attention { border-color: rgba(201, 154, 74, .5); }
.av-attention > .av-card__head { background: linear-gradient(180deg, #fffdf8, #fbf6ea); }
.av-attn-list > li { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid #efeadf; }
.av-attn-list > li:last-child { border-bottom: 0; }
.av-attn__icon { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--t-bg); color: var(--t-solid); border: 1px solid var(--t-bd); }
.av-attn__body { flex: 1 1 auto; min-width: 0; }
.av-attn__title { font-weight: 700; }
.av-attn__text { color: var(--av-muted); }
.av-count-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: #fbebe9; color: #8a2a22; font-size: 12px; font-weight: 700; margin-left: 8px; vertical-align: middle; }

.av-work { display: grid; gap: 10px; align-content: start; padding: 18px; background: #fff; border: 1px solid var(--av-line); border-radius: var(--av-radius); box-shadow: var(--av-shadow); }
.av-work__step { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--av-gold-dark); }
.av-work__title { font-family: var(--av-serif); font-size: 19px; font-weight: 600; color: var(--av-navy); }
.av-work__row { display: flex; align-items: baseline; gap: 10px; }
.av-work__count { font-family: var(--av-serif); font-size: 40px; line-height: 1; letter-spacing: -.02em; color: var(--av-navy); font-variant-numeric: tabular-nums; }
.av-work__text { color: var(--av-muted); min-height: 40px; }
.av-work.is-idle .av-work__count { color: #a09985; }

.av-snap { display: grid; gap: 12px; }
.av-snap__row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.av-snap__row dt { color: var(--av-muted); }
.av-snap__row dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.av-health-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #efeadf; }
.av-health-row:last-child { border-bottom: 0; }
.av-health-row span:first-child { font-weight: 500; }

.av-listhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.av-listhead h3 { font-family: var(--av-serif); font-size: 17px; font-weight: 600; }
.av-lowflag { color: #7a5410; font-weight: 700; }
.av-zero { color: #a09985; }

/* 11 · Settings, health, launch, printing ---------------------------------- */
.av-setting { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px; background: #fff; border: 1px solid var(--av-line); border-radius: var(--av-radius); box-shadow: var(--av-shadow); text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.av-setting:hover { border-color: var(--av-gold); box-shadow: 0 6px 18px rgba(10, 33, 54, .1); transform: translateY(-1px); }
.av-setting__icon { width: 44px; height: 44px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--av-cream); color: var(--av-gold-dark); border: 1px solid rgba(201, 154, 74, .35); }
.av-setting__title { font-family: var(--av-serif); font-size: 17px; font-weight: 600; color: var(--av-navy); }
.av-setting__text { color: var(--av-muted); font-size: 13.5px; }
.av-setting .av-icon.chev { color: var(--av-muted); }
.av-setting.is-later { background: transparent; border-style: dashed; box-shadow: none; }
.av-setting.is-later .av-setting__title { color: var(--av-muted); }

.av-health-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.av-health-tile { display: grid; gap: 8px; padding: 16px 18px; background: #fff; border: 1px solid var(--av-line); border-top: 4px solid var(--t-solid, #8a8479); border-radius: var(--av-radius); box-shadow: var(--av-shadow); text-decoration: none; color: inherit; }
.av-health-tile:hover { border-color: var(--av-line-strong); border-top-color: var(--t-solid, #8a8479); }
.av-health-tile__label { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--av-muted); }
.av-health-tile__detail { color: var(--av-muted); font-size: 13px; }
.av-accordion { background: #fff; border: 1px solid var(--av-line); border-radius: var(--av-radius); box-shadow: var(--av-shadow); overflow: hidden; }
.av-accordion + .av-accordion { margin-top: 12px; }
.av-accordion > summary { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 20px; cursor: pointer; list-style: none; font-weight: 600; }
.av-accordion > summary::-webkit-details-marker { display: none; }
.av-accordion > summary .av-icon.chev { margin-left: auto; color: var(--av-muted); transition: transform .15s; }
.av-accordion[open] > summary .av-icon.chev { transform: rotate(180deg); }
.av-accordion[open] > summary { border-bottom: 1px solid var(--av-line); }
.av-accordion__title { font-family: var(--av-serif); font-size: 17px; }
.av-accordion__note { padding: 10px 20px; color: var(--av-muted); font-size: 13px; border-bottom: 1px solid var(--av-line); background: var(--av-surface-2); }

.av-progress { height: 10px; border-radius: 999px; background: #ece7db; overflow: hidden; }
.av-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2d7a4d, #58a273); }
.av-launch-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 32px; }
.av-launch-head__num { font-family: var(--av-serif); font-size: 44px; line-height: 1; color: var(--av-navy); letter-spacing: -.02em; }
.av-launch-head__num small { font-size: 18px; color: var(--av-muted); margin-left: 4px; }
.av-launch-tallies { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.av-check-group + .av-check-group { margin-top: 22px; }
.av-check-group__title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--av-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.av-check { background: #fff; border: 1px solid var(--av-line); border-radius: var(--av-radius); }
.av-check + .av-check { margin-top: 8px; }
.av-check > summary, .av-check > .av-check__row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; list-style: none; cursor: default; }
.av-check[data-expandable] > summary { cursor: pointer; }
.av-check__mark--green { background: #e8f3ec; color: #2d7a4d; border-color: #b9d8c4; }
.av-check__mark--gold { background: #fbf1dc; color: #b8842a; border-color: #e6d09b; }
.av-check__mark--red { background: #fbebe9; color: #b3372c; border-color: #e8b7b1; }
.av-check > summary::-webkit-details-marker { display: none; }
.av-check__mark { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--t-bg); color: var(--t-solid); border: 1px solid var(--t-bd); }
.av-check__mark .av-icon { width: 14px; height: 14px; stroke-width: 2.4; }
.av-check__label { font-weight: 600; }
.av-check__detail { color: var(--av-muted); font-size: 13px; }
.av-check > summary .av-icon.chev { color: var(--av-muted); transition: transform .15s; }
.av-check[open] > summary .av-icon.chev { transform: rotate(180deg); }
.av-check__more { padding: 4px 16px 16px 54px; }
.av-check__more p { font-weight: 600; margin-bottom: 6px; }
.av-check__more ol { list-style: decimal; padding-left: 18px; display: grid; gap: 4px; color: var(--av-ink); }

.av-printer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 18px 20px; }
.av-printer__icon { width: 52px; height: 52px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--av-cream); color: var(--av-gold-dark); border: 1px solid rgba(201, 154, 74, .35); }
.av-printer__icon .av-icon { width: 26px; height: 26px; }
.av-printer__name { font-family: var(--av-serif); font-size: 19px; font-weight: 600; color: var(--av-navy); }
.av-printer__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--av-muted); font-size: 13.5px; margin-top: 2px; align-items: center; }
.av-tech { border-top: 1px solid var(--av-line); }
.av-tech > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; cursor: pointer; color: var(--av-muted); font-weight: 600; list-style: none; }
.av-tech > summary::-webkit-details-marker { display: none; }
.av-tech > summary .chev { margin-left: auto; transition: transform .15s; }
.av-tech[open] > summary .chev { transform: rotate(180deg); }
.av-tech__body { padding: 4px 20px 20px; display: grid; gap: 14px; }

.av-profile-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.av-avatar--xl { width: 60px; height: 60px; font-size: 22px; font-family: var(--av-serif); }
.av-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border: 1px solid var(--av-line); border-radius: var(--av-radius); box-shadow: var(--av-shadow); margin-bottom: 20px; }
.av-stats > div { padding: 16px 20px; border-left: 1px solid var(--av-line); }
.av-stats > div:first-child { border-left: 0; }
.av-stats span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--av-muted); }
.av-stats strong { display: block; margin-top: 4px; font-family: var(--av-serif); font-size: 28px; font-weight: 500; letter-spacing: -.01em; color: var(--av-navy); font-variant-numeric: tabular-nums; }

/* 12 · Responsive ---------------------------------------------------------- */
@media (max-width: 1280px) {
  .av-grid--kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .av-health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1140px) {
  .av-order-grid { grid-template-columns: minmax(0, 1fr); }
  .av-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .av-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .av-shell { grid-template-columns: minmax(0, 1fr); }
  .av-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(280px, 86vw); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--av-shadow-lift); }
  body.av-nav-open .av-sidebar { transform: none; }
  .av-sidebar__close { display: inline-flex; }
  .av-backdrop { position: fixed; inset: 0; z-index: 35; border: 0; background: rgba(5, 18, 32, .5); }
  body.av-nav-open .av-backdrop { display: block; }
  body.av-nav-open { overflow: hidden; }
  .av-topbar .av-topbar__nav { display: inline-flex; }
  .av-topbar__context { display: none; }
  .av-gsearch { margin-left: 0; }
}
@media (max-width: 820px) {
  .av-chip--preview { display: none; }
  .av-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .av-stats > div:nth-child(3) { border-left: 0; }
  .av-stats > div:nth-child(n+3) { border-top: 1px solid var(--av-line); }
  .av-launch-head { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .av-grid--kpi, .av-grid--4, .av-grid--3, .av-grid--2, .av-health-grid { grid-template-columns: minmax(0, 1fr); }
  .av-grid--kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .av-form-grid { grid-template-columns: 1fr; }
  .av-fact-grid { grid-template-columns: 1fr; }
  .av-attn-list > li { flex-wrap: wrap; }
  .av-attn-list > li > .av-btn { margin-left: 52px; }
  .av-printer { grid-template-columns: auto minmax(0, 1fr); }
  .av-printer > :last-child { grid-column: 1 / -1; }
  .av-timeline__item { grid-template-columns: 32px minmax(0, 1fr); }
  .av-timeline__meta { grid-column: 2; justify-items: start; text-align: left; padding-top: 0; grid-auto-flow: column; gap: 8px; }
  .av-check > summary { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .av-check__detail { display: none; }
  .av-check__more { padding-left: 16px; }
  .av-callout { flex-wrap: wrap; }
  .av-setting { grid-template-columns: 44px minmax(0, 1fr); }
  .av-setting .av-icon.chev { display: none; }
}
@media (max-width: 640px) {
  /* Progress becomes a vertical list so the current step is never scrolled out of view */
  .av-stepper { grid-template-columns: 1fr; overflow: visible; }
  .av-step { grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: auto auto; justify-items: start; text-align: left; column-gap: 14px; row-gap: 0; padding: 0 0 20px; min-width: 0; }
  .av-step:last-child { padding-bottom: 0; }
  .av-step::before { display: none !important; }
  .av-step:not(:last-child)::after { content: ""; position: absolute; left: 16.5px; top: 38px; bottom: 2px; width: 3px; border-radius: 3px; background: var(--av-line-strong); }
  .av-step--done:not(:last-child)::after { background: #2d7a4d; }
  .av-step__dot { grid-row: 1 / span 2; }
  .av-step__label { align-self: end; padding-top: 2px; }
  .av-step__state { align-self: start; min-height: 0; }
}
@media (max-width: 480px) {
  .av-grid--kpi { grid-template-columns: minmax(0, 1fr); }
  .av-gsearch__kbd { display: none; }
  .av-topbar { gap: 8px; }
  .av-topbar__end { gap: 4px; }
}

/* 13 · Live-admin additions ------------------------------------------------- */
.av-nav__group { margin: 16px 12px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(224, 189, 114, .78); }
.av-nav > .av-nav__group:first-child { margin-top: 2px; }
.av-nav ul + .av-nav__group { margin-top: 18px; }
.av-notices { display: grid; gap: 10px; margin-bottom: 20px; }
.av-notice-list { list-style: disc; padding-left: 18px; }
.av-topbar__link { display: inline-flex; align-items: center; gap: 6px; height: var(--av-control); padding: 0 12px; border-radius: 8px; color: var(--av-muted); font-weight: 600; text-decoration: none; white-space: nowrap; }
.av-topbar__link:hover { color: var(--av-navy); background: rgba(127, 127, 127, .1); }
.av-menu__who { display: grid; padding: 8px 10px 10px; border-bottom: 1px solid var(--av-line); margin-bottom: 4px; min-width: 200px; }
.av-menu__who span { color: var(--av-muted); font-size: 12.5px; overflow-wrap: anywhere; }
.av-profile--sidebar .av-menu__who { color: var(--av-ink); }
.av-profile__role { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.av-inline-form { display: inline; margin: 0; }
.av-danger-zone { border-color: #e2b0aa; }
.av-danger-zone > .av-card__head { background: #fdf3f1; border-bottom-color: #efc9c4; }
.av-danger-zone .av-card__title { color: #8a2a22; }
.av-danger-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.av-danger-row + .av-danger-row { border-top: 1px solid #f1dcd9; }
.av-danger-row p { min-width: 0; }
.av-table tr.is-failed > td { background: #fff8f7; }
.av-table tr.is-failed > td:first-child { box-shadow: inset 3px 0 0 #b3372c; }
.av-table tr.is-attention > td:first-child { box-shadow: inset 3px 0 0 #b8842a; }
.av-attn-inline { display: inline-flex; align-items: flex-start; gap: 6px; color: var(--t-fg); font-size: 12.5px; line-height: 1.35; max-width: 240px; }
.av-attn-inline .av-icon { width: 14px; height: 14px; margin-top: 1px; color: var(--t-solid); }
.av-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.av-queue-list > li > a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; text-decoration: none; border-bottom: 1px solid #efeadf; min-height: 48px; }
.av-queue-list > li:last-child > a { border-bottom: 0; }
.av-queue-list > li > a:hover { background: #fbf9f4; }
.av-queue-list__label { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.av-queue-list__label .av-icon { color: var(--av-gold-dark); }
.av-queue-list__n { font-family: var(--av-serif); font-size: 22px; font-variant-numeric: tabular-nums; color: var(--av-navy); }
.av-queue-list__n.is-zero { color: #a09985; }
.av-split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.av-tabpanel-note { color: var(--av-muted); font-size: 13px; }
.av-table td .av-btn-row { justify-content: flex-end; flex-wrap: nowrap; }
@media (max-width: 1140px) { .av-split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .av-topbar__link { display: none; } }

/* dense tables (Orders): tighter cells, truncated sub-lines, sticky first column while scrolling sideways */
.av-clip { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-clip.is-tight { max-width: 110px; }
.av-table--dense th, .av-table--dense td { padding-inline: 12px; }
.av-table--dense td:first-child, .av-table--dense th:first-child { position: sticky; left: 0; z-index: 1; background: #fff; }
.av-table--dense th:first-child { background: var(--av-surface-2); }
.av-table--dense tbody tr:hover td:first-child { background: #fbf9f4; }
.av-table--dense tr.is-failed > td:first-child { background: #fff8f7; }
.av-table--dense .av-attn-inline { white-space: nowrap; max-width: none; }
.av-clip.is-order { max-width: 170px; }
.av-table--dense .av-clip { max-width: 160px; }
.av-table th.th-wrap { white-space: normal; min-width: 84px; line-height: 1.2; }
.av-main { padding-inline: clamp(16px, 2vw, 28px); }
.av-table--dense .av-clip { max-width: 140px; }
.av-table--dense .av-clip.is-tight { max-width: 104px; }
.av-table--dense .av-clip.is-order { max-width: 170px; }
.av-table--dense th, .av-table--dense td { padding-inline: 10px; }

/* 14 · Final polish: compact empty states, login, staff, launch blockers ------------------------------ */
.av-empty { gap: 3px; padding: 22px 16px; }
.av-empty__icon { width: 34px; height: 34px; margin-bottom: 4px; }
.av-empty__icon .av-icon { width: 17px; height: 17px; }
.av-empty__title { font-family: var(--av-sans); font-size: 14.5px; font-weight: 700; color: var(--av-ink); }
.av-empty__text { font-size: 13.5px; }
.av-empty__action { margin-top: 8px; }
.av-btn--success-outline { background: #fff; border-color: #a9cdb7; color: #1c5a37; }
.av-btn--success-outline:hover { background: #eef7f1; }
.av-badge-note { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--av-surface-2); border: 1px dashed var(--av-line-strong); color: var(--av-muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.av-current-user { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; background: var(--av-surface-2); border: 1px solid var(--av-line); color: var(--av-muted); font-weight: 600; font-size: 13px; }
.av-btn.is-unavailable { opacity: .55; cursor: not-allowed; }
.av-field-error { display: flex; align-items: flex-start; gap: 6px; color: #8a2a22; font-size: 13px; font-weight: 600; }
.av-field-error .av-icon { width: 15px; height: 15px; margin-top: 1px; }
.av-input[aria-invalid="true"] { border-color: #b3372c; background: #fffafa; }
.av-notices [role="alert"]:focus { outline: none; }

.av-blockers { border-color: #e2b0aa; margin-bottom: 24px; }
.av-blockers > .av-card__head { background: #fdf3f1; border-bottom-color: #efc9c4; }
.av-blockers .av-card__title { color: #8a2a22; }
.av-blocker { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 14px 20px; border-bottom: 1px solid #f1dcd9; }
.av-blocker:last-child { border-bottom: 0; }
.av-blocker .av-check__mark { margin-top: 1px; }
.av-blocker p { min-width: 0; }
.av-blocker ul { list-style: disc; padding-left: 18px; margin-top: 6px; color: var(--av-ink); }
.av-tally-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.av-tally { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--av-radius); background: var(--t-bg); border: 1px solid var(--t-bd); color: var(--t-fg); }
.av-tally strong { font-family: var(--av-serif); font-size: 30px; line-height: 1; font-weight: 500; }
.av-tally span { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.av-readonly { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 720px) { .av-tally-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Admin sign-in */
.av-login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(circle at 18% 12%, rgba(201, 154, 74, .16), transparent 34%), linear-gradient(180deg, #0a2136, #051220); }
.av-login__card { width: min(420px, 100%); background: #fff; border-radius: 16px; padding: 30px 30px 26px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); border-top: 4px solid var(--av-gold); }
.av-login__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.av-login__brand img { width: 40px; height: 40px; }
.av-login__brand strong { display: block; font-family: var(--av-serif); font-size: 17px; color: var(--av-navy); line-height: 1.2; }
.av-login__brand span { font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--av-gold-dark); }
.av-login h1 { font-family: var(--av-serif); font-size: 26px; font-weight: 600; color: var(--av-navy); letter-spacing: -.01em; }
.av-login__sub { color: var(--av-muted); margin: 4px 0 20px; }
.av-login form { display: grid; gap: 16px; }
.av-login .av-input { height: 42px; }
.av-login .av-btn { height: 44px; width: 100%; font-size: 14.5px; }
.av-password { position: relative; }
.av-password .av-input { padding-right: 68px; }
.av-password__toggle { position: absolute; right: 6px; top: 5px; height: 32px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--av-gold-dark); font-weight: 700; font-size: 12.5px; cursor: pointer; }
.av-password__toggle:hover { background: var(--av-surface-2); }
.av-login__foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--av-line); color: var(--av-muted); font-size: 12.5px; }

.av-stats .av-status, .av-fact .av-status { text-transform: none; letter-spacing: 0; font-size: 12px; display: inline-flex; margin: 0; }
.av-stats--flat { margin: 0; border: 0; box-shadow: none; border-radius: 0; }
.av-stats--5 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); overflow: hidden; }
.av-stats--5 > div { border: 0; border-right: 1px solid var(--av-line); border-bottom: 1px solid var(--av-line); margin: 0 -1px -1px 0; }

/* 15 · Print status / local print */
.av-fact .av-cell-sub { display: block; margin-top: 2px; color: var(--av-muted); font-size: 12.5px; font-weight: 400; }
.av-fact .av-status + .av-muted { margin-left: 6px; }
.av-radio-row { align-items: flex-start; padding: 10px 12px; border: 1px solid var(--av-line); border-radius: 8px; }
.av-radio-row > span { display: grid; gap: 2px; }
.av-radio-row .av-cell-sub { display: block; color: var(--av-muted); font-size: 12.5px; font-weight: 400; }
.av-radio-row:has(input:checked) { border-color: var(--av-gold-dark); background: #fffdf8; }
.av-radio-row input { margin-top: 3px; }

.av-radio-row { justify-content: space-between; gap: 12px; align-items: center; }
.av-radio-row > span:first-child { flex: 1 1 auto; }
