/* ============================================================
   SLAR 3D admin — "Operate" surface on the Studio tokens.
   Restrained: brand olive marks primary actions, selection and state only.
   ============================================================ */
.page-admin { background: var(--paper); font-size: 15px; line-height: 1.5; }
.page-admin .topbar, .page-admin .nav, .page-admin .drawer, .page-admin .footer,
.page-admin .chat-fab, .page-admin .chat, .page-admin .cart { display: none !important; }

.adm { --side-w: 248px; background: linear-gradient(to right, #eceee5 var(--side-w), transparent 0); display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }

/* ---------- Sidebar ---------- */
.adm-side {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 1.25rem;
  padding: 1.1rem 0.75rem; background: #eceee5; box-shadow: inset -1px 0 0 var(--line);
}
.adm-side__brand { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0.6rem; text-decoration: none; }
.adm-side__brand .logo { width: 96px; }
.adm-side__brand span { font-size: 12px; font-weight: 700; color: var(--graphite); padding: 2px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--stone); }
.adm-nav { display: grid; gap: 2px; }
.adm-nav a, .adm-nav__plain {
  display: flex; align-items: center; gap: 0.7rem; min-height: 40px; padding: 0 0.7rem; border-radius: var(--r-sm);
  text-decoration: none; color: var(--graphite); font-weight: 600; font-size: 14px;
  transition: background-color var(--dur-1), color var(--dur-1);
}
.adm-nav svg, .adm-nav__plain svg { width: 18px; height: 18px; flex: none; }
@media (hover: hover) { .adm-nav a:hover, .adm-nav__plain:hover { background: rgba(17,19,9,0.05); color: var(--ink); } }
.adm-nav a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.adm-nav a[aria-current="page"] svg { color: var(--brand); }
.adm-nav__count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.adm-ext { width: 14px !important; height: 14px !important; margin-left: auto; opacity: 0.6; }
.adm-side__foot { margin-top: auto; display: grid; gap: 0.5rem; }
.adm-me { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-1); }
.adm-me__avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; font-size: 13px; }
.adm-me__avatar img { width: 100%; height: 100%; object-fit: cover; }
.adm-me__who { display: grid; min-width: 0; line-height: 1.25; }
.adm-me__who strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-me__who small { font-size: 12px; color: var(--graphite); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-me .adm-icon { margin-left: auto; }
.adm-scrim { display: none; }

/* ---------- Top bar ---------- */
.adm-main { min-width: 0; display: flex; flex-direction: column; }
.adm-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 0.75rem; min-height: 64px; padding: 0 clamp(1rem, 3vw, 2rem);
  background: rgba(245,245,240,0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line);
}
.adm-top__title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.adm-icon.adm-top__menu { display: none; }
.adm-search { position: relative; margin-left: auto; width: min(360px, 40vw); }
.adm-search > svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--graphite); pointer-events: none; }
.adm-search input {
  width: 100%; min-height: 40px; padding: 0 2.4rem 0 2.3rem; border: 0; border-radius: var(--r-sm);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--stone); font-size: 14px;
  transition: box-shadow var(--dur-1);
}
.adm-search input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--focus); }
.adm-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 600 12px/1 var(--font); color: var(--graphite); padding: 3px 6px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--stone); }
.adm-search input:focus ~ kbd, .adm-search input:not(:placeholder-shown) ~ kbd { display: none; }

.adm-view > * { min-width: 0; }
.adm-view { grid-template-columns: minmax(0, 1fr); padding: clamp(1rem, 3vw, 2rem); display: grid; gap: 1.25rem; align-content: start; outline: none; max-width: 1280px; width: 100%; }

/* ---------- Primitives (shadcn-style) ---------- */
.adm-icon {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 0; border-radius: var(--r-sm);
  background: none; cursor: pointer; color: var(--graphite); transition: background-color var(--dur-1), color var(--dur-1), transform 160ms var(--ease-out);
}
.adm-icon svg { width: 18px; height: 18px; }
@media (hover: hover) { .adm-icon:hover { background: rgba(17,19,9,0.06); color: var(--ink); } }
.adm-icon:active { transform: scale(0.96); }
.adm-icon.is-spinning svg { animation: spin 0.8s linear infinite; }

.abtn {
  --ab-bg: var(--ink); --ab-fg: #fff; --ab-ring: transparent;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 38px; padding: 0 0.95rem; border: 0; border-radius: var(--r-sm); cursor: pointer; white-space: nowrap;
  background: var(--ab-bg); color: var(--ab-fg); box-shadow: inset 0 0 0 1px var(--ab-ring);
  font-weight: 600; font-size: 14px; text-decoration: none;
  transition: background-color var(--dur-1), box-shadow var(--dur-1), opacity var(--dur-1), transform 160ms var(--ease-out);
}
.abtn svg { width: 16px; height: 16px; flex: none; }
.abtn:active { transform: scale(0.97); }
@media (hover: hover) { .abtn:hover { --ab-bg: #2a2d22; } }
.abtn--brand { --ab-bg: var(--brand); }
@media (hover: hover) { .abtn--brand:hover { --ab-bg: var(--brand-hover); } }
.abtn--ghost { --ab-bg: var(--surface); --ab-fg: var(--ink); --ab-ring: var(--stone); }
@media (hover: hover) { .abtn--ghost:hover { --ab-bg: var(--mist); } }
.abtn--danger { --ab-bg: var(--danger); }
@media (hover: hover) { .abtn--danger:hover { --ab-bg: #9a1d13; } }
.abtn--danger-ghost { --ab-bg: transparent; --ab-fg: var(--danger); --ab-ring: #f3c6c1; }
@media (hover: hover) { .abtn--danger-ghost:hover { --ab-bg: var(--danger-tint); } }
.abtn--sm { min-height: 32px; padding: 0 0.7rem; font-size: 13px; }
.abtn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.abtn.is-busy { color: transparent; cursor: progress; }
.abtn.is-busy > * { visibility: hidden; }
.abtn.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ab-fg); border-right-color: transparent; animation: spin 0.7s linear infinite; }

.ainput, .aselect, .atextarea {
  width: 100%; min-height: 38px; padding: 0 0.75rem; border: 0; border-radius: var(--r-sm); font-size: 14px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--stone); transition: box-shadow var(--dur-1);
}
.atextarea { padding: 0.6rem 0.75rem; min-height: 72px; resize: vertical; }
.ainput:focus, .aselect:focus, .atextarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--focus); }
.ainput.is-error { box-shadow: inset 0 0 0 2px var(--danger); }
.alabel { display: block; font-size: 13px; font-weight: 600; margin-bottom: 0.35rem; }
.ahelp { margin: 0.35rem 0 0; font-size: 12.5px; color: var(--graphite); }
.ahelp.is-error { color: var(--danger); }

.acard { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.acard__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.1rem; box-shadow: 0 1px 0 var(--line); }
.acard__head h2, .acard__head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.acard__head a { font-size: 13px; font-weight: 600; color: var(--brand); text-decoration: none; }
.acard__head a:hover { text-decoration: underline; }
.acard__body { padding: 1.1rem; }

.astatus { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--mist); color: var(--graphite); }
.astatus::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.astatus--paid { background: var(--warn-tint); color: var(--warn); }
.astatus--packed { background: #e8eefb; color: #2a4f9e; }
.astatus--shipped { background: var(--brand-tint); color: #47600a; }
.astatus--delivered { background: #e3efe0; color: #2f6a26; }
.astatus--cancelled, .astatus--failed, .astatus--declined { background: var(--danger-tint); color: var(--danger); }
.astatus--created { background: var(--mist); color: var(--graphite); }
.astatus--new { background: var(--warn-tint); color: var(--warn); }
.astatus--quoted, .astatus--in_progress { background: #e8eefb; color: #2a4f9e; }
.astatus--done { background: #e3efe0; color: #2f6a26; }

/* Segmented tabs */
.aseg { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-sm); background: #e4e6dc; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.aseg::-webkit-scrollbar { display: none; }
.aseg button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 0.75rem; border: 0; border-radius: 7px;
  background: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--graphite); white-space: nowrap;
  transition: background-color var(--dur-1), color var(--dur-1);
}
.aseg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(17,19,9,0.12); }
.aseg b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--graphite); }

.atoolbar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.kpi { padding: 1rem 1.1rem; display: grid; gap: 0.3rem; text-decoration: none; color: inherit; transition: box-shadow var(--dur-1); }
a.kpi:hover { box-shadow: var(--shadow-2), 0 0 0 1px var(--stone); }
.kpi__label { display: flex; align-items: center; gap: 0.45rem; font-size: 13px; font-weight: 600; color: var(--graphite); }
.kpi__label svg { width: 16px; height: 16px; }
.kpi__value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi__meta { font-size: 12.5px; color: var(--graphite); }
.kpi__meta .up { color: #2f6a26; font-weight: 600; }
.kpi__meta .down { color: var(--danger); font-weight: 600; }
.kpi--attn .kpi__value { color: var(--warn); }

.agrid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem; align-items: start; }

/* Revenue chart */
.chart { position: relative; padding: 1rem 1.1rem 0.75rem; }
.chart { min-height: 180px; }
.chart svg { display: block; overflow: visible; }
.chart .bar { fill: var(--brand); }
.chart .bar.is-empty { fill: var(--stone); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart .bar.is-hot { fill: var(--brand-hover); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--graphite); font-size: 11.5px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart__tip {
  position: absolute; pointer-events: none; transform: translate(-50%, -100%); padding: 6px 9px; border-radius: 8px;
  background: var(--ink); color: #fff; font-size: 12.5px; white-space: nowrap; box-shadow: 0 8px 20px -8px rgba(0,0,0,0.5);
  opacity: 0; transition: opacity var(--dur-1);
}
.chart__tip.is-on { opacity: 1; }
.chart__tip b { font-variant-numeric: tabular-nums; }
.chart__sum { display: flex; gap: 1.5rem; flex-wrap: wrap; padding: 0 1.1rem 1rem; font-size: 13px; color: var(--graphite); }
.chart__sum b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Attention list */
.alist { list-style: none; margin: 0; padding: 0; }
.alist li + li { box-shadow: 0 -1px 0 var(--line); }
.alist__row { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.1rem; }
.alist__row > div { min-width: 0; flex: 1; display: grid; }
.alist__row strong { font-size: 14px; }
.alist__row small { font-size: 12.5px; color: var(--graphite); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aempty { padding: 2rem 1.1rem; display: grid; justify-items: center; text-align: center; gap: 0.5rem; color: var(--graphite); }
.aempty svg { width: 28px; height: 28px; color: var(--stone); }
.aempty strong { color: var(--ink); font-size: 15px; }
.aempty p { margin: 0; max-width: 42ch; font-size: 14px; }

/* ---------- Table ---------- */
.atable-wrap { overflow-x: auto; }
.atable { width: 100%; border-collapse: collapse; font-size: 14px; }
.atable th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--graphite); padding: 0.65rem 1rem; white-space: nowrap; box-shadow: inset 0 -1px 0 var(--line); background: #fafaf7; }
.atable td { padding: 0.75rem 1rem; box-shadow: inset 0 -1px 0 var(--line); vertical-align: middle; }
.atable tbody tr:last-child td { box-shadow: none; }
.atable tbody tr[data-id] { cursor: pointer; transition: background-color var(--dur-1); }
@media (hover: hover) { .atable tbody tr[data-id]:hover { background: #f8f9f3; } }
.atable tbody tr.is-open { background: var(--brand-tint); }
.atable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.atable a { color: inherit; text-decoration: none; }
.atable a:hover { text-decoration: underline; }
.addr-box a { color: inherit; }
.atable .mono { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.atable .sub { display: block; font-size: 12.5px; color: var(--graphite); }
.atable .clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atable .chev { width: 32px; color: var(--graphite); }
.atable .chev svg { width: 16px; height: 16px; display: block; }
.afoot { padding: 0.7rem 1rem; font-size: 12.5px; color: var(--graphite); box-shadow: 0 -1px 0 var(--line); }

/* ---------- Skeletons ---------- */
.adm-skel i, .skel { display: block; border-radius: var(--r-md); background: linear-gradient(90deg, #e9ebe2 0%, #f2f3ec 50%, #e9ebe2 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.adm-skel--kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.adm-skel--kpis i { height: 104px; }
.adm-skel--rows { display: grid; gap: 1px; }
.adm-skel--rows i { height: 54px; border-radius: 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Requests ---------- */
.reqs { display: grid; gap: 1rem; }
.req__top { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.req__top > div { flex: 1; min-width: 220px; display: grid; gap: 0.15rem; }
.req__top strong { font-size: 15px; }
.req__meta { font-size: 13px; color: var(--graphite); }
.req__desc { margin: 0.9rem 0 0; white-space: pre-wrap; max-width: 75ch; }
.req__files { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.9rem; }
.req__files a { display: block; border-radius: var(--r-sm); overflow: hidden; outline: 1px solid rgba(17,19,9,0.08); outline-offset: -1px; }
.req__files img { width: 132px; height: 100px; object-fit: cover; display: block; }
.req__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
.req__actions .aselect { width: auto; min-width: 150px; }

/* ---------- Settings ---------- */
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.8rem 1.1rem; }
.checks li + li { box-shadow: 0 -1px 0 var(--line); }
.checks svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.checks .ok svg { color: #2f6a26; } .checks .no svg { color: var(--warn); }
.checks div { display: grid; gap: 0.1rem; } .checks small { color: var(--graphite); font-size: 13px; }

/* ---------- Sheet (order detail) ---------- */
.sheet { position: fixed; inset: 0; z-index: 90; visibility: hidden; transition: visibility 0s var(--dur-3); }
.sheet.is-open { visibility: visible; transition: none; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(17,19,9,0.32); opacity: 0; transition: opacity var(--dur-3) var(--ease-out); }
.sheet.is-open .sheet__scrim { opacity: 1; }
.sheet__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); display: flex; flex-direction: column; outline: none;
  background: var(--paper); box-shadow: -24px 0 60px -30px rgba(17,19,9,0.5);
  transform: translateX(100%); transition: transform 0.36s var(--ease-drawer);
}
.sheet.is-open .sheet__panel { transform: none; }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem 0.9rem 1.25rem; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.sheet__title { margin: 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.sheet__sub { margin: 0.25rem 0 0; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--graphite); }
.sheet__body { flex: 1; overflow: auto; padding: 1.1rem 1.25rem 2rem; display: grid; gap: 1rem; align-content: start; overscroll-behavior: contain; }
.sec { display: grid; gap: 0.7rem; }
.sec + .sec { padding-top: 1rem; box-shadow: 0 -1px 0 var(--line); }
.sec__title { margin: 0; font-size: 13px; font-weight: 700; color: var(--graphite); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.sec__title .abtn { font-weight: 600; }
.fulfil { padding: 1rem; border-radius: var(--r-md); background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); display: grid; gap: 0.75rem; }
.fulfil h3 { margin: 0; font-size: 15px; }
.fulfil p { margin: 0; font-size: 13.5px; color: var(--graphite); }
.fulfil__row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.fulfil__row .ainput { flex: 1; min-width: 180px; text-transform: uppercase; font-variant-numeric: tabular-nums; letter-spacing: 0.03em; }
.fulfil__row .ainput::placeholder { text-transform: none; letter-spacing: 0; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0.45rem 1rem; margin: 0; font-size: 14px; }
.kv dt { color: var(--graphite); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv a { color: var(--brand); font-weight: 600; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.lines li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; font-size: 14px; }
.lines img { width: 48px; height: 48px; object-fit: contain; background: var(--surface); border-radius: 8px; padding: 3px; outline: 1px solid rgba(17,19,9,0.08); outline-offset: -1px; }
.lines small { display: block; color: var(--graphite); font-size: 12.5px; }
.lines b { font-variant-numeric: tabular-nums; }
.totals { display: grid; gap: 0.3rem; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; color: var(--graphite); }
.totals .t { color: var(--ink); font-weight: 700; padding-top: 0.4rem; box-shadow: 0 -1px 0 var(--line); }
.totals span:last-child { font-variant-numeric: tabular-nums; }
.addr-box { padding: 0.85rem 1rem; border-radius: var(--r-sm); background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: 14px; line-height: 1.55; }
.tl { list-style: none; margin: 0; padding: 0; display: grid; }
.tl li { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 0.75rem; padding-bottom: 0.9rem; font-size: 14px; }
.tl li::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--stone); }
.tl li:last-child::before { display: none; }
.tl i { width: 18px; height: 18px; border-radius: 50%; margin-top: 1px; background: var(--surface); box-shadow: inset 0 0 0 2px var(--stone); }
.tl .is-paid i, .tl .is-packed i, .tl .is-shipped i, .tl .is-delivered i { background: var(--brand); box-shadow: none; }
.tl .is-cancelled i, .tl .is-signature_failed i, .tl .is-failed i { background: var(--danger); box-shadow: none; }
.tl .is-note i { background: var(--warn-tint); box-shadow: inset 0 0 0 2px #e8c27a; }
.tl small { display: block; color: var(--graphite); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tl .note { margin-top: 0.2rem; padding: 0.5rem 0.7rem; border-radius: 8px; background: var(--warn-tint); font-size: 13.5px; white-space: pre-wrap; }
.note-form { display: grid; gap: 0.5rem; }
.note-form .abtn { justify-self: end; }

/* Confirm dialog */
.adm-confirm { width: min(420px, calc(100vw - 2rem)); padding: 1.4rem; border: 0; border-radius: var(--r-md); background: var(--surface); color: var(--ink); box-shadow: 0 30px 70px -20px rgba(17,19,9,0.5); }
.adm-confirm[open] { animation: authIn var(--dur-2) var(--ease-out); }
.adm-confirm::backdrop { background: rgba(17,19,9,0.4); }
.adm-confirm h2 { margin: 0 0 0.5rem; font-size: 17px; }
.adm-confirm p { margin: 0 0 1.25rem; color: var(--graphite); font-size: 14px; }
.adm-confirm__row { display: flex; justify-content: flex-end; gap: 0.5rem; }

/* Packing slip — print only */
.slip { display: none; }
@media print {
  @page { size: A5; margin: 12mm; }
  body.is-printing > *:not(.slip) { display: none !important; }
  body.is-printing .slip { display: block !important; color: #000; font: 11pt/1.45 var(--font); }
  .slip h1 { font-size: 16pt; margin: 0 0 2mm; }
  .slip .to { margin: 6mm 0; padding: 4mm; border: 1.5pt solid #000; font-size: 13pt; line-height: 1.4; }
  .slip table { width: 100%; border-collapse: collapse; margin-top: 4mm; }
  .slip th, .slip td { text-align: left; padding: 2mm 0; border-bottom: 0.5pt solid #999; }
  .slip .logo { width: 40mm; }
  .slip .from { margin-top: 8mm; font-size: 9pt; color: #333; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .kpis, .adm-skel--kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .agrid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .adm { grid-template-columns: 1fr; background: none; }
  .adm-side { position: fixed; z-index: 80; left: 0; top: 0; width: min(280px, 86vw); transform: translateX(-100%); transition: transform 0.32s var(--ease-drawer); box-shadow: none; }
  .adm-side.is-open { transform: none; box-shadow: 20px 0 50px -20px rgba(17,19,9,0.45); }
  .adm-scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 79; background: rgba(17,19,9,0.32); }
  .adm-icon.adm-top__menu { display: grid; margin-left: -6px; }
  .adm-top { flex-wrap: wrap; padding-block: 0.6rem; gap: 0.5rem; }
  .adm-search { order: 5; width: 100%; margin-left: 0; }
  .adm-top__title { margin-right: auto; }
  .adm-search input { min-height: 44px; font-size: 16px; }
  .abtn, .ainput, .aselect { min-height: 44px; }
  .abtn--sm { min-height: 36px; }
  .adm-icon { width: 44px; height: 44px; }
  /* table -> stacked rows */
  .atable--orders thead { display: none; }
  .atable--orders tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 0.75rem; padding: 0.85rem 1rem; box-shadow: inset 0 -1px 0 var(--line); }
  .atable--orders td { padding: 0; box-shadow: none !important; }
  .atable--orders td.c-items, .atable--orders td.chev, .atable--orders td.c-date { display: none; }
  .atable--orders td.c-status { grid-column: 2; grid-row: 1; justify-self: end; }
  .atable--orders td.num { grid-column: 2; grid-row: 2; }
  .atable--orders td.c-cust { grid-column: 1; }
  .atable--people th:nth-child(n+4), .atable--people td:nth-child(n+4) { display: none; }
}
@media (max-width: 560px) { .kpis { gap: 0.6rem; } .kpi__value { font-size: 22px; } .kv { grid-template-columns: 1fr; gap: 0 0; } .kv dd { margin-bottom: 0.5rem; } }
@media (prefers-reduced-motion: reduce) { .adm-skel i, .skel { animation: none; } }
