/* AKXVV agent workspace: warm, grounded and intentionally business-first. */
:root{
  color-scheme:light;
  --agent-bg:#eee9e1;
  --agent-sidebar:#3b3834;
  --agent-panel:#fffdf9;
  --agent-panel-soft:#f7f0e7;
  --agent-line:#e6ddd2;
  --agent-text:#282521;
  --agent-muted:#7c736a;
  --agent-accent:#d7663b;
  --agent-accent-soft:#f8dfd2;
}
body{background:#eee9e1;color:var(--agent-text)}
.portal{
  min-height:100vh;
  grid-template-columns:206px minmax(0,1fr);
  gap:14px;
  padding:14px;
  background:
    radial-gradient(circle at 3% 8%,#f5b58d88,transparent 24%),
    linear-gradient(135deg,#efeae3,#e7e1d8);
}
.portal>aside{
  top:14px;
  height:calc(100vh - 28px);
  padding:19px 12px 14px;
  border:1px solid #ffffff2e;
  border-radius:27px;
  background:linear-gradient(165deg,#4e4944e8,#282725f2);
  box-shadow:0 22px 56px #3b2b2130;
  backdrop-filter:blur(24px) saturate(1.15);
}
.brand{padding:4px 10px 24px;color:#fff}.brand img{width:39px;filter:drop-shadow(0 5px 12px #0004)}
.brand span{color:#d9d0c7;font-size:11px;letter-spacing:.04em}
.portal nav{gap:7px}
.portal nav button,.logout{
  min-height:43px;
  border:1px solid transparent;
  border-radius:15px;
  color:#e5ddd5;
  font-size:12px;
  font-weight:700;
}
.portal nav button i{
  width:25px;height:25px;border-radius:10px;
  color:#f7e3d7;background:#ffffff12;
}
.portal nav button:hover,.logout:hover{background:#ffffff12;color:#fff;transform:translateX(2px)}
.portal nav button.active{
  color:#302c28;
  background:#fffaf4;
  border-color:#ffffff80;
  box-shadow:0 10px 25px #17120f25;
}
.portal nav button.active i{color:#fff;background:var(--agent-accent)}
.logout{color:#d9d0c7}

.workspace{
  position:relative;
  isolation:isolate;
  max-width:none;
  min-height:calc(100vh - 28px);
  margin:0;
  padding:27px 30px 42px;
  overflow:hidden;
  border:1px solid #ffffffa3;
  border-radius:29px;
  background:linear-gradient(to bottom,#776f68 0,#aa7760 300px,#f6f1e9 390px,#f6f3ee 100%);
  box-shadow:0 22px 60px #4a352529;
  color:var(--agent-text);
}
.workspace::before{
  content:"";
  position:absolute;z-index:-2;inset:0 0 auto;height:390px;
  background:
    linear-gradient(90deg,transparent 0 13%,#2d2a2829 13% 14%,transparent 14% 48%,#2d2a2829 48% 49%,transparent 49% 79%,#2d2a2829 79% 80%,transparent 80%),
    linear-gradient(174deg,transparent 0 48%,#e48755c9 49% 54%,#7a4a38c7 55% 63%,#3d3733df 64% 100%),
    radial-gradient(circle at 18% 8%,#ffe1c1 0 7%,#f1a06a99 16%,transparent 38%),
    linear-gradient(112deg,#c9c0b8 0,#776f69 47%,#4b4947 74%,#b76746 100%);
  filter:saturate(.92);
}
.workspace::after{
  content:"";
  position:absolute;z-index:-1;inset:0 0 auto;height:390px;
  background:linear-gradient(180deg,#1f1c1918,#3a21184a 76%,#f6f1e9 100%);
  pointer-events:none;
}
.workspace>*{position:relative;z-index:1}
.workspace>header{align-items:flex-start;margin-bottom:20px;color:#fff}
.workspace>header h1{font-size:30px;font-weight:650;letter-spacing:-.035em;text-shadow:0 3px 18px #24171140}
.workspace>header h1::before{content:"AGENT BUSINESS DESK";display:block;margin-bottom:8px;color:#fffbdc;font-size:10px;font-weight:800;letter-spacing:.18em}
.identity-strip{margin-top:10px}.identity-strip span{
  padding:6px 10px;border:1px solid #ffffff38;background:#3f352f66;color:#fff0e8;
  box-shadow:inset 0 1px #ffffff1c;backdrop-filter:blur(14px);
}
.ghost,.text-button{
  border:1px solid #ffffff5e;
  border-radius:13px;
  background:#3a302b70;
  color:#fff8f2;
  box-shadow:inset 0 1px #ffffff20;
  backdrop-filter:blur(15px);
}
.page[data-page-panel="dashboard"]{padding-top:64px}
.overview-report{position:relative;isolation:isolate;overflow:hidden;min-height:210px;padding:20px 22px;border:1px solid #ffffffb8;border-radius:24px;background:linear-gradient(118deg,#fffdf9f2 0%,#fff7efdf 56%,#f5d8c8cf 100%);box-shadow:0 18px 45px #4d2d1e22;backdrop-filter:blur(22px) saturate(1.08);animation:overviewReportEnter .55s cubic-bezier(.2,.8,.2,1) both}.overview-report::before{content:"";position:absolute;z-index:-1;right:-70px;top:-105px;width:310px;height:310px;border-radius:50%;background:radial-gradient(circle,#e86f3c48 0,#ef9b7430 37%,transparent 69%);animation:overviewAura 7s ease-in-out infinite alternate}.overview-report::after{content:"";position:absolute;z-index:-1;left:29%;right:4%;bottom:25px;height:74px;border-bottom:1px solid #d8653b55;border-radius:0 0 50% 45%;transform:skewX(-14deg) rotate(-2deg);opacity:.72;animation:overviewLine 5.5s ease-in-out infinite alternate}.overview-report-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:17px}.overview-report-head>div>span{display:block;color:#b8603e;font-size:8px;font-weight:900;letter-spacing:.18em}.overview-report-head h2{margin:4px 0 0;color:#2d2824;font-size:20px}.overview-live{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid #ead6c8;border-radius:99px;background:#fffaf4a8;color:#765f52;font-size:10px;font-weight:800}.overview-live i{width:7px;height:7px;border-radius:50%;background:#49a36e;box-shadow:0 0 0 0 #49a36e66;animation:overviewPulse 2s ease-out infinite}.overview-report-body{display:grid;grid-template-columns:minmax(245px,.88fr) minmax(0,2.12fr);gap:13px}.overview-balance,.overview-metric-strip article{position:relative;overflow:hidden;border:1px solid #fff;border-radius:18px;background:#fffaf4c9;box-shadow:0 10px 26px #70402b12}.overview-balance{display:grid;align-content:center;min-height:115px;padding:17px 18px;transition:transform .22s ease,box-shadow .22s ease}.overview-balance:hover{transform:translateY(-3px);box-shadow:0 15px 32px #70402b1c}.overview-balance>span,.overview-metric-strip span{color:#796d64;font-size:11px;font-weight:800}.overview-balance strong{margin-top:7px;color:#2d2925;font-size:29px;letter-spacing:-.025em}.overview-balance small,.overview-metric-strip small{margin-top:5px;color:#9a8d83;font-size:9px}.overview-balance button{position:absolute;right:14px;bottom:14px;border:1px solid #e6d5c9;border-radius:9px;padding:7px 10px;background:#fff8f1;color:#9a4b2e;font-size:10px;font-weight:800;cursor:pointer;transition:transform .18s ease,background .18s ease}.overview-balance button:hover{transform:translateX(2px);background:#fff}.overview-metric-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.overview-metric-strip article{display:grid;align-content:center;min-width:0;padding:17px;animation:overviewMetricEnter .5s cubic-bezier(.2,.8,.2,1) both}.overview-metric-strip article:nth-child(1){animation-delay:.08s}.overview-metric-strip article:nth-child(2){animation-delay:.15s}.overview-metric-strip article:nth-child(3){animation-delay:.22s}.overview-metric-strip article::before{content:"";position:absolute;left:17px;top:14px;width:25px;height:3px;border-radius:99px;background:#d85e35}.overview-metric-strip span{margin-top:10px}.overview-metric-strip strong{margin-top:9px;overflow:hidden;color:#332e2a;font-size:20px;text-overflow:ellipsis;white-space:nowrap}.overview-metric-strip small{display:block}.overview-metric-strip article:nth-child(2){background:linear-gradient(145deg,#fffaf4db,#fff1e7d4)}
.finance-report{margin-bottom:14px}.finance-report::before{right:auto;left:-80px;top:-120px}.finance-report::after{left:36%;bottom:96px;transform:skewX(12deg) rotate(1deg)}.finance-trend{position:relative;z-index:1;display:grid;grid-template-columns:150px 1fr;align-items:end;gap:18px;margin-top:13px;padding:12px 14px;border:1px solid #fff;border-radius:16px;background:#fffaf4b8;box-shadow:0 8px 22px #70402b0d}.finance-trend>div:first-child{display:grid;gap:4px}.finance-trend strong{color:#3a332e;font-size:12px}.finance-trend span{color:#94867c;font-size:9px}.finance-trend-bars{height:62px;display:flex;align-items:flex-end;gap:6px}.finance-trend-bars i{flex:1;height:var(--trend-height,0);min-width:8px;border-radius:7px 7px 3px 3px;background:linear-gradient(180deg,#f49a72,#d65a32);box-shadow:0 5px 12px #d85c3428;animation:financeBarRise .5s cubic-bezier(.2,.8,.2,1) both}.finance-trend-bars i:nth-child(2){animation-delay:.04s}.finance-trend-bars i:nth-child(3){animation-delay:.08s}.finance-trend-bars i:nth-child(4){animation-delay:.12s}.finance-trend-bars i:nth-child(5){animation-delay:.16s}.finance-trend-bars i:nth-child(6){animation-delay:.2s}.finance-trend-bars i:nth-child(7){animation-delay:.24s}.finance-trend-bars i:nth-child(8){animation-delay:.28s}.finance-trend-empty{margin:auto}
.finance-trend-bars{justify-content:flex-end;gap:8px;border-bottom:1px solid #e7d5c8}.finance-trend-bars i{flex:0 1 64px;width:64px;min-width:12px}
@keyframes overviewReportEnter{from{opacity:0;transform:translateY(14px) scale(.99)}to{opacity:1;transform:none}}@keyframes overviewMetricEnter{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:none}}@keyframes overviewAura{from{transform:translate3d(-10px,7px,0) scale(.94)}to{transform:translate3d(9px,-8px,0) scale(1.06)}}@keyframes overviewLine{from{transform:skewX(-14deg) rotate(-2deg) translateY(3px)}to{transform:skewX(-9deg) rotate(-1deg) translateY(-5px)}}@keyframes overviewPulse{0%{box-shadow:0 0 0 0 #49a36e66}70%{box-shadow:0 0 0 7px #49a36e00}100%{box-shadow:0 0 0 0 #49a36e00}}@keyframes financeBarRise{from{height:0;opacity:.25}to{height:var(--trend-height,0);opacity:1}}
.summary-grid{gap:12px}
.portal .summary-grid article{
  position:relative;
  min-height:118px;
  padding:18px 18px 17px;
  overflow:hidden;
  border:1px solid #fff;
  border-radius:21px;
  background:#fffdf9f2;
  box-shadow:0 15px 34px #4c31231f;
  backdrop-filter:blur(18px) saturate(1.08);
}
.portal .summary-grid article::before{content:"";display:block;width:28px;height:4px;margin-bottom:17px;border-radius:99px;background:var(--agent-accent)}
.portal .summary-grid article::after{content:"";position:absolute;right:-24px;bottom:-32px;width:90px;height:90px;border-radius:50%;background:#f2a07a24}
.summary-grid span{position:relative;z-index:1;color:#7d736a;font-size:11px;font-weight:700;letter-spacing:.02em}
.summary-grid strong{position:relative;z-index:1;color:#2d2925;font-size:23px;letter-spacing:-.02em}
.portal .panel,.portal .invite-card,.portal .ticket-card{
  border:1px solid #fff;
  border-radius:21px;
  background:#fffdf9ed;
  box-shadow:0 14px 35px #4c312317;
  backdrop-filter:blur(20px) saturate(1.08);
}
.portal .panel{padding:19px;margin-top:14px}
.panel-title{margin-bottom:14px}.panel-title h2{font-size:16px;color:#2e2a26}.panel-title p{color:var(--agent-muted)}
#save-prices{width:auto;min-width:150px}.panel-title h2{line-height:1.2}
.panel-title button:not(.text-button),#save-prices,.invite-price-form button,.inline-form button,.ticket-form button,.copy-row button,.reply-row button,.invite-actions button,.withdraw-form button,.agent-invite-section:not(#agent-invite-panel) .custom-invite-head button{
  border:0;
  background:linear-gradient(135deg,#df744b,#c95631);
  color:#fff;
  box-shadow:0 8px 18px #c7563030;
}
.panel-title .text-button{border-color:#e5d9ce;background:#faf4ec;color:#805642;box-shadow:none}
.count-badge,.profit-badge{background:#f7ddd0;color:#a84627}.target-badge{border-color:#e8d7ca;background:#fff8f1;color:#755746}
.referral-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:22px 0 8px}.referral-heading h2{margin:0}
.referral-heading p{margin:4px 0 0;color:var(--agent-muted);font-size:11px}
.central-custom-builder{margin-top:16px;padding-top:16px;border-top:1px solid #eadfd4}.central-custom-builder-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.central-custom-builder-head strong{font-size:15px;color:#2e2a26}.central-custom-builder-head p{margin:4px 0 0;color:var(--agent-muted);font-size:11px}.central-custom-builder-head button{height:38px;border:0;border-radius:10px;padding:0 16px;background:linear-gradient(135deg,#df744b,#c95631);color:#fff;font-weight:800;white-space:nowrap;cursor:pointer;box-shadow:0 8px 18px #c7563030}.central-custom-link .invite-card{margin:0;background:#fffaf4}.central-custom-link .empty{margin:0}
.business-summary,.price-summary>div,.invite-prices span,.ticket-message,.rate-panel,.verification-hint,.missing-preset,.invite-card.disabled,.purchase-history-popover{
  border-color:#eadfd4;background:#f8f1e8;
}
.business-summary div+div,.order,.record-row,.ticket-card,.invite-card,.agent-invite-section,th,td,.withdrawal-list,.withdrawal-row{border-color:#e9dfd4}
.order,.record-row{border-radius:14px;background:#fffaf4}
.dashboard-insight-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(230px,.78fr) minmax(230px,.78fr);gap:14px;margin-top:14px}.dashboard-insight-grid>.panel{height:100%;margin-top:0}.dashboard-insight-grid .panel-title{margin-bottom:13px}.dashboard-insight-grid .panel-title h2{font-size:18px}.dashboard-recent-card{min-width:0}.dashboard-orders{gap:8px}.dashboard-orders .order{min-height:65px;padding:10px 12px}.dashboard-orders .order>span:first-child{grid-template-columns:auto 1fr;align-items:center;column-gap:8px}.dashboard-orders .order strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-orders .order small{grid-column:1/-1}.order-kind{display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:21px;border-radius:99px;font-size:9px;font-style:normal;font-weight:800}.order-kind.traffic{background:#f8ddd0;color:#b94f2b}.order-kind.central{background:#eee4d9;color:#6e584a}
.dashboard-traffic-total{display:grid;place-content:center;min-height:137px;text-align:center}.dashboard-traffic-total strong{color:#d65b33;font-size:31px;letter-spacing:-.03em}.dashboard-traffic-total span{margin-top:4px;color:#8a7c70;font-size:10px}.dashboard-useful-list{display:grid;gap:9px}.dashboard-useful-list>span{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:11px;background:#f8f1e8;color:#756a61;font-size:10px}.dashboard-useful-list b{margin-left:auto;color:#342f2a;font-size:12px}.dashboard-ring-row{display:grid;place-items:center;padding:3px 0 15px}.dashboard-margin-ring{--margin-angle:0deg;width:132px;height:132px;padding:14px;border-radius:50%;background:conic-gradient(#d76036 0 var(--margin-angle),#eadfd4 var(--margin-angle) 360deg);box-shadow:inset 0 0 0 1px #fff,0 14px 30px #9f5b3d24;transition:background .35s ease}.dashboard-margin-ring>div{height:100%;display:grid;place-content:center;text-align:center;border-radius:50%;background:#fffaf4}.dashboard-margin-ring strong{font-size:24px;color:#2d2925}.dashboard-margin-ring span{margin:2px 0 0;color:#8a7c70;font-size:10px}
.order b,.rate-panel strong,.price-summary b,.invite-prices b,.price-facts b,.purchase-history b,.withdrawal-row b{color:#bd522e}
.cost-baseline{color:#9a6a52!important;font-weight:700}.sale-value{color:#342d28}.profit-value{color:#c6532e}.traffic-economics span{padding:11px 13px}.traffic-economics b{font-size:13px}
.order:hover,tbody tr:hover{background:#fff2e8}
th{color:#83766b;font-size:11px;text-transform:none}td{color:#3f3934}
.table-wrap{border:1px solid #eee3d9;border-radius:15px;background:#fffaf6;scrollbar-color:#dc8a68 transparent}
table{background:transparent}thead{background:#f8f0e7}
.status{background:#e4f2e8;color:#30764d}.status.inactive{background:#eeeae5;color:#746d65}
.self-customer-name{background:#e4f2e8;color:#30764d}.traffic-balance{color:#25825b}
.customer-edit-icon{width:25px;height:25px;display:inline-grid;place-items:center;flex:0 0 auto;border:1px solid #e2d5ca;border-radius:50%;padding:0;background:#fff8f1;color:#a64e2f;font-size:12px;font-weight:900;line-height:1;cursor:pointer;transition:transform .16s ease,background .16s ease}.customer-edit-icon:hover{transform:rotate(-8deg) scale(1.07);background:#fff}.ticket-body small{color:#8b7e74;font-size:9px;font-weight:500;line-height:1.5}.withdrawal-panel>.connection-state{margin-top:10px;padding:9px 11px;border-radius:10px;background:#f8f1e8}
.purchase-history summary{color:#b7502f}.purchase-history-popover{border-color:#e6d7ca;background:#fffaf4;box-shadow:0 24px 70px #5a39252e}
.purchase-history-list>div{background:#f7eee5}
.invite-preview,.invite-actions button.secondary,.login-card .login-back,.panel-title #fill-invite-defaults{
  border-color:#e6d8cc;background:#fff9f3;color:#765644;
}
.preset-invite-list .invite-prices{grid-template-columns:1fr}.invite-prices span{min-width:0;white-space:nowrap}
.custom-invite-head button{height:36px;border:0;border-radius:9px;padding:0 14px;background:linear-gradient(135deg,#df744b,#c95631);color:#fff;font-weight:800;white-space:nowrap;cursor:pointer;box-shadow:0 8px 18px #c7563030}
input,select,textarea,.login-card input,.price-grid input,.price-grid select,.inline-form input,.ticket-form input,.ticket-form select,.ticket-form textarea,.copy-row input,.reply-row textarea,.invite-price-form input,.invite-actions input,.withdraw-form input,.withdraw-form select,.direct-price-form input,.customer-name-edit input{
  border-color:#dfd2c6!important;background:#fffdf9!important;color:#332d28!important;
}
input:focus,select:focus,textarea:focus{border-color:#dc7249!important;box-shadow:0 0 0 3px #df744b20!important}
.boundary-note{border-color:#cfe3d7;background:#edf7f1;color:#2c7350}
.locked-badge{border-color:#dfc98b;background:#fff3cd;color:#7e6220}
.agent-invite-card{border-color:#e3c8b7;background:#fff8f2}
.toast{background:#352d28;color:#fff;border-radius:14px;box-shadow:0 14px 34px #2d211a3d}
.finance-summary{grid-template-columns:repeat(5,minmax(0,1fr))}
.page[data-page-panel="withdrawals"]>.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.page[data-page-panel="finance"] table{min-width:1080px}
#ticket-submit{grid-column:1/-1;width:100%}.ticket-card>header .status{white-space:nowrap}
.customer-directory-toolbar{display:grid;grid-template-columns:minmax(240px,1.4fr) minmax(140px,.55fr) minmax(160px,.65fr);gap:10px;margin:2px 0 8px}.customer-directory-toolbar label{display:grid;gap:5px;color:#7d6d62;font-size:10px;font-weight:800}.customer-directory-toolbar input,.customer-directory-toolbar select{width:100%;height:38px;border:1px solid #dfd2c6;border-radius:10px;padding:0 11px;background:#fffdf9;color:#332d28;font:inherit}.customer-presence-state{margin:0 0 10px;color:#89796d;font-size:10px}.customer-table{min-width:900px}.customer-identity{display:grid;gap:3px;min-width:0}.customer-identity strong{overflow:hidden;text-overflow:ellipsis}.customer-identity small{max-width:190px;overflow:hidden;color:#8f8075;font-size:9px;text-overflow:ellipsis;white-space:nowrap}.customer-level{display:inline-flex;align-items:center;justify-content:center;min-width:52px;height:25px;padding:0 9px;border:1px solid #e3d5ca;border-radius:999px;background:#fff8f2;color:#8a5c48;font-size:10px;font-weight:800;white-space:nowrap}.customer-level.level-0{border-color:#e6c9ba;background:#f9e5da;color:#ae4d2c}.customer-service-grid{display:grid;grid-template-columns:repeat(2,max-content);gap:5px;min-width:218px}.customer-service-chip{display:inline-flex;align-items:center;gap:4px;min-height:25px;padding:3px 7px;border:1px solid #e3d9d0;border-radius:8px;background:#f8f3ee;color:#70665f;white-space:nowrap}.customer-service-chip i{width:6px;height:6px;border-radius:50%;background:#b5aaa2}.customer-service-chip b{font-size:9px}.customer-service-chip small{font-size:8px}.customer-service-chip.online{border-color:#cbdcf2;background:#eef5ff;color:#34689c}.customer-service-chip.online i{background:#4382c3;box-shadow:0 0 0 3px #4382c31c}.customer-service-chip.unknown{border-style:dashed;color:#94877e}.service-status-unknown{display:inline-flex;padding:5px 8px;border:1px dashed #ded3ca;border-radius:8px;background:#faf7f3;color:#94877e;font-size:9px;white-space:nowrap}.customer-online-time{display:grid;gap:3px;min-width:112px}.customer-online-time strong{font-size:11px}.customer-online-time small{color:#96887e;font-size:8px;white-space:nowrap}.customer-online-time.online strong{color:#34689c}.customer-online-time.offline strong{color:#81766e}.customer-row-online{box-shadow:inset 3px 0 #6f9fd0}
.customer-table-shell{position:relative}.customer-table-wrap{scrollbar-width:thin;scrollbar-color:#d97654 #f5e7dc}.customer-table-wrap::-webkit-scrollbar{height:11px}.customer-table-wrap::-webkit-scrollbar-track{border-radius:999px;background:#f5e7dc}.customer-table-wrap::-webkit-scrollbar-thumb{border:2px solid #f5e7dc;border-radius:999px;background:linear-gradient(90deg,#e49676,#d96843)}.customer-scroll-cue{position:absolute;right:14px;bottom:1px;z-index:4;padding:2px 8px;border-radius:999px;background:#453b36e8;color:#fff7f1;font-size:9px;font-weight:800;box-shadow:0 4px 12px #51301f2e;pointer-events:none;animation:scroll-cue-pulse 1.4s ease-in-out infinite}.customer-scroll-cue b{display:inline-block;margin-left:3px;animation:scroll-cue-arrow 1.1s ease-in-out infinite}@keyframes scroll-cue-pulse{50%{transform:translateY(-1px)}}@keyframes scroll-cue-arrow{50%{transform:translateX(4px)}}
.traffic-transfer-control{display:grid;grid-template-columns:76px auto 52px;align-items:center;gap:7px;min-width:156px}.traffic-transfer-control input{width:76px;height:34px;padding:0 9px;border:1px solid #decfc2;border-radius:9px;background:#fffdf9;color:#332c28;font:inherit}.traffic-transfer-control span{color:#8a7c70;font-size:10px}.traffic-transfer-control button{height:34px;padding:0 11px;border:0;border-radius:9px;background:linear-gradient(135deg,#df744b,#c95631);color:#fff;font-weight:800;cursor:pointer}.traffic-transfer-control input:disabled{background:#f7f2ed;color:#9d9188}.traffic-transfer-control button:disabled{background:#ded8d2;color:#9d9188;cursor:not-allowed}.self-balance-label{color:#8a7c70;font-size:11px;white-space:nowrap}

.login-shell{
  background:
    radial-gradient(circle at 14% 13%,#ffd4b8 0,transparent 28%),
    linear-gradient(145deg,#716b66,#d8784e 55%,#f5d1b9);
}
.login-shell::after{content:"";position:absolute;inset:auto 0 0;height:42%;background:linear-gradient(170deg,transparent 0 18%,#3b3632 19% 23%,#241f1c 24% 100%);opacity:.68}
.login-shell .login-card{z-index:1;border-color:#ffffffb5;border-radius:25px;background:#fffaf3e8;box-shadow:0 28px 78px #3b211c42;color:#2e2925}
.login-card>p:not(.error),.login-persistence{color:#7c7269}
.login-card button,#save-prices{background:linear-gradient(135deg,#df744b,#c95631)}

@media(max-width:1000px){
  .overview-report-body{grid-template-columns:1fr}.overview-balance{min-height:110px}.overview-metric-strip{grid-template-columns:repeat(3,minmax(0,1fr))}
  .dashboard-insight-grid{grid-template-columns:1fr 1fr}.dashboard-recent-card{grid-column:1/-1}
  .portal{grid-template-columns:82px minmax(0,1fr)}
  .portal>aside{padding-inline:9px}
  .brand{justify-content:center;padding-inline:0}.brand img{width:36px}
  .portal nav button{justify-content:center}
  .workspace{padding-inline:22px}
  .finance-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:650px){
  .finance-trend{grid-template-columns:1fr}.finance-trend-bars{height:70px}
  .overview-report{min-height:0;padding:16px;border-radius:20px}.overview-report-head{margin-bottom:13px}.overview-report-head h2{font-size:19px}.overview-report-body{display:block}.overview-balance{min-height:126px}.overview-balance strong{font-size:26px}.overview-metric-strip{grid-template-columns:1fr 1fr;margin-top:10px}.overview-metric-strip article{min-height:102px;padding:14px}.overview-metric-strip article:last-child{grid-column:1/-1}.overview-metric-strip article::before{left:14px;top:12px}.overview-metric-strip strong{font-size:18px}.overview-report::after{left:8%;bottom:145px}
  .dashboard-insight-grid{grid-template-columns:1fr}.dashboard-recent-card{grid-column:auto}.dashboard-insight-grid>.panel{min-width:0}.dashboard-orders .order{align-items:flex-start}.dashboard-orders .order>span:last-child{flex:0 0 auto}.dashboard-traffic-card,.dashboard-efficiency-card{min-height:0}
  .portal{display:block;padding:0;background:#f3eee7}
  .portal>aside{
    position:sticky;z-index:50;top:0;height:auto;display:flex;flex-direction:row;
    padding:8px 9px;border:0;border-radius:0 0 20px 20px;overflow:auto;
    background:#302d2be8;box-shadow:0 8px 28px #2e211c2b;
    scrollbar-width:none;
  }
  .portal>aside::-webkit-scrollbar{display:none}
  .brand{padding:0;margin-right:7px}.brand img{width:34px}
  .portal nav{display:flex;gap:4px}.portal nav button{min-height:39px;padding:7px 10px;border-radius:13px}.portal nav button span{display:inline}
  .workspace{min-height:100vh;padding:23px 13px 34px;border:0;border-radius:0;background:linear-gradient(to bottom,#8e6a59 0,#f6f1e9 300px,#f6f3ee 100%)}
  .workspace::before,.workspace::after{height:300px}
  .workspace>header{align-items:flex-start}.workspace>header h1{font-size:23px}.workspace>header h1::before{font-size:8px}
  .identity-strip{align-items:flex-start;flex-direction:column}
  .page[data-page-panel="dashboard"]{padding-top:30px}
  .summary-grid,.compact-overview,.finance-summary,.page[data-page-panel="withdrawals"]>.summary-grid{grid-template-columns:1fr 1fr}
  .portal .summary-grid article{min-height:105px;padding:14px;border-radius:17px}
  .portal .summary-grid article::before{margin-bottom:12px}.summary-grid strong{font-size:18px}
  .portal .panel{padding:14px;border-radius:17px}
  .table-wrap{border-radius:13px}
  .panel-title{align-items:center}.panel-title h2{font-size:18px}#save-prices{min-width:132px}
  .central-custom-builder-head{align-items:flex-start;flex-direction:column}.central-custom-builder-head button{width:100%}
  .referral-heading{margin-top:18px}.referral-heading .count-badge{flex:0 0 auto}
  .preset-invite-list .invite-prices{grid-template-columns:1fr}

  .customer-table,.customer-table tbody,.customer-table tr,.customer-table td,
  .page[data-page-panel="finance"] table,.page[data-page-panel="finance"] tbody,.page[data-page-panel="finance"] tr,.page[data-page-panel="finance"] td{display:block;width:100%;min-width:0}
  .customer-table thead,.page[data-page-panel="finance"] thead{display:none}
  .customer-table tbody,.page[data-page-panel="finance"] tbody{padding:10px}
  .customer-table tr,.page[data-page-panel="finance"] tbody tr{margin-bottom:10px;padding:10px 12px;border:1px solid #eadfd4;border-radius:14px;background:#fffdf9}
  .customer-table tr:last-child,.page[data-page-panel="finance"] tbody tr:last-child{margin-bottom:0}
  .customer-table td,.page[data-page-panel="finance"] td{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:7px 0;border:0;text-align:right;white-space:normal}
  .customer-table td::before,.page[data-page-panel="finance"] td::before{flex:0 0 82px;color:#8a7c70;font-size:10px;font-weight:700;text-align:left}
  .customer-directory-toolbar{grid-template-columns:1fr 1fr}.customer-directory-toolbar .customer-search-field{grid-column:1/-1}.customer-presence-state{line-height:1.5}
  .customer-table td:nth-child(1)::before{content:"客户"}.customer-table td:nth-child(2)::before{content:"专属链接"}.customer-table td:nth-child(3)::before{content:"累计购买"}.customer-table td:nth-child(4)::before{content:"可用流量"}.customer-table td:nth-child(5)::before{content:"销售额"}.customer-table td:nth-child(6)::before{content:"利润"}.customer-table td:nth-child(7)::before{content:"购买记录"}.customer-table td:nth-child(8)::before{content:"分配流量"}.customer-table td:nth-child(9)::before{content:"状态 / 时长"}
  .traffic-transfer-control{grid-template-columns:minmax(76px,1fr) auto 54px;min-width:min(100%,210px)}
  #traffic-orders td:nth-child(1)::before{content:"订单"}#traffic-orders td:nth-child(2)::before{content:"购买"}#traffic-orders td:nth-child(3)::before{content:"销售额"}#traffic-orders td:nth-child(4)::before{content:"利润"}#traffic-orders td:nth-child(5)::before{content:"订单状态"}#traffic-orders td:nth-child(6)::before{content:"付款订单号"}#traffic-orders td:nth-child(7)::before{content:"创建/付款时间"}#traffic-orders td:nth-child(8)::before{content:"客户链接"}
  #orders td:nth-child(1)::before{content:"订单"}#orders td:nth-child(2)::before{content:"客户"}#orders td:nth-child(3)::before{content:"成交"}#orders td:nth-child(4)::before{content:"成本"}#orders td:nth-child(5)::before{content:"差价"}#orders td:nth-child(6)::before{content:"购买时间"}#orders td:nth-child(7)::before{content:"状态"}
  .customer-name-view,.customer-link-actions{justify-content:flex-end}.customer-identity{justify-items:end}.customer-service-grid{grid-template-columns:repeat(2,minmax(82px,1fr));min-width:0;width:min(100%,230px)}.customer-service-chip{justify-content:flex-start}.customer-online-time{justify-items:end}.purchase-history{min-width:0}.purchase-history summary{white-space:normal}
}
@media(max-width:330px){.summary-grid,.compact-overview,.finance-summary,.page[data-page-panel="withdrawals"]>.summary-grid,.customer-directory-toolbar{grid-template-columns:1fr}.customer-directory-toolbar .customer-search-field{grid-column:auto}.customer-service-grid{grid-template-columns:1fr}}
@media(min-width:651px){.page[data-page-panel="central"] .compact-sales-panel,.page[data-page-panel="traffic"] .compact-sales-panel{min-height:444px}.page[data-page-panel="central"] .preset-invite-list .invite-card,.page[data-page-panel="traffic"] .preset-invite-list .invite-card{min-height:297px;display:flex;flex-direction:column}.page[data-page-panel="central"] .preset-invite-list .invite-actions,.page[data-page-panel="traffic"] .preset-invite-list .invite-actions{margin-top:auto}}
@media(prefers-reduced-motion:reduce){.workspace::before{filter:none}.overview-report,.overview-metric-strip article,.overview-report::before,.overview-report::after,.overview-live i,.finance-trend-bars i{animation:none!important}.overview-balance,.overview-balance button,.customer-edit-icon{transition:none!important}}

/* Agent finance controls: scoped to the current agent portal. */
.pagination{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:13px;color:#8d7d71;font-size:11px}.pagination button{height:32px;border:1px solid #dfcfc3;border-radius:9px;padding:0 12px;background:#fffaf4;color:#81452f;font-weight:800;cursor:pointer}.pagination button:disabled{cursor:default;opacity:.42}.compact-pagination{margin-top:9px;padding-top:9px;border-top:1px solid #eadbd0}.finance-trend-bars i{position:relative;cursor:default}.finance-trend-bars i::after{content:attr(data-tooltip);position:absolute;z-index:5;left:50%;bottom:calc(100% + 8px);min-width:max-content;padding:6px 8px;border-radius:8px;background:#3f342d;color:#fff;font-style:normal;font-size:10px;font-weight:700;opacity:0;pointer-events:none;transform:translate(-50%,6px);transition:opacity .16s ease,transform .16s ease}.finance-trend-bars i:hover::after,.finance-trend-bars i:focus::after{opacity:1;transform:translate(-50%,0)}.withdraw-qr-field{grid-column:span 2}.withdraw-qr-field input{padding:8px}.withdraw-qr-field small{color:#94867c;font-size:10px}.withdraw-qr-preview{width:116px;height:116px;border:1px solid #dfcfc3;border-radius:12px;background:#fff;object-fit:contain;padding:5px}.withdraw-form .hidden{display:none!important}
@media(max-width:650px){.pagination{justify-content:center;flex-wrap:wrap}.withdraw-qr-field{grid-column:auto}}

/* Traffic volume discounts. */
.traffic-discount-editor{margin:14px 0;border:1px solid #ead8cb;border-radius:13px;background:#fff8f2;overflow:hidden}.traffic-discount-editor summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;list-style:none;cursor:pointer}.traffic-discount-editor summary::-webkit-details-marker{display:none}.traffic-discount-editor summary strong{display:block;color:#3d322b;font-size:13px}.traffic-discount-editor summary small{display:block;margin-top:2px;color:#8a776a;font-size:10px}.traffic-discount-toggle{flex:0 0 auto;padding:5px 9px;border:1px solid #dfcfc3;border-radius:9px;background:#fffaf4;color:#b85d3c;font-size:11px;font-weight:800}.traffic-discount-toggle:after{content:"展开设置"}.traffic-discount-editor[open] .traffic-discount-toggle:after{content:"收起"}.traffic-discount-fields{display:grid;grid-template-columns:repeat(3,minmax(110px,150px)) auto;align-items:end;justify-content:end;gap:10px;padding:10px 12px 12px;border-top:1px solid #efe1d6}.traffic-discount-editor label{display:grid;grid-template-columns:1fr auto;gap:5px;color:#725f53;font-size:11px;font-weight:700}.traffic-discount-editor label input{grid-row:2;min-width:0;height:34px;border:1px solid #dfcfc3;border-radius:9px;padding:0 9px;background:#fff;color:#44372f;font:700 13px/1 inherit}.traffic-discount-editor label span{grid-row:2;align-self:center;color:#a56a50}.traffic-discount-fields>button{height:32px;border:0;border-radius:9px;padding:0 12px;background:linear-gradient(135deg,#df744b,#c95631);color:#fff;font-size:12px;font-weight:800;cursor:pointer}.traffic-discount-fields>button:disabled{opacity:.55}.traffic-discount-summary{margin:10px 0 2px;padding:8px 10px;border-radius:10px;background:#f8eee6;color:#a54d2d;font-size:11px;font-weight:800}
@media(max-width:650px){.traffic-discount-fields{grid-template-columns:1fr}.traffic-discount-fields>button{width:auto;justify-self:end}}
.invite-code-row{display:grid;grid-template-columns:auto minmax(8rem,auto) 1fr;align-items:center;gap:.65rem;padding:.65rem .75rem;border-radius:12px;background:#f8f1e8;color:#6c5b50}.invite-code-row button{width:max-content;padding:.42rem .8rem;border:1px dashed #d56a43;border-radius:9px;background:#fffaf4;color:#bd4f2c;font:700 .92rem/1 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.08em;cursor:pointer}.invite-code-row small{color:#88756a}

/* Compact status preserves the underlying hierarchy and all five service sources. */
.customer-status{display:grid;gap:4px;min-width:62px;color:#84776d;font-size:11px}
.customer-status>span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.customer-status i{width:6px;height:6px;border-radius:50%;background:#b5aaa2}
.customer-status.online{color:#476b5d}.customer-status.online i{background:#658b77}
.customer-status small{font-size:10px;color:#8d7c6e;white-space:nowrap}
.customer-table .customer-link-actions{gap:6px}.customer-table .customer-link-actions .text-button{padding:6px 10px;font-size:11px}
.customer-table .purchase-history{min-width:90px}.customer-table .customer-identity{max-width:160px}
#toast.toast{left:50%;right:auto;bottom:24px;transform:translateX(-50%);width:max-content;max-width:min(420px,calc(100vw - 32px));padding:10px 16px;border:1px solid #665348;border-radius:12px;background:#493c33;color:#fffaf4;font-size:13px;line-height:1.5;overflow-wrap:anywhere;z-index:1000;box-shadow:0 8px 28px #493c3326;pointer-events:none}
@media(max-width:650px){.customer-table .customer-identity{max-width:100%}.customer-status{justify-items:end}.customer-table td.empty::before{content:none}#toast.toast{bottom:16px}}

.customer-list-panel{padding:20px}
.customer-list-panel .panel-title{margin-bottom:14px}
.customer-directory-toolbar{gap:12px;margin:0 0 10px}
.customer-presence-state{margin-bottom:12px;line-height:1.5}
.customer-table th,.customer-table td{padding:12px 10px;font-size:12px;vertical-align:middle}
.customer-table th{padding-block:10px;font-size:11px}
.customer-table .traffic-transfer-control{grid-template-columns:46px auto 42px;min-width:110px;gap:4px}
.customer-table .traffic-transfer-control input{width:46px;padding:0 5px}
.customer-table .traffic-transfer-control button{padding:0 6px}
.customer-table .customer-identity{flex:1;max-width:100%}
.customer-table .customer-identity small{max-width:100%}
.customer-table .self-customer-name{justify-self:start;width:max-content}
.customer-table .sale-value,.customer-table .profit-value{font-size:11px;font-variant-numeric:tabular-nums}
.customer-table .balance-stale{color:#89796d}
@media(min-width:651px){
  .customer-table{table-layout:fixed;min-width:900px;width:100%}
  .customer-table th:nth-child(1){width:152px}
  .customer-table th:nth-child(2){width:104px}
  .customer-table th:nth-child(8){width:128px}
  .customer-table th:nth-child(9){width:84px}
  .customer-table th:nth-child(n+3),.customer-table td:nth-child(n+3){text-align:center}
  .customer-table .customer-status{justify-items:center}
  .customer-table .traffic-transfer-control{justify-content:center}
}
@media(max-width:650px){
  .customer-list-panel{padding:16px 13px}
  .customer-directory-toolbar{gap:10px;margin-bottom:10px}
  .customer-table th,.customer-table td{padding:8px 0}
  .customer-table .customer-identity{flex:initial;max-width:100%}
}

/* Customer-list controls share the title row; units belong to column headings. */
.customer-list-panel [hidden]{display:none!important}
.customer-list-panel .customer-list-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px;flex-wrap:wrap}
.customer-list-heading{display:flex;align-items:center;gap:10px;flex-shrink:0}
.customer-list-heading h2{margin:0}.customer-list-heading .count-badge{font-size:10px;padding:4px 7px}
.customer-list-head .customer-directory-toolbar{display:grid;grid-template-columns:minmax(130px,190px) 94px 100px;gap:8px;margin:0;min-width:0}
.customer-list-head .customer-directory-toolbar input,.customer-list-head .customer-directory-toolbar select{height:32px;font-size:11px;border-radius:8px;padding:0 9px;background:#fffcf8}
.customer-table .traffic-transfer-control{display:inline-grid;grid-template-columns:40px 42px;min-width:0;gap:0;overflow:hidden;border:1px solid #e1d5ca;border-radius:8px;background:#fffcf8;vertical-align:middle}
.customer-table .traffic-transfer-control input{width:40px;height:28px;border:0;border-radius:0;background:transparent;padding:0 4px;text-align:center;font-size:11px;appearance:textfield}
.customer-table .traffic-transfer-control input::-webkit-inner-spin-button,.customer-table .traffic-transfer-control input::-webkit-outer-spin-button{appearance:none;margin:0}
.customer-table .traffic-transfer-control button{height:28px;border:0;border-left:1px solid #eee3d9;border-radius:0;background:#f7e7dc;color:#b95d36;padding:0 6px;font-size:11px}
.customer-table .traffic-transfer-control button:disabled{background:#f4eee8;color:#9a8b80}.customer-table .traffic-transfer-control input:disabled{color:#9a8b80;background:none}
.customer-table .service-status-unknown{padding:0;border:0;background:none;color:#8d7c6e;font-size:11px}
.customer-table .customer-status{display:block;font-size:11px;text-align:center}
.customer-table .purchase-history{min-width:0}.customer-table .purchase-history summary{width:max-content;margin:auto}
.customer-table .purchase-history-popover header{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px}.customer-table .purchase-history-popover header>span{font-size:11px;color:#8d7765}
@media(min-width:651px){.customer-table th:nth-child(8){width:105px}.customer-table th:nth-child(9){width:115px}}
@media(max-width:800px){.customer-list-head .customer-directory-toolbar{grid-template-columns:minmax(120px,1fr) 88px 96px;flex:1;min-width:320px}}
@media(max-width:650px){
  .customer-list-panel .customer-list-head{gap:12px;margin-bottom:14px}.customer-list-head .customer-directory-toolbar{flex-basis:100%;min-width:0;grid-template-columns:minmax(0,1fr) 86px 92px;gap:6px}
  .customer-list-head .customer-directory-toolbar input,.customer-list-head .customer-directory-toolbar select{padding:0 7px}
  .customer-table .customer-status{text-align:right}.customer-table .purchase-history summary{margin:0}
  .customer-table td:nth-child(5)::before{content:"销售额 / 元"}.customer-table td:nth-child(6)::before{content:"利润 / 元"}.customer-table td:nth-child(7)::before{content:"购买明细"}.customer-table td:nth-child(8)::before{content:"分配 / GB"}.customer-table td:nth-child(9)::before{content:"状态 / 时间"}
}
