/* Companion Hub v3: one deliberate scroll owner and member-first benefit wording. */
.companion-hub,.ch-panel,.ch-financial-overview,.ch-table-wrap,.ch-tabs-scroll{min-width:0;max-width:100%}.ch-financial-overview{overflow:visible}.ch-financial-scroll{width:100%;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#8fcfab #edf6f0;contain:none}.ch-financial-scroll::-webkit-scrollbar{height:10px}.ch-financial-scroll::-webkit-scrollbar-track{background:#edf6f0;border-radius:99px}.ch-financial-scroll::-webkit-scrollbar-thumb{background:#8fcfab;border:2px solid #edf6f0;border-radius:99px}.ch-financial-table{min-width:2020px}.ch-financial-table th:first-child,.ch-financial-table td:first-child{width:190px;min-width:190px;max-width:190px}.ch-financial-table th:nth-child(2),.ch-financial-table td:nth-child(2){width:120px;min-width:120px;max-width:120px;left:190px}.ch-overview-tools{display:flex;gap:10px;align-items:center}.ch-overview-search{position:relative;flex:1 1 340px;min-width:220px}.ch-overview-search input{width:100%;height:44px;padding:0 40px;border:1px solid var(--ch-line);border-radius:13px;background:var(--ch-card);font:inherit}.ch-overview-search input:focus{outline:0;border-color:#39b54a;box-shadow:0 0 0 3px rgba(57,181,74,.14)}.ch-overview-search-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#537467;font-size:21px;pointer-events:none}.ch-search-clear{position:absolute;right:7px;top:50%;transform:translateY(-50%);display:none;width:30px;height:30px;border:0;border-radius:50%;background:#eff6f1;color:#456558;font-size:22px;line-height:1;cursor:pointer}.ch-search-clear.is-visible{display:block}.ch-scroll-actions{display:flex;gap:6px}.ch-scroll-actions .btn{min-width:42px}.ch-scroll-actions .is-muted{opacity:.45}.ch-scroll-hint{margin:0 0 8px;color:#668176;font-size:12px;text-align:center}.ch-benefit-grid .ch-benefit:first-child{background:linear-gradient(135deg,#edf9f1,#fff);border-color:#bfe7cf}.ch-benefit-grid .ch-benefit:first-child span{color:#078c45;font-weight:800;letter-spacing:.04em}.ch-benefit-grid .ch-benefit small{line-height:1.45}@media (max-width:1023px){.ch-overview-tools{display:grid;grid-template-columns:minmax(0,1fr) auto auto}.ch-overview-search{grid-column:1/-1}.ch-overview-search input{min-width:0}.ch-benefit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:767px){.ch-financial-table th:first-child,.ch-financial-table td:first-child,.ch-financial-table th:nth-child(2),.ch-financial-table td:nth-child(2){position:static;width:auto;min-width:0;max-width:none}.ch-overview-tools{grid-template-columns:minmax(0,1fr) auto}.ch-scroll-actions{justify-content:flex-end}.ch-overview-tools select{min-width:96px}.ch-benefit-grid{grid-template-columns:1fr}.ch-scroll-hint{display:block}.ch-financial-scroll{margin-inline:0;border-radius:12px}.ch-financial-table{min-width:2020px}}@media (max-width:430px){.ch-overview-tools{grid-template-columns:1fr 1fr}.ch-overview-search{grid-column:1/-1}.ch-scroll-actions{justify-content:flex-end}.ch-overview-tools select{width:100%}}
/* Responsive Companion Hub: content tables fit; only the tab rail may scroll. */
.ch-financial-scroll{overflow:visible!important}.ch-financial-table{min-width:0!important;width:100%;table-layout:fixed}.ch-financial-table th,.ch-financial-table td{min-width:0!important}.ch-money,.ch-number,.ch-percent{white-space:nowrap;word-break:keep-all;overflow-wrap:normal;font-variant-numeric:tabular-nums}.ch-table td{font-variant-numeric:tabular-nums}.ch-benefit-locks{display:grid;gap:0}.ch-benefit-lock-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;padding:14px 0;border-bottom:1px solid var(--ch-line)}.ch-benefit-lock-item:last-child{border-bottom:0}.ch-benefit-lock-item b,.ch-benefit-lock-item small{display:block}.ch-benefit-lock-item small{margin-top:6px}.ch-benefit-state{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:999px;background:#e7f7eb;color:#08783a;font-size:12px;font-weight:700}.ch-benefit-state.locked{background:#fff0e9;color:#b54818}.ch-rights-summary{border:0;background:#eef8f1;color:#08783a;border-radius:999px;padding:6px 10px;font:inherit;font-weight:700;white-space:nowrap;cursor:pointer}.ch-detail-trigger{border:0;background:transparent;color:#08783a;padding:0;font:inherit;cursor:pointer;text-decoration:underline}.ch-mobile-card-table{width:100%}
.ch-modal-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;padding:14px 0;border-bottom:1px solid var(--ch-line)}.ch-modal-row span{min-width:0}.ch-modal-row b,.ch-modal-row small{display:block}.ch-modal-row small{margin-top:6px}.ch-modal-row .btn.light{border-color:#39b54a;color:#08783a}
@media(max-width:1365px){.ch-financial-table th:nth-child(2),.ch-financial-table td:nth-child(2),.ch-financial-table th:nth-child(3),.ch-financial-table td:nth-child(3),.ch-financial-table th:nth-child(4),.ch-financial-table td:nth-child(4),.ch-financial-table th:nth-child(7),.ch-financial-table td:nth-child(7),.ch-financial-table th:nth-child(8),.ch-financial-table td:nth-child(8),.ch-financial-table th:nth-child(9),.ch-financial-table td:nth-child(9),.ch-financial-table th:nth-child(10),.ch-financial-table td:nth-child(10),.ch-financial-table th:nth-child(11),.ch-financial-table td:nth-child(11),.ch-financial-table th:nth-child(12),.ch-financial-table td:nth-child(12),.ch-financial-table th:nth-child(13),.ch-financial-table td:nth-child(13),.ch-financial-table th:nth-child(14),.ch-financial-table td:nth-child(14){display:none}.ch-maintenance-table th:nth-child(5),.ch-maintenance-table td:nth-child(5),.ch-maintenance-table th:nth-child(10),.ch-maintenance-table td:nth-child(10),.ch-maintenance-table th:nth-child(11),.ch-maintenance-table td:nth-child(11){display:none}.gb-admin-table th:nth-child(7),.gb-admin-table td:nth-child(7),.gb-admin-table th:nth-child(11),.gb-admin-table td:nth-child(11){display:none}}
@media(max-width:1023px){.gb-admin-table th:nth-child(1),.gb-admin-table td:nth-child(1),.gb-admin-table th:nth-child(3),.gb-admin-table td:nth-child(3),.gb-admin-table th:nth-child(5),.gb-admin-table td:nth-child(5),.gb-admin-table th:nth-child(9),.gb-admin-table td:nth-child(9),.gb-admin-table th:nth-child(12),.gb-admin-table td:nth-child(12),.gb-admin-table th:nth-child(13),.gb-admin-table td:nth-child(13){display:none}.ch-maintenance-table th:nth-child(4),.ch-maintenance-table td:nth-child(4),.ch-maintenance-table th:nth-child(6),.ch-maintenance-table td:nth-child(6),.ch-maintenance-table th:nth-child(9),.ch-maintenance-table td:nth-child(9){display:none}}
@media(max-width:767px){.ch-table-wrap{overflow:visible!important}.ch-mobile-card-table,.ch-mobile-card-table tbody,.ch-mobile-card-table tr,.ch-mobile-card-table td{display:block!important;width:100%!important}.ch-mobile-card-table thead{display:none!important}.ch-mobile-card-table tr{margin:0 0 12px;padding:12px;border:1px solid var(--ch-line);border-radius:14px;background:var(--ch-card)}.ch-mobile-card-table td{min-width:0!important;padding:7px 0!important;border:0!important;text-align:right;white-space:nowrap}.ch-mobile-card-table td:before{content:attr(data-label);float:left;max-width:46%;color:#668176;font-size:11px;font-weight:700;text-align:left;white-space:normal}.ch-mobile-card-table td[data-label="Thành viên"]{text-align:left;font-size:14px}.ch-mobile-card-table td[data-label="Thành viên"]:before{display:none}.ch-mobile-card-table td[data-label="Thao tác"] .btn{width:100%;margin-top:4px}.ch-financial-table,.ch-maintenance-table,.gb-admin-table{table-layout:auto}.ch-benefit-lock-item{gap:10px;padding:12px 0}.ch-benefit-lock-item .btn{min-width:86px}.ch-modal{width:calc(100vw - 20px)!important;max-height:86dvh;overflow-y:auto}.ch-maintenance-tools,.ch-overview-tools,.gb-filter-grid{grid-template-columns:1fr 1fr!important}.ch-maintenance-tools input,.ch-overview-tools input,.gb-filter-search{grid-column:1/-1!important}}
/* Financial overview intentionally scrolls inside its own shell on desktop/tablet. */
.ch-financial-scroll{overflow-x:auto!important;overflow-y:hidden!important}.ch-financial-table{min-width:2020px!important;width:auto!important;table-layout:auto!important}.ch-financial-table th:first-child,.ch-financial-table td:first-child{width:190px!important;min-width:190px!important;max-width:190px!important}.ch-financial-table th:nth-child(2),.ch-financial-table td:nth-child(2){width:120px!important;min-width:120px!important;max-width:120px!important}
@media(max-width:767px){.ch-financial-scroll{overflow:visible!important}.ch-financial-table{min-width:0!important;width:100%!important;table-layout:auto!important}}
/* Overview is intentionally a seven-column summary, never a 2020px ledger. */
.ch-financial-overview{container-type:inline-size}.ch-financial-overview .ch-financial-scroll{overflow:visible!important}.ch-financial-overview .ch-financial-table{width:100%!important;min-width:0!important;table-layout:fixed!important}.ch-financial-overview .ch-financial-table th,.ch-financial-overview .ch-financial-table td{display:table-cell!important;min-width:0!important;vertical-align:middle}.ch-financial-overview .ch-financial-table th:nth-child(1){width:20%}.ch-financial-overview .ch-financial-table th:nth-child(2){width:13%}.ch-financial-overview .ch-financial-table th:nth-child(3){width:18%}.ch-financial-overview .ch-financial-table th:nth-child(4){width:14%}.ch-financial-overview .ch-financial-table th:nth-child(5){width:11%}.ch-financial-overview .ch-financial-table th:nth-child(6){width:12%}.ch-financial-overview .ch-financial-table th:nth-child(7){width:12%}.ch-member-cell{display:grid;gap:3px;min-width:0}.ch-member-cell strong{font-size:13px;line-height:1.25}.ch-member-cell small,.ch-col-sales small,.ch-col-commission small{display:block;color:#668176;font-size:11px;line-height:1.35}.ch-overview-rank{line-height:1.25;max-width:100%;font-weight:700}.ch-overview-primary-money{font-weight:800;margin-bottom:2px}.ch-overview-action .btn{white-space:nowrap;min-width:max-content}.ch-overview-detail h4{margin:14px 0 6px}.ch-overview-detail p{margin:6px 0}
.ch-financial-detail-modal{display:grid;gap:12px}.ch-financial-detail-modal h4{margin:2px 0}.ch-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.ch-detail-grid>div,.ch-financial-line{border:1px solid #dcebe1;border-radius:12px;padding:12px;background:#fff}.ch-financial-line{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;align-items:start}.ch-financial-line small{grid-column:1/-1;color:#668176}.ch-product-entitlement{display:inline-block;color:#8a5a00!important;font-weight:800;background:#fff6d8;border:1px solid #f2d994;border-radius:8px;padding:3px 7px;line-height:1.35}
@container (max-width:1000px){.ch-financial-overview .ch-financial-table th:nth-child(2),.ch-financial-overview .ch-financial-table td:nth-child(2),.ch-financial-overview .ch-financial-table th:nth-child(5),.ch-financial-overview .ch-financial-table td:nth-child(5){display:none!important}.ch-financial-overview .ch-financial-table th:nth-child(1){width:27%}.ch-financial-overview .ch-financial-table th:nth-child(3){width:25%}.ch-financial-overview .ch-financial-table th:nth-child(4){width:18%}.ch-financial-overview .ch-financial-table th:nth-child(6){width:15%}.ch-financial-overview .ch-financial-table th:nth-child(7){width:15%}}
@media(max-width:767px){.ch-financial-overview .ch-financial-table,.ch-financial-overview .ch-financial-table tbody,.ch-financial-overview .ch-financial-table tr,.ch-financial-overview .ch-financial-table td{display:block!important;width:100%!important}.ch-financial-overview .ch-financial-table thead{display:none!important}.ch-financial-overview .ch-financial-table tr{margin:0 0 12px;padding:12px;border:1px solid var(--ch-line);border-radius:14px}.ch-financial-overview .ch-financial-table td{padding:7px 0!important;text-align:right}.ch-financial-overview .ch-financial-table td:before{content:attr(data-label);float:left;color:#668176;font-size:11px;font-weight:700}.ch-financial-overview .ch-financial-table td:first-child{text-align:left}.ch-financial-overview .ch-financial-table td:first-child:before{display:none}.ch-financial-overview .ch-financial-table td:nth-child(2),.ch-financial-overview .ch-financial-table td:nth-child(5){display:none!important}.ch-financial-overview .ch-financial-table .ch-overview-action .btn{width:100%}}
/* Semantic Overview columns: all seven stay visible in the compact desktop table. */
.ch-overview-compact .ch-col-member{width:20%}.ch-overview-compact .ch-col-rank{width:13%}.ch-overview-compact .ch-col-sales{width:18%}.ch-overview-compact .ch-col-commission{width:14%}.ch-overview-compact .ch-col-benefits{width:11%}.ch-overview-compact .ch-col-total{width:12%}.ch-overview-compact .ch-col-action{width:12%}
@container (max-width:1000px){.ch-overview-compact .ch-col-member{width:27%}.ch-overview-compact .ch-col-rank,.ch-overview-compact .ch-col-benefits{display:none!important}.ch-overview-compact .ch-col-sales{width:25%}.ch-overview-compact .ch-col-commission{width:18%}.ch-overview-compact .ch-col-total{width:15%}.ch-overview-compact .ch-col-action{width:15%}}
.ch-financial-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}.ch-financial-actions .btn{padding:7px 10px;font-size:12px;white-space:nowrap}.ch-financial-actions .danger{color:#b42318;border-color:#f7b9b2;background:#fff5f3}.ch-financial-actions .btn:disabled{opacity:.42;cursor:not-allowed}.ch-financial-source{display:none;grid-column:1/-1;border-top:1px dashed var(--ch-line);padding-top:10px;color:#4b6658}.ch-financial-line.is-source-open .ch-financial-source{display:block}.ch-financial-source h5{margin:0 0 5px;font-size:13px}.ch-financial-source ul{margin:0;padding-left:18px}.ch-financial-source li{display:flex;justify-content:space-between;gap:14px;padding:3px 0;font-size:12px;overflow-wrap:anywhere}.ch-financial-source b{font-weight:700;text-align:right}@media(max-width:720px){.ch-financial-line{display:flex;flex-direction:column;align-items:stretch}.ch-financial-actions{justify-content:stretch}.ch-financial-actions .btn{flex:1 1 calc(50% - 6px)}.ch-detail-grid{grid-template-columns:1fr}.ch-financial-source li{display:block}.ch-financial-source b{display:block;text-align:left}}
.ch-financial-hero{display:grid;gap:4px;padding:16px 18px;border:1px solid #bce8ca;border-radius:15px;background:linear-gradient(120deg,#eefbf2,#dff6e7);color:#124b2a}.ch-financial-hero span{font-size:11px;font-weight:800;letter-spacing:.06em;color:#087f3c}.ch-financial-hero strong{font-size:27px;line-height:1.1;color:#087f3c}.ch-financial-hero small{color:#567767;line-height:1.45}.ch-benefit-hero{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:10px;border:1px solid #dcebe1;border-radius:14px;background:#fbfefc}.ch-benefit-hero>div{display:grid;gap:4px;padding:10px;border-radius:10px;background:#f1faf4}.ch-benefit-hero span{font-size:11px;color:#547364}.ch-benefit-hero b{color:#087f3c;font-size:14px;white-space:nowrap}@media(max-width:720px){.ch-benefit-hero{grid-template-columns:repeat(2,minmax(0,1fr))}.ch-financial-hero strong{font-size:23px}}@media(max-width:390px){.ch-benefit-hero{grid-template-columns:1fr}}
/* Global financial overview: source data is supplied by financial_summary. */
.ch-financial-summary{container-type:inline-size;display:grid;gap:14px;margin:0 0 16px;padding:18px;border:1px solid #cfe8d8;border-radius:18px;background:#fbfefc;box-shadow:0 8px 24px rgba(22,82,47,.05)}
.ch-financial-summary-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.ch-financial-summary h3{margin:0;color:#174e34;font-size:16px}.ch-financial-summary p{margin:5px 0 0;color:#667085;font-size:13px;line-height:1.45}.ch-financial-summary-head>small{padding:6px 9px;border-radius:999px;background:#edf8f0;color:#31724e;font-size:11px;font-weight:700;white-space:nowrap}
.ch-financial-hero-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px}.ch-financial-hero-card{display:grid;min-width:0;min-height:150px;align-content:start;gap:7px;padding:14px;border:1px solid #deece2;border-radius:14px;background:#fff;color:#174e34;text-align:left;box-shadow:0 3px 10px rgba(22,82,47,.035);cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.ch-financial-hero-card:hover,.ch-financial-hero-card:focus-visible{border-color:#93d4a7;box-shadow:0 8px 18px rgba(22,82,47,.1);outline:0;transform:translateY(-1px)}.ch-financial-hero-card>span{color:#537464;font-size:11px;font-weight:800;letter-spacing:.035em;line-height:1.35}.ch-financial-hero-card strong{min-width:0;color:#087443;font-size:clamp(20px,2.15cqi,28px);line-height:1.18;white-space:nowrap;font-variant-numeric:tabular-nums}.ch-financial-hero-card small{color:#3d6850;font-size:12px;font-weight:800}.ch-financial-hero-card em{margin-top:auto;color:#718178;font-size:11px;font-style:normal;line-height:1.35}.ch-financial-hero-card.is-total{grid-column:span 2;min-height:168px;padding:17px;border-color:#b9e1c5;background:#f4fbf6}.ch-financial-hero-card.is-total strong{font-size:clamp(25px,2.7cqi,34px)}.ch-financial-hero-card.is-product{border-color:#eedeb2;background:#fffdf8}.ch-financial-hero-card.is-product strong{color:#8a5a00}.ch-financial-hero-card.is-benefit strong{color:#28764a}.ch-financial-summary--error{display:flex;align-items:center;justify-content:space-between;gap:12px}.ch-financial-summary--error p{margin-bottom:0}
@container (max-width:860px){.ch-financial-hero-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ch-financial-hero-card.is-total{grid-column:span 2}}
@media(max-width:600px){.ch-financial-summary{padding:14px;border-radius:16px}.ch-financial-summary-head{display:grid;gap:7px}.ch-financial-summary-head>small{justify-self:start;white-space:normal}.ch-financial-hero-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.ch-financial-hero-card{min-height:142px;padding:12px}.ch-financial-hero-card strong{font-size:clamp(18px,6.2vw,24px);letter-spacing:-.02em}.ch-financial-hero-card.is-total{min-height:154px;padding:14px}.ch-financial-hero-card.is-total strong{font-size:clamp(22px,7.1vw,29px)}.ch-financial-hero-card em{font-size:10px}.ch-financial-summary--error{align-items:flex-start;flex-direction:column}.ch-financial-summary--error .btn{width:100%;min-height:42px}}
@media(max-width:390px){.ch-financial-hero-grid{grid-template-columns:1fr}.ch-financial-hero-card.is-total{grid-column:auto}.ch-financial-hero-card{min-height:132px}.ch-financial-hero-card em{display:none}}
