.client-category-bar{display:flex;gap:10px;overflow-x:auto;padding:0 0 16px;margin-top:12px}
.client-own-balance{font-weight:600;color:var(--text,#233e38);white-space:nowrap}
.client-category-bar button{min-width:100px;white-space:nowrap;flex-shrink:0}
.client-category-bar button.active{background:var(--brand-primary,#16685e);color:white;border-color:transparent}
#clientUserWorkbench{display:grid;grid-template-columns:minmax(225px,.34fr) minmax(0,1fr);gap:18px;align-items:stretch}
#clientUserWorkbench.hidden{display:none!important}
#clientUserWorkbench .project-picker-card{display:flex;flex-direction:column;justify-content:center;align-self:stretch;width:100%;min-width:0;margin:0}
.client-project-selection,.client-project-details{min-width:0}
.client-project-selection{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px 16px}
.client-project-selection .client-card-head{grid-column:1/-1}
.client-project-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:0}
#clientSpecifiedPhone{width:12.5em;height:40px;min-width:0}
#clientPhoneFilterCheckBtn{min-height:34px;padding:4px 10px;white-space:nowrap}
.client-project-selection #clientBuyBtn{width:auto;min-width:120px;margin:0;white-space:nowrap}
.client-project-details{border:0;padding:0}
.client-project-overview {
  display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0;
  padding: clamp(18px, 2vw, 30px); border-radius: 18px; background: var(--console-overview-fill); color: #f4f9ee;
}
.client-project-overview h2 { margin: 0; color: inherit; font-size: clamp(18px, 1.7vw, 25px); overflow-wrap: anywhere; }
#clientAppView .client-project-overview .client-project-tags { margin: 0; color: #d1e1d5; }
#clientAppView .client-project-overview .client-project-price { margin: 8px 0 0; font-size: clamp(24px, 2.4vw, 38px); color: #e6ffbb; }
.client-project-overview :is(.client-project-price, .client-project-tags):empty { display: none; }
#clientUserWorkbench .client-card-head{flex-direction:row;align-items:center;margin-bottom:12px;padding-bottom:10px;gap:10px}
#clientUserWorkbench .client-card-head h2{margin:0;font-size:18px}
#clientUserWorkbench .client-project-selection .client-card-head{margin:0;padding:0;border:0}
#clientUserWorkbench .project-picker-card .client-label,#clientUserWorkbench .monitor-card .client-label{display:none}
#clientUserWorkbench .project-select-wrap{margin-bottom:0}
#projectSelectBtn:hover, #projectSelectBtn:focus-visible { background: var(--surface-hover); color: var(--text); }
#projectDropdown{right:auto;width:max(100%,min(460px,100% + 140px));max-width:calc(100vw - 64px);max-height:min(52dvh,420px);overflow:auto;background:var(--surface)}
.client-project-tags{color:#16685e;font-size:13px;margin:0 0 10px}
.client-project-price{display:block;font-size:30px;color:#16685e;margin:12px 0 20px}
#clientProjectOptions .project-option{display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left}
#clientProjectOptions .project-option span{min-width:0;flex:1}
#clientProjectOptions .project-option strong{white-space:normal;overflow-wrap:anywhere}
#clientProjectOptions .project-option small{display:block;margin-top:5px}
#clientProjectOptions .project-option b{white-space:nowrap;font-size:14px;font-weight:600}
.client-project-empty{padding:16px}
.client-project-details #clientNumberFilterBar{display:flex;flex-wrap:wrap;gap:8px 12px;padding:12px;margin:16px 0 0;border:0;border-radius:10px;background:var(--surface-sunken)}
.client-project-details #clientNumberFilterBar.hidden{display:none!important}
#clientTaskFilterCardKey{width:12em;max-width:100%}
#clientUserWorkbench .monitor-card{grid-column:1/-1;grid-row:auto;min-width:0;min-height:0;width:100%;margin:0}
#clientMonitorEmpty,#clientMonitorEmpty .empty-state{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;min-height:0;padding:16px;font-size:13px}
#clientMonitorEmpty .empty-state{padding:0}
#clientMonitorEmpty .empty-state::before{display:none}
#clientUserWorkbench .monitor-list:empty{display:none}
.monitor-highlight{outline:2px solid var(--brand-primary,#16685e);outline-offset:2px}.monitor-task{scroll-margin-top:24px}
@media(max-width:760px){
  .client-project-selection{grid-template-columns:minmax(0,1fr);gap:8px 10px}
  #clientSpecifiedPhone{flex:1}
  .client-project-selection #clientBuyBtn{min-width:0}
}
#clientAppView :is(.user-content .client-card, #clientApiPage > .panel) { border-radius: 18px; }
#clientAppView .client-own-balance {
  display: grid; grid-template-columns: 24px auto; align-items: center; column-gap: 8px;
  padding: 5px 12px; border-radius: 9px; line-height: 1.2; background: var(--surface-sunken); border: 1px solid var(--line);
}
#clientAppView .client-actions { align-items: center; flex-wrap: wrap; }
#clientAppView .client-actions :is(.client-uid, button) { border-radius: 9px; }
#clientViewTitle { scroll-margin-top: 90px; }
#clientAppView #clientCategoryBar { margin: 0; padding: 0 0 14px; gap: 6px; }
#clientCategoryBar button { min-width: auto; min-height: 37px; padding-inline: 16px; border-radius: 9px; }
#clientAppView #clientCategoryBar button.active { background: var(--console-ink); color: #eff9e7; }
#clientRecordsPage .records-card-tools { width: 100%; padding: 12px; border: 0; border-radius: 10px; background: var(--surface-sunken); }
#clientRecordsPage .table-card, .client-payment-orders { min-width: 0; }
#clientAppView .user-content .table-wrap { max-width: 100%; overflow-x: auto; border-radius: 10px; }
#clientAppView .user-content thead th { padding-block: 12px; }
#clientAppView .user-content tbody td { padding-block: 10px; font-variant-numeric: tabular-nums; }
#clientUsdtPage { display: grid; grid-template-columns: minmax(240px,.4fr) minmax(0,1fr); align-items: start; gap: 20px; }
.client-payment-form { min-width: 0; padding: 16px; border-radius: 12px; background: var(--surface-sunken); }
.client-payment-form > p:first-child { margin-top: 0; }
#clientAppView #clientUsdtPage .client-card-head { margin: 0; padding: 0; align-items: center; }
#clientAppView #clientUsdtRefreshStatus:empty { min-height: 0; }
#clientRecordsPage, #clientUsdtPage, #clientApiPage { margin-top: 0; }
#clientAppView #consoleNav { min-width: 0; flex-wrap: wrap; }
@media (min-width: 761px) and (max-width: 1000px) {
  #clientAppView > .console-masthead { flex-wrap: wrap; gap: 6px 10px; }
  #clientAppView #consoleNav > .nav-button, #clientAppView #consoleNav summary { padding-inline: 7px; }
  #clientAppView #consoleNav > .nav-button .nav-icon { display: none; }
}
@media (max-width: 940px) {
  #clientUserWorkbench, #clientUsdtPage { grid-template-columns: minmax(0,1fr); }
  .client-project-overview { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; align-items: center; }
  .client-project-overview h2 { grid-column: 1; }
  #clientAppView .client-project-overview .client-project-price { grid-column: 2; grid-row: 1/3; margin: 0; }
}
@media (max-width: 760px) {
  #clientAppView .client-topbar { grid-template-columns: minmax(0,1fr); }
  #clientAppView .client-topbar #clientViewTitle { grid-area: 1 / 1; }
  #clientAppView .client-topbar .client-actions { grid-area: 2 / 1; justify-content: center; gap: 6px; }
  #clientCategoryBar button { padding-inline: 12px; }
  #clientRecordsPage .records-card-tools > input { grid-column: 1/-1; }
}
@media (max-width: 540px) {
  .client-project-details #clientNumberFilterBar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  #clientTaskFilterCardKey { width: 100%; min-width: 0; }
  #clientNumberFilterBar label > span:first-child { white-space: nowrap; }
  #clientNumberFilterBar label:has(#clientTaskFilterCardKey, #clientPhoneFilterProject) { grid-column: 1/-1; }
}
#clientUsdtForm{max-width:440px}.client-payment-card{border:1px solid var(--border,#e2e5df);padding:20px;margin:20px 0;border-radius:10px}
.client-payment-card code{overflow-wrap:anywhere;display:block;margin:10px 0}.client-payment-card img{display:block;margin-top:12px}
.client-payment-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.client-payment-heading h3{margin:0;overflow-wrap:anywhere;min-width:0}
.client-payment-heading button{flex-shrink:0}
#clientUsdtRefreshStatus{min-height:20px}
#clientApiReference details{padding:15px 0;border-bottom:1px solid var(--border,#e2e5df)}
#clientApiReference summary{cursor:pointer;display:flex;gap:12px;flex-wrap:wrap}
#clientApiReference pre{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:850px){#projectDropdown{width:100%}}

.domestic-progress{display:flex;align-items:center;gap:8px}
.domestic-progress-spinner{display:inline-block;width:15px;height:15px;flex:0 0 15px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;color:var(--brand-primary,#16685e);animation:domestic-monitor-spin .8s linear infinite}
@keyframes domestic-monitor-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.domestic-progress-spinner{animation:none;border-style:dashed}}
