:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --bg: #f4f0e8;
  --surface: #fff;
  --ink: #24352b;
  --muted: #5b6b61;
  --green: #176448;
  --green-dark: #104b35;
  --tint: #e8f0ea;
  --gold: #8b6226;
  --gold-tint: #f8efdf;
  --line: #dce5de;
  --warning: #935b18;
  --warning-bg: #fff4e1;
  --error: #a42c36;
  --radius: 14px;
  --shadow: 0 12px 36px #104b3512;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #176448;
  outline-offset: 3px;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.35;
  letter-spacing: -0.025em;
  font-weight: 700;
}
h2 {
  font-size: 19px;
  line-height: 1.45;
}
h3 {
  font-size: 16px;
  line-height: 1.5;
}
p {
  line-height: 1.75;
}
.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.boot {
  padding: 100px 24px;
  text-align: center;
  color: var(--muted);
}
.demo-bar {
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  min-height: 32px;
  background: #e8f0ea;
  color: #176448;
  padding: 6px 16px;
}
.demo-bar button {
  text-decoration: underline;
  min-height: 24px;
  font-size: 12px;
  padding: 0;
}
.shell {
  max-width: 568px;
  margin: auto;
  padding: calc(18px + var(--safe-top)) calc(24px + var(--safe-right))
    calc(110px + var(--safe-bottom)) calc(24px + var(--safe-left));
}
.page-heading {
  margin-bottom: 26px;
}
.record-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.record-query {
  flex-shrink: 0;
  white-space: nowrap;
  min-height: 44px;
  padding: 8px 14px;
}
.compact-help summary {
  cursor: pointer;
}
.compact-help p {
  margin-top: 8px;
}
.eyebrow {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.subheading {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.7;
}
.back-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
  min-height: 38px;
}
.back-link .icon {
  width: 18px;
  height: 18px;
}
.panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
  line-height: 1.65;
}
.caption {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--tint);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 23px;
  font-weight: 600;
  flex-shrink: 0;
}
.profile-name {
  font-size: 20px;
  font-weight: 650;
  line-height: 1.5;
}
.profile-detail {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.profile-edit {
  margin-left: auto;
  border: 1px solid var(--line);
  padding: 9px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--tint);
  color: var(--green);
}
.badge.pending {
  color: var(--warning);
  background: var(--warning-bg);
}
.badge.rejected {
  color: var(--muted);
  background: #eef0ed;
}
.badge.depth {
  font-size: 12px;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  padding: 10px 0 18px;
  gap: 12px;
}
.metric {
  flex: 1 1 0;
  min-width: max-content;
  padding: 0 12px;
  border-right: 1px solid var(--line);
}
.metric:first-child {
  padding-left: 0;
}
.metric:last-child {
  border: 0;
  padding-right: 0;
}
.metric-number {
  display: block;
  font-size: 34px;
  font-weight: 680;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}
.metric-label {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
.metric.stock .metric-number {
  color: var(--green);
}
.home-summary .stats {
  padding: 6px 0 24px;
}
.home-summary .metric {
  padding: 0;
  border: 0;
  text-align: center;
}
.home-summary .metric:not(.negative):not(.active-warning) .metric-number {
  color: var(--green);
}
.metric-link {
  min-height: 44px;
}
.metric-link:hover .metric-label {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.fund-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.fund-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 72px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  opacity: 1;
  cursor: pointer;
}
.fund-symbol {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--green);
}
.fund-symbol .icon {
  width: 24px;
  height: 24px;
}
.fund-shortcut .fund-symbol {
  color: var(--green);
  background: var(--tint);
}
.fund-shortcut:hover .fund-symbol {
  background: #d9e9de;
}
.fund-pin {
  min-width: 0;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}
.fund-pin legend {
  margin-bottom: 10px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
}
.fund-pin-cells {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
}
.fund-pin-digit {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 0;
  border: 1px solid #7c9787;
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  text-align: center;
  font-size: 22px;
  line-height: 1;
  caret-color: var(--green);
}
.fund-pin-digit:focus {
  border-color: var(--green);
  outline: 2px solid var(--green);
  outline-offset: 1px;
}
.fund-confirm {
  margin-top: 20px;
}
.fund-confirm:disabled {
  cursor: not-allowed;
}
.identity-lookup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.identity-lookup .btn {
  padding-right: 14px;
  padding-left: 14px;
  white-space: nowrap;
}
.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.photo-preview {
  position: relative;
  display: flex;
  min-width: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface);
}
.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-preview > span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 10px 12px;
  overflow: hidden;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-preview-empty {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}
.photo-preview-empty > span {
  position: static;
  padding: 0;
  color: inherit;
}
.photo-preview-empty .icon {
  width: 30px;
  height: 30px;
}
.photo-view-all {
  min-height: 44px;
  margin-top: 18px;
}
.purchase-shortcut {
  flex: 1 1 0;
  min-width: max-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 72px;
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
}
.purchase-shortcut .icon {
  width: 30px;
  height: 30px;
}
.home-trade-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  padding-bottom: 18px;
  overflow-wrap: normal;
}
.home-trade-totals b {
  font-weight: 550;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  display: inline-block;
  white-space: nowrap;
}
.services-title {
  font-size: 17px;
  padding: 20px 0 10px;
}
.profile-header > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.message-button {
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
}
.metric.negative .metric-number {
  color: var(--error);
}
.service-poster {
  display: block;
  width: 100%;
  height: auto;
}
.service-copy {
  overflow-wrap: anywhere;
}
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 6px 0 22px;
}
.btn {
  min-height: 46px;
  border-radius: 10px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  background: var(--green);
  color: white;
  text-align: center;
  line-height: 1.4;
}
.btn:hover {
  background: var(--green-dark);
}
.btn.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.secondary:hover {
  background: #eef4ef;
}
.btn.light {
  background: var(--tint);
  color: var(--green);
}
.btn.danger {
  background: #faeef0;
  color: var(--error);
}
.btn.small-btn {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 12px;
}
.btn.full {
  width: 100%;
}
.text-button {
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  min-height: 40px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.count {
  border-radius: 6px;
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 12px;
  padding: 4px 7px;
}
.pending-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 15px 0;
}
.pending-row:first-of-type {
  border: 0;
}
.pending-row:last-child {
  padding-bottom: 0;
}
.initial {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #e8f0ea;
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 14px;
  flex-shrink: 0;
}
.row-main {
  min-width: 0;
  flex: 1;
}
.row-main strong {
  font-size: 14px;
  font-weight: 600;
  display: block;
  line-height: 1.6;
}
.row-main span {
  font-size: 12px;
  color: var(--muted);
  display: block;
  line-height: 1.7;
}
.row-value {
  text-align: right;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.row-value small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 5px;
}
.service-list {
  padding: 0 22px;
}
.message-button {
  position: relative;
}
.message-count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #c42b39;
  color: white;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  font-weight: 600;
}
.message-count[hidden] {
  display: none;
}
.service-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 19px 0;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
}
.service-row:last-child {
  border: 0;
}
.service-row > .icon {
  color: var(--green);
  width: 21px;
}
.service-row > span {
  font-size: 14px;
  font-weight: 550;
  flex: 1;
}
.service-row > .chevron {
  color: #617267;
  width: 17px;
}
.service-row:hover {
  color: var(--green);
}
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 568px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: white;
  border-top: 1px solid var(--line);
  padding: 10px calc(16px + var(--safe-right)) calc(10px + var(--safe-bottom))
    calc(16px + var(--safe-left));
  z-index: 10;
}
.bottom-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  min-height: 48px;
}
.bottom-nav a.active {
  color: var(--green);
  font-weight: 650;
}
.bottom-nav .icon {
  width: 23px;
  height: 23px;
}
.bottom-nav a.active .icon {
  stroke-width: 2.1;
}
.empty {
  text-align: center;
  padding: 34px 12px;
  color: var(--muted);
}
.empty .icon {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  color: #617267;
}
.empty h3 {
  color: var(--ink);
  margin-bottom: 7px;
}
.empty p {
  font-size: 13px;
  max-width: 40ch;
  margin: auto;
}
.empty .btn {
  margin-top: 20px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}
.input {
  width: 100%;
  min-width: 0;
  font-size: 16px;
  border: 1px solid #7c9787;
  background: white;
  border-radius: 9px;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--ink);
  transition: border-color 0.15s;
}
.input::placeholder {
  color: #5b6b61;
}
.input:focus {
  border-color: var(--green);
  outline: 2px solid var(--green);
  outline-offset: 0;
}
.input:disabled {
  background: #eef4ef;
  color: var(--muted);
}
textarea.input {
  resize: vertical;
  line-height: 1.8;
  min-height: 150px;
}
select.input {
  padding-right: 30px;
}
.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.7;
}
.form-error {
  color: var(--error);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.form-error:empty {
  display: none;
}
.options {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 4px 0 24px;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  min-height: 32px;
  cursor: pointer;
}
.check input {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
  margin: 0;
}
.login-panel {
  padding: 30px 26px;
}
.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.category-list li {
  padding: 14px 0;
  overflow-wrap: anywhere;
}
.category-list li + li {
  border-top: 1px solid var(--line);
}
.login-brand {
  width: 100px;
  height: 48px;
  margin-bottom: 24px;
}
.login-tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.login-tabs button {
  font-size: 17px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 0 14px;
  position: relative;
}
.login-tabs button.active {
  color: var(--ink);
}
.login-tabs button.active:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 3px;
  background: var(--green);
}
.invite-notice {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--tint);
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 22px;
  color: var(--green);
}
.demo-accounts {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.demo-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.demo-buttons button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf7f1;
  padding: 9px 12px;
  font-size: 12px;
  min-height: 38px;
}
.hint-banner {
  background: var(--warning-bg);
  color: var(--warning);
  padding: 13px 15px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 18px;
}
.tabs {
  display: flex;
  gap: 6px;
  background: #e8f0ea;
  padding: 5px;
  border-radius: 10px;
  margin-bottom: 20px;
}
.tabs a,
.tabs button {
  flex: 1;
  text-align: center;
  font-size: 13px;
  padding: 9px 5px;
  border-radius: 7px;
  color: var(--muted);
}
.tabs .active {
  background: white;
  box-shadow: 0 2px 6px #104b3510;
  color: var(--green);
  font-weight: 600;
}
.seller-tabs a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
}
.order-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}
.order-person {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}
.order-date {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.order-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.order-numbers strong {
  font-size: 16px;
  display: block;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.order-numbers span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}
.order-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px;
}
.order-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.return-line {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f4f0e8;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
.return-line strong {
  color: var(--ink);
  font-weight: 550;
}
.detail-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  padding: 14px 0;
  font-size: 14px;
}
.detail-list dt {
  color: var(--muted);
}
.detail-list dd {
  margin: 0;
  text-align: right;
}
.stock-details {
  grid-template-columns: minmax(0, 1fr) auto;
}
.stock-details dt {
  overflow-wrap: anywhere;
}
.account-id {
  max-width: 250px;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.account-id span {
  display: block;
}
.account-id .text-button {
  min-height: 44px;
  display: flex;
  margin-left: auto;
  width: fit-content;
  justify-content: flex-end;
}
.profile-details,
.buyer-identity {
  grid-template-columns: auto minmax(0, 1fr);
}
.buyer-picker .form-group {
  margin: 20px 0 12px;
}
.buyer-options {
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 8px -4px 0;
  padding: 4px;
}
.buyer-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 64px;
  padding: 12px 8px;
  gap: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.buyer-option[hidden] {
  display: none;
}
.buyer-option > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.buyer-option .caption {
  display: block;
  margin-top: 5px;
}
.buyer-option:hover,
.buyer-option[aria-pressed="true"],
.buyer-option[aria-busy="true"] {
  background: var(--tint);
  color: var(--green);
}
.sale-entry {
  margin-bottom: 20px;
}
.commission-details {
  grid-template-columns: minmax(0, 1fr) max-content;
}
.commission-details dt {
  overflow-wrap: anywhere;
}
.commission-details dd {
  white-space: nowrap;
  overflow-wrap: normal;
}
.commission-details strong {
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.commission-details .account-id {
  display: block;
  max-width: none;
}
.negative {
  color: var(--error);
}
.qr-panel {
  text-align: center;
  padding: 28px;
}
.qr {
  display: block;
  width: min(100%, 280px);
  aspect-ratio: 1;
  margin: 22px auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
}
.invite-link {
  width: 100%;
  font-size: 12px;
  word-break: break-all;
  border-radius: 8px;
  background: var(--bg);
  padding: 12px;
  color: var(--muted);
  margin: 20px 0;
}
.team-entry {
  display: block;
  color: var(--ink);
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.team-entry:hover .row-main strong,
.team-entry:focus-visible .row-main strong {
  color: var(--green);
}
.team-chevron {
  color: var(--green);
  flex-shrink: 0;
}
.team-entry:last-child {
  border: 0;
}
.team-entry[hidden] {
  display: none;
}
.report-dates,
.report-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.report-totals {
  margin-top: 20px;
}
.report-totals h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
.report-number {
  display: block;
  font-size: clamp(1rem, 4.5vw, 1.75rem);
  white-space: nowrap;
  overflow-wrap: normal;
  font-variant-numeric: tabular-nums;
}
.report-period {
  margin: 24px 0 12px;
}
.report-entry {
  padding: 20px 0;
  overflow-wrap: normal;
}
.report-entry + .report-entry {
  border-top: 1px solid var(--line);
}
.report-entry .panel-title {
  margin-bottom: 8px;
}
@media (max-width: 600px) {
  .report-dates,
  .report-totals {
    grid-template-columns: minmax(0, 1fr);
  }
  .report-dates {
    gap: 0;
  }
  .report-totals > section + section {
    border-top: 1px solid var(--line);
    padding-top: 20px;
  }
}
.team-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.team-metrics {
  display: flex;
  gap: 20px;
  margin: 15px 0 0 50px;
  font-size: 12px;
  color: var(--muted);
}
.team-metrics b {
  font-weight: 600;
  color: var(--ink);
  display: block;
  margin-top: 5px;
  font-size: 16px;
}
.article-title {
  font-size: 30px;
  line-height: 1.55;
  margin-bottom: 18px;
  max-width: 15ch;
  letter-spacing: -0.02em;
}
.article-body {
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 2;
  color: #4f6558;
  overflow-wrap: anywhere;
}
.article-panel {
  padding: 28px;
}
.article-rule {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 20px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--green);
  font-size: 12px;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.photo-card {
  overflow: hidden;
  border-radius: 12px;
  background: white;
}
.photo-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: #e6ece7;
}
.photo-card figcaption {
  font-size: 13px;
  padding: 12px 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.photo-card figure {
  margin: 0;
}
.photo-card .btn {
  margin: 0 12px 12px;
}
.photo-view {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: white;
  border-radius: 12px;
}
.upload-preview {
  display: block;
  width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--bg);
  margin: 14px 0;
}
.upload-preview[hidden] {
  display: none;
}
.admin-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  max-width: 1280px;
  margin: auto;
  min-height: calc(100vh - 106px);
}
.admin-sidebar {
  padding: 24px 20px;
  border-right: 1px solid var(--line);
}
.admin-sidebar .caption {
  padding: 0 12px;
  margin-bottom: 16px;
}
.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 12px;
  font-size: 13px;
  border-radius: 9px;
  margin-bottom: 5px;
  min-height: 46px;
}
.admin-sidebar a.active {
  background: var(--tint);
  color: var(--green);
  font-weight: 600;
}
.admin-sidebar .return-user {
  margin-top: 30px;
  color: var(--muted);
}
.admin-main {
  padding: 30px 36px 70px;
  min-width: 0;
}
.admin-main .page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.admin-stats {
  display: flex;
  flex-wrap: wrap;
  background: white;
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 22px;
  gap: 20px;
}
.admin-stats .metric-number {
  font-size: 36px;
}
.admin-stats .count-medium {
  font-size: 28px;
}
.admin-stats .count-long {
  font-size: 24px;
}
.admin-stats .count-dense {
  font-size: 20px;
}
.admin-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.directory-wrap {
  overflow-x: auto;
  background: white;
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}
th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  background: #fdfbf6;
}
th,
td {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}
tr:last-child td {
  border-bottom: 0;
}
td strong {
  font-weight: 600;
}
td .caption {
  display: block;
  font-size: 11px;
  margin-top: 5px;
}
.table-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.table-actions .commission-pay {
  margin-left: auto;
}
.directory-search {
  max-width: 340px;
  margin-bottom: 20px;
}
.admin-scope {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 18px;
  line-height: 1.7;
}
.admin-scope > .icon {
  color: var(--green);
  width: 18px;
}
.admin-main .photo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.logout {
  display: block;
  width: 100%;
  text-align: center;
  color: var(--muted);
  min-height: 44px;
  font-size: 13px;
  margin-top: 18px;
}
dialog {
  border: 0;
  border-radius: 18px;
  padding: 0;
  max-width: 440px;
  width: calc(100% - 32px - var(--safe-left) - var(--safe-right));
  box-shadow: 0 24px 70px #102f2033;
  color: var(--ink);
  max-height: calc(100vh - 40px - var(--safe-top) - var(--safe-bottom));
  max-height: calc(100dvh - 40px - var(--safe-top) - var(--safe-bottom));
  overflow: auto;
}
dialog::backdrop {
  background: #162a2066;
}
dialog[open] {
  animation: dialog-enter 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 18px;
}
.dialog-header h2 {
  font-size: 21px;
}
.dialog-close {
  display: grid;
  place-items: center;
  min-width: 36px;
  min-height: 36px;
  color: var(--muted);
}
.dialog-body {
  padding: 0 24px 24px;
}
.dialog-context {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  padding-bottom: 20px;
}
.dialog-summary {
  background: var(--tint);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 20px;
  font-size: 13px;
  color: var(--green);
}
.dialog-summary strong {
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}
#toast {
  position: fixed;
  bottom: calc(105px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  padding: 13px 18px;
  background: #104b35;
  color: #fff;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.65;
  z-index: 100;
  max-width: calc(100% - 40px);
  width: max-content;
  box-shadow: var(--shadow);
  pointer-events: none;
}
#toast:empty {
  display: none;
}
.admin-toast #toast {
  bottom: calc(28px + var(--safe-bottom));
}
#network-status {
  position: fixed;
  bottom: calc(164px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 101;
  max-width: calc(100% - 40px);
  width: max-content;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--green-dark);
  font-size: 13px;
  line-height: 1.65;
  pointer-events: none;
}
#network-status[hidden] {
  display: none;
}
.admin-toast #network-status {
  bottom: 86px;
}
.link-inline {
  color: var(--green);
  font-weight: 600;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 24px 0;
}
.privacy-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.access-error {
  padding-top: 30px;
}
.directory-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.directory-filter .directory-search {
  margin-bottom: 16px;
}
.onboarding {
  padding: 40px 0;
}
.record-list {
  margin-top: 18px;
}
.record-list .pending-row .row-main strong {
  font-size: 13px;
}
.active-warning {
  color: var(--error) !important;
}
@keyframes dialog-enter {
  from {
    transform: translateY(12px);
    box-shadow: 0 8px 24px #102f2022;
  }
  to {
    transform: translateY(0);
    box-shadow: 0 24px 70px #102f2033;
  }
}
@media (min-width: 900px) {
  .shell {
    padding-top: 28px;
  }
  .admin-main .page-heading h1 {
    font-size: 30px;
  }
  .shell .page-heading h1 {
    font-size: 30px;
  }
}
@media (max-width: 760px) {
  .admin-layout {
    display: block;
  }
  .admin-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 18px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    background: white;
  }
  .admin-sidebar .caption {
    display: none;
  }
  .admin-sidebar a {
    white-space: nowrap;
    margin: 0;
    padding: 12px;
    min-height: 44px;
  }
  .admin-sidebar a .icon {
    display: none;
  }
  .admin-sidebar .return-user {
    margin: 0;
  }
  .admin-main {
    padding: 24px 20px 50px;
  }
  .admin-columns {
    grid-template-columns: 1fr;
  }
  .admin-stats {
    padding: 20px;
    gap: 8px;
  }
  .admin-stats .metric-number {
    font-size: 22px;
  }
  .admin-main .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-main .page-heading {
    display: block;
  }
  .admin-main .page-heading > .badge {
    margin-top: 12px;
  }
}
@media (max-width: 400px) {
  .shell {
    padding-left: calc(18px + var(--safe-left));
    padding-right: calc(18px + var(--safe-right));
  }
  .panel {
    padding: 20px;
  }
  .service-list {
    padding: 0 20px;
  }
  .metric-number {
    font-size: 29px;
  }
  .metric {
    padding: 0 8px;
  }
  .stats {
    gap: 12px 6px;
  }
  .login-panel {
    padding: 26px 22px;
  }
  .article-panel {
    padding: 24px;
  }
  .order-numbers strong {
    font-size: 15px;
  }
  .order-card {
    padding: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.profile-name,
.order-person {
  overflow-wrap: anywhere;
}
.order-person > .icon {
  width: 15px;
  height: 15px;
  vertical-align: middle;
  margin: 0 3px;
}
.check {
  min-height: 44px;
}
.metric.active-warning .metric-number {
  color: var(--error);
}
.row-main .badge {
  display: inline-flex;
  width: max-content;
  color: var(--green);
  font-size: 11px;
}
.input::placeholder {
  color: var(--muted);
}
.service-row > .chevron {
  color: #5b6b61;
}
.text-button {
  min-height: 44px;
}
.profile-edit {
  min-width: 44px;
  min-height: 44px;
}
.dialog-close {
  min-width: 44px;
  min-height: 44px;
}
.login-tabs button {
  min-height: 44px;
}
@media (max-width: 760px) {
  .btn.small-btn {
    min-height: 44px;
  }
}
.back-link {
  min-height: 44px;
}
.tabs a,
.tabs button {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-numbers {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: 16px;
}
.order-numbers > div {
  min-width: 0;
}
.order-numbers > div:last-child {
  grid-column: 1/-1;
  display: flex;
  flex-direction: row-reverse;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.order-numbers > div:last-child strong {
  font-size: clamp(16px, 4.6vw, 20px);
  white-space: nowrap;
}
.order-numbers > div:last-child span {
  margin: 0;
}
.metric {
  min-width: max-content;
}
.stats .metric {
  display: flex;
  flex-direction: column;
}
.stats .metric-number {
  min-height: 48px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  overflow-wrap: normal;
  white-space: nowrap;
}
.stats .metric-label {
  font-size: 12px;
  white-space: nowrap;
}
.home-summary .stats:not(.stats-stacked) .metric-number {
  justify-content: center;
  width: 100%;
}
.home-summary .stats:not(.stats-stacked) .purchase-shortcut {
  display: grid;
  grid-template-rows: minmax(48px, auto) auto;
  align-content: start;
  justify-items: center;
  gap: 3px;
  min-height: 0;
  font-size: 12px;
  font-weight: 400;
}
.stats .count-medium {
  font-size: 1.25rem;
}
.stats .count-long {
  font-size: 1.125rem;
}
.stats .count-dense {
  font-size: 1rem;
}
.stats-stacked {
  flex-direction: column;
  gap: 0;
}
.stats-stacked .metric {
  flex: initial;
  min-width: 0;
  padding: 12px 0;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  border-right: 0;
  border-bottom: 1px solid var(--line);
}
.stats-stacked .purchase-shortcut {
  flex: initial;
  flex-direction: row;
  justify-content: flex-start;
  min-height: 48px;
  padding-top: 12px;
}
.stats-stacked .metric:last-child {
  border-bottom: 0;
}
.stats-stacked .metric-number {
  flex: initial;
  min-height: 0;
  font-size: 1.125rem;
  white-space: nowrap;
}
.profile-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.profile-details {
  margin: 0;
}
.profile-details dd {
  overflow-wrap: anywhere;
  min-width: 0;
}
.profile-qr {
  text-align: center;
}
.profile-qr h2 {
  margin-bottom: 18px;
}
.qr-placeholder {
  width: 240px;
  max-width: 100%;
  aspect-ratio: 1;
  margin: auto;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  border: 1px dashed #9db4a4;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
}
.qr-placeholder .icon {
  width: 80px;
  height: 80px;
  color: #607d6a;
}
.contact-qr {
  display: block;
  max-width: 100%;
  width: 240px;
  height: auto;
  margin: 0 auto 16px;
}
.profile-title-row .btn {
  flex-shrink: 0;
}
.booking-preview {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 12px;
  font-size: 13px;
}
.booking-preview strong {
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}
.order-breakdown {
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 14px;
}
.team-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-left: 0;
}
.team-metrics > span {
  flex: 1 1 0;
  min-width: max-content;
}
.team-metrics b {
  font-size: 14px;
  white-space: nowrap;
  overflow-wrap: normal;
}
.row-main strong {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .admin-stats-stacked {
    grid-template-columns: 1fr;
  }
  .admin-stats-stacked .metric {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    padding: 8px 0;
  }
  .admin-stats.admin-stats-stacked .metric-number {
    font-size: 1.125rem;
    white-space: nowrap;
  }
  .admin-stats .count-medium {
    font-size: 20px;
  }
  .admin-stats .count-long {
    font-size: 16px;
  }
  .admin-stats .count-dense {
    font-size: 14px;
  }
}

.avatar-image {
  display: block;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-large {
  width: 88px;
  height: 88px;
  font-size: 32px;
}
.profile-avatar-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.profile-avatar-summary strong {
  min-width: 0;
}
#avatar-preview {
  margin-bottom: 18px;
}
#avatar-preview .upload-preview {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-remove {
  margin-bottom: 20px;
}

.metric-breakdown {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.metric-breakdown dd {
  min-width: max-content;
  white-space: nowrap;
  overflow-wrap: normal;
}
.metric-entry .panel-title {
  align-items: flex-start;
  gap: 12px;
}
.metric-entry .panel-title strong {
  min-width: 0;
  overflow-wrap: normal;
}
.metric-entry .panel-title strong:last-child {
  white-space: nowrap;
  text-align: right;
}

.metric-breakdown-stacked {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.metric-breakdown-stacked dd {
  margin-bottom: 8px;
  text-align: left;
}
.metric-entry-wide .panel-title {
  display: block;
}
.metric-entry-wide .panel-title strong:last-child {
  display: block;
  margin-top: 8px;
  text-align: left;
}

/* Keep complete numeric values together; wrap their containing groups instead. */
.order-numbers {
  display: flex;
  flex-wrap: wrap;
}
.order-numbers > div {
  flex: 1 1 0;
  min-width: max-content;
}
.order-numbers strong,
.booking-preview strong,
.dialog-summary strong {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}
.order-numbers > div:last-child {
  flex: 1 0 100%;
  min-width: 0;
  flex-wrap: wrap;
}
.booking-preview,
.dialog-summary,
.metric-entry .panel-title {
  flex-wrap: wrap;
}
.dialog-summary {
  gap: 8px 16px;
}
.metric-breakdown {
  grid-template-columns: minmax(0, 1fr) max-content;
}
.metric-breakdown-stacked {
  grid-template-columns: minmax(0, 1fr);
}
.admin-layout {
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}
.admin-main {
  padding-top: calc(30px + var(--safe-top));
  padding-bottom: calc(70px + var(--safe-bottom));
}
@media (max-width: 400px) {
  .dialog-header {
    padding: 20px 18px 16px;
  }
  .dialog-body {
    padding: 0 18px 20px;
  }
  .booking-preview strong {
    font-size: 1.125rem;
  }
  .dialog-summary strong {
    font-size: 1rem;
  }
  .dialog-summary {
    padding: 14px 4px;
  }
  .metric-breakdown {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .metric-breakdown dd {
    text-align: left;
    margin-bottom: 8px;
  }
}

.admin-stats-stacked {
  flex-direction: column;
}
.admin-stats-stacked .metric {
  flex: initial;
  min-width: 0;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 6px;
  padding: 12px 0;
  border: 0;
}
.admin-stats.admin-stats-stacked .metric-number {
  font-size: 1.125rem;
}
.report-entry dd,
[data-report-summary] dd,
[data-report-participants] dd {
  white-space: nowrap;
}
@media (max-width: 400px) {
  .report-entry .detail-list,
  [data-report-summary] .detail-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .report-entry .detail-list dd,
  [data-report-summary] .detail-list dd {
    text-align: left;
    margin-bottom: 8px;
  }
}

@media (max-width: 400px) {
  .commission-details {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .commission-details dd {
    margin-bottom: 8px;
    text-align: left;
  }
}
