/* sys_2D — 3D module styles (3d/ folder). Loaded after style.css */

.sys3d-board-shell {
  position: relative;
  font-variant-numeric: tabular-nums;
}

.sys3d-board-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.sys3d-tool-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Footer + head controls: muted (not dark btn-secondary) */
#adminMainBoard3dPage .sys3d-footer-tools .sys3d-tool-btn.btn-secondary,
#agentMainBoard3dPage .sys3d-footer-tools .sys3d-tool-btn.btn-secondary,
#adminMainBoardPage .sys3d-main-head .btn-main-head-define.btn-secondary,
#adminMainBoard3dPage .sys3d-main-head .btn-main-head-define.btn-secondary,
#agentMainBoard3dPage .sys3d-main-head .btn-main-head-define.btn-secondary {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-weight: 600;
  box-shadow: none;
}

#adminMainBoard3dPage .sys3d-footer-tools .sys3d-tool-btn.btn-secondary:hover,
#agentMainBoard3dPage .sys3d-footer-tools .sys3d-tool-btn.btn-secondary:hover,
#adminMainBoardPage .sys3d-main-head .btn-main-head-define.btn-secondary:hover,
#adminMainBoard3dPage .sys3d-main-head .btn-main-head-define.btn-secondary:hover,
#agentMainBoard3dPage .sys3d-main-head .btn-main-head-define.btn-secondary:hover {
  background: #f1f5f9;
  color: #334155;
  border-color: #94a3b8;
}

#adminMainBoard3dPage .sys3d-footer-tools .sys3d-tool-btn.btn-secondary:active,
#agentMainBoard3dPage .sys3d-footer-tools .sys3d-tool-btn.btn-secondary:active,
#adminMainBoardPage .sys3d-main-head .btn-main-head-define.btn-secondary:active,
#adminMainBoard3dPage .sys3d-main-head .btn-main-head-define.btn-secondary:active,
#agentMainBoard3dPage .sys3d-main-head .btn-main-head-define.btn-secondary:active {
  background: #e2e8f0;
  color: #1e293b;
}

.sys3d-footer-tools {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.28rem;
  flex-shrink: 0;
  max-width: 100%;
}

.sys3d-grand-sum-inputs {
  flex-wrap: wrap;
  align-items: center;
  row-gap: 0.28rem;
}

/* Footer tools (incl. Purchaser) must not clip — style.css grand-sum-wrap uses overflow:hidden */
#adminMainBoard3dPage .sys3d-board-main > .agent-main-board-grand-sum-wrap,
#agentMainBoard3dPage .sys3d-board-main > .agent-main-board-grand-sum-wrap {
  overflow: visible;
}

#adminMainBoard3dPage .agent-main-board-grand-sum-inputs.sys3d-grand-sum-inputs,
#agentMainBoard3dPage .agent-main-board-grand-sum-inputs.sys3d-grand-sum-inputs {
  flex-wrap: wrap;
  row-gap: 0.28rem;
  overflow: visible;
}

#adminMainBoard3dPage .sys3d-footer-tools,
#agentMainBoard3dPage .sys3d-footer-tools {
  flex: 0 0 auto;
  max-width: 100%;
}

/* Purchaser = admin 3D MAIN only (3D-P02) */
#adminMainBoard3dPage #sys3dPurchaserBtn {
  display: inline-flex !important;
  visibility: visible !important;
}

#agentMainBoard3dPage #sys3dPurchaserBtn {
  display: none !important;
}

#adminMainBoard3dPage .agent-main-board-grand-sum-inputs.sys3d-grand-sum-inputs,
#agentMainBoard3dPage .agent-main-board-grand-sum-inputs.sys3d-grand-sum-inputs {
  flex-wrap: wrap !important;
  overflow: visible !important;
}

#adminMainBoard3dPage .agent-main-board-footer-lead,
#agentMainBoard3dPage .agent-main-board-footer-lead {
  min-width: 0;
  overflow: visible;
}

/* 3D MAIN footer grand boxes: box 1 + box 3 at 3/5 width; box 2 unchanged */
#adminMainBoard3dPage .main-board-grand-input--7,
#agentMainBoard3dPage .main-board-grand-input--7 {
  width: calc((14ch + 0.7rem) * 0.6);
  max-width: 100%;
}

#adminMainBoard3dPage .main-board-grand-input--5,
#agentMainBoard3dPage .main-board-grand-input--5 {
  width: calc((10ch + 0.7rem) * 0.6);
}

#adminMainBoard3dPage #sys3dPagePrev,
#adminMainBoard3dPage #sys3dPageNext,
#agentMainBoard3dPage #sys3dPagePrev,
#agentMainBoard3dPage #sys3dPageNext {
  box-sizing: border-box;
  min-width: 2.65rem;
  min-height: 2rem;
  padding: 0.2rem 0.55rem;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  color: #0f172a;
  border-color: #94a3b8;
  background: #fff;
}

#adminMainBoard3dPage #sys3dPagePrev:hover,
#adminMainBoard3dPage #sys3dPageNext:hover,
#agentMainBoard3dPage #sys3dPagePrev:hover,
#agentMainBoard3dPage #sys3dPageNext:hover {
  color: #020617;
  background: #f8fafc;
  border-color: #64748b;
}

.sys3d-member-host {
  min-height: 8rem;
}

.sys3d-member-placeholder {
  text-align: center;
  padding: 1rem 0.75rem;
}

.sys3d-member-placeholder__title {
  margin: 0 0 0.35rem;
  font-weight: 800;
  color: #5b21b6;
}

/* 3D member feed select-mode visuals (explicit override for 3D pane). */
.member-intake-root--3d.member-intake-root--select-mode .member-composer-dock {
  opacity: 0.42;
  pointer-events: none;
}

.member-intake-root--3d.member-intake-root--select-mode .member-keyboard-panel {
  display: none !important;
}

.member-chat-grid--3d .member-chat-row--selected,
.member-chat-feed--3d .member-chat-row--selected {
  background: #dbeafe !important;
  box-shadow: inset 3px 0 0 #2563eb !important;
}

.member-chat-grid--3d .member-chat-row--selected .member-chat-cell,
.member-chat-feed--3d .member-chat-row--selected .member-chat-cell {
  background: #dbeafe !important;
  font-weight: 700;
}

/* 3D MAIN mobile stack — disabled; UX-08 in style.css keeps 3-col / 4-grid parity with 2D MAIN */

/* 3D SUMMARY — Sale Summary sheet grid (soft footer, not yellow) */
.agent-summary-3d-page__win-group {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
}

.agent-summary-3d-page__online-time {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

#adminStockSummary3dPage .agent-summary-page__meta,
#agentStockSummary3dPage .agent-summary-page__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
}

#adminStockSummary3dPage .agent-summary-page__meta-item--push,
#agentStockSummary3dPage .agent-summary-page__meta-item--push {
  margin-inline-start: auto;
}

/* W num — plain digits, no pill background (2D agent SUMMARY parity). */
.agent-summary-3d-page__win-pill,
#admin3dSummaryWinPill.summary-page__v--pill,
#agentStock3dSummaryWinPill.summary-page__v--pill {
  min-width: 0;
  text-align: center;
  font-weight: 600;
  background: none !important;
  color: #0f172a;
  border-radius: 0;
  padding: 0;
}

.agent-summary-3d-table {
  table-layout: fixed;
  width: 100%;
}

.agent-summary-3d-table thead th {
  font-size: 0.82rem;
}

/* Name — Latin/display name only (Segoe UI stack, not Myanmar). */
.agent-summary-3d-table col.agent-summary-3d-col--wnum {
  width: 3.2rem;
  min-width: 3.2rem;
  max-width: 3.2rem;
}

.agent-summary-3d-table th.agent-summary-3d-col--wnum,
.agent-summary-3d-table td.agent-summary-3d-col--wnum {
  width: 3.2rem;
  min-width: 3.2rem;
  max-width: 3.2rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.agent-summary-3d-table th.agent-summary-3d-col--name,
.agent-summary-3d-table td.agent-summary-3d-col--name,
.agent-summary-3d-table thead tr:first-child th:nth-child(1),
.agent-summary-3d-table tbody td:nth-child(1).agent-summary-grid-table__td--text {
  font-family: var(--font-sans);
  text-align: left;
}

/* 3D REPORT — compact Period column (W Num is separate). */
.agent-summary-3d-table--report col.agent-summary-3d-col--name,
.report-3d-table-wrap col.agent-summary-3d-col--name {
  width: 6.5rem;
  min-width: 6.5rem;
  max-width: 6.5rem;
}

.agent-summary-3d-table--report th.agent-summary-3d-col--name,
.agent-summary-3d-table--report td.agent-summary-3d-col--name,
.report-3d-table-wrap th.agent-summary-3d-col--name,
.report-3d-table-wrap td.agent-summary-3d-col--name {
  width: 6.5rem;
  max-width: 6.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* % column — fixed 2rem (SUMMARY 14-col only; REPORT uses block below). */
#admin3dSummaryDataTable col:nth-child(3),
#agentStock3dSummaryDataTable col:nth-child(3),
.agent-summary-3d-table:not(.agent-summary-3d-table--report) col.agent-summary-3d-col--pct {
  width: 2rem !important;
  min-width: 2rem !important;
  max-width: 2rem !important;
}

.agent-summary-3d-table:not(.agent-summary-3d-table--report) thead tr:first-child th:nth-child(3),
.agent-summary-3d-table:not(.agent-summary-3d-table--report) tbody td:nth-child(3),
.agent-summary-3d-table:not(.agent-summary-3d-table--report) th.agent-summary-3d-col--pct,
.agent-summary-3d-table:not(.agent-summary-3d-table--report) td.agent-summary-3d-col--pct {
  width: 2rem !important;
  min-width: 2rem !important;
  max-width: 2rem !important;
  padding-left: 0.1rem !important;
  padding-right: 0.1rem !important;
  box-sizing: border-box;
}

#admin3dSummaryDataTable col:nth-child(4),
#agentStock3dSummaryDataTable col:nth-child(4),
.agent-summary-3d-table:not(.agent-summary-3d-table--report) col.agent-summary-3d-col--return {
  width: 5rem !important;
  min-width: 5rem !important;
  max-width: 5rem !important;
}

.agent-summary-3d-table:not(.agent-summary-3d-table--report) thead tr:first-child th:nth-child(4),
.agent-summary-3d-table:not(.agent-summary-3d-table--report) tbody td:nth-child(4),
.agent-summary-3d-table:not(.agent-summary-3d-table--report) th.agent-summary-3d-col--return,
.agent-summary-3d-table:not(.agent-summary-3d-table--report) td.agent-summary-3d-col--return {
  width: 5rem !important;
  min-width: 5rem !important;
  max-width: 5rem !important;
  padding-left: 0.12rem !important;
  padding-right: 0.12rem !important;
  box-sizing: border-box;
}

/* 1st / 2nd Win: win amount narrow, x wide (swapped vs default equal split). */
#admin3dSummaryDataTable col:nth-child(6),
#admin3dSummaryDataTable col:nth-child(9),
#agentStock3dSummaryDataTable col:nth-child(6),
#agentStock3dSummaryDataTable col:nth-child(9),
.agent-summary-3d-table col.agent-summary-3d-col--win-amt {
  width: 3.85rem !important;
  min-width: 3.85rem !important;
  max-width: 3.85rem !important;
}

#admin3dSummaryDataTable col:nth-child(7),
#admin3dSummaryDataTable col:nth-child(10),
#agentStock3dSummaryDataTable col:nth-child(7),
#agentStock3dSummaryDataTable col:nth-child(10),
.agent-summary-3d-table col.agent-summary-3d-col--win-x {
  width: 2.75rem !important;
  min-width: 2.75rem !important;
  max-width: 2.75rem !important;
}

.agent-summary-3d-table:not(.agent-summary-3d-table--report) thead tr:nth-child(2) th:nth-child(1),
.agent-summary-3d-table:not(.agent-summary-3d-table--report) thead tr:nth-child(2) th:nth-child(3),
.agent-summary-3d-table:not(.agent-summary-3d-table--report) tbody td:nth-child(6),
.agent-summary-3d-table:not(.agent-summary-3d-table--report) tbody td:nth-child(9),
.agent-summary-3d-table th.agent-summary-3d-col--win-amt,
.agent-summary-3d-table td.agent-summary-3d-col--win-amt {
  width: 3.85rem !important;
  max-width: 3.85rem !important;
  min-width: 3.85rem !important;
  padding-left: 0.12rem !important;
  padding-right: 0.12rem !important;
  box-sizing: border-box;
}

.agent-summary-3d-table:not(.agent-summary-3d-table--report) thead tr:nth-child(2) th:nth-child(2),
.agent-summary-3d-table:not(.agent-summary-3d-table--report) thead tr:nth-child(2) th:nth-child(4),
.agent-summary-3d-table:not(.agent-summary-3d-table--report) tbody td:nth-child(7),
.agent-summary-3d-table:not(.agent-summary-3d-table--report) tbody td:nth-child(10),
.agent-summary-3d-table th.agent-summary-3d-col--win-x,
.agent-summary-3d-table td.agent-summary-3d-col--win-x {
  width: 2.75rem !important;
  max-width: 2.75rem !important;
  min-width: 2.75rem !important;
  padding-left: 0.15rem !important;
  padding-right: 0.15rem !important;
  box-sizing: border-box;
}

/* 3D REPORT — 15-col layout (Period + W Num). Slightly trim other cols; widen Sold. */
.agent-summary-3d-table--report col.agent-summary-3d-col--wnum,
.report-3d-table-wrap col.agent-summary-3d-col--wnum {
  width: 3rem;
  min-width: 3rem;
  max-width: 3rem;
}

.agent-summary-3d-table--report th.agent-summary-3d-col--wnum,
.agent-summary-3d-table--report td.agent-summary-3d-col--wnum,
.report-3d-table-wrap th.agent-summary-3d-col--wnum,
.report-3d-table-wrap td.agent-summary-3d-col--wnum {
  width: 3rem;
  min-width: 3rem;
  max-width: 3rem;
}

.agent-summary-3d-table--report col.agent-summary-3d-col--sold,
.report-3d-table-wrap col.agent-summary-3d-col--sold {
  width: 6.25rem !important;
  min-width: 6.25rem !important;
  max-width: 6.25rem !important;
}

.agent-summary-3d-table--report thead tr:first-child th:nth-child(3),
.agent-summary-3d-table--report tbody td:nth-child(3),
.report-3d-table-wrap thead tr:first-child th:nth-child(3),
.report-3d-table-wrap tbody td:nth-child(3) {
  width: 6.25rem !important;
  min-width: 6.25rem !important;
  max-width: 6.25rem !important;
  box-sizing: border-box;
}

.agent-summary-3d-table--report col.agent-summary-3d-col--pct,
.report-3d-table-wrap col.agent-summary-3d-col--pct {
  width: 1.85rem !important;
  min-width: 1.85rem !important;
  max-width: 1.85rem !important;
}

.agent-summary-3d-table--report thead tr:first-child th:nth-child(4),
.agent-summary-3d-table--report tbody td:nth-child(4),
.agent-summary-3d-table--report th.agent-summary-3d-col--pct,
.agent-summary-3d-table--report td.agent-summary-3d-col--pct,
.report-3d-table-wrap thead tr:first-child th:nth-child(4),
.report-3d-table-wrap tbody td:nth-child(4) {
  width: 1.85rem !important;
  min-width: 1.85rem !important;
  max-width: 1.85rem !important;
  box-sizing: border-box;
}

.agent-summary-3d-table--report col.agent-summary-3d-col--return,
.report-3d-table-wrap col.agent-summary-3d-col--return {
  width: 4.4rem !important;
  min-width: 4.4rem !important;
  max-width: 4.4rem !important;
}

.agent-summary-3d-table--report thead tr:first-child th:nth-child(5),
.agent-summary-3d-table--report tbody td:nth-child(5),
.report-3d-table-wrap thead tr:first-child th:nth-child(5),
.report-3d-table-wrap tbody td:nth-child(5) {
  width: 4.4rem !important;
  min-width: 4.4rem !important;
  max-width: 4.4rem !important;
  box-sizing: border-box;
}

.agent-summary-3d-table--report col.agent-summary-3d-col--received,
.report-3d-table-wrap col.agent-summary-3d-col--received {
  width: 4.35rem !important;
  min-width: 4.35rem !important;
  max-width: 4.35rem !important;
}

.agent-summary-3d-table--report thead tr:first-child th:nth-child(6),
.agent-summary-3d-table--report tbody td:nth-child(6),
.report-3d-table-wrap thead tr:first-child th:nth-child(6),
.report-3d-table-wrap tbody td:nth-child(6) {
  width: 4.35rem !important;
  min-width: 4.35rem !important;
  max-width: 4.35rem !important;
  box-sizing: border-box;
}

.agent-summary-3d-table--report col.agent-summary-3d-col--win-amt,
.report-3d-table-wrap col.agent-summary-3d-col--win-amt {
  width: 3.55rem !important;
  min-width: 3.55rem !important;
  max-width: 3.55rem !important;
}

.agent-summary-3d-table--report th.agent-summary-3d-col--win-amt,
.agent-summary-3d-table--report td.agent-summary-3d-col--win-amt,
.report-3d-table-wrap th.agent-summary-3d-col--win-amt,
.report-3d-table-wrap td.agent-summary-3d-col--win-amt {
  width: 3.55rem !important;
  min-width: 3.55rem !important;
  max-width: 3.55rem !important;
  box-sizing: border-box;
}

.agent-summary-3d-table--report col.agent-summary-3d-col--win-x,
.report-3d-table-wrap col.agent-summary-3d-col--win-x {
  width: 2.55rem !important;
  min-width: 2.55rem !important;
  max-width: 2.55rem !important;
}

.agent-summary-3d-table--report th.agent-summary-3d-col--win-x,
.agent-summary-3d-table--report td.agent-summary-3d-col--win-x,
.report-3d-table-wrap th.agent-summary-3d-col--win-x,
.report-3d-table-wrap td.agent-summary-3d-col--win-x {
  width: 2.55rem !important;
  min-width: 2.55rem !important;
  max-width: 2.55rem !important;
  box-sizing: border-box;
}

.agent-summary-3d-table--report col.agent-summary-3d-col--paid,
.report-3d-table-wrap col.agent-summary-3d-col--paid {
  width: 4.1rem !important;
  min-width: 4.1rem !important;
  max-width: 4.1rem !important;
}

.agent-summary-3d-table--report thead tr:first-child th:nth-child(9),
.agent-summary-3d-table--report thead tr:first-child th:nth-child(12),
.agent-summary-3d-table--report tbody td:nth-child(9),
.agent-summary-3d-table--report tbody td:nth-child(12),
.report-3d-table-wrap thead tr:first-child th:nth-child(9),
.report-3d-table-wrap thead tr:first-child th:nth-child(12),
.report-3d-table-wrap tbody td:nth-child(9),
.report-3d-table-wrap tbody td:nth-child(12) {
  width: 4.1rem !important;
  min-width: 4.1rem !important;
  max-width: 4.1rem !important;
  box-sizing: border-box;
}

.agent-summary-3d-table--report col.agent-summary-3d-col--total-paid,
.report-3d-table-wrap col.agent-summary-3d-col--total-paid {
  width: 4.45rem !important;
  min-width: 4.45rem !important;
  max-width: 4.45rem !important;
}

.agent-summary-3d-table--report thead tr:first-child th:nth-child(13),
.agent-summary-3d-table--report tbody td:nth-child(13),
.report-3d-table-wrap thead tr:first-child th:nth-child(13),
.report-3d-table-wrap tbody td:nth-child(13) {
  width: 4.45rem !important;
  min-width: 4.45rem !important;
  max-width: 4.45rem !important;
  box-sizing: border-box;
}

.agent-summary-3d-table--report col.agent-summary-3d-col--share,
.report-3d-table-wrap col.agent-summary-3d-col--share {
  width: 2.35rem !important;
  min-width: 2.35rem !important;
  max-width: 2.35rem !important;
}

.agent-summary-3d-table--report thead tr:first-child th:nth-child(14),
.agent-summary-3d-table--report tbody td:nth-child(14),
.report-3d-table-wrap thead tr:first-child th:nth-child(14),
.report-3d-table-wrap tbody td:nth-child(14) {
  width: 2.35rem !important;
  min-width: 2.35rem !important;
  max-width: 2.35rem !important;
  box-sizing: border-box;
}

.agent-summary-3d-table--report col.agent-summary-3d-col--net,
.report-3d-table-wrap col.agent-summary-3d-col--net {
  width: 4.65rem !important;
  min-width: 4.65rem !important;
  max-width: 4.65rem !important;
}

.agent-summary-3d-table--report thead tr:first-child th:nth-child(15),
.agent-summary-3d-table--report tbody td:nth-child(15),
.report-3d-table-wrap thead tr:first-child th:nth-child(15),
.report-3d-table-wrap tbody td:nth-child(15) {
  width: 4.65rem !important;
  min-width: 4.65rem !important;
  max-width: 4.65rem !important;
  box-sizing: border-box;
}

.agent-summary-3d-table tbody tr.agent-summary-3d-agent-row td {
  background: #f1f5f9;
  font-weight: 600;
}

.agent-summary-3d-table tbody tr.agent-summary-3d-agent-row.is-expanded td {
  background: #e2e8f0;
}

.agent-summary-3d-agent-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  margin: 0;
  padding: 0.1rem 0.25rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  text-align: start;
  vertical-align: middle;
}

.agent-summary-3d-agent-toggle:hover,
.agent-summary-3d-agent-toggle:focus-visible {
  background: rgba(13, 148, 136, 0.12);
  outline: none;
}

.agent-summary-3d-agent-toggle__caret {
  flex-shrink: 0;
  color: #0f766e;
  font-size: 0.72rem;
}

.agent-summary-3d-agent-toggle__label {
  min-width: 0;
}

.agent-summary-3d-table tbody tr.agent-summary-3d-member-row td {
  background: #fff;
  font-weight: 400;
}

.agent-summary-3d-table tbody tr.agent-summary-3d-member-row td.agent-summary-3d-col--name-member {
  padding-left: 1.65rem !important;
  font-size: 0.92em;
  color: #334155;
}

/* Purchaser rows — bottom of admin 3D SUMMARY (distinct from member detail rows). */
.agent-summary-3d-table tbody tr.agent-summary-3d-purchaser-row td {
  background: #fff7e6;
  font-weight: 500;
}

.agent-summary-3d-table tbody tr.agent-summary-3d-purchaser-row td.agent-summary-3d-col--name-purchaser {
  color: #92400e;
  border-top: 1px solid #fcd34d;
}

.agent-summary-3d-table tbody tr.agent-summary-3d-purchaser-row:first-of-type td {
  border-top: 2px solid #f59e0b;
}

.agent-summary-3d-table tbody tr.agent-summary-3d-table__totals td,
.agent-summary-3d-table tbody tr.agent-summary-grid-table__totals.agent-summary-3d-table__totals td {
  background: #e8eef5 !important;
  font-weight: 700;
  border-top: 2px solid #64748b;
}

.agent-summary-3d-table tbody tr.agent-summary-3d-table__totals td.agent-summary-3d-table__totals-label {
  text-align: start;
}

#adminStockSummary3dPage .agent-summary-3d-page__wrap,
#agentStockSummary3dPage .agent-summary-3d-page__wrap {
  width: 100%;
  overflow-x: auto;
}

#adminStockSummary3dPage .summary-page__agent-member-hint.agent-summary-3d-page__hint,
#agentStockSummary3dPage .summary-page__agent-member-hint.agent-summary-3d-page__hint {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.42;
}

.sys3d-purchaser-dialog {
  margin: 0.5rem 0 0.35rem;
  padding: 0.55rem 0.6rem;
  font-size: 0.82rem;
}

.sys3d-purchaser-dialog__title {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
}

.sys3d-purchaser-dialog__hint {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
}

.sys3d-purchaser-dialog__field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
}

.sys3d-purchaser-dialog__field .input {
  width: 100%;
  box-sizing: border-box;
}

.sys3d-purchaser-dialog__actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.sys3d-purchaser-add-form__name-row {
  margin-bottom: 0.35rem;
}

.sys3d-purchaser-add-form__name-row .sys3d-purchaser-dialog__field--name {
  margin-bottom: 0;
}

.sys3d-purchaser-add-form__nums-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}

.sys3d-purchaser-add-form__nums-row .sys3d-purchaser-dialog__field {
  margin-bottom: 0;
  flex: 0 0 auto;
}

.sys3d-purchaser-dialog__field--pct .input,
.sys3d-purchaser-dialog__field--t1 .input,
.sys3d-purchaser-dialog__field--t2 .input {
  box-sizing: content-box;
  padding-left: 0.2rem;
  padding-right: 0.2rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.sys3d-purchaser-dialog__field--pct .input {
  width: 2ch;
  min-width: 2ch;
  max-width: 2ch;
}

.sys3d-purchaser-dialog__field--t1 .input {
  width: 3ch;
  min-width: 3ch;
  max-width: 3ch;
}

.sys3d-purchaser-dialog__field--t2 .input {
  width: 2ch;
  min-width: 2ch;
  max-width: 2ch;
}

.sys3d-purchaser-dialog__field--t1,
.sys3d-purchaser-dialog__field--t2 {
  font-size: 0.72rem;
  white-space: nowrap;
}

.sys3d-purchaser-entry-num-display {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-start;
  margin-bottom: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.sys3d-purchaser-entry-capture-inp {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.sys3d-purchaser-entry-field--num,
.sys3d-purchaser-entry-field--amt {
  position: relative;
  min-height: 2.6rem;
}

.sys3d-purchaser-entry-field--num,
.sys3d-purchaser-entry-field--amt {
  cursor: text;
}

.sys3d-purchaser-entry-field--amt .sys3d-purchaser-entry-amt-display {
  display: block;
  min-height: 1.75rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.sys3d-purchaser-entry-field--num:focus-within .sys3d-purchaser-entry-num-display,
.sys3d-purchaser-entry-field--amt:focus-within .sys3d-purchaser-entry-amt-display {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Purchaser list — name only (no % / times sub-line beside name; VB6 Purchaser List parity). */
.main-board-purchaser-btn .main-board-user-sub {
  display: none !important;
}

/* VB6 Purchaser List — fills agent/member aside slot */
.sys3d-board-shell--purchaser-view .main-board-user-list {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.sys3d-purchaser-list-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-height: 12rem;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  background: #f8fafc;
  box-sizing: border-box;
}

.sys3d-purchaser-list-panel__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.35rem 0.12rem;
}

.sys3d-purchaser-list-panel .main-board-purchaser-btn {
  width: 100%;
  text-align: left;
  margin-bottom: 0.12rem;
}

/* Purchaser list footer — Add New + Delete on one row, opposite sides (VB6 parity). */
.sys3d-purchaser-aside-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.sys3d-purchaser-aside-actions .btn-compact {
  flex: 1 1 0;
  min-width: 0;
  max-width: calc(50% - 0.25rem);
}

.sys3d-board-main {
  position: relative;
}

/* VB6 frmcusmain — left aside entry + center MAIN + right purchaser sale list */
#adminDashboard:has(#adminMainBoard3dPage:not(.hidden))
  #adminMainBoard3dPage
  .sys3d-board-shell.sys3d-board-shell--purchaser-view,
#adminMainBoard3dPage .sys3d-board-shell--purchaser-view {
  --main-board-shell-cols: minmax(13.5rem, 18rem) minmax(0, 1fr) minmax(11rem, 15rem);
  grid-template-columns: var(--main-board-shell-cols) !important;
  width: 100%;
  max-width: none;
}

#adminDashboard:has(#adminMainBoard3dPage:not(.hidden))
  #adminMainBoard3dPage
  .sys3d-board-shell.sys3d-board-shell--purchaser-entry-active,
#adminMainBoard3dPage .sys3d-board-shell--purchaser-entry-active {
  --main-board-shell-cols: minmax(16.5rem, 21rem) minmax(0, 1fr) minmax(11rem, 15rem);
  grid-template-columns: var(--main-board-shell-cols) !important;
  width: 100%;
  max-width: none;
}

.sys3d-purchaser-entry-aside {
  display: none;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.sys3d-board-shell--purchaser-entry-active .sys3d-purchaser-entry-aside {
  display: none !important;
}

.sys3d-board-shell--purchaser-entry-active #sys3dAsideHint,
.sys3d-board-shell--purchaser-entry-active .sys3d-purchaser-add-form,
.sys3d-board-shell--purchaser-entry-active .sys3d-purchaser-aside-actions,
.sys3d-board-shell--purchaser-entry-active #sys3dAsideActions,
.sys3d-aside--purchaser-entry-active #sys3dAsideActions,
.sys3d-aside--purchaser-entry-active #sys3dPurchaserAddBtn,
.sys3d-aside--purchaser-entry-active #sys3dPurchaserDelBtn,
#adminMainBoard3dPage.sys3d-page--purchaser-entry-active #sys3dAsideActions,
#adminMainBoard3dPage.sys3d-page--purchaser-entry-active #sys3dPurchaserAddBtn,
#adminMainBoard3dPage.sys3d-page--purchaser-entry-active #sys3dPurchaserDelBtn,
.sys3d-purchaser-list-footer--entry-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Entry open — keep right purchaser Name/Amount list (VB6 three-column). */
.sys3d-board-shell--purchaser-entry-active .main-board-side-sum {
  display: flex !important;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  padding: 0.2rem 0.15rem 0.25rem;
  box-sizing: border-box;
}

/* Entry sheet replaces Purchaser List in the same left slot (VB6 frmcusmain). */
#sys3dUserList.sys3d-purchaser-entry-host {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: min(72vh, 26rem);
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
}

.sys3d-board-shell--purchaser-view .main-board-aside,
.sys3d-board-shell--purchaser-entry-active .main-board-aside {
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  max-width: none;
  padding-left: 0.12rem;
  padding-right: 0.1rem;
  box-sizing: border-box;
}

.sys3d-board-shell--purchaser-view #sys3dUserList {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.sys3d-purchaser-aside-hint {
  font-size: 0.78rem;
  line-height: 1.35;
  margin: 0.2rem 0 0.35rem;
  padding: 0.25rem 0.1rem;
}

.sys3d-purchaser-entry-panel {
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0.3rem 0.15rem 0.4rem;
  font-size: 0.82rem;
  box-shadow: none;
  box-sizing: border-box;
  min-height: 0;
  overflow: hidden;
}

.sys3d-purchaser-entry-window-title {
  flex: 1 1 auto;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  text-align: center;
}

.sys3d-purchaser-entry-frame {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  margin-top: 0.15rem;
  padding: 0.5rem 0.38rem 0.45rem;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  background: #f8fafc;
  overflow: hidden;
}

.sys3d-purchaser-entry-frame__legend {
  align-self: flex-start;
  margin: -1.05rem 0 0.45rem 0.2rem;
  padding: 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: #0f172a;
  background: #f8fafc;
}

.sys3d-purchaser-entry-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.sys3d-purchaser-entry-back-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0 0.35rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.sys3d-purchaser-entry-back-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.sys3d-purchaser-entry-back-btn:active {
  background: #cbd5e1;
}

.sys3d-purchaser-entry-close-x {
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 1.6rem;
  padding: 0 0.35rem;
  line-height: 1.2;
}

.sys3d-purchaser-entry-inputs {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.4rem 0.55rem;
  margin-bottom: 0.35rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.sys3d-purchaser-entry-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.12rem;
  font-size: 0.72rem;
  font-weight: 600;
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
}

.sys3d-purchaser-entry-box-inp {
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 1.5rem;
  height: 1.5rem;
  padding: 0.14rem 0.4rem;
  box-sizing: border-box;
  border: 1px solid #94a3b8;
  border-radius: 3px;
  background: #fff;
  font-variant-numeric: tabular-nums;
  font-size: 0.84rem;
  line-height: 1.15;
}

.sys3d-purchaser-entry-box-inp--amt {
  text-align: right;
}

.sys3d-purchaser-entry-field--num .sys3d-purchaser-entry-box-inp {
  letter-spacing: 0.06em;
  text-align: center;
}

.sys3d-purchaser-entry-field--num:focus-within .sys3d-purchaser-entry-box-inp,
.sys3d-purchaser-entry-field--amt:focus-within .sys3d-purchaser-entry-box-inp {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.sys3d-purchaser-entry-table-wrap {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  overflow-x: hidden;
  border: 1px solid #94a3b8;
  background: #e2e8f0;
  box-sizing: border-box;
}

/* Right panel — purchaser Name + Amount (VB6 sale list); click opens left entry */
.sys3d-board-shell--purchaser-view .main-board-side-sum,
.sys3d-board-shell--purchaser-entry-active .main-board-side-sum {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 0.2rem 0.12rem 0.25rem;
  box-sizing: border-box;
}

.sys3d-board-shell--purchaser-view .main-board-side-sum__scroll,
.sys3d-board-shell--purchaser-entry-active .main-board-side-sum__scroll {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: auto;
}

.sys3d-board-shell--purchaser-view .main-board-side-sum__table,
.sys3d-board-shell--purchaser-entry-active .main-board-side-sum__table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.sys3d-board-shell--purchaser-view .main-board-side-sum__table th,
.sys3d-board-shell--purchaser-view .main-board-side-sum__table td,
.sys3d-board-shell--purchaser-entry-active .main-board-side-sum__table th,
.sys3d-board-shell--purchaser-entry-active .main-board-side-sum__table td {
  padding: 0.12rem 0.2rem;
  font-size: 0.72rem;
}

.sys3d-board-shell--purchaser-view .main-board-side-sum__table th:first-child,
.sys3d-board-shell--purchaser-view .main-board-side-sum__table td:first-child,
.sys3d-board-shell--purchaser-entry-active .main-board-side-sum__table th:first-child,
.sys3d-board-shell--purchaser-entry-active .main-board-side-sum__table td:first-child {
  width: 58%;
}

.sys3d-board-shell--purchaser-view .main-board-side-sum__title,
.sys3d-board-shell--purchaser-entry-active .main-board-side-sum__title {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.sys3d-purchaser-sale-row {
  cursor: pointer;
}

.sys3d-purchaser-sale-row:hover td {
  background: rgba(59, 130, 246, 0.12);
}

.sys3d-purchaser-sale-row.selected td {
  background: rgba(59, 130, 246, 0.22);
  font-weight: 600;
}

.sys3d-purchaser-sale-empty {
  text-align: center;
  font-size: 0.78rem;
}

.sys3d-purchaser-entry-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.65rem;
  line-height: 1;
  color: #0f172a;
  background: #f8fafc;
}

.sys3d-purchaser-entry-table th:nth-child(1),
.sys3d-purchaser-entry-table td:nth-child(1) {
  width: 26%;
}

.sys3d-purchaser-entry-table th:nth-child(2),
.sys3d-purchaser-entry-table td:nth-child(2) {
  width: 44%;
}

.sys3d-purchaser-entry-table th:nth-child(3),
.sys3d-purchaser-entry-table td:nth-child(3) {
  width: 30%;
}

.sys3d-purchaser-entry-row {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.sys3d-purchaser-entry-row td {
  pointer-events: auto;
}

.sys3d-purchaser-entry-row:hover td {
  background: rgba(59, 130, 246, 0.1);
}

.sys3d-purchaser-entry-row.sys3d-purchaser-entry-row--selected td,
.sys3d-purchaser-entry-row--selected td {
  background: rgba(59, 130, 246, 0.35) !important;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #2563eb;
}

.sys3d-purchaser-entry-foot-del-btn {
  flex: 0 0 auto;
  flex-shrink: 0;
  display: inline-flex !important;
  visibility: visible !important;
  padding: 0.28rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #b91c1c;
  border-color: #f87171;
  background: #fef2f2;
}

.sys3d-purchaser-entry-foot-del-btn:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #ef4444;
}

.sys3d-purchaser-entry-foot-del-btn--inactive {
  opacity: 0.55;
}

.sys3d-purchaser-entry-foot-del-btn--inactive:hover {
  background: #fef2f2;
  border-color: #f87171;
}

.sys3d-purchaser-entry-table thead th {
  position: sticky;
  top: 0;
  background: #cbd5e1;
  color: #0f172a;
  padding: 0.04rem 0.28rem;
  text-align: left;
  border-bottom: 1px solid #94a3b8;
  font-size: 0.62rem;
  line-height: 1;
}

.sys3d-purchaser-entry-table tbody td {
  padding: 0 0.22rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  vertical-align: middle;
  line-height: 1;
}

.sys3d-purchaser-entry-row td {
  height: 0.62rem;
  max-height: 0.62rem;
  overflow: hidden;
  font-size: 0.64rem;
}

#adminDashboard:has(#adminMainBoard3dPage:not(.hidden)) .legacy-content:has(#adminMainBoard3dPage:not(.hidden)) {
  padding-left: 0.05rem;
  padding-right: 0.05rem;
}

.sys3d-purchaser-entry-foot {
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid #cbd5e1;
  background: #f8fafc;
}

.sys3d-purchaser-entry-foot-bar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.55rem;
  width: 100%;
}

.sys3d-purchaser-entry-total {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.sys3d-number-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  background: rgba(15, 23, 42, 0.28);
}

.sys3d-number-lock-overlay.hidden {
  display: none;
}

.sys3d-number-lock-panel {
  width: min(100%, 22rem);
  max-height: min(92%, 26rem);
  display: flex;
  flex-direction: column;
  padding: 0.45rem 0.55rem 0.5rem;
  font-size: 0.82rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.sys3d-number-lock-panel--readonly {
  max-height: min(92%, 22rem);
}

.sys3d-number-lock-panel--readonly .sys3d-number-lock-table-wrap {
  max-height: 14rem;
}

.sys3d-number-lock-row--readonly {
  cursor: default;
}

.sys3d-number-lock-panel--readonly .sys3d-number-lock-foot {
  justify-content: flex-end;
}

.sys3d-number-lock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.15rem;
}

.sys3d-number-lock-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.sys3d-number-lock-close-x {
  min-width: 1.6rem;
  padding: 0 0.35rem;
  line-height: 1.2;
}

.sys3d-number-lock-date {
  text-align: right;
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}

.sys3d-number-lock-inputs {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.35rem;
}

.sys3d-number-lock-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.76rem;
}

.sys3d-number-lock-field .input {
  width: 100%;
  box-sizing: border-box;
}

.sys3d-number-lock-table-wrap {
  flex: 1 1 auto;
  min-height: 6rem;
  max-height: 11rem;
  overflow: auto;
  border: 1px solid var(--border, #c5cdd8);
  margin-bottom: 0.4rem;
}

.sys3d-number-lock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.sys3d-number-lock-table th,
.sys3d-number-lock-table td {
  padding: 0.2rem 0.35rem;
  border-bottom: 1px solid var(--border, #dde3ea);
  text-align: left;
}

.sys3d-number-lock-table th {
  position: sticky;
  top: 0;
  background: var(--card, #f4f6f9);
  z-index: 1;
}

.sys3d-number-lock-row {
  cursor: pointer;
}

.sys3d-number-lock-row.selected {
  background: rgba(59, 130, 246, 0.14);
}

.sys3d-number-lock-row:focus {
  outline: 1px solid rgba(59, 130, 246, 0.55);
  outline-offset: -1px;
}

.sys3d-number-lock-empty td {
  text-align: center;
  font-style: italic;
}

.sys3d-number-lock-shortcuts {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 0.35rem;
}

.sys3d-number-lock-r-btn {
  min-width: 2rem;
  padding: 0.15rem 0.45rem;
  font-weight: 600;
}

.sys3d-number-lock-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

#adminMainBoard3dPage .sys3d-board-shell .main-board-aside-actions--footer,
#agentMainBoard3dPage .sys3d-board-shell .main-board-aside-actions--footer {
  margin-top: auto;
  padding-top: 0.45rem;
  flex-shrink: 0;
}

