.profit-ledger {
  margin-top: 30px;
  color: #31473a;
}
.profit-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}
.profit-eyebrow {
  font-size: 12px;
  color: #7e806c;
  letter-spacing: 1px;
}
.profit-heading h2 {
  font-size: 25px;
  margin: 5px 0 0;
  letter-spacing: .5px;
}
.profit-heading h2 span {
  font-size: 12px;
  color: #67786a;
  background: #e8efdf;
  border-radius: 20px;
  padding: 4px 9px;
  vertical-align: middle;
  letter-spacing: 0;
  margin-left: 6px;
}
.profit-heading > small {
  font-size: 12px;
  color: #7c806e;
}
.profit-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.profit-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.profit-filters button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  min-height: 40px;
  padding: 8px 12px;
  margin: 0;
  border: 1px solid #e8dfc4;
  border-radius: 24px;
  background: #fffdf5;
  color: #6c715f;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s;
}
.profit-filters button span {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 12px;
  background: #f1eddc;
  color: #767b67;
  min-width: 22px;
}
.profit-filters button[aria-pressed=true] {
  background: #1b6240;
  color: #fff;
  border-color: #1b6240;
  box-shadow: 0 2px 4px #24513713;
}
.profit-filters button[aria-pressed=true] span {
  background: #ffdf78;
  color: #365036;
}
.profit-filter-summary {
  font-size: 12px;
  color: #7c806e;
  white-space: nowrap;
}
.profit-filter-summary > span {
  margin-right: 8px;
}
.profit-filter-summary strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  color: #1b6240;
  margin-left: 6px;
}
.profit-surface {
  background: #fff;
  border: 1px solid #e9e4d2;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 3px 12px #574d2605;
}
.profit-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: left;
}
.profit-col-order {
  width: 39%;
}
.profit-col-person {
  width: 19%;
}
.profit-col-state {
  width: 15%;
}
.profit-col-amount {
  width: 17%;
}
.profit-col-action {
  width: 10%;
}
.profit-table th {
  background: #f9f8ef;
  padding: 13px 18px;
  color: #7a806e;
  font-size: 12px;
  font-weight: 500;
  border-bottom: 1px solid #eae7d7;
}
.profit-row td {
  padding: 18px;
  border-bottom: 1px solid #f0ede1;
  vertical-align: middle;
}
.profit-row:last-of-type td {
  border-bottom: 0;
}
.profit-row:hover {
  background: #fffdf5;
}
.profit-id {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 5px;
}
.profit-code {
  font:
    600 12px/1.5 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  letter-spacing: .4px;
  color: #5e7864;
  white-space: nowrap;
}
.profit-id time {
  font-size: 11px;
  color: #919384;
  white-space: nowrap;
}
.profit-product {
  font-size: 14px;
  font-weight: 650;
  color: #354b38;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  min-width: 0;
}
.profit-person {
  font-size: 13px;
}
.profit-phone {
  display: block;
  font-size: 11px;
  color: #959787;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.profit-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.profit-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.profit-badge.pending {
  background: #fff3c8;
  color: #8b691b;
}
.profit-badge.payable {
  background: #e7f4e9;
  color: #26704b;
}
.profit-badge.settled {
  background: #edf0ed;
  color: #6b7c6f;
}
.profit-badge.excluded {
  background: #f9eee7;
  color: #9a705b;
}
.profit-amount {
  font-size: 22px;
  font-weight: 750;
  text-align: right;
  letter-spacing: -.7px;
  font-variant-numeric: tabular-nums;
  color: #1b6240;
  white-space: nowrap;
}
.profit-amount.is-zero {
  color: #939887;
}
.profit-toggle,
.profit-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  min-height: 36px;
  padding: 6px 9px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  color: #3a7351;
  border: 1px solid #e1e9dc;
  border-radius: 8px;
  white-space: nowrap;
}
.profit-toggle:hover,
.profit-copy:hover {
  background: #eef5e9;
  border-color: #98b79c;
}
.profit-toggle span {
  font-size: 16px;
  line-height: 1;
}
.profit-toggle[aria-expanded=true] span {
  transform: rotate(180deg);
}
.profit-right {
  text-align: right;
}
.profit-action {
  text-align: right;
}
.profit-row.is-expanded {
  background: #fbfcf5;
}
.profit-row.is-expanded td {
  border-bottom: 0;
}
.profit-detail td {
  padding: 0 18px 18px;
  background: #fbfcf5;
  border-bottom: 1px solid #e9ecdc;
}
.profit-detail-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 18px 20px;
  background: #f0f5e9;
  border-radius: 12px;
}
.profit-calculation dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0;
}
.profit-calculation dt {
  font-size: 11px;
  color: #7e8875;
}
.profit-calculation dd {
  margin: 5px 0 0;
  font-size: 18px;
  font-weight: 700;
  color: #2a6240;
  font-variant-numeric: tabular-nums;
}
.profit-calculation p {
  font-size: 11px;
  line-height: 1.8;
  color: #7d8573;
  margin: 12px 0 0;
}
.profit-reference {
  min-width: 0;
  display: flex;
  align-items: start;
  flex-wrap: wrap;
  gap: 8px;
}
.profit-reference > span:first-child {
  width: 100%;
  font-size: 11px;
  color: #7e8875;
}
.profit-reference code {
  display: block;
  flex-basis: 100%;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  user-select: all;
  color: #4b6653;
}
.profit-reference small {
  width: 100%;
  font-size: 11px;
  color: #7e8875;
}
.profit-copy {
  font-size: 11px;
  min-height: 34px;
}
.profit-copy-result {
  font-size: 11px;
  align-self: center;
  color: #3c7451;
}
.profit-empty {
  text-align: center;
  padding: 40px 20px;
}
.profit-empty > span {
  display: inline-grid;
  place-items: center;
  font-size: 26px;
  width: 58px;
  height: 58px;
  background: #fff7d4;
  border-radius: 50%;
  margin-bottom: 12px;
}
.profit-empty h3 {
  font-size: 16px;
  color: #526b4f;
  margin-bottom: 5px;
}
.profit-empty p {
  font-size: 13px;
  color: #8a8e7c;
  margin: 0;
}
.profit-footnote {
  font-size: 11px;
  color: #8b8d7c;
  margin: 12px 3px;
}
.profit-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.profit-ledger button:focus-visible {
  outline: 3px solid #e7b829;
  outline-offset: 3px;
}
@media (max-width: 767px) {
  .profit-ledger {
    margin-top: 24px;
  }
  .profit-heading {
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
  }
  .profit-heading h2 {
    font-size: 23px;
  }
  .profit-heading > small {
    max-width: 88px;
    text-align: right;
    font-size: 10px;
    line-height: 1.8;
  }
  .profit-controls {
    display: block;
  }
  .profit-filters {
    gap: 6px;
  }
  .profit-filters button {
    padding: 8px 10px;
    font-size: 12px;
    min-height: 38px;
    gap: 5px;
  }
  .profit-filter-summary {
    display: flex;
    justify-content: end;
    align-items: baseline;
    gap: 4px;
    margin: 12px 2px 0;
  }
  .profit-filter-summary > span {
    margin-right: auto;
  }
  .profit-filter-summary strong {
    font-size: 18px;
  }
  .profit-surface {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }
  .profit-table,
  .profit-table tbody {
    display: block;
    width: 100%;
  }
  .profit-table colgroup,
  .profit-table thead {
    display: none;
  }
  .profit-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px 8px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ece5cc;
    border-radius: 16px;
    margin-top: 10px;
    box-shadow: 0 2px 7px #574d2606;
  }
  .profit-row td {
    padding: 0;
    border: 0;
  }
  .profit-row td.profit-primary {
    display: contents;
  }
  .profit-id {
    grid-column: 1;
    grid-row: 1;
    gap: 7px;
    margin: 0;
    min-width: 0;
  }
  .profit-code {
    font-size: 11px;
    letter-spacing: 0;
  }
  .profit-id time {
    font-size: 10px;
    color: #9b9d8b;
  }
  .profit-product {
    grid-column: 1/4;
    grid-row: 2;
    font-size: 13px;
    margin: 1px 0;
  }
  .profit-person {
    grid-column: 1;
    grid-row: 3;
    align-self: center;
    font-size: 12px;
    color: #8a8f7a;
  }
  .profit-phone {
    display: none;
  }
  .profit-state {
    grid-column: 2;
    grid-row: 3;
    align-self: center;
  }
  .profit-badge {
    font-size: 10px;
    padding: 3px 7px;
  }
  .profit-amount {
    grid-column: 2/4;
    grid-row: 1;
    font-size: 23px;
    line-height: 1.2;
    align-self: center;
  }
  .profit-action {
    grid-column: 3;
    grid-row: 3;
    align-self: center;
  }
  .profit-toggle {
    font-size: 11px;
    min-height: 32px;
    padding: 4px 6px;
    background: #fffdf6;
  }
  .profit-toggle span {
    font-size: 14px;
  }
  .profit-row.is-expanded {
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: none;
  }
  .profit-detail {
    display: block;
    background: #fbfcf5;
    border: 1px solid #ece5cc;
    border-top: 0;
    border-radius: 0 0 16px 16px;
    padding: 0 12px 12px;
  }
  .profit-detail td {
    display: block;
    padding: 0;
    border: 0;
  }
  .profit-detail-inner {
    display: block;
    padding: 16px;
  }
  .profit-calculation dl {
    gap: 8px;
  }
  .profit-calculation dd {
    font-size: 18px;
  }
  .profit-reference {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #dee6d5;
  }
  .profit-footnote {
    font-size: 10px;
    line-height: 1.8;
  }
  .profit-empty {
    background: #fff;
    border: 1px solid #eee7d1;
    border-radius: 16px;
    padding: 30px 18px;
  }
  .profit-copy {
    min-height: 36px;
  }
  .profit-reference code {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .profit-filters button {
    transition: none;
  }
}
/* t391u: order snapshots lead; payment is explicitly inactive, never inferred. */
.profit-col-order{width:28%}.profit-col-person{width:12%}.profit-col-state{width:18%}.profit-col-time{width:20%}.profit-col-amount{width:14%}.profit-col-action{width:8%}
.profit-items{display:block;font-size:12px;font-weight:400;color:#6c7a66;margin-top:4px}.profit-time{font-size:12px;line-height:1.7;color:#6c7a66;font-variant-numeric:tabular-nums}.profit-mobile-label{display:none}.profit-ledger .profit-badge{font-size:11px}.profit-table th,.profit-row td{padding-left:14px;padding-right:14px}.profit-calculation dt{line-height:1.6}
@media(max-width:767px){.profit-col-time{display:none}.profit-id{grid-column:1;grid-row:1}.profit-product{grid-column:1/4;grid-row:2;white-space:normal}.profit-items{margin-top:3px;font-size:11px}.profit-person{grid-row:3}.profit-state{grid-row:3}.profit-action{grid-row:3}.profit-row td{padding:0}.profit-time{grid-column:1/4;grid-row:4;font-size:11px;color:#73816c;padding-top:3px!important}.profit-mobile-label{display:block;font-size:9px;font-weight:400;letter-spacing:0;color:#7a8571;margin-bottom:3px}.profit-amount{grid-row:1;grid-column:2/4;font-size:23px}.profit-ledger .profit-badge{font-size:10px;padding:4px 6px}.profit-heading>small{min-width:75px}.profit-eyebrow{font-size:10px}}
@media(max-width:767px){.profit-state{white-space:nowrap}.profit-state::before{content:'付費：';font-size:10px;color:#73816c;margin-right:2px}.profit-time::before{content:'下單：'}}
