@charset "UTF-8";
:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #182331;
  background: #f4f6f8;
  font-synthesis: none;
  --nav: #132330;
  --green: #00896f;
  --line: #e5eaf0;
  --muted: #788595;
  --purple: #7b63d3;
  --shadow: 0 10px 40px #102b4410;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
a {
  color: var(--green);
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.8px;
}
h2 {
  font-size: 19px;
  font-weight: 650;
}
h3 {
  font-size: 15px;
}
small {
  font-size: 12px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #57b7a0;
}
.loading {
  padding: 120px;
  text-align: center;
  color: var(--muted);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 222px;
  background: var(--nav);
  color: #aab8c4;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 28px 24px 22px;
  color: white;
}
.brand-mark {
  width: 38px;
  height: 38px;
  background: #5ce1b7;
  color: #14362f;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
}
.brand strong {
  font-size: 23px;
  letter-spacing: 3px;
}
.workspace-chip {
  margin: 0 17px 20px;
  padding: 12px;
  border: 1px solid #34434f;
  border-radius: 8px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}
.workspace-chip i {
  background: #5be0b2;
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 100%;
  margin-right: 6px;
}
.nav {
  overflow: auto;
  padding: 0 12px 24px;
  flex: 1;
}
.nav-label {
  font-size: 10px;
  padding: 15px 14px 8px;
  color: #728997;
  letter-spacing: 2px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: none;
  color: #a8b9c6;
  text-align: left;
  padding: 11px 14px;
  border-radius: 7px;
  margin: 3px 0;
  font-size: 13px;
}
.nav button:hover {
  background: #ffffff0c;
  color: white;
}
.nav button.active {
  background: #284c49;
  color: #a9f4da;
}
.nav-icon {
  width: 19px;
  font-size: 17px;
  text-align: center;
  font-family: "Segoe UI Symbol", sans-serif;
}
.sidebar-foot {
  padding: 20px;
  font-size: 11px;
  color: #78919f;
  border-top: 1px solid #ffffff0c;
}
.main {
  margin-left: 222px;
  min-height: 100vh;
}
.topbar {
  height: 74px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  gap: 16px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb b {
  font-weight: 500;
  color: #263a48;
  margin-left: 13px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 17px;
}
.local-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #648176;
  font-size: 11px;
}
.local-tag i {
  width: 6px;
  height: 6px;
  background: #40b88e;
  border-radius: 50%;
}
.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: #eee9fa;
  color: #8263c3;
  border-radius: 50%;
  font-weight: 600;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.page {
  padding: 32px 36px 40px;
  max-width: 1800px;
  margin: auto;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 18px;
}
.dashboard-date .date-compact {
  display: none;
}
.button {
  border: 1px solid #dce3e9;
  background: #fff;
  padding: 9px 14px;
  border-radius: 7px;
  color: #344759;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  white-space: nowrap;
  line-height: 1.35;
}
.button:hover {
  border-color: #9eb4ad;
  background: #f9fcfb;
}
.button.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
  box-shadow: 0 3px 8px #00896f16;
}
.button.primary:hover {
  background: #00765e;
}
.button.danger {
  color: #c05656;
  border-color: #eccccc;
}
.button.small {
  padding: 6px 10px;
  font-size: 11px;
}
.button.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.button.dark {
  background: #182f3e;
  color: white;
  border-color: #182f3e;
}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 23px;
}
.stat {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 22px;
  position: relative;
  min-height: 145px;
}
.stat.featured {
  background: #e8f5ee;
  border-color: #d3ebdd;
}
.stat-label {
  font-size: 12px;
  color: #637987;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.stat-icon {
  color: #9ba9b4;
  font-size: 17px;
}
.stat-value {
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -1.2px;
  margin-top: 20px;
  font-variant-numeric: tabular-nums;
}
.stat-value em {
  font-size: 16px;
  font-style: normal;
  margin-right: 3px;
  font-weight: 400;
  color: #677c81;
}
.stat-foot {
  margin-top: 13px;
  color: #93a0aa;
  font-size: 11px;
}
.stat-foot strong {
  color: #3f9879;
  font-weight: 500;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
  gap: 22px;
}
.panel {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-head {
  padding: 22px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-head p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.panel-content {
  padding: 23px;
}
.chart {
  height: 230px;
  position: relative;
  padding: 15px 7px 25px;
  margin-top: 25px;
  display: flex;
  align-items: end;
  gap: 10px;
  background: repeating-linear-gradient(
    to top,
    transparent 0,
    transparent 49px,
    #eef2f5 50px
  );
}
.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  height: 100%;
  min-width: 0;
}
.chart-bar {
  width: 75%;
  max-width: 28px;
  background: #aad9cb;
  min-height: 2px;
  border-radius: 5px 5px 0 0;
  position: relative;
}
.chart-col:last-child .chart-bar {
  background: #00896f;
}
.chart-label {
  font-size: 9px;
  color: #9aa6ae;
  position: absolute;
  bottom: 3px;
}
.chart-wrap {
  padding: 0 24px 12px;
}
.chart-legend {
  display: flex;
  gap: 18px;
  font-size: 11px;
  color: #7f8e9b;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00896f;
  margin-right: 5px;
}
.workflow {
  padding: 12px 23px 18px;
}
.workflow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid #f0f3f5;
}
.workflow-row:last-child {
  border: 0;
}
.workflow-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.workflow-num {
  font-size: 18px;
  font-weight: 550;
  color: #263e4b;
}
.circle-icon {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #eef3f9;
  display: grid;
  place-items: center;
  color: #7e8faa;
}
.circle-icon.green {
  background: #edf8f1;
  color: #62a57a;
}
.circle-icon.purple {
  background: #f1edfa;
  color: #9a7acb;
}
.ranking {
  padding: 8px 24px 20px;
}
.rank-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  margin-top: 20px;
  font-size: 11px;
  align-items: center;
}
.rank-number {
  width: 21px;
  height: 21px;
  border-radius: 5px;
  background: #f3f5f7;
  color: #8496a4;
  display: grid;
  place-items: center;
  font-size: 10px;
}
.rank-row:first-child .rank-number {
  background: #e4f4ec;
  color: #239170;
}
.rank-bar {
  height: 4px;
  background: #f0f4f3;
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.rank-bar i {
  display: block;
  height: 100%;
  background: #9bcfbc;
}
.rank-amount {
  font-variant-numeric: tabular-nums;
  color: #536976;
}
.table-wrap {
  overflow: auto;
  width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
}
th {
  text-align: left;
  font-size: 11px;
  color: #8896a4;
  background: #f9fafb;
  font-weight: 500;
  padding: 14px 18px;
  border-bottom: 1px solid #e9edf1;
}
td {
  padding: 16px 18px;
  border-bottom: 1px solid #edf0f3;
  color: #425769;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fbfcfd;
}
td strong {
  font-weight: 550;
  color: #2b4252;
}
td small {
  display: block;
  color: #9aa7b0;
  margin-top: 5px;
  font-size: 10px;
}
.money {
  font-variant-numeric: tabular-nums;
  font-weight: 550;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 8px;
  background: #f1f4f6;
  border-radius: 5px;
  color: #7d8d9a;
}
.badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge.followed {
  color: #6989b8;
  background: #edf3fb;
}
.badge.applying {
  color: #b18c4c;
  background: #fdf5e8;
}
.badge.approved,
.badge.paid {
  color: #369579;
  background: #e9f6f0;
}
.badge.rejected,
.badge.lost {
  color: #be6c71;
  background: #fff0f0;
}
.filter {
  display: flex;
  gap: 13px;
  align-items: end;
  padding: 20px 22px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  background: white;
}
.filter label {
  flex: 1;
  min-width: 130px;
  max-width: 230px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field span {
  font-size: 12px;
  color: #607585;
}
.field input,
.field select,
.field textarea,
.input {
  background: #fff;
  border: 1px solid #dae2e8;
  color: #324b5a;
  min-height: 37px;
  border-radius: 6px;
  padding: 9px 11px;
  width: 100%;
  font-size: 12px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #72b8a4;
  outline: 2px solid #dff3ec;
}
.field input:disabled {
  background: #f5f6f8;
}
.field textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.7;
}
.field.full {
  grid-column: 1/-1;
}
.field small {
  font-size: 10px;
  color: #95a1a9;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 19px 22px;
}
.form-section {
  margin: 28px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: #486273;
  grid-column: 1/-1;
}
.form-section:first-child {
  margin-top: 0;
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  grid-column: 1/-1;
}
.check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #647c89;
}
.check input {
  accent-color: var(--green);
  width: 15px;
  height: 15px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.selection {
  color: #738694;
  font-size: 11px;
}
.selection strong {
  color: var(--green);
}
.table-foot {
  padding: 15px 21px;
  color: #8e9ca8;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}
.link-button {
  background: none;
  border: 0;
  color: var(--green);
  padding: 3px 0;
  font-size: 12px;
}
.link-button:hover {
  text-decoration: underline;
}
.link-button.danger {
  color: #c46b70;
}
.row-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.empty {
  text-align: center;
  padding: 50px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.empty span {
  font-size: 28px;
  color: #a5b7c0;
}
.empty strong {
  font-size: 13px;
  color: #7e939f;
  font-weight: 500;
}
.empty small {
  color: #a5b2bb;
}
.muted {
  color: #94a0ab;
  font-size: 12px;
}
.callout {
  padding: 14px 17px;
  background: #f0f7f4;
  color: #557e6e;
  border: 1px solid #e2eee7;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 19px;
}
.callout.warning {
  background: #fffaed;
  color: #9c824c;
  border-color: #f0e7cd;
}
.tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.tabs button {
  background: transparent;
  border: 1px solid #e2e7eb;
  color: #80939e;
  border-radius: 6px;
  padding: 8px 13px;
  font-size: 12px;
}
.tabs button.active {
  background: #e5f2ec;
  border-color: #c8e5d6;
  color: #20886c;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 21px;
  margin: 20px 0;
}
.detail-grid small {
  display: block;
  color: #8d9eaa;
  margin-bottom: 8px;
}
.detail-grid strong {
  font-size: 14px;
  font-weight: 550;
}
.detail-banner {
  background: #f2f7f5;
  border: 1px solid #dceae2;
  padding: 20px;
  border-radius: 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.detail-banner .amount {
  font-size: 26px;
  color: var(--green);
  font-weight: 600;
}
.image-strip {
  display: flex;
  gap: 10px;
  margin: 12px 0 22px;
}
.image-strip img {
  width: 90px;
  height: 90px;
  border: 1px solid var(--line);
  object-fit: cover;
  border-radius: 6px;
}
.timeline {
  border-left: 1px solid #dce7e0;
  margin-left: 5px;
  padding-left: 19px;
}
.timeline p {
  position: relative;
  font-size: 12px;
  color: #718390;
  line-height: 1.8;
  margin-bottom: 17px;
}
.timeline p:before {
  content: "";
  position: absolute;
  left: -24px;
  top: 6px;
  width: 8px;
  height: 8px;
  border: 2px solid white;
  border-radius: 50%;
  background: #8abbab;
}
.timeline small {
  display: block;
  color: #a5b1b8;
}
.overlay {
  position: fixed;
  inset: 0;
  background: #142c405b;
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.modal {
  background: #fff;
  width: 640px;
  max-width: 100%;
  max-height: 90vh;
  border-radius: 13px;
  box-shadow: 0 30px 90px #11253640;
  display: flex;
  flex-direction: column;
}
.modal.wide {
  width: 940px;
}
.modal-head {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.icon-button {
  border: 0;
  background: #f3f6f7;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  color: #7e929f;
  font-size: 20px;
}
.modal form {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-body {
  padding: 25px 28px;
  overflow: auto;
  line-height: 1.7;
}
.modal-body > .field {
  margin-bottom: 16px;
}
.modal-foot {
  border-top: 1px solid var(--line);
  padding: 17px 28px;
  display: flex;
  justify-content: end;
  gap: 9px;
  align-items: center;
}
.modal-foot #form-error {
  margin-right: auto;
  color: #c35d5d;
  font-size: 11px;
  max-width: 65%;
  white-space: normal;
}
.modal-open {
  overflow: hidden;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #18392e;
  color: white;
  padding: 13px 23px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: 0.2s;
  max-width: 90%;
  font-size: 13px;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
#toast.error {
  background: #924c50;
}
.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafcfb;
  padding: 40px;
}
.login-brand {
  padding: 0 0 20px;
  color: #224939;
}
.login-form {
  width: 350px;
}
.login-form h2 {
  font-size: 25px;
  margin-bottom: 12px;
}
.login-form p {
  color: #8b9da7;
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 30px;
}
.login-form .field {
  margin-bottom: 19px;
}
.login-form .button {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
}
.login-error {
  color: #b75c60;
  font-size: 12px;
  margin: 15px 0;
}
.login-alt {
  margin-top: 25px;
  font-size: 12px;
  text-align: center;
  color: #8c9aa3;
}
.metric-pill {
  background: #f5f8f7;
  border-radius: 8px;
  padding: 13px;
  font-size: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.code {
  font-family: Consolas, monospace;
  background: #f3f6f7;
  padding: 14px;
  border-radius: 7px;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 12px;
}
.help-prose {
  line-height: 2;
  color: #5e7583;
  max-width: 900px;
}
.help-prose h2 {
  color: #284856;
  margin: 25px 0 12px;
}
.help-prose p {
  margin: 12px 0;
}
.client-body {
  background: #f4f7f5;
}
.client-shell {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px 24px;
}
.client-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e2eae5;
  margin-bottom: 14px;
  gap: 12px;
}
.client-header .brand {
  padding: 0;
  color: #193b30;
}
.client-header .brand small {
  color: #71998a;
}
.client-header .brand-mark {
  background: #dbefe5;
  color: #2c8a6e;
  width: 30px;
  height: 30px;
  font-size: 20px;
  border-radius: 8px;
}
.client-header .brand strong {
  font-size: 18px;
  letter-spacing: 0;
}
.client-hero {
  padding: 0 0 10px;
}
.client-hero h1 {
  font-size: 22px;
}
.client-hero p {
  color: #80988b;
  line-height: 1.9;
  margin-top: 12px;
}
.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}
.activity-card {
  border: 1px solid #dfe9e3;
  border-radius: 8px;
  background: #fff;
  min-width: 0;
  padding: 12px 14px;
}
.activity-card h3 {
  font-size: 15px;
  color: #345141;
  line-height: 1.5;
  margin-bottom: 7px;
  overflow-wrap: anywhere;
}
.activity-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.activity-metrics {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 12px;
  font-size: 13px;
  line-height: 1.6;
}
.activity-metrics .subtle {
  font-size: 12px;
}
.activity-metrics strong {
  white-space: nowrap;
}
.activity-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}
.activity-actions .button {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
  box-shadow: none;
}
.activity-window {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.client-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.client-toolbar h1 {
  font-size: 22px;
  white-space: nowrap;
}
.client-toolbar .search-inline {
  flex: 1;
  min-width: 0;
  max-width: 460px;
  margin: 0;
  gap: 6px;
}
.client-toolbar .search-inline input {
  flex: 1;
  min-width: 0;
  max-width: none;
}
.client-toolbar .input,
.client-toolbar .button {
  min-height: 36px;
  padding: 6px 10px;
}
.client-nav .button {
  min-height: 34px;
  padding: 6px 10px;
}
.client-body .panel-content {
  padding: 14px;
}
.client-body .panel {
  margin-bottom: 10px;
}
.client-body .form-grid {
  gap: 10px 12px;
}
.client-body .modal-head,
.client-body .modal-foot {
  padding: 12px 16px;
}
.client-body .modal-body {
  padding: 14px 16px;
}
.client-body .field textarea {
  min-height: 64px;
}
.client-body .callout {
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.6;
}
.report-guidance p + p {
  margin-top: 4px;
}
.client-identity,
.client-invite {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.6;
}
.client-identity span,
.client-invite > span {
  color: var(--muted);
}
.client-invite code {
  min-width: 0;
  overflow-wrap: anywhere;
}
.client-nav {
  display: flex;
  gap: 8px;
}
.client-nav button.active {
  color: #00896f;
  background: #e1eee7;
}
.client-order {
  background: white;
  border: 1px solid #e1e9e4;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.client-order-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}
.client-order .detail-grid {
  grid-template-columns: repeat(4, 1fr);
}
.mobile-menu {
  display: none;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tag {
  font-size: 10px;
  background: #f0edf8;
  color: #927db7;
  padding: 3px 6px;
  border-radius: 4px;
  display: inline-block;
  margin: 3px;
}
.notice-title {
  white-space: normal;
  max-width: 320px;
  line-height: 1.8;
}
.page-error {
  padding: 50px;
  background: white;
  border: 1px solid #ecd5d5;
  border-radius: 12px;
  color: #aa6060;
}
.capability-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.capability {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}
.capability p {
  font-size: 12px;
  color: #82939e;
  line-height: 1.9;
  margin-top: 10px;
}
.detail-label {
  color: #92a3ac;
  font-size: 11px;
}
.form-note {
  grid-column: 1/-1;
  font-size: 11px;
  color: #8b9d91;
  line-height: 1.9;
}
.full {
  grid-column: 1/-1;
}
.subtle {
  font-size: 11px;
  color: #899ba7;
}
.record-count {
  color: #80969f;
  font-size: 11px;
}
.search-inline {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}
.search-inline input {
  max-width: 370px;
}
@media (min-width: 1600px) {
  .page {
    padding-top: 40px;
  }
  .stat {
    min-height: 164px;
  }
  .stat-value {
    font-size: 34px;
  }
  .chart {
    height: 270px;
  }
  .sidebar {
    width: 238px;
  }
  .main {
    margin-left: 238px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 190px;
  }
  .main {
    margin-left: 190px;
  }
  .page {
    padding: 25px 23px;
  }
  .topbar {
    padding: 0 23px;
  }
  .cards {
    gap: 12px;
  }
  .stat {
    padding: 17px;
  }
  .stat-value {
    font-size: 24px;
  }
  .dashboard-grid {
    grid-template-columns: 1.5fr 1fr;
  }
  .activity-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 800px) {
  .sidebar {
    width: 220px;
    transform: translateX(-100%);
    transition: 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 20px 0 100px #0005;
  }
  .main {
    margin: 0;
  }
  .mobile-menu {
    display: block;
    border: 0;
    background: none;
    font-size: 19px;
    color: #617685;
  }
  .topbar {
    height: 63px;
    padding: 0 20px;
  }
  .topbar .breadcrumb {
    margin-right: auto;
  }
  .top-actions {
    gap: 8px;
  }
  .local-tag {
    display: none;
  }
  .page {
    padding: 24px 17px;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-value {
    font-size: 26px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .page-head {
    align-items: start;
  }
  h1 {
    font-size: 24px;
  }
  .page-head .actions {
    justify-content: end;
  }
  .page-head .button {
    padding: 8px 10px;
  }
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-form-wrap {
    min-height: 100vh;
  }
  .overlay {
    padding: 12px;
  }
  .modal {
    max-height: 95vh;
  }
  .modal-head,
  .modal-body {
    padding: 20px;
  }
  .modal-foot {
    padding: 15px 20px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .check-grid {
    grid-template-columns: 1fr 1fr;
  }
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
  .client-order .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
  .client-header {
    flex-wrap: wrap;
    gap: 18px;
  }
  .client-header .brand strong {
    font-size: 20px;
  }
  .client-shell {
    padding: 0 16px 80px;
  }
  .client-nav {
    gap: 0;
  }
  .client-nav button {
    padding: 8px 10px;
  }
  .capability-list {
    grid-template-columns: 1fr;
  }
  .panel-head {
    padding: 18px 18px 0;
  }
  .filter {
    padding: 16px;
  }
  .toolbar {
    padding: 13px 16px;
  }
}
@media (max-width: 480px) {
  .activity-grid {
    grid-template-columns: 1fr;
  }
  .user-chip > span {
    display: none;
  }
  .stat-value {
    font-size: 24px;
  }
  .stat-label {
    font-size: 11px;
  }
  .stat {
    padding: 17px 14px;
  }
  .stat-foot {
    font-size: 10px;
  }
  .client-nav {
    width: 100%;
    justify-content: space-between;
  }
  .client-hero h1 {
    font-size: 27px;
  }
  .form-note {
    font-size: 10px;
  }
  .filter label {
    max-width: none;
  }
  .check-grid {
    grid-template-columns: 1fr 1fr;
  }
  .table-foot {
    gap: 10px;
  }
  .topbar .breadcrumb {
    font-size: 11px;
  }
  .detail-banner {
    padding: 15px;
  }
  .detail-banner .amount {
    font-size: 23px;
  }
}

.custom-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.5fr auto auto;
  gap: 12px;
  align-items: end;
  border: 1px solid #e5eaf0;
  padding: 14px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.custom-row .check {
  padding-bottom: 10px;
}
.rule-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 16px;
  margin-bottom: 15px;
  max-width: 650px;
}
@media (max-width: 800px) {
  .custom-row {
    grid-template-columns: 1fr 1fr;
  }
  .rule-row {
    grid-template-columns: 1fr 1fr auto;
  }
}

.panel-table {
  margin-top: 20px;
}
.modal-actions {
  margin: 18px 0;
}
.dialog-note {
  margin-top: 20px;
}

/* Compact mobile layout shared by the customer pages and admin workspace. */
@media (max-width: 800px) {
  body {
    font-size: 13px;
  }
  .loading {
    padding: 32px 12px;
  }
  .button {
    min-height: 34px;
    padding: 6px 10px;
    gap: 5px;
    border-radius: 6px;
    box-shadow: none;
  }
  .button.small {
    padding: 5px 8px;
  }
  .actions,
  .row-actions {
    gap: 6px;
  }
  .badge {
    padding: 3px 6px;
    gap: 4px;
    flex-shrink: 0;
  }
  .page {
    padding: 14px 12px 24px;
  }
  .page-head {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
  }
  .page-head > div:first-child {
    min-width: 0;
    flex: 1 1 180px;
  }
  .page-head h1,
  .client-hero h1 {
    font-size: 20px;
    letter-spacing: -0.3px;
    line-height: 1.4;
  }
  .client-hero p {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.6;
  }
  .page-head .actions {
    justify-content: flex-start;
  }
  .page-head.dashboard-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "title date button";
    align-items: center;
    gap: 4px 8px;
    margin-bottom: 10px;
  }
  .dashboard-head > div:first-child,
  .dashboard-head > .actions {
    display: contents;
  }
  .dashboard-head h1 {
    grid-area: title;
  }
  .dashboard-head .dashboard-date {
    grid-area: date;
    justify-self: end;
    font-size: 10px;
    white-space: nowrap;
  }
  .dashboard-date .date-full {
    display: none;
  }
  .dashboard-date .date-compact {
    display: inline;
  }
  .dashboard-head .button {
    grid-area: button;
    justify-self: end;
    padding: 6px 10px;
    font-size: 11px;
  }
  .topbar {
    height: 54px;
    padding: 0 12px;
    gap: 8px;
  }
  .breadcrumb b {
    margin-left: 0;
  }
  .breadcrumb {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .breadcrumb > span {
    display: none;
  }
  .mobile-menu {
    flex-shrink: 0;
    min-width: 32px;
    min-height: 34px;
  }
  .avatar {
    width: 28px;
    height: 28px;
  }
  .sidebar .brand {
    padding: 16px 18px 12px;
  }
  .sidebar .brand small {
    display: none;
  }
  .workspace-chip {
    padding: 9px;
    margin-bottom: 8px;
  }
  .nav-label {
    padding: 8px 14px 4px;
  }
  .nav button {
    min-height: 36px;
    padding: 7px 14px;
    margin: 1px 0;
  }
  .sidebar-foot {
    padding: 12px 18px;
  }
  .cards {
    gap: 8px;
    margin-bottom: 12px;
  }
  .stat {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 6px;
    padding: 10px;
    min-height: 0;
    border-radius: 8px;
  }
  .stat-label {
    font-size: 10px;
    white-space: nowrap;
  }
  .stat-icon {
    display: none;
  }
  .stat-value {
    font-size: clamp(14px, 4.5vw, 20px);
    letter-spacing: -0.5px;
    margin-top: 0;
    text-align: right;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }
  .stat-value em {
    font-size: 10px;
    margin-right: 2px;
  }
  .stat-foot {
    grid-column: 1 / -1;
    margin-top: 0;
    font-size: 10px;
    line-height: 1.5;
  }
  .dashboard-grid {
    gap: 0;
    min-width: 0;
  }
  .dashboard-grid > div,
  .form-grid > *,
  .detail-grid > * {
    min-width: 0;
  }
  .panel {
    border-radius: 8px;
    margin-bottom: 12px;
  }
  .panel-head {
    padding: 12px 12px 0;
    gap: 8px;
  }
  .panel-head h3 {
    font-size: 13px;
  }
  .panel-head p {
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.5;
  }
  .panel-content {
    padding: 12px;
  }
  .panel-table {
    margin-top: 10px;
  }
  .modal-actions {
    margin: 10px 0;
  }
  .dialog-note {
    margin-top: 10px;
  }
  .chart {
    height: 160px;
    margin-top: 12px;
    gap: 5px;
  }
  .chart-wrap {
    padding: 0 12px 8px;
  }
  .chart-legend {
    gap: 8px;
    font-size: 10px;
  }
  .workflow {
    padding: 5px 12px 8px;
  }
  .workflow-row {
    padding: 8px 0;
  }
  .workflow-label {
    gap: 8px;
  }
  .circle-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
  }
  .ranking {
    padding: 0 12px 12px;
  }
  .rank-row {
    margin-top: 12px;
    gap: 7px;
  }
  .rank-bar {
    margin-top: 5px;
  }
  .filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
    gap: 9px 10px;
  }
  .filter label {
    min-width: 0;
    max-width: none;
  }
  .filter > .button {
    width: 100%;
  }
  .toolbar {
    padding: 10px 12px;
    gap: 8px;
  }
  table {
    font-size: 11px;
  }
  th {
    padding: 9px 10px;
  }
  td {
    padding: 9px 10px;
    max-width: 240px;
  }
  td small {
    margin-top: 3px;
    font-size: 10px;
  }
  .table-wrap {
    -webkit-overflow-scrolling: touch;
  }
  .notice-title {
    min-width: 180px;
    max-width: 240px;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }
  .row-actions .link-button {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 3px;
  }
  .table-foot {
    padding: 10px 12px;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.5;
  }
  .tabs {
    gap: 5px;
    margin-bottom: 10px;
  }
  .tabs button {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 11px;
  }
  .field {
    gap: 5px;
    min-width: 0;
  }
  .field span {
    font-size: 11px;
    line-height: 1.4;
  }
  .field input,
  .field select,
  .field textarea,
  .input {
    min-width: 0;
    min-height: 36px;
    padding: 6px 8px;
    /* Avoid focus zoom on iOS while keeping labels and spacing compact. */
    font-size: 16px;
  }
  .field textarea {
    min-height: 72px;
    line-height: 1.5;
  }
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px;
  }
  .form-grid > .field:has(input[type="datetime-local"]),
  .form-grid > .field:has(input[name="pay_account"]),
  .form-grid > .field:has(input[name="tracking"]) {
    grid-column: 1 / -1;
  }
  .form-section {
    margin: 8px 0 4px;
    padding-bottom: 6px;
    font-size: 12px;
  }
  .check-grid {
    gap: 6px 10px;
  }
  .check {
    min-height: 30px;
    gap: 6px;
    font-size: 11px;
    line-height: 1.4;
  }
  .custom-row {
    padding: 10px;
    gap: 8px;
    margin-bottom: 8px;
  }
  .custom-row .check {
    padding-bottom: 0;
  }
  .rule-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 10px;
  }
  .callout {
    padding: 9px 11px;
    margin-bottom: 10px;
    font-size: 11px;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }
  .empty {
    padding: 26px 12px;
    gap: 7px;
  }
  .overlay {
    padding: 8px;
  }
  .modal {
    max-height: 96vh;
    max-height: calc(100dvh - 16px);
    border-radius: 9px;
  }
  .modal-head {
    padding: 12px 14px;
  }
  .modal-head h2 {
    font-size: 16px;
    line-height: 1.5;
  }
  .modal-body {
    padding: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }
  .modal-body > .field {
    margin-bottom: 10px;
  }
  .modal-body textarea[rows] {
    height: 144px;
    min-height: 96px;
  }
  .modal-foot {
    padding: 10px 14px;
    gap: 6px;
    flex-wrap: wrap;
  }
  .modal-foot #form-error:not(:empty) {
    flex-basis: 100%;
    max-width: none;
  }
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px;
    margin: 12px 0;
  }
  .detail-grid small {
    margin-bottom: 4px;
    font-size: 10px;
  }
  .detail-grid strong {
    font-size: 13px;
    overflow-wrap: anywhere;
  }
  .detail-banner {
    padding: 12px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .detail-banner .amount {
    font-size: 22px;
  }
  .image-strip {
    gap: 7px;
    flex-wrap: wrap;
    margin: 8px 0 12px;
  }
  .image-strip img {
    width: 64px;
    height: 64px;
  }
  .image-group:has(.image-strip > .muted:only-child) {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 6px 0;
    font-size: 11px;
  }
  .image-group .image-strip:has(> .muted:only-child) {
    margin: 0;
    font-size: 11px;
  }
  .timeline p {
    margin-bottom: 10px;
    font-size: 11px;
  }
  .code {
    padding: 10px;
    font-size: 11px;
    line-height: 1.5;
  }
  .callout .code {
    margin: 6px 0;
  }
  .login-form-wrap {
    padding: 24px 18px;
    align-items: flex-start;
  }
  .login-form {
    width: 100%;
    max-width: 380px;
  }
  .login-form h2 {
    font-size: 22px;
    margin-bottom: 8px;
  }
  .login-form p {
    line-height: 1.6;
    margin-bottom: 18px;
  }
  .login-form .field {
    margin-bottom: 12px;
  }
  .login-form .button {
    padding: 9px 12px;
  }
  .login-alt {
    margin-top: 16px;
  }
  .capability-list {
    gap: 10px;
  }
  .capability {
    padding: 12px;
  }
  .capability p {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.6;
  }
  .help-prose {
    line-height: 1.7;
    font-size: 12px;
  }
  .help-prose h2 {
    font-size: 16px;
    margin: 16px 0 8px;
  }
  .help-prose p {
    margin: 8px 0;
  }
  .client-shell {
    padding: 0 12px 24px;
  }
  .client-header {
    padding: 8px 0;
    margin-bottom: 10px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .client-header .brand {
    gap: 8px;
  }
  .client-header .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 19px;
  }
  .client-header .brand strong {
    font-size: 17px;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }
  .client-header .brand,
  .client-header .brand > div {
    min-width: 0;
    max-width: 100%;
  }
  .client-header .brand small {
    display: none;
  }
  .client-nav {
    width: auto;
    flex: 1 0 auto;
    gap: 3px;
    justify-content: space-between;
  }
  .client-nav button {
    padding: 6px 8px;
    font-size: 12px;
  }
  .client-hero {
    padding: 0 0 8px;
  }
  .search-inline {
    margin-bottom: 10px;
    gap: 6px;
  }
  .search-inline input {
    flex: 1 1 0;
    min-width: 0;
  }
  .activity-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .activity-card {
    padding: 10px 12px;
  }
  .activity-card h3 {
    font-size: 14px;
    margin-bottom: 6px;
  }
  .activity-summary {
    gap: 8px;
  }
  .activity-metrics {
    gap: 1px 10px;
    font-size: 13px;
  }
  .activity-actions .button {
    min-height: 36px;
    padding: 6px 10px;
  }
  .client-toolbar {
    gap: 10px;
    margin-bottom: 8px;
  }
  .client-toolbar h1 {
    font-size: 19px;
    letter-spacing: 0;
  }
  .client-toolbar .input,
  .client-toolbar .button {
    padding: 6px 8px;
  }
  .client-body .modal-head,
  .client-body .modal-foot,
  .client-body .modal-body {
    padding: 10px 12px;
  }
  .client-order {
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
  }
  .client-order-top {
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 8px;
  }
  .client-order-top > div {
    min-width: 0;
  }
  .client-order-top h3 {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 2px;
    overflow-wrap: anywhere;
  }
  .client-order-top .muted {
    display: block;
    font-size: 10px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .client-order .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 12px;
    margin: 8px 0;
  }
  .client-order .detail-grid > div {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 6px;
  }
  .client-order .detail-grid small {
    margin: 0;
    font-size: 11px;
    line-height: 1.5;
  }
  .client-order .detail-grid strong {
    font-size: 13px;
    line-height: 1.5;
  }
  .client-order > .actions {
    gap: 5px 6px;
  }
  .client-order > .actions .button {
    padding: 6px 8px;
    font-size: 11px;
  }
  .client-order > .actions .subtle {
    font-size: 10px;
    line-height: 1.5;
  }
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 280px);
  align-items: start;
  gap: 18px;
}
.workbench-grid > *,
.workbench-grid .panel {
  min-width: 0;
}
.scope-label {
  color: var(--muted);
  font-size: 11px;
}
.permission-choice > span {
  display: block;
  font-size: 12px;
  margin-bottom: 8px;
}
.permission-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  max-height: 180px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.permission-options .check {
  margin: 0;
}
.permission-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 310px;
}
.permission-summary span {
  font-size: 10px;
  background: #f0f6f3;
  border-radius: 4px;
  padding: 3px 5px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1100px) {
  .workbench-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}
@media (max-width: 800px) {
  .workbench-grid {
    gap: 8px;
  }
  .scope-label {
    font-size: 10px;
  }
  .permission-options {
    padding: 8px;
    gap: 7px 12px;
  }
  .permission-choice > span {
    font-size: 11px;
    margin-bottom: 5px;
  }
}
@media (max-width: 359px) {
  .stat {
    padding: 8px;
    column-gap: 4px;
  }
  .stat-value {
    font-size: 14px;
  }
  .stat-foot {
    font-size: 9px;
  }
  .client-order .detail-grid {
    gap: 5px 8px;
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .custom-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
:root { --purchase-gap: 12px; }
.purchase-admin h1 { font-size: 24px; margin: 0; }
.purchase-page-head,.purchase-card-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.purchase-page-head { margin-bottom:14px; flex-wrap:wrap; }
.purchase-page-head .actions { margin:0; flex-wrap:wrap; }
.purchase-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--purchase-gap); align-items:start; }
.purchase-card { min-width:0; background:#fff; border:1px solid #dfe8e7; border-radius:10px; padding:12px 14px; overflow-wrap:anywhere; }
.purchase-card h3 { margin:0; font-size:15px; line-height:1.5; min-width:0; }
.purchase-card h3 small { font-size:12px; font-weight:400; color:#71827d; }
.purchase-card .badge { flex-shrink:0; white-space:normal; text-align:center; }
.purchase-meta { margin:5px 0; color:#72817e; font-size:12px; line-height:1.5; }
.purchase-facts { display:flex; flex-wrap:wrap; gap:5px 16px; font-size:13px; margin:8px 0; }
.purchase-facts b { font-weight:500; }
.purchase-card .actions { margin-top:8px; gap:6px; flex-wrap:wrap; }
.purchase-card .button,.purchase-tabs .button { min-height:36px; padding:6px 10px; font-size:13px; }
.purchase-tabs { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.purchase-tabs .active { color:#007f69; border-color:#8ac9ba; background:#e9f6f1; }
.purchase-details { display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px 16px; font-size:14px; }
.purchase-details dt { color:#7a8985; }.purchase-details dd { margin:0; overflow-wrap:anywhere; }
.purchase-timeline { padding-left:18px; margin:12px 0; }
.purchase-timeline li { padding:6px 0; font-size:14px; overflow-wrap:anywhere; }
.purchase-timeline small { display:block; color:#7a8985; font-size:12px; margin-top:3px; }
.purchase-stock-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.stock-count { display:flex; gap:8px; align-items:baseline; margin:6px 0; }
.stock-count strong { font-size:28px; }.stock-count span { color:#00896f; font-size:20px; }
.purchase-filter { display:flex; align-items:end; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.purchase-filter .field { flex:1; min-width:130px; }
.purchase-account-picks { display:flex; flex-wrap:wrap; gap:8px 16px; max-height:160px; overflow:auto; }
.purchase-instructions { white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:760px) {
  .purchase-list { grid-template-columns:1fr; gap:8px; }
  .purchase-stock-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .purchase-card { padding:10px 12px; }
  .purchase-page-head { margin-bottom:10px; }.purchase-admin h1 { font-size:20px; }
  .purchase-shell .client-header { flex-wrap:wrap; gap:8px; }
  .purchase-shell .client-nav { margin-left:auto; }
  .purchase-card-head { align-items:flex-start; gap:6px; }
  .purchase-card-head .badge { font-size:11px; max-width:96px; }
  .purchase-facts { gap:4px 12px; margin:6px 0; }
  .purchase-admin .button { min-height:36px; }
  .purchase-filter { gap:6px; }
}

/* Personal quick states occupy the title row, including narrow phones. */
.page-head.orders-head { flex-wrap:wrap; gap:8px; }
.page-head.orders-head .orders-heading { display:flex; align-items:center; gap:10px; flex:1 1 100%; min-width:0; }
.orders-heading h1 { white-space:nowrap; flex-shrink:0; }
.order-all-tab{border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;padding:4px 0;cursor:pointer;border-bottom:2px solid transparent}.order-all-tab.active{color:#008b73;border-bottom-color:#008b73}.order-all-tab:focus-visible{outline:2px solid #008b73;outline-offset:3px}
.import-guide{margin:12px 0}.import-guide summary{cursor:pointer;color:#008b73;padding:8px 0}.import-guide .code{white-space:pre-wrap;overflow-wrap:anywhere}
.order-quick-filters { display:flex; align-items:center; gap:5px; flex-wrap:wrap; }
.order-quick-filters .button { min-height:32px; padding:5px 9px; white-space:nowrap; }
.order-quick-filters .quick-edit { padding:5px 2px; font-size:12px; white-space:nowrap; }
@media(max-width:600px) {
  .page-head.orders-head .orders-heading { gap:6px; }
  .order-quick-filters { gap:3px; }
  .order-quick-filters .button { font-size:11px; padding:4px 5px; min-height:30px; }
  .order-quick-filters .quick-edit { font-size:11px; }
}
@media(max-width:350px) {
  .orders-head .orders-heading h1 { font-size:18px; }
}

.account-settings{padding:3px 6px;min-height:38px;cursor:pointer}.account-settings:focus-visible{outline:2px solid #00896f;outline-offset:3px}@media(max-width:700px){.account-settings>.avatar{display:flex}.account-settings{padding:2px;min-width:36px}}
.account-settings>.avatar{display:flex}
.client-order .report-facts{grid-template-columns:repeat(3,minmax(0,1fr))}

.supplement-images{margin-top:12px}.supplement-image-group{padding:10px 0;border-top:1px solid #e5ecef}.supplement-image-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.supplement-image-head strong{font-size:13px}.supplement-image-group .image-strip{margin:8px 0;flex-wrap:wrap}.supplement-image-group .selected-image-preview:empty{display:none}.supplement-image-group>small{display:block;font-size:11px}.supplement-image-head button:disabled{opacity:.5;cursor:not-allowed}
.supplement-preview{padding:0;border:0;background:transparent;cursor:zoom-in;max-width:100%}.supplement-preview[aria-expanded=true]{width:100%;cursor:zoom-out}.supplement-preview[aria-expanded=true] img{display:block;width:100%;height:auto;max-height:none;object-fit:contain}
.report-image-list{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0}.report-image-item{display:flex;flex-direction:column;align-items:flex-start;gap:6px;width:110px;max-width:100%;min-width:0}.report-image-item:has([aria-expanded=true]){width:100%}.report-image-item img,[data-report-merged] img{width:90px;height:90px;object-fit:contain;border:1px solid #e5ecef;border-radius:6px}.report-image-item small{max-width:100%;overflow-wrap:anywhere;font-size:11px}[data-report-image-status]{display:block;margin:8px 0;overflow-wrap:anywhere}[data-report-image-preview] .button{min-height:32px}[data-report-merged]{max-width:100%}
.profit-private{display:inline-flex;align-items:center;gap:6px;max-width:100%;vertical-align:middle}.profit-eye{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:30px;height:30px;padding:5px;border:0;border-radius:6px;background:transparent;color:#81939e;cursor:pointer;line-height:1}.profit-eye:hover,.profit-eye:focus-visible{background:#e9f3ef;color:#008b73}.profit-eye svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7}.profit-mask{display:none;letter-spacing:2px}.profit-eye-slash{display:none}[data-profit-hidden=true] .profit-number{display:none!important}[data-profit-hidden=true] .profit-mask{display:inline}[data-profit-hidden=true] .profit-eye-slash{display:block}.stat-value .profit-eye{width:32px;height:32px}
.system-loading{position:fixed;inset:0;z-index:300;background:#f4f6f8;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px}.system-loading strong{font-size:18px;font-variant-numeric:tabular-nums;color:#008b73}.system-loading progress{width:180px;max-width:80vw;height:6px;border:0;border-radius:6px;overflow:hidden;accent-color:#008b73}.system-loading progress::-webkit-progress-bar{background:#dfe8e6}.system-loading progress::-webkit-progress-value{background:#008b73;transition:width .2s}
.password-control{position:relative;width:100%}.field .password-control input{width:100%;padding-right:48px}.password-eye{position:absolute;right:6px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:8px;border:0;border-radius:6px;background:transparent;color:#81939e;cursor:pointer}.password-eye:hover,.password-eye:focus-visible{background:#e9f3ef;color:#008b73}.password-eye svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7}.password-eye-slash{display:none}.password-eye[aria-pressed=true] .password-eye-slash{display:block}
.activity-card-heading h3{font-size:19px;margin:10px 0 16px}.activity-tag{font-size:11px;color:#008b73;background:#eaf6f0;border-radius:5px;padding:4px 8px}.activity-description{color:#72858e;line-height:1.7;margin:0 0 18px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.activity-card{padding:22px;border-radius:14px}.activity-limit{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:18px 0;margin:16px 0;border-top:1px solid #edf2ef;border-bottom:1px solid #edf2ef}.activity-limit small{display:block;color:#8b9a9f;font-size:12px;margin-bottom:8px}.activity-limit strong{font-size:18px;color:#264d40}.activity-card .activity-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.activity-card .activity-actions .button{flex:1;min-height:44px}.activity-card .activity-actions button:disabled{background:#e8eeeb;color:#889990;border-color:#e8eeeb;opacity:1;cursor:default}
@media(max-width:700px){.client-shell:not(.purchase-shell){padding:0 18px calc(104px + env(safe-area-inset-bottom));min-height:100dvh}.client-shell:not(.purchase-shell) .client-header{padding:22px 0;margin-bottom:24px}.client-shell:not(.purchase-shell) .client-nav{position:fixed;bottom:0;left:0;right:0;width:100%;z-index:40;display:flex;gap:4px;justify-content:space-around;flex-wrap:nowrap;background:#fff;border-top:1px solid #e2ebe5;padding:12px 10px calc(12px + env(safe-area-inset-bottom));box-shadow:0 -4px 20px #173b3010}.client-shell:not(.purchase-shell) .client-nav .button{flex:1;padding:12px 4px;font-size:14px;text-align:center;white-space:nowrap;min-height:46px}.client-shell:not(.purchase-shell) .client-toolbar{align-items:center;margin-bottom:22px}.client-shell:not(.purchase-shell) .client-toolbar h1{font-size:25px}.client-shell:not(.purchase-shell) .activity-grid{gap:20px}.client-shell:not(.purchase-shell) .activity-card{padding:24px 22px;border-radius:16px}.client-shell:not(.purchase-shell) .activity-card h3{font-size:21px;line-height:1.6;margin:14px 0 22px}.client-shell:not(.purchase-shell) .activity-metrics{font-size:16px}.client-shell:not(.purchase-shell) .activity-limit{margin:22px 0;padding:22px 0}.client-shell:not(.purchase-shell) .activity-limit strong{font-size:21px}.client-shell:not(.purchase-shell) .activity-card .activity-actions .button{min-height:50px;font-size:16px}.client-shell:not(.purchase-shell) .activity-actions{flex-direction:column}}
.purchase-shell .purchase-intro{color:#81938b;font-size:13px;line-height:1.7;margin:10px 0 0}.purchase-shell .purchase-client-toolbar{gap:22px;margin-bottom:24px}.purchase-shell .purchase-card{padding:24px;border-radius:16px}.purchase-shell .purchase-card h3{font-size:19px;line-height:1.6}.purchase-shell .purchase-task-tag{display:inline-block;font-size:11px;color:#008b73;background:#eaf6f0;padding:4px 8px;border-radius:5px;margin-bottom:16px}.purchase-shell .purchase-task-spec{font-size:14px;color:#526e62;margin:8px 0 12px}.purchase-shell .purchase-meta{font-size:13px;line-height:1.8;margin:12px 0}.purchase-shell .purchase-task-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;border-top:1px solid #edf2ef;border-bottom:1px solid #edf2ef;padding:22px 0;margin:22px 0}.purchase-shell .purchase-task-metrics small{display:block;color:#87988e;font-size:12px;margin-bottom:10px}.purchase-shell .purchase-task-metrics strong{font-size:24px;color:#264d40}.purchase-shell .purchase-task-metrics strong span{font-size:13px;font-weight:400;margin-left:5px}.purchase-shell .purchase-card .actions{gap:10px;margin-top:22px}.purchase-shell .purchase-card .actions .button{flex:1;min-height:44px}.purchase-shell .purchase-task-card .actions .button{width:100%}.purchase-shell .purchase-facts{display:flex;flex-direction:column;gap:12px;background:#f5f8f6;border-radius:10px;padding:16px;margin:18px 0;font-size:14px;line-height:1.7}.purchase-shell .purchase-card .actions .primary{flex-basis:100%;order:-1}
@media(max-width:700px){.purchase-shell{padding:0 18px calc(104px + env(safe-area-inset-bottom));min-height:100dvh}.purchase-shell .client-header{padding:22px 0;margin-bottom:24px}.purchase-shell .client-header .brand strong{font-size:20px}.purchase-shell .client-nav{position:fixed;bottom:0;left:0;right:0;width:100%;margin:0;z-index:40;display:flex;justify-content:space-around;gap:8px;flex-wrap:nowrap;background:#fff;border-top:1px solid #e2ebe5;box-shadow:0 -4px 20px #173b3010;padding:12px 14px calc(12px + env(safe-area-inset-bottom))}.purchase-shell .client-nav .button{flex:1;font-size:14px;min-height:46px;padding:12px 6px}.purchase-shell .purchase-client-toolbar{display:flex;flex-direction:column;align-items:stretch;gap:20px;margin-bottom:22px}.purchase-shell .purchase-client-toolbar h1{font-size:25px}.purchase-shell .purchase-client-toolbar .search-inline{display:flex;width:100%;margin:0;gap:10px}.purchase-shell .purchase-client-toolbar .search-inline input{min-width:0;max-width:none;flex:1;min-height:46px;font-size:15px;padding:12px}.purchase-shell .purchase-client-toolbar .search-inline .button{min-height:46px;font-size:14px;padding:10px 16px}.purchase-shell .purchase-list{gap:20px}.purchase-shell .purchase-card{padding:24px 22px}.purchase-shell .purchase-card h3{font-size:21px}.purchase-shell .purchase-card-head{gap:12px;align-items:flex-start}.purchase-shell .purchase-card-head .badge{padding:6px 8px;max-width:110px;line-height:1.5}.purchase-shell .purchase-card .actions .button{min-height:48px;font-size:15px}.purchase-shell .purchase-tabs{flex-wrap:nowrap;overflow-x:auto;gap:8px;padding-bottom:10px;margin-bottom:14px}.purchase-shell .purchase-tabs .button{flex-shrink:0;white-space:nowrap;min-height:40px;padding:9px 13px;font-size:13px}.purchase-shell .empty{padding:48px 20px}}
/* Keep iPhone text sizing and the document width stable; wide tables scroll locally. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
.main,.page,.topbar,.dashboard-grid,.dashboard-grid>*,.cards,.cards>*,.panel,.panel-table,.table-wrap{min-width:0}
@media(max-width:800px){
 html,body{width:100%;max-width:100%;overflow-x:hidden;overscroll-behavior:none}
 #app,.main,.page{width:100%;max-width:100%;min-width:0}
 .topbar{width:100%;min-width:0;gap:8px}
 .topbar .breadcrumb{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
 .top-actions{flex-shrink:0;gap:6px}
 .top-actions .button{padding:7px 8px;white-space:nowrap}
 .top-actions .account-settings>span:not(.avatar){display:none}
 .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
 .stat{grid-template-columns:minmax(0,1fr);align-content:start;gap:8px;min-width:0}
 .stat-label{white-space:normal}.stat-value{text-align:left;min-width:0;max-width:100%;overflow-wrap:anywhere}
 .stat-value .profit-private{flex-wrap:wrap}.stat-foot{overflow-wrap:anywhere}
 .dashboard-grid{grid-template-columns:minmax(0,1fr)}
 .dashboard-grid .panel,.chart{max-width:100%;min-width:0}
 .table-wrap{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 .main .field input:not([type=checkbox]),.main .field select,.main .field textarea{font-size:16px}
}
.top-actions .avatar{display:flex;align-items:center;justify-content:center;flex-shrink:0;line-height:1;text-align:center;padding:0}
@media(max-width:800px){
 body.admin-workspace{position:fixed;inset:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
 body.admin-workspace #app{position:absolute;inset:0;width:100%;height:100%;overflow:hidden}
 body.admin-workspace .main{display:flex;flex-direction:column;width:100%;height:100%;min-height:0;overflow:hidden}
 body.admin-workspace .topbar{flex:0 0 54px}
 body.admin-workspace .page{flex:1 1 0;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
 body.admin-workspace.modal-open .page{overflow:hidden}
 body.admin-workspace .table-wrap{scrollbar-width:none}
 body.admin-workspace .table-wrap::-webkit-scrollbar{display:none;width:0;height:0}
 body.admin-workspace .dashboard-grid .table-wrap{overflow-x:hidden}
 body.admin-workspace .dashboard-grid table{table-layout:fixed;min-width:0;width:100%;white-space:normal}
 body.admin-workspace .dashboard-grid td,body.admin-workspace .dashboard-grid th{min-width:0;max-width:none;white-space:normal;overflow-wrap:anywhere;padding-left:8px;padding-right:8px}
}
@media(max-width:800px){
 body.admin-workspace .topbar{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:6px;padding:0 10px;height:48px;flex-basis:48px}
 .topbar #menu-toggle{display:flex;align-items:center;justify-content:center;width:28px;min-width:28px;height:32px;min-height:32px;padding:0;line-height:1;font-size:20px}
 .topbar .breadcrumb{display:block;align-self:center;margin:0;font-size:12px;line-height:1.2}
 .topbar .breadcrumb b{margin:0;font-size:12px;line-height:1.2}
 .topbar .top-actions{display:flex;align-items:center;gap:4px;margin:0}
 .topbar .top-actions .button{display:inline-flex;align-items:center;justify-content:center;height:32px;min-height:32px;margin:0;padding:0 8px;font-size:12px;line-height:1}
 .topbar .top-actions .account-settings{width:32px;padding:0;min-width:32px}
 .topbar .top-actions .avatar{width:28px;height:28px;font-size:12px;line-height:1}
}
.menu-icon{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.nav-icon{display:flex;align-items:center;justify-content:center;width:20px;height:20px;flex:0 0 20px}.workspace-chip .menu-icon{width:14px;height:14px}.mobile-menu .menu-icon{width:20px;height:20px}
.products-mobile-list{display:none}
@media(max-width:800px){
 .products-desktop-table{display:none}.products-mobile-list{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:0}
 .products-panel{background:transparent;border:0;overflow:visible}
 .products-panel>.toolbar{display:flex;flex-direction:row;align-items:baseline;gap:4px 10px;flex-wrap:wrap;background:transparent;padding:0 2px 8px;line-height:1.5;border:0;font-size:11px}
 .products-panel>.toolbar .subtle{font-size:11px;line-height:1.5}.products-panel .record-count{font-size:11px;white-space:nowrap}
 .product-mobile-card{min-width:0;background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px 12px;overflow-wrap:anywhere}
 .product-mobile-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.product-mobile-card>header>div{min-width:0;flex:1}
 .product-mobile-card h2{font-size:14px;line-height:1.4;letter-spacing:0;margin:0}.product-mobile-card header p{color:#8a9aa3;font-size:11px;line-height:1.4;margin:3px 0 0}
 .product-mobile-card header .badge{flex-shrink:0;margin:0;font-size:10px;padding:3px 6px}
 .product-card-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px;margin:8px 0 0;padding:8px 0 0;border-top:1px solid #edf1f4}
 .product-card-facts>div{min-width:0;display:flex;align-items:baseline;gap:6px}.product-card-facts dt{flex-shrink:0;font-size:11px;color:#8a9aa3;margin:0;line-height:1.5}.product-card-facts dd{min-width:0;font-size:12px;font-weight:550;line-height:1.5;color:#365267;margin:0}
 .product-card-facts .product-card-time{grid-column:1/-1}
 .product-card-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:8px;padding-top:8px;border-top:1px solid #edf1f4}
 .product-card-actions .link-button{min-height:32px;padding:5px 4px;border:1px solid var(--line);border-radius:6px;font-size:12px;line-height:20px;text-align:center}
}

/* Keep mobile admin forms inside the dialog, including iOS date controls. */
@media(max-width:800px){
 body.admin-workspace .overlay{overflow:hidden;overscroll-behavior:none}
 body.admin-workspace .modal{width:100%;min-width:0;max-width:100%;overflow:hidden}
 body.admin-workspace .modal-head,body.admin-workspace .modal-foot{flex-shrink:0;min-width:0}
 body.admin-workspace .modal form{width:100%;min-width:0;min-height:0;max-width:100%}
 body.admin-workspace .modal-body{width:100%;min-width:0;min-height:0;max-width:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y pinch-zoom;-webkit-overflow-scrolling:touch}
 body.admin-workspace .modal-body .form-grid{min-width:0;max-width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}
 body.admin-workspace .modal-body .form-grid>*{min-width:0;max-width:100%}
 body.admin-workspace .modal-body .field{min-width:0;max-width:100%}
 body.admin-workspace .modal-body .field>span{overflow-wrap:anywhere}
 body.admin-workspace .modal-body .field input:not([type=checkbox]),body.admin-workspace .modal-body .field select,body.admin-workspace .modal-body .field textarea{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box}
 body.admin-workspace .modal-body input[type=date],body.admin-workspace .modal-body input[type=datetime-local]{min-inline-size:0;max-inline-size:100%;-webkit-appearance:none;appearance:none}
 body.admin-workspace .modal-body input::-webkit-date-and-time-value{min-width:0;text-align:left}
}

.order-search-toggle{display:none}
@media(max-width:800px){
 .order-search-toggle{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;border:0;border-bottom:1px solid var(--line);background:#fff;color:#365267;text-align:left;min-height:40px;font:inherit;font-size:12px}
 .order-search-toggle strong{flex-shrink:0;font-weight:600}.order-search-hint{min-width:0;flex:1;color:#8a9aa3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.order-search-toggle-label{color:var(--accent,#008d79);flex-shrink:0}
 .order-search:not(.is-open)>.filter{display:none}
 .orders-panel .filter{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px 12px}
 .orders-panel .filter .field{min-width:0;margin:0}.orders-panel .filter .field>span{font-size:11px;line-height:1.4}
 .orders-panel .filter input,.orders-panel .filter select{width:100%;min-width:0;max-width:100%;min-height:34px;height:34px;padding:5px 7px;font-size:16px;box-sizing:border-box}
 .orders-panel .filter input[type=date]{display:block;min-inline-size:0;max-inline-size:100%;-webkit-appearance:none;appearance:none}.orders-panel .filter input::-webkit-date-and-time-value{text-align:left;min-width:0}
 .orders-panel .filter>.button{min-height:32px;padding:5px 8px;font-size:12px}
 .orders-head{margin-bottom:10px}.orders-head>.actions{gap:6px}.orders-head>.actions .button{min-height:32px;padding:5px 10px;font-size:12px}
 .orders-panel>.toolbar{padding:8px 10px;gap:6px}.orders-panel>.toolbar .actions{gap:5px}.orders-panel>.toolbar .button{min-height:30px;padding:4px 6px;font-size:11px}.orders-panel .selection{font-size:11px}
}

.order-filter-actions{display:flex;align-items:end;gap:8px}.order-filter-actions>.button{flex:1}
@media(max-width:800px){.orders-panel .order-filter-actions{grid-column:1/-1}.orders-panel .order-filter-actions>.button{min-height:32px;padding:5px 8px;font-size:12px}}

/* Freeze order identity columns while the rest of the order table scrolls. */
.orders-panel{--order-check-width:32px;--order-number-width:150px;--order-product-width:170px}
.orders-panel>.table-wrap{max-height:70vh;isolation:isolate;overscroll-behavior:contain}
.orders-panel>.table-wrap table{table-layout:fixed;min-width:960px;border-collapse:separate;border-spacing:0}
.orders-panel>.table-wrap th{position:sticky;top:0;z-index:4;background:#f9fafb}
.orders-panel>.table-wrap th:first-child,.orders-panel>.table-wrap td:first-child:not([colspan]){width:var(--order-check-width);min-width:var(--order-check-width);max-width:var(--order-check-width);padding-left:5px;padding-right:5px;position:sticky;left:0;z-index:3;background:#fff;text-align:center}
.orders-panel>.table-wrap th:nth-child(2),.orders-panel>.table-wrap td:nth-child(2){width:var(--order-number-width);min-width:var(--order-number-width);max-width:var(--order-number-width);position:sticky;left:var(--order-check-width);z-index:3;background:#fff}
.orders-panel>.table-wrap th:nth-child(3),.orders-panel>.table-wrap td:nth-child(3){width:var(--order-product-width);min-width:var(--order-product-width);max-width:var(--order-product-width);position:sticky;left:calc(var(--order-check-width) + var(--order-number-width));z-index:3;background:#fff;box-shadow:3px 0 5px -4px #486273}
.orders-panel>.table-wrap th:last-child{width:170px}
.orders-panel>.table-wrap thead th:nth-child(-n+3){z-index:6;background:#f9fafb}
.orders-panel>.table-wrap td:nth-child(2),.orders-panel>.table-wrap td:nth-child(3){white-space:normal;overflow-wrap:anywhere;line-height:1.45}
@media(max-width:800px){
 #page:has(>.orders-head){padding-left:4px;padding-right:4px}
 .orders-head{padding:0 4px}
 .orders-panel{--order-check-width:24px;--order-number-width:104px;--order-product-width:112px;border-radius:6px}
 .orders-panel>.table-wrap{max-height:65vh;max-height:65dvh}
 .orders-panel>.table-wrap table{min-width:850px}
 .orders-panel>.table-wrap th,.orders-panel>.table-wrap td{padding:8px 5px}
 .orders-panel>.table-wrap th{font-size:10px}
 .orders-panel>.table-wrap td small{font-size:10px;line-height:1.35;margin-top:3px}
 .orders-panel .table-foot{padding:10px 8px;gap:6px;flex-wrap:wrap}
}

@media(max-width:800px){
 .orders-panel>.table-wrap table{min-width:730px}
 .orders-panel>.table-wrap th:last-child{width:100px}
 .orders-panel>.table-wrap .row-actions{flex-wrap:wrap;gap:4px 7px;white-space:normal}
}
@media(max-width:359px){.orders-panel{--order-check-width:22px;--order-number-width:86px;--order-product-width:92px}}

@media(max-width:800px){
 .main .orders-panel .filter .field input,.main .orders-panel .filter .field select{font-size:12px;line-height:1.4}
 .main .orders-panel .filter .field input::placeholder{font-size:inherit}
 .main .orders-panel .filter input::-webkit-date-and-time-value{font-size:inherit}
}

.order-identity-mobile{display:none}
@media(max-width:800px){
 .orders-panel{--order-check-width:24px;--order-number-width:calc((100vw - 10px)/3 - var(--order-check-width))}
 .orders-panel>.table-wrap table{min-width:630px}
 .orders-panel>.table-wrap th:nth-child(3),.orders-panel>.table-wrap td:nth-child(3){display:none}
 .orders-panel>.table-wrap th:nth-child(2),.orders-panel>.table-wrap td:nth-child(2){box-shadow:3px 0 5px -4px #486273}
 .orders-panel .order-identity-desktop{display:none}
 .orders-panel .order-identity-mobile{display:block;min-width:0;max-width:100%;line-height:1.35}
 .orders-panel .order-identity-link{display:block;width:100%;min-width:0;padding:0;border:0;background:transparent;text-align:left;font:inherit;color:#2b4252;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer}
 .orders-panel .order-identity-number{font-size:11px;font-weight:600;line-height:1.4}
 .orders-panel .order-identity-product{font-size:10px;font-weight:500;line-height:1.4;margin-top:2px}
 .orders-panel .order-identity-link:focus-visible{outline:1px solid #008b73;outline-offset:-1px}
 .orders-panel .order-identity-mobile small,.orders-panel .order-identity-mobile time{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:10px;font-weight:400;line-height:1.35;color:#8a9aa3;margin-top:2px}
}

@media(max-width:800px){
 .page-head.orders-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 6px;margin-bottom:6px;padding:0 4px}
 .page-head.orders-head .orders-heading{display:contents}
 .orders-head .orders-heading h1{grid-column:1;grid-row:1;font-size:20px;line-height:1.3;margin:0}
 .orders-head .order-all-tab{padding:2px 0}
 .orders-head>.actions{grid-column:2;grid-row:1;justify-self:end;display:flex;flex-wrap:nowrap;gap:4px;margin:0}
 .orders-head>.actions .button{min-height:26px;padding:3px 6px;font-size:11px;line-height:18px;white-space:nowrap}
 .orders-head .order-quick-filters{grid-column:1/-1;grid-row:2;gap:4px}
 .orders-head .order-quick-filters .button{min-height:25px;padding:2px 6px;font-size:11px;line-height:19px}
 .orders-head .order-quick-filters .quick-edit{padding:2px 3px;font-size:11px}
 .orders-panel .order-search-toggle{min-height:34px;padding:6px 8px;font-size:11px;gap:6px}
 .orders-panel>.toolbar{padding:6px 7px;gap:4px}
 .orders-panel>.toolbar .actions{gap:3px}
 .orders-panel>.toolbar .button{min-height:26px;padding:3px 5px;font-size:10px;line-height:18px}
 .orders-panel .selection{font-size:10px;white-space:nowrap}
 .orders-panel .filter{padding:8px;gap:6px 8px}
 .orders-panel .filter .field{gap:4px}
 .orders-panel .filter input,.orders-panel .filter select{min-height:30px;height:30px;padding:4px 6px}
 .orders-panel .order-filter-actions{gap:6px}
 .orders-panel .order-filter-actions>.button{min-height:28px;padding:3px 7px;line-height:20px}
}

.orders-head .order-all-tab{font-weight:400;color:#425769;border:1px solid var(--line);border-radius:6px;background:#fff;text-decoration:none}
.orders-head .order-all-tab.active{color:#425769;background:#edf2f4;border-color:#d8e1e6}
@media(max-width:800px){
 .page-head.orders-head{display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:3px;min-width:0;max-width:100%;padding:0 2px;margin-bottom:6px;overflow-x:auto;scrollbar-width:none}
 .orders-head::-webkit-scrollbar{display:none}
 .page-head.orders-head .orders-heading,.orders-head .order-quick-filters,.orders-head>.actions{display:contents}
 .orders-head .orders-heading h1{flex:0 0 auto;font-size:10px;font-weight:400;line-height:18px;margin:0}
 .orders-head .order-all-tab,.orders-head .order-quick-filters .button,.orders-head>.actions .button,.orders-head .order-quick-filters .quick-edit{flex:0 0 auto;min-height:24px;height:24px;padding:2px 3px;font-size:10px;font-weight:400;line-height:18px;white-space:nowrap}
 .orders-head .order-quick-filters .quick-edit{padding-left:1px;padding-right:1px}
}
@media(max-width:359px){
 .page-head.orders-head{gap:2px;padding:0}
 .orders-head .orders-heading h1{font-size:9px}
 .orders-head .order-all-tab,.orders-head .order-quick-filters .button,.orders-head>.actions .button,.orders-head .order-quick-filters .quick-edit{font-size:9px;padding-left:2px;padding-right:2px}
}

@media(max-width:800px){
 .orders-panel tbody td:nth-child(-n+2):not([colspan]){cursor:pointer;-webkit-tap-highlight-color:#008b731a}
 .orders-panel tbody tr:has(.row-check:checked)>td:nth-child(-n+2){background:#edf7f3}
}

@media(max-width:800px){
 #page:has(>.reports-head){padding-left:4px;padding-right:4px}
 .reports-head{padding:0 4px;margin-bottom:8px;gap:6px}
 .reports-head h1{font-size:18px;line-height:1.4}
 .reports-head .button{min-height:28px;padding:4px 8px;font-size:11px;line-height:18px}
 .reports-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin-bottom:8px}
 .reports-tabs button{width:100%;min-width:0;min-height:26px;padding:3px 2px;font-size:10px;line-height:18px;white-space:nowrap}
 .reports-panel{border-radius:6px}
 #report-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;padding:8px;gap:6px 8px}
 #report-filters .field{min-width:0;max-width:100%;margin:0;gap:4px}
 #report-filters .field>span{font-size:11px;line-height:1.4}
 .main #report-filters .field input,.main #report-filters .field select{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box;height:30px;min-height:30px;padding:4px 6px;font-size:12px;line-height:1.4}
 #report-filters input[type=date]{min-inline-size:0;max-inline-size:100%;-webkit-appearance:none;appearance:none}
 #report-filters input::-webkit-date-and-time-value{font-size:inherit;min-width:0;text-align:left}
 #report-filters>.button{align-self:end;min-width:0;width:100%;height:30px;min-height:30px;padding:4px 6px;font-size:12px;line-height:20px}
 .reports-panel th,.reports-panel td{padding:8px 6px;font-size:11px}
 .reports-panel .table-foot{padding:8px;gap:6px;flex-wrap:wrap;font-size:11px;line-height:1.5}
}

@media(max-width:800px){
 .orders-head>.actions>.button:first-child{margin-left:auto}
}

.orders-panel>.toolbar{display:grid;grid-template-columns:minmax(0,1fr)}
@media(max-width:800px){
 .orders-panel>.toolbar>.actions{display:flex;flex-wrap:nowrap;min-width:0;max-width:100%;overflow-x:auto;scrollbar-width:none}
 .orders-panel>.toolbar>.actions::-webkit-scrollbar{display:none}
 .orders-panel>.toolbar>.actions>*{flex-shrink:0}
}
@media(max-width:359px){.orders-panel>.toolbar .button{font-size:9.5px;padding-left:3px;padding-right:3px}}

.upload-progress-overlay{position:fixed;inset:0;z-index:400;display:flex;align-items:center;justify-content:center;padding:20px;background:#13253066;touch-action:none;overscroll-behavior:contain}
.upload-progress-window{box-sizing:border-box;width:320px;max-width:100%;padding:26px 24px 22px;border:1px solid #e3ebe8;border-radius:16px;background:#fff;box-shadow:0 16px 56px #102b3633;text-align:center;outline:none}
.upload-progress-title{display:block;color:#253f4b;font-size:17px;font-weight:600;line-height:1.5}
.upload-progress-percent{display:block;margin:14px 0 10px;color:#008b73;font-size:36px;line-height:1.2;font-variant-numeric:tabular-nums}
.upload-progress-window progress{display:block;width:100%;height:8px;margin:0;border:0;border-radius:8px;overflow:hidden;background:#e7eeec;accent-color:#008b73}
.upload-progress-window progress::-webkit-progress-bar{background:#e7eeec}
.upload-progress-window progress::-webkit-progress-value{background:#008b73;transition:width .2s}
.upload-progress-window progress::-moz-progress-bar{background:#008b73}
.upload-progress-hint{margin:14px 0 0;color:#7c8e98;font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.upload-progress-window .button{margin-top:18px;width:100%;min-height:40px;font-size:14px;touch-action:manipulation}
.upload-progress-window [hidden]{display:none!important}
.upload-progress-failed .upload-progress-title{color:#cf5b62}
