:root {
  font-family: "Inter", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  color: #252e29;
  background: #f5f5ee;
  font-synthesis: none;
  --navy: #202a26;
  --navy-2: #34463d;
  --ink: #252e29;
  --muted: #505e56;
  --line: #d6dcd6;
  --accent: #356046;
  --paper: #fff;
}
* {box-sizing:border-box}
[hidden] {display:none!important}
body {margin:0;font-size:1rem;line-height:1.5}
button,input,select {font:inherit}
button,select {cursor:pointer}
button {border:0;background:none;color:inherit}
button:disabled {opacity:.55;cursor:wait}
button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible {outline:3px solid #148b95;outline-offset:3px}
h1,h2,h3,p {margin:0}
h1 {font-size:clamp(1.85rem,3.2vw,2.65rem);line-height:1.12;letter-spacing:-.045em}
h2 {font-size:1.28rem;letter-spacing:-.025em;line-height:1.3}
h3 {font-size:1.06rem}
.skip-link {position:fixed;top:0;left:1rem;transform:translateY(-130%);background:#fff;color:var(--ink);padding:.6rem 1rem;z-index:9}
.skip-link:focus {transform:translateY(0)}
.workspace {min-height:100vh;display:grid;grid-template-columns:15.25rem minmax(0,1fr)}
.sidebar {background:var(--navy);color:#e7eff3;min-height:100vh;position:sticky;top:0;align-self:start;display:flex;flex-direction:column;height:100dvh;padding:1.65rem 1rem 1rem}
.brand {display:inline-flex;gap:.7rem;align-items:center;font-weight:720;font-size:1.23rem;letter-spacing:-.03em;line-height:1.2}
.brand-mark {display:inline-block;width:1.8rem;height:1.82rem;border-radius:.38rem;background:linear-gradient(90deg,transparent 0 25%,#79c4bc 25% 36%,transparent 36% 48%,#bde3db 48% 59%,transparent 59% 71%,#fff 71% 82%,transparent 82%) #245066;border:1px solid #456a7b;flex-shrink:0}
.sidebar-brand {padding:0 .65rem 1.55rem;border-bottom:1px solid #465146}
.nav-group {padding-top:1.35rem;flex:1}
#nav {display:grid;gap:.35rem}
.nav-btn {display:flex;align-items:center;text-align:left;border-radius:.45rem;padding:.68rem .78rem;gap:.65rem;color:#c0d0db;font-size:.94rem;font-weight:550}
.nav-btn:hover {color:white;background:#314035}
.nav-btn[aria-current="page"] {background:#354b3e;color:white;box-shadow:inset 3px 0 #d6b779}
.nav-icon {display:inline-block;font-size:1.03rem;width:1.5rem;text-align:center;line-height:1}
.account {display:grid;grid-template-columns:auto 1fr;gap:.55rem .7rem;align-items:center;padding:.95rem .6rem .2rem;border-top:1px solid #465146;overflow-wrap:anywhere}
.avatar {height:2.25rem;width:2.25rem;border-radius:50%;display:grid;place-items:center;color:#e5f6f1;background:#2e515e;font-weight:650}
.account strong {display:block;font-size:.9rem}
.account div span {font-size:.81rem;color:#b9cbd6}
.account .quiet-btn {grid-column:2;justify-self:start;color:#c6d7df;padding:0}
.quiet-btn {color:var(--accent);font-weight:600;font-size:.88rem;min-height:1.9rem}
.content {min-width:0;width:100%;max-width:98rem;padding:clamp(1.3rem,3.3vw,3.3rem);margin:0 auto}
.page-header {display:flex;justify-content:space-between;align-items:flex-end;gap:1rem;padding-bottom:1.35rem;border-bottom:1px solid var(--line);margin-bottom:1.5rem}
.section-label {display:block;font-size:.82rem;font-weight:640;color:var(--muted);margin-bottom:.42rem}
.header-meta {display:flex;align-items:center;gap:.85rem;flex-wrap:wrap;font-size:.86rem;color:var(--muted)}
.secondary-btn,.primary-btn,.close-btn {display:inline-flex;align-items:center;justify-content:center;min-height:2.5rem;padding:.45rem .92rem;border:1px solid #bccbd4;border-radius:.45rem;background:white;font-size:.9rem;font-weight:600;line-height:1.3}
.secondary-btn:hover,.close-btn:hover {background:#f1f6f7}
.primary-btn {background:var(--navy-2);border-color:var(--navy-2);color:white}
.primary-btn:hover {background:var(--navy)}
.close-btn {font-size:1.45rem;width:2.5rem;padding:0}
.metrics {display:grid;gap:.85rem;grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:1.4rem}
.metric,.panel {background:var(--paper);border:1px solid var(--line);border-radius:.65rem}
.metric {padding:1rem 1.2rem;min-width:0;text-align:left;min-height:6.5rem}
button.metric:hover {border-color:#8caaa9;background:#fcfefe}
.metric small {display:block;color:var(--muted);font-size:.89rem;margin-bottom:.45rem}
.metric b {display:block;font-size:clamp(1.6rem,2.6vw,2.25rem);line-height:1.15;font-weight:650;font-variant-numeric:tabular-nums;letter-spacing:-.045em}
.panel {margin-bottom:1rem;overflow:hidden}
.panel-head {display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1.04rem 1.2rem;border-bottom:1px solid var(--line)}
.panel-head > div {min-width:0}
.link-btn {padding:.18rem 0;border:0;color:var(--accent);font-weight:650;line-height:1.35;text-align:left}
.link-btn:hover {text-decoration:underline}
.filters {display:flex;flex-wrap:wrap;gap:.75rem;margin-bottom:.95rem;align-items:flex-end}
.field,.filter-field {display:grid;gap:.3rem;color:var(--ink);font-size:.88rem;font-weight:600}
.filter-field.search {flex:1 1 16rem;max-width:34rem}
input,select {max-width:100%;min-width:0;height:2.65rem;background:#fff;border:1px solid #b9c8d2;border-radius:.43rem;padding:.38rem .68rem;color:var(--ink);font-size:1rem;font-weight:400}
select {min-width:8rem}
.table-wrap {overflow-x:auto}
table {border-collapse:collapse;width:100%;font-size:.94rem;text-align:left}
thead {background:#f6f8fa;color:#486072}
th,td {padding:.7rem 1rem;border-bottom:1px solid #e6ecef;vertical-align:middle}
th {font-size:.81rem;font-weight:640;background:#f6f8fa}
tbody tr:last-child td {border-bottom:0}
tbody tr:hover {background:#fafcfc}
td.numeric,th.numeric {text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
td .sub {display:block;font-size:.8rem;color:var(--muted);margin-top:.12rem}
.pill {display:inline-block;padding:.15rem .52rem;border-radius:999px;background:#edf2f5;color:#435c70;font-size:.81rem;font-weight:600;line-height:1.45}
.pill.good {background:#e0f0e9;color:#185641}
.pill.info {background:#e0eff5;color:#1c546e}
.pill.warn,.anomaly {color:#8a4e18}
.pill.warn {background:#faecd8}
.muted,.empty,.status-text {color:var(--muted)}
.empty {padding:1.3rem 1.2rem;font-size:.94rem}
.error {background:#fbece9;border:1px solid #e6b7ae;border-radius:.45rem;color:#813722;padding:.65rem .9rem;margin-bottom:1rem}
.status-text {font-size:.9rem;margin:.2rem 0 1rem}
.status-text:empty {display:none}
.pager {display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.7rem 1rem;border-top:1px solid var(--line);color:var(--muted);font-size:.82rem}
.pager-buttons {display:flex;gap:.45rem}
.pager .secondary-btn {min-height:2rem;padding:.28rem .65rem}
.pager button:disabled {cursor:default}
dialog {width:min(43rem,calc(100vw - 1.5rem));max-height:85dvh;border:1px solid #cbd7df;border-radius:.75rem;color:var(--ink);padding:0;box-shadow:0 1.3rem 3.5rem #14283e33}
dialog::backdrop {background:#0a203855}
.dialog-header {padding:1.15rem 1.3rem;border-bottom:1px solid var(--line);display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.dialog-body {padding:1rem 1.3rem 1.35rem}
.spec-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;margin:0 0 1rem}
.spec-grid div {border-bottom:1px solid var(--line);padding:.25rem 0 .55rem}
dt {color:var(--muted);font-size:.85rem} dd {margin:.15rem 0 0}
.date-form {border-top:1px solid var(--line);margin-top:1rem;padding-top:1rem}
.date-form .form-row {display:flex;flex-wrap:wrap;gap:.85rem;margin:.6rem 0}
.date-form .field {flex:1 1 12rem}
.form-note {font-size:.85rem;color:var(--muted)}
.auth-layout,.startup {min-height:100dvh;display:grid;place-items:center;padding:1.25rem;background:linear-gradient(135deg,#0a2339,#234e60)}
.startup {color:#fff}
.auth-card {background:white;border-radius:.9rem;width:min(100%,28rem);padding:clamp(1.45rem,4vw,2.4rem);box-shadow:0 .85rem 2.3rem #07182933}
.auth-top {display:flex;justify-content:space-between;align-items:center;gap:.5rem}
.auth-copy {margin:2rem 0 1.3rem}.auth-copy p {margin:.5rem 0;color:var(--muted)}
.auth-card .field {margin-bottom:.85rem}
.auth-card .primary-btn {width:100%;margin-top:.3rem;min-height:2.75rem}
@media (max-width:850px) {
  .workspace {grid-template-columns:1fr}
  .sidebar {position:static;display:grid;grid-template-columns:1fr auto;min-height:0;height:auto;padding:.8rem 1rem .5rem;gap:.55rem;align-items:center}
  .sidebar-brand {padding:0;border:0}
  .nav-group {grid-column:1/-1;grid-row:2;padding:0;min-width:0}
  #nav {display:flex;gap:.25rem;overflow-x:auto;padding:0 0 .2rem}
  .nav-btn {flex:0 0 auto;padding:.45rem .6rem;font-size:.9rem}
  .nav-btn[aria-current="page"] {box-shadow:inset 0 -2px #d6b779}
  .account {grid-column:2;grid-row:1;display:flex;border:0;padding:0;gap:.5rem}
  .account .avatar,.account div span {display:none}
  .account .quiet-btn {padding:.15rem .4rem}
  .content {padding:1.35rem}
}
@media (max-width:590px) {
  .content {padding:1rem .8rem}
  .page-header {align-items:flex-start;flex-direction:column;gap:.6rem;margin-bottom:1rem;padding-bottom:.8rem}
  .header-meta {width:100%;justify-content:space-between}
  .metrics {gap:.45rem;margin-bottom:1rem}
  .metric {padding:.68rem .6rem;min-height:5.6rem}
  .metric small {font-size:.8rem;line-height:1.25}
  .panel-head {padding:.8rem .85rem}
  .filters {gap:.45rem}.filter-field.search {max-width:none;flex-basis:100%}
  .filter-field {flex:1;min-width:0}select {min-width:0;width:100%}
  .table-wrap.cards table,.table-wrap.cards tbody {display:block}
  .table-wrap.cards thead {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .table-wrap.cards tr {display:grid;grid-template-columns:1fr 1fr;gap:.28rem .65rem;padding:.66rem .85rem;border-bottom:1px solid var(--line)}
  .table-wrap.cards tr:last-child {border-bottom:0}
  .table-wrap.cards td {display:block;padding:0;border:0;text-align:left;overflow-wrap:anywhere;white-space:normal}
  .table-wrap.cards td:first-child {grid-column:1/-1;font-weight:650}
  .table-wrap.cards td:not(:first-child)::before {content:attr(data-label);display:block;font-size:.75rem;color:var(--muted);font-weight:450}
  .nav-icon {display:none}
  .account strong {max-width:7rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .dialog-body,.dialog-header {padding:1rem}
}
@media (prefers-reduced-motion:reduce){* {scroll-behavior:auto!important}}

/* Authenticated customer workspace. The layout supports
   desktop and phone measurements and apply only to the customer role. */
#customer-bar, #customer-nav { display: none; }
#workspace[data-role="customer"] {
  display: block;
  background: #f6f5ee;
  color: #272f28;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: normal;
}
#workspace[data-role="customer"] .sidebar { display: none; }
#workspace[data-role="customer"] .customer-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - 1200px) / 2));
  border-bottom: 1px solid #53606a;
  color: #fff;
  background: linear-gradient(110deg, #202a24 0%, #2c3b30 80%, #394938 100%);
}
#workspace[data-role="customer"] .customer-header > div { display: flex; min-width: 0; align-items: center; gap: 16px; }
#workspace[data-role="customer"] .customer-header .brand {
  max-width: 60%;
  min-width: 0;
  gap: 12px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: normal;
}
#workspace[data-role="customer"] .customer-header .brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f0dcc0;
  border: 1px solid #ab926e;
  border-radius: 6px;
  background: none;
  font: 500 21px Baskerville, Georgia, serif;
}
#workspace[data-role="customer"] .customer-user {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e7eadf;
  font-size: 14px;
}
#workspace[data-role="customer"] .customer-header .text-button {
  min-height: 44px;
  padding: 8px 12px;
  color: #fff;
  background: transparent;
  border: 1px solid #69809d;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
#workspace[data-role="customer"] .customer-header .text-button:hover { background: #405a42; }
#workspace[data-role="customer"] .customer-header .text-button:active { background: #0c1e34; }
#workspace[data-role="customer"] .customer-header :focus-visible { outline-color: #fff; }
#workspace[data-role="customer"] .content { max-width: 1200px; padding: 32px 24px; margin: 0 auto; }
#workspace[data-role="customer"] .page-header {
  display: block;
  padding: 0;
  border: 0;
  margin: 0 0 16px;
}
#workspace[data-role="customer"] #role-heading { display: none; }
#workspace[data-role="customer"] #heading {
  margin: 0 0 8px;
  letter-spacing: -.025em;
  color: #272f28;
  font: 500 clamp(30px, 3vw, 38px)/1.15 Baskerville, Georgia, "Times New Roman", serif;
}
#workspace[data-role="customer"] .header-meta { justify-content: flex-start; }
#workspace[data-role="customer"] .header-meta #as-of { color: #556055; font-size: 14px; }
#workspace[data-role="customer"] .page-header #refresh { display: none; }
#workspace[data-role="customer"]:has(#page-error:not([hidden])) #refresh { display: inline-flex; }
#workspace[data-role="customer"] #customer-nav { display: flex; }
#workspace[data-role="customer"] #page-status:empty { display: none; }
#workspace[data-role="customer"] button:focus-visible,
#workspace[data-role="customer"] input:focus-visible,
#workspace[data-role="customer"] summary:focus-visible { outline: 2px solid #38633e; outline-offset: 3px; }
#workspace[data-role="customer"] .customer-button {
  min-height: 44px;
  border: 1px solid #38633e;
  border-radius: 6px;
  padding: 8px 16px;
  color: #38633e;
  background: #fff;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
}
#workspace[data-role="customer"] .customer-button.primary { color: white; background: #2d4633; border-color: #2d4633; }
#workspace[data-role="customer"] .customer-button.primary:hover { background: #405a42; }
#workspace[data-role="customer"] .pi-view h2,
#workspace[data-role="customer"] .pi-view strong { letter-spacing: normal; }
#workspace[data-role="customer"] .pi-view input { height: auto; flex: 1; }
#workspace[data-role="customer"] .pi-view small { font-size: 13px; }
@media (max-width: 1000px) {
  #workspace[data-role="customer"] .content { max-width: 800px; }
}
@media (max-width: 800px) {
  #workspace[data-role="customer"] .customer-header { padding-inline: 16px; }
  #workspace[data-role="customer"] .content { padding: 24px 16px; }
}
@media (max-width: 600px) {
  #workspace[data-role="customer"] .content { max-width: 100%; }
  #workspace[data-role="customer"] .customer-header { gap: 12px; }
  #workspace[data-role="customer"] .customer-header .brand { gap: 8px; max-width: calc(100% - 96px); font-size: 19px; }
  #workspace[data-role="customer"] .customer-user { display: none; }
}
#workspace[data-role="customer"] .pi-view {
  color: #29352d;
  gap: 16px;
  min-width: 0;
  display: grid;
}
#workspace[data-role="customer"] .pi-heading {
  margin: 0;
}
#workspace[data-role="customer"] .pi-subnav,
#workspace[data-role="customer"] .pi-pagination {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  display: flex;
}
#workspace[data-role="customer"] .pi-subnav {
  margin: 0 0 12px;
}
#workspace[data-role="customer"] .pi-view .pi-subnav {
  margin: 0;
}
#workspace[data-role="customer"] .pi-subnav button,
#workspace[data-role="customer"] .pi-pagination button {
  font: inherit;
  cursor: pointer;
  color: #274967;
  background: #fff;
  border: 1px solid #ccd8e2;
  border-radius: 5px;
  padding: 7px 13px;
  font-weight: 600;
}
#workspace[data-role="customer"] .pi-subnav button[aria-pressed=true] {
  color: #153856;
  background: #e7eff7;
  border-color: #a4b9cc;
}
#workspace[data-role="customer"] .pi-pagination button:disabled {
  opacity: .48;
  cursor: default;
}
#workspace[data-role="customer"] .pi-search {
  align-items: stretch;
  gap: 8px;
  display: flex;
}
#workspace[data-role="customer"] .pi-search input {
  min-width: 0;
  font: inherit;
  color: inherit;
  border: 1px solid #adbece;
  border-radius: 6px;
  flex: auto;
  padding: 13px 16px;
}
#workspace[data-role="customer"] .pi-search button {
  flex: none;
  padding: 10px 22px;
}
#workspace[data-role="customer"] .pi-metrics {
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
  display: grid;
}
#workspace[data-role="customer"] .pi-metrics article {
  background: #fff;
  border: 1px solid #cbd8e2;
  border-radius: 8px;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 18px 20px;
  display: flex;
}
#workspace[data-role="customer"] .pi-metrics article>span {
  font-weight: 600;
  line-height: 1.3;
}
#workspace[data-role="customer"] .pi-metrics article>strong {
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  font-size: clamp(19px,3vw,36px);
  font-weight: 700;
  line-height: 1.25;
}
#workspace[data-role="customer"] .pi-metrics small,
#workspace[data-role="customer"] .pi-view small,
#workspace[data-role="customer"] .pi-unknown {
  color: #586d80;
}
#workspace[data-role="customer"] .pi-metrics .text-button,
#workspace[data-role="customer"] .pi-metrics small {
  padding: 0;
  font-size: .78rem;
}
#workspace[data-role="customer"] .pi-breakdown,
#workspace[data-role="customer"] .pi-line-extra {
  font-size: .9rem;
}
#workspace[data-role="customer"] .pi-view summary {
  cursor: pointer;
  padding: 6px 0;
  font-weight: 600;
}
#workspace[data-role="customer"] .pi-view details>p {
  margin: 4px 0;
}
#workspace[data-role="customer"] .pi-product-list,
#workspace[data-role="customer"] .pi-container-list details,
#workspace[data-role="customer"] .pi-order-list article {
  background: #fff;
  border: 1px solid #cfdae3;
  border-radius: 7px;
}
#workspace[data-role="customer"] .pi-product-list>div {
  grid-template-columns: minmax(0,1fr) minmax(68px,15%) minmax(68px,15%);
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  display: grid;
}
#workspace[data-role="customer"] .pi-product-list>div:not(:last-child),
#workspace[data-role="customer"] .pi-container-list li:not(:last-child) {
  border-bottom: 1px solid #e1e8ed;
}
#workspace[data-role="customer"] .pi-product-list>div>span:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
#workspace[data-role="customer"] .pi-product-header {
  color: #4c6378;
  background: #f3f7fa;
  font-size: .86rem;
}
#workspace[data-role="customer"] .pi-product-list small,
#workspace[data-role="customer"] .pi-child small {
  display: block;
}
#workspace[data-role="customer"] .pi-view h2,
#workspace[data-role="customer"] .pi-view strong,
#workspace[data-role="customer"] .pi-container-list li {
  overflow-wrap: anywhere;
}
#workspace[data-role="customer"] .pi-container-list,
#workspace[data-role="customer"] .pi-order-list {
  gap: 9px;
  display: grid;
}
#workspace[data-role="customer"] .pi-container-list details,
#workspace[data-role="customer"] .pi-order-list article {
  padding: 10px 16px;
}
#workspace[data-role="customer"] .pi-container-list .pi-arrived-group {
  background: #f6f8fa;
}
#workspace[data-role="customer"] .pi-arrived-list {
  gap: 6px;
  margin-top: 6px;
  display: grid;
}
#workspace[data-role="customer"] .pi-container-list summary>span {
  color: #566e84;
  margin-left: 14px;
  font-weight: 400;
}
#workspace[data-role="customer"] .pi-container-list summary>.pi-factory-reference {
  white-space: nowrap;
  margin-inline-start: .3em;
}
#workspace[data-role="customer"] .pi-view .pi-sea-dates {
  color: #425970;
  font-variant-numeric: tabular-nums;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin-inline-start: 14px;
  font-weight: 400;
  display: inline-flex;
}
#workspace[data-role="customer"] .pi-sea-dates span {
  white-space: nowrap;
}
#workspace[data-role="customer"] .pi-container-list ul {
  margin: 4px 0;
  padding: 0;
  list-style: none;
}
#workspace[data-role="customer"] .pi-container-list li,
#workspace[data-role="customer"] .pi-child {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  display: flex;
}
#workspace[data-role="customer"] .pi-container-list li small {
  display: block;
}
#workspace[data-role="customer"] .pi-order-list header,
#workspace[data-role="customer"] .pi-line-counts {
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  display: flex;
}
#workspace[data-role="customer"] .pi-order-list header>span {
  color: #536b80;
  text-align: right;
  font-size: .8rem;
}
#workspace[data-role="customer"] .pi-order-list header>span small {
  font-weight: 600;
  display: block;
}
#workspace[data-role="customer"] .pi-order-list header>span .pi-closed {
  color: #963747;
}
#workspace[data-role="customer"] .pi-order-list h2 {
  margin: 0;
  font-size: 1.07rem;
}
#workspace[data-role="customer"] .pi-order-oil {
  color: #304960;
  overflow-wrap: anywhere;
  white-space: pre-line;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin: 3px 0 0;
  font-size: .85rem;
  display: flex;
}
#workspace[data-role="customer"] .pi-order-oil span {
  min-width: 0;
}
#workspace[data-role="customer"] .pi-order-oil b {
  color: #52697e;
  font-weight: 600;
}
#workspace[data-role="customer"] .pi-line-counts {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px 18px;
  margin: 9px 0;
  font-size: .88rem;
}
#workspace[data-role="customer"] .pi-line-counts b {
  font-variant-numeric: tabular-nums;
}
#workspace[data-role="customer"] .pi-line-extra {
  border-top: 1px solid #e4ebf0;
}
#workspace[data-role="customer"] .pi-child {
  border-left: 2px solid #b8c9d8;
  padding: 5px 10px;
  display: block;
}
#workspace[data-role="customer"] .pi-pagination {
  justify-content: flex-end;
}
#workspace[data-role="customer"] .pi-feedback,
#workspace[data-role="customer"] .pi-unknown {
  margin: 0;
}
@media (max-width:600px) {
  #workspace[data-role="customer"] .pi-view {
    gap: 11px;
  }
  #workspace[data-role="customer"] .pi-metrics {
    gap: 5px;
  }
  #workspace[data-role="customer"] .pi-metrics article {
    min-width: 0;
    padding: 9px 6px;
  }
  #workspace[data-role="customer"] .pi-metrics article>span {
    font-size: .78rem;
  }
  #workspace[data-role="customer"] .pi-subnav {
    gap: 4px;
  }
  #workspace[data-role="customer"] .pi-search input {
    padding: 11px 8px;
  }
  #workspace[data-role="customer"] .pi-search button {
    padding: 8px 12px;
  }
  #workspace[data-role="customer"] .pi-product-list>div {
    grid-template-columns: minmax(0,1fr) minmax(45px,18%) minmax(45px,18%);
    gap: 5px;
    padding: 9px;
  }
  #workspace[data-role="customer"] .pi-product-list .pi-product-header {
    font-size: .74rem;
  }
  #workspace[data-role="customer"] .pi-order-list article,
  #workspace[data-role="customer"] .pi-container-list details {
    padding: 8px 10px;
  }
  #workspace[data-role="customer"] .pi-line-counts {
    gap: 5px 9px;
  }
  #workspace[data-role="customer"] .pi-view .pi-sea-dates {
    gap: 2px 10px;
    margin: 3px 0 0;
    display: flex;
  }
}

#workspace[data-role="customer"] .pi-metrics article {
  border-color: #cbd4d8;
  border-radius: 10px;
  box-shadow: 0 2px 8px #162b390a;
}
#workspace[data-role="customer"] .pi-metrics article:first-child {
  color: #fff;
  background: linear-gradient(120deg, #2d4633, #475c42);
  border-color: #2d4633;
}
#workspace[data-role="customer"] .pi-metrics article:first-child small { color: #d7e1e7; }
#workspace[data-role="customer"] .pi-metrics article > strong { letter-spacing: -.025em; font-weight: 600; }
#workspace[data-role="customer"] :is(.pi-product-list, .pi-order-list article, .pi-container-card) {
  border-color: #d9dcd2;
  border-radius: 10px;
}
#workspace[data-role="customer"] .pi-product-header {
  color: #405666;
  background: #ecf0ef;
  border-radius: 9px 9px 0 0;
}
#workspace[data-role="customer"] .pi-search input { border-color: #95a6b1; border-radius: 6px; }
@media (max-width: 600px) {
  #workspace[data-role="customer"] .pi-subnav button, #workspace[data-role="customer"] .pi-pagination button { min-height: 40px; }
}
#workspace[data-role="customer"] .customer-workspace-tabs {
  gap: 8px;
  border-bottom: 1px solid #d9dcd2;
  margin: 0 0 24px;
}
#workspace[data-role="customer"] .customer-workspace-tabs button {
  min-height: 48px;
  padding: 10px 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #556055;
  box-shadow: none;
  font-size: 15px;
  font-weight: 600;
}
#workspace[data-role="customer"] .customer-workspace-tabs button.active,
#workspace[data-role="customer"] .customer-workspace-tabs button[aria-current="page"] {
  color: #2d4633;
  border-bottom-color: #a78955;
}
@media (max-width: 700px) {
  #workspace[data-role="customer"] .customer-workspace-tabs { margin-bottom: 20px; }
  #workspace[data-role="customer"] .customer-workspace-tabs button { flex: 1; padding: 10px; }
}
@media (max-width: 600px) {
  #workspace[data-role="customer"] .customer-workspace-tabs button { padding-inline: 4px; font-size: 14px; }
}


/* Bharara customer and staff entry forms. */
.bharara-entry {
  min-height: 100vh;
  color: #272f28;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(ellipse at 50% 20%, #fff 0%, #f6f5ee 65%);
}
.bharara-entry .login-topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
  color: white;
  background: linear-gradient(110deg, #202a24 0%, #2c3b30 80%, #394938 100%);
  border-bottom: 1px solid #53606a;
}
.bharara-entry .brand { gap: 12px; font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: normal; }
.bharara-entry .brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid #ab926e;
  border-radius: 6px;
  color: #f0dcc0;
  font: 500 21px/1.25 Baskerville, Georgia, serif;
}
.bharara-entry .login-system-label { color: #e7eadf; font-size: 14px; white-space: nowrap; }
.bharara-entry .login-main { display: flex; justify-content: center; padding: 64px 24px; }
.bharara-entry .login-panel {
  width: 100%;
  max-width: 440px;
  padding: clamp(24px, 4vw, 42px);
  background: white;
  border: 1px solid #d9dcd2;
  border-top: 3px solid #a78955;
  border-radius: 10px;
  box-shadow: 0 14px 40px #162b3912;
}
.bharara-entry .login-panel h1 { margin: 0 0 16px; font-size: 26px; font-weight: 600; line-height: 1.3; letter-spacing: normal; }
.bharara-entry[data-entry="customer"] .login-panel h1 {
  font: 500 clamp(30px, 3vw, 38px)/1.15 Baskerville, Georgia, "Times New Roman", serif;
  letter-spacing: -.025em;
}
.bharara-entry .login-description { margin: 0 0 24px; color: #556055; font-size: 14px; line-height: 1.6; }
.bharara-entry .field { display: grid; gap: 8px; margin: 16px 0 0; font-size: 14px; font-weight: 500; }
.bharara-entry input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #8797ac; border-radius: 6px; font-size: 16px; }
.bharara-entry .primary-btn { width: 100%; min-height: 44px; margin-top: 24px; color: #fff; background: #2d4633; border-color: #2d4633; border-radius: 6px; font-size: 16px; }
.bharara-entry .primary-btn:hover { background: #405a42; }
.bharara-entry .quiet-btn { margin-top: 16px; color: #38633e; }
@media (max-width: 600px) {
  .bharara-entry .login-topbar { padding: 0 16px; gap: 12px; }
  .bharara-entry .login-main { padding: 32px 16px; }
}

.bharara-entry .brand,
#workspace[data-role="customer"] .customer-header .brand,
.sidebar-brand {
  font-family:"Baskervville", Georgia, serif;
  font-weight:500;
  letter-spacing:.035em;
}
.bharara-entry .brand-mark,
#workspace[data-role="customer"] .customer-header .brand-mark,
.sidebar-brand .brand-mark {
  display:inline-grid;place-items:center;flex-shrink:0;
  width:2rem;height:2rem;color:#dec588;
  background:transparent;border:1px solid #ab956c;border-radius:50% 50% 4px 4px;
  font:500 1.28rem/1 Georgia,serif;
}
#workspace[data-role="customer"] .page-header h1 {
  color:#283a2c;font-family:"Baskervville", Georgia, serif;
  font-weight:500;letter-spacing:-.035em;font-size:clamp(2rem,4vw,3.1rem);
}
.sidebar .account .avatar {background:#455845;color:#f6f4e9}
.workspace[data-role="staff"] .metric:first-child {background:#293d2f;color:#fff;border-color:#293d2f}
.workspace[data-role="staff"] .metric:first-child small {color:#e0e8de}
.workspace[data-role="staff"] .metric:first-child:hover {background:#38523e}
.management-tabs,.import-actions {display:flex;gap:.55rem;flex-wrap:wrap;margin:0 0 1rem}
.management-tabs .secondary-btn[aria-current="page"] {background:#314834;color:white;border-color:#314834}
.import-form {display:grid;gap:.85rem;max-width:53rem;padding:1.3rem}
.import-form input[type=file] {height:auto;padding:.65rem}
.import-form input[type=date] {max-width:13rem}
.selected-file,.import-form .form-note {font-size:.9rem;color:var(--muted)}
.selected-file:empty,.import-receipt:empty,.import-form .status-text:empty {display:none}
.import-counts {display:grid;grid-template-columns:repeat(auto-fit,minmax(6.2rem,1fr));gap:.5rem;margin:.7rem 0}
.import-counts div {padding:.65rem .8rem;background:#eef2e9;border-radius:.4rem}
.import-counts dt {font-size:.82rem;color:#465847}
.import-counts dd {margin:.3rem 0 0;font-weight:650;font-variant-numeric:tabular-nums}
.import-form .error,.import-actions,.import-form .status-text {margin:0}
@media(max-width:500px){
  .import-form {padding:1rem}
  .import-actions button {min-height:44px}
}
