@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-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; }
}
