/* Ardina WMS — operational shell styling
   Built on top of styles.css. Keeps the B&W architectural system but
   adds density, tables, and sidebar chrome.                          */

.wms-root {
  position: fixed; inset: 0;
  display: grid;
  grid-template-columns: 232px 1fr;
  grid-template-rows: 100%;
  background: #f6f5f3;
  color: #14110e;
  font-family: var(--sans);
  font-size: 13px;
  z-index: 100;
  overflow: hidden;
}

/* ──────────────────────────────  LOGIN  ────────────────────────────── */
.wms-login {
  position: fixed; inset: 0;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: #faf8f4;
  color: #14110e;
  font-family: var(--sans);
  z-index: 100;
}
.wms-login__art {
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 25% 35%, rgba(255,250,242,0.4), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 75%, rgba(139,111,74,0.18), transparent 60%),
    linear-gradient(165deg, #1f1a14 0%, #0e0b08 100%);
  overflow: hidden;
}
.wms-login__art::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.012' numOctaves='3' seed='5'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 0.95 0 0 0 0 0.85 0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: screen; opacity: 0.5; pointer-events: none;
}
.wms-login__art-content {
  position: absolute; inset: 0;
  padding: 64px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: #e7ddcd;
  z-index: 2;
}
.wms-login__art-top { display: flex; align-items: center; gap: 14px; }
.wms-login__art-top img { width: 40px; height: 40px; filter: brightness(0) invert(1); }
.wms-login__art-top span {
  font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: rgba(255,250,242,0.65);
}
.wms-login__art-title {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(48px, 5.5vw, 84px);
  line-height: 0.96; letter-spacing: -0.012em; color: #f6f1e8; margin: 0;
}
.wms-login__art-title em { font-style: italic; color: #c69b6a; font-weight: 300; }
.wms-login__art-lede {
  margin-top: 18px; max-width: 38ch; font-size: 14px; line-height: 1.6; color: rgba(255,250,242,0.7);
}
.wms-login__art-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px;
  font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,250,242,0.55);
}
.wms-login__art-meta b { display: block; color: #f6f1e8; font-family: var(--display); font-weight: 300; font-size: 22px; letter-spacing: 0; text-transform: none; margin-bottom: 2px; }

.wms-login__form {
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
}
.wms-login__card {
  width: 100%; max-width: 380px;
}
.wms-login__eye {
  font-size: 10.5px; letter-spacing: 0.32em; text-transform: uppercase; color: #8a7f72;
  margin-bottom: 16px;
}
.wms-login__h1 {
  font-family: var(--display);
  font-weight: 300; font-size: 38px; line-height: 1.08; color: #14110e; margin: 0 0 8px;
  letter-spacing: -0.005em;
}
.wms-login__sub { font-size: 13px; color: #6e6358; margin: 0 0 32px; line-height: 1.5; }
.wms-login__field { display: block; margin-bottom: 16px; }
.wms-login__field label {
  display: block;
  font-size: 9.5px; letter-spacing: 0.28em; text-transform: uppercase; color: #8a7f72;
  margin-bottom: 6px; font-weight: 600;
}
.wms-login__field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d9d2c7;
  border-radius: 0;
  background: #fff;
  font-size: 14px;
  color: #14110e;
  font-family: var(--sans);
  outline: none;
  transition: border-color .15s var(--ease);
  letter-spacing: 0;
}
.wms-login__field input:focus { border-color: #14110e; }
.wms-login__error {
  margin: 8px 0 16px;
  padding: 10px 12px;
  border-left: 2px solid #c44a2c;
  background: #f8eee9;
  font-size: 12px; color: #863623;
}
.wms-login__btn {
  display: block; width: 100%;
  padding: 14px 18px;
  background: #14110e; color: #faf8f4;
  border: 1px solid #14110e;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.wms-login__btn:hover { background: #faf8f4; color: #14110e; }
.wms-login__hint {
  margin-top: 24px; padding-top: 16px; border-top: 1px solid #ece6dc;
  font-size: 11px; color: #8a7f72; line-height: 1.6;
}
.wms-login__hint code { font-family: var(--mono); background: #f1ebde; padding: 1px 5px; color: #14110e; }

/* ──────────────────────────────  SIDEBAR  ────────────────────────────── */
.wms-side {
  background: #14110e;
  color: #d4c8b3;
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.04);
  overflow-y: auto;
}
.wms-side__brand {
  padding: 22px 22px 18px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.wms-side__brand img { width: 30px; height: 30px; filter: brightness(0) invert(1); opacity: 0.95; }
.wms-side__brand-name {
  display: flex; flex-direction: column; gap: 1px;
}
.wms-side__brand-name b {
  font-family: var(--display); font-size: 16px; letter-spacing: 0.12em; color: #f6f1e8; font-weight: 400;
}
.wms-side__brand-name span {
  font-size: 8.5px; letter-spacing: 0.32em; text-transform: uppercase; color: rgba(255,250,242,0.42); font-weight: 600;
}
.wms-side__group {
  padding: 18px 12px 6px 22px;
  font-size: 8.5px; letter-spacing: 0.32em; text-transform: uppercase; color: rgba(255,250,242,0.34); font-weight: 600;
}
.wms-side__nav { display: flex; flex-direction: column; padding-bottom: 12px; }
.wms-side__link {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 22px;
  color: rgba(255,250,242,0.62);
  font-size: 13px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
}
.wms-side__link:hover { color: #f6f1e8; background: rgba(255,255,255,0.03); }
.wms-side__link.is-active {
  color: #f6f1e8;
  background: rgba(255,255,255,0.05);
  border-left-color: #c69b6a;
}
.wms-side__link .icon {
  width: 16px; height: 16px; opacity: 0.7; flex: 0 0 auto;
  display: inline-grid; place-items: center;
}
.wms-side__link .badge {
  margin-left: auto;
  font-size: 10px; letter-spacing: 0.04em; padding: 1px 6px;
  background: rgba(198,155,106,0.18); color: #c69b6a; border-radius: 2px;
  font-family: var(--mono); font-weight: 600;
}
.wms-side__foot {
  margin-top: auto; padding: 16px 22px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 11px; color: rgba(255,250,242,0.45);
  display: flex; flex-direction: column; gap: 4px;
}
.wms-side__foot b { color: #f6f1e8; font-weight: 500; font-size: 12px; }

/* ──────────────────────────────  CONTENT  ────────────────────────────── */
.wms-main {
  display: grid;
  grid-template-rows: auto 1fr;
  background: #f6f5f3;
  overflow: hidden;
}
.wms-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: #fff;
  border-bottom: 1px solid #ece6dc;
  gap: 24px;
}
.wms-top__crumb {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: #8a7f72;
}
.wms-top__crumb b {
  font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: -0.005em;
  text-transform: none; color: #14110e;
}
.wms-top__crumb i { color: #c8bfb4; font-style: normal; }
.wms-top__right { display: flex; align-items: center; gap: 18px; }
.wms-top__search {
  position: relative;
}
.wms-top__search input {
  width: 280px;
  padding: 8px 12px 8px 32px;
  border: 1px solid #ece6dc;
  background: #faf8f4;
  font-size: 12.5px; color: #14110e;
  outline: none;
  border-radius: 0;
  font-family: var(--sans);
}
.wms-top__search input:focus { border-color: #14110e; background: #fff; }
.wms-top__search::before {
  content: "🔍"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 11px; opacity: 0.4;
}
.wms-top__user {
  display: flex; align-items: center; gap: 10px;
  padding-left: 18px; border-left: 1px solid #ece6dc;
  cursor: pointer;
}
.wms-top__user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg,#c69b6a,#8b6f4a);
  color: #faf8f4;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
}
.wms-top__user-meta { display: flex; flex-direction: column; gap: 1px; }
.wms-top__user-meta b { font-size: 12.5px; color: #14110e; font-weight: 500; }
.wms-top__user-meta span { font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: #8a7f72; }
.wms-top__logout {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: #8a7f72;
  cursor: pointer; padding: 6px 10px; border: 1px solid transparent;
}
.wms-top__logout:hover { color: #14110e; border-color: #ece6dc; }

.wms-page {
  overflow-y: auto;
  padding: 28px 32px 48px;
}

/* ──────────────────────────────  PRIMITIVES  ────────────────────────────── */
.wms-h2 {
  font-family: var(--display); font-weight: 300; font-size: 32px;
  margin: 0 0 4px; color: #14110e; letter-spacing: -0.005em;
}
.wms-sub { font-size: 13px; color: #6e6358; margin: 0 0 24px; }

.wms-card {
  background: #fff;
  border: 1px solid #ece6dc;
  padding: 22px 24px;
}
.wms-card h3 {
  margin: 0 0 14px;
  font-family: var(--display); font-weight: 400; font-size: 17px; color: #14110e;
}
.wms-card .wms-card__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.wms-card .wms-card__head h3 { margin: 0; }
.wms-card .wms-card__head .more {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: #8a7f72;
  cursor: pointer;
}
.wms-card .wms-card__head .more:hover { color: #14110e; }

.wms-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.wms-kpi__card {
  background: #fff; border: 1px solid #ece6dc; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 4px; position: relative;
}
.wms-kpi__label { font-size: 9.5px; letter-spacing: 0.28em; text-transform: uppercase; color: #8a7f72; font-weight: 600; }
.wms-kpi__value { font-family: var(--display); font-weight: 300; font-size: 38px; line-height: 1.1; color: #14110e; letter-spacing: -0.01em; }
.wms-kpi__unit { font-size: 11px; color: #8a7f72; font-family: var(--mono); letter-spacing: 0.04em; }
.wms-kpi__delta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #6e6358; font-family: var(--mono); }
.wms-kpi__delta.up { color: #2f6f3e; }
.wms-kpi__delta.down { color: #c44a2c; }
.wms-kpi__spark { margin-top: 10px; }

.wms-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px;
  font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600;
  border: 1px solid;
  background: transparent;
  white-space: nowrap;
}
.wms-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.wms-pill[data-status="scheduled"], .wms-pill[data-status="released"], .wms-pill[data-status="open"], .wms-pill[data-status="staged"], .wms-pill[data-status="loading"] { color: #2c5a8a; border-color: #c9d8e8; background: #f3f7fc; }
.wms-pill[data-status="in-yard"], .wms-pill[data-status="receiving"], .wms-pill[data-status="picking"], .wms-pill[data-status="putaway"]                              { color: #8e5a14; border-color: #e8d4b2; background: #fcf6ea; }
.wms-pill[data-status="picked"], .wms-pill[data-status="closed"], .wms-pill[data-status="departed"], .wms-pill[data-status="delivered"], .wms-pill[data-status="active"]   { color: #2f6f3e; border-color: #cbe2cf; background: #f0f7f1; }
.wms-pill[data-status="inactive"]                                                                                                                                       { color: #8a7f72; border-color: #d9d2c7; background: #f6f3ee; }
.wms-pill[data-priority="high"]   { color: #c44a2c; border-color: #f0c8b5; background: #fbeee7; }
.wms-pill[data-priority="normal"] { color: #6e6358; border-color: #d9d2c7; background: #f6f3ee; }
.wms-pill[data-priority="low"]    { color: #8a7f72; border-color: #ece6dc; background: #faf8f4; }
.wms-pill[data-abc="A"] { color: #14110e; border-color: #14110e; background: transparent; }
.wms-pill[data-abc="B"] { color: #6e6358; border-color: #d9d2c7; background: transparent; }
.wms-pill[data-abc="C"] { color: #a89c8d; border-color: #ece6dc; background: transparent; }

/* tables */
.wms-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.wms-table thead th {
  text-align: left; padding: 10px 12px;
  font-size: 9.5px; letter-spacing: 0.24em; text-transform: uppercase; color: #8a7f72; font-weight: 600;
  border-bottom: 1px solid #ece6dc;
  background: #faf8f4;
  white-space: nowrap;
}
.wms-table tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid #f1ebe0;
  color: #2a2622; vertical-align: middle;
}
.wms-table tbody tr:hover td { background: #faf8f4; cursor: pointer; }
.wms-table tbody tr:last-child td { border-bottom: 0; }
.wms-table .num  { font-family: var(--mono); letter-spacing: 0.02em; }
.wms-table .id   { font-family: var(--mono); font-weight: 600; color: #14110e; font-size: 11.5px; letter-spacing: 0.04em; }
.wms-table .right { text-align: right; }
.wms-table .muted { color: #8a7f72; font-size: 11.5px; }

/* utility */
.wms-row { display: flex; align-items: center; gap: 12px; }
.wms-row .grow { flex: 1; }
.wms-grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.wms-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.wms-filters {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.wms-input {
  padding: 8px 12px; border: 1px solid #ece6dc; background: #fff;
  font-size: 12.5px; color: #14110e; font-family: var(--sans); outline: none;
}
.wms-input:focus { border-color: #14110e; }
.wms-input--wide { min-width: 280px; }

.wms-chip {
  display: inline-flex; align-items: center;
  padding: 6px 12px; font-size: 11px; letter-spacing: 0.06em;
  border: 1px solid #ece6dc; background: #fff;
  cursor: pointer;
  color: #6e6358;
  transition: all .12s;
}
.wms-chip:hover { border-color: #14110e; color: #14110e; }
.wms-chip.is-on { background: #14110e; color: #faf8f4; border-color: #14110e; }

.wms-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600;
  background: #14110e; color: #faf8f4; border: 1px solid #14110e;
  cursor: pointer;
}
.wms-btn--ghost { background: transparent; color: #14110e; }
.wms-btn--ghost:hover { background: #14110e; color: #faf8f4; }

.wms-empty { padding: 40px; text-align: center; color: #8a7f72; font-size: 13px; }

/* Activity feed */
.wms-feed { display: flex; flex-direction: column; }
.wms-feed__item {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #f1ebe0; align-items: baseline;
}
.wms-feed__item:last-child { border-bottom: 0; }
.wms-feed__t { font-family: var(--mono); font-size: 11px; color: #8a7f72; letter-spacing: 0.04em; }
.wms-feed__what { font-size: 12.5px; color: #2a2622; line-height: 1.45; }
.wms-feed__what b { color: #14110e; font-weight: 500; }
.wms-feed__mod { font-size: 9.5px; letter-spacing: 0.24em; text-transform: uppercase; color: #8a7f72; }

/* Sparkline */
.wms-spark { display: block; width: 100%; height: 28px; color: #14110e; }
.wms-spark--up { color: #2f6f3e; }
.wms-spark--down { color: #c44a2c; }

/* Bin map */
.wms-binmap {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.wms-zone {
  background: #fff; border: 1px solid #ece6dc; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.wms-zone__head { display: flex; align-items: baseline; justify-content: space-between; }
.wms-zone__head h4 { margin: 0; font-family: var(--display); font-size: 16px; font-weight: 400; color: #14110e; }
.wms-zone__head .util { font-family: var(--mono); font-size: 11px; color: #6e6358; }
.wms-zone__bar { height: 4px; background: #f1ebe0; position: relative; }
.wms-zone__bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: #14110e; }
.wms-zone__bar > i.warn { background: #c69b6a; }
.wms-zone__bar > i.full { background: #c44a2c; }
.wms-zone__grid {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px;
}
.wms-zone__cell { aspect-ratio: 1 / 1; background: #f6f3ee; border: 1px solid transparent; }
.wms-zone__cell[data-fill="0"] { background: #fcfaf5; }
.wms-zone__cell[data-fill="1"] { background: #ece6dc; }
.wms-zone__cell[data-fill="2"] { background: #c8bfb4; }
.wms-zone__cell[data-fill="3"] { background: #8a7f72; }
.wms-zone__cell[data-fill="4"] { background: #3d3833; }
.wms-zone__cell[data-fill="5"] { background: #14110e; }
.wms-zone__note { font-size: 11px; color: #8a7f72; line-height: 1.5; }

/* Drawer (SKU detail) */
.wms-drawer-backdrop {
  position: fixed; inset: 0; background: rgba(20,17,14,0.4); z-index: 200;
  animation: wms-fade-in .15s ease-out;
}
.wms-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 540px;
  background: #fff; border-left: 1px solid #ece6dc;
  z-index: 201; overflow-y: auto;
  animation: wms-slide-in .22s var(--ease);
  display: flex; flex-direction: column;
}
@keyframes wms-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes wms-slide-in { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.wms-drawer__head {
  padding: 24px 28px;
  border-bottom: 1px solid #ece6dc;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.wms-drawer__title { font-family: var(--display); font-weight: 400; font-size: 22px; color: #14110e; margin: 4px 0 0; letter-spacing: -0.005em; }
.wms-drawer__id { font-family: var(--mono); font-size: 11px; color: #8a7f72; letter-spacing: 0.06em; }
.wms-drawer__close { font-size: 18px; cursor: pointer; color: #8a7f72; padding: 4px 8px; }
.wms-drawer__close:hover { color: #14110e; }
.wms-drawer__body { padding: 24px 28px; flex: 1; }
.wms-drawer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin-bottom: 26px; }
.wms-drawer__grid .k { font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase; color: #8a7f72; font-weight: 600; margin-bottom: 4px; }
.wms-drawer__grid .v { font-size: 13.5px; color: #14110e; font-family: var(--mono); letter-spacing: 0.02em; }
.wms-drawer__section { margin-bottom: 28px; }
.wms-drawer__section h4 {
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; color: #8a7f72; font-weight: 600;
  margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid #ece6dc;
}

/* Generic settings/users grids */
.wms-list { display: flex; flex-direction: column; }
.wms-list__row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid #f1ebe0;
}
.wms-list__row:last-child { border-bottom: 0; }
.wms-list__row .name { font-size: 13.5px; color: #14110e; font-weight: 500; }
.wms-list__row .sub { font-size: 11.5px; color: #8a7f72; }

/* ─────────────────────────── PROFORMA INVOICE ─────────────────────────── */
.pi-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; padding: 10px 14px;
  background: #fff; border: 1px solid #ece6dc;
}
.pi-toolbar__actions { display: flex; align-items: center; gap: 8px; }

.pi-doc {
  background: #fff;
  border: 1px solid #ece6dc;
  padding: 56px 64px;
  max-width: 920px;
  margin: 0 auto;
  position: relative;
  color: #14110e;
  font-family: var(--sans);
  overflow: hidden;
}
.pi-watermark {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 300;
  font-size: 240px; color: rgba(20,17,14,0.05);
  letter-spacing: 0.04em;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.pi-doc > * { position: relative; z-index: 1; }

.pi-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  margin-bottom: 22px;
}
.pi-muted { color: #8a7f72; }
.pi-section-label {
  font-size: 9.5px; letter-spacing: 0.3em; text-transform: uppercase;
  color: #8a7f72; font-weight: 600;
}
.pi-meta-grid {
  display: grid; grid-template-columns: auto 1fr;
  gap: 4px 18px;
  font-size: 11.5px;
  text-align: left;
}
.pi-meta-grid > span:nth-child(odd) { text-align: right; }
.pi-rule { height: 1px; background: #14110e; margin: 16px 0; }
.pi-billto { margin-bottom: 20px; }

.pi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 22px;
}
.pi-table thead th {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1.5px solid #14110e;
  border-top: 1.5px solid #14110e;
  font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: #14110e; font-weight: 600;
}
.pi-table thead th.right { text-align: right; }
.pi-table tbody td {
  padding: 10px 8px;
  border-bottom: 1px solid #f1ebe0;
  vertical-align: top;
}
.pi-table tbody td.right { text-align: right; }
.pi-table tbody td.num { font-family: var(--mono); letter-spacing: 0.02em; }

.pi-totals {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  margin-bottom: 28px;
}
.pi-totals__box {
  display: flex; flex-direction: column;
  font-size: 12px;
}
.pi-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 3px 0;
}
.pi-row .num { font-family: var(--mono); letter-spacing: 0.02em; color: #14110e; }
.pi-row--grand {
  margin-top: 6px; padding-top: 8px; border-top: 1.5px solid #14110e;
  font-size: 14px; font-weight: 700;
}
.pi-row--grand span { color: #14110e; }
.pi-row--grand .num { font-weight: 700; font-size: 16px; }

.pi-terms {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 18px;
}

.pi-footer {
  margin-top: 36px;
  padding-top: 14px;
  border-top: 1px solid #ece6dc;
  display: flex; align-items: center;
  font-size: 10.5px; color: #8a7f72;
}

/* Print: clean doc only */
@media print {
  body { background: #fff; }
  .wms-root { position: static !important; display: block !important; }
  .wms-side, .wms-top, .wms-side__foot, .no-print, .pi-toolbar { display: none !important; }
  .wms-page { overflow: visible !important; padding: 0 !important; }
  .pi-doc {
    border: 0; padding: 0; max-width: none; margin: 0;
  }
  .pi-watermark { font-size: 200px; }
}
