/* Admin payouts page (pw). Own prefix; the webmaster payouts page keeps its legacy/wm- styles. */
.pw{
  --pw-card:#fff;--pw-line:#e6e9ee;--pw-soft:#f3f5f7;--pw-text:#22262b;--pw-muted:#6b7380;--pw-ink:#22262b;--pw-focus:#2563eb;
  --pw-lime:#d3f68a;--pw-lime-ink:#2c3a0a;
  --pw-amber-bg:#fff4dc;--pw-amber:#8a5a00;--pw-green-bg:#eaf8f1;--pw-green:#1f7a4d;--pw-blue-bg:#e8f0ff;--pw-blue:#2457c5;
  --pw-red-bg:#fff4f3;--pw-red-line:#f1cbc7;--pw-red:#b42318;
  --pw-warn-bg:#fff8e6;--pw-warn-line:#f1deaa;--pw-warn:#8a5a00;
  --pw-shadow:0 1px 2px rgba(34,38,43,.05),0 8px 24px rgba(34,38,43,.04);
  width:100%;max-width:1240px;margin:0 auto;color:var(--pw-text);box-sizing:border-box;
}
html[data-theme="dark"] .pw{
  --pw-card:#191817;--pw-line:#34312D;--pw-soft:#201F1C;--pw-text:#F2EFE9;--pw-muted:#B2ADA5;--pw-ink:#171610;--pw-focus:#C3E865;
  --pw-lime:#C3E865;--pw-lime-ink:#171610;
  --pw-amber-bg:#2c2410;--pw-amber:#f1c75b;--pw-green-bg:#173328;--pw-green:#7ddea8;--pw-blue-bg:#17233d;--pw-blue:#8db3ff;
  --pw-red-bg:#2a1816;--pw-red-line:#5c2b27;--pw-red:#ff9a92;
  --pw-warn-bg:#241e0e;--pw-warn-line:#52431b;--pw-warn:#f1c75b;
  --pw-shadow:none;
}
html[data-theme="light"] .main:has(.pw){background:#f5f6f8!important}
.pw *,.pw *::before,.pw *::after{box-sizing:border-box}
.pw h1,.pw h2,.pw p,.pw dl,.pw dd{margin:0}
.pw :focus{outline:none}
.pw :focus-visible{outline:2px solid var(--pw-focus);outline-offset:2px}
.pw-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.pw-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:0 0 18px}
.pw-title h1{font-size:28px;line-height:1.15;font-weight:800;letter-spacing:-.01em}
.pw-title p{margin-top:4px;color:var(--pw-muted);font-size:14px}
.pw .pw-add{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;min-width:214px;padding:0 16px;border-radius:10px;font-weight:700;white-space:nowrap}
.pw .pw-add span{font-size:18px;line-height:1}

.pw-alert,.pw-ok{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px;padding:10px 14px;border-radius:12px;font-size:14px}
.pw-alert{background:var(--pw-red-bg);border:1px solid var(--pw-red-line);color:var(--pw-red)}
.pw-ok{background:var(--pw-green-bg);border:1px solid transparent;color:var(--pw-green)}
.pw-alert .ghost{height:32px;flex:none}
.pw-x{flex:none;width:28px;height:28px;border:0;border-radius:8px;background:transparent;color:inherit;font-size:18px;line-height:1;cursor:pointer}

.pw-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.pw-cards.is-stale .pw-card-value{opacity:.45}
.pw-card{display:flex;flex-direction:column;gap:6px;min-width:0;padding:14px 16px 14px;background:var(--pw-card);border:1px solid var(--pw-line);border-radius:16px;box-shadow:var(--pw-shadow)}
.pw-card-top{display:flex;align-items:center;gap:10px;min-width:0}
.pw-card-label{font-size:13px;font-weight:600;color:var(--pw-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pw-ico{flex:none;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%}
.pw-ico svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.pw-ico b{font-size:14px;font-weight:800;line-height:1}
.pw-ico.is-avail{background:var(--pw-lime);color:var(--pw-lime-ink)}
.pw-ico.is-hold{background:var(--pw-amber-bg);color:var(--pw-amber)}
.pw-ico.is-paid{background:var(--pw-green-bg);color:var(--pw-green)}
.pw-ico.is-req{background:var(--pw-blue-bg);color:var(--pw-blue)}
.pw-card-value{font-size:26px;line-height:1.1;font-weight:800;letter-spacing:-.01em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.pw-card-cap{font-size:12.5px;line-height:1.35;color:var(--pw-muted)}
.pw-card-sub{font-size:12px;line-height:1.35;color:var(--pw-warn)}
.pw p.pw-scope{margin:12px 2px 18px;font-size:12.5px;line-height:1.4;color:var(--pw-muted)}

.pw-list{background:var(--pw-card);border:1px solid var(--pw-line);border-radius:16px;box-shadow:var(--pw-shadow);overflow:hidden}
.pw-tabs{display:flex;gap:4px;padding:0 12px;border-bottom:1px solid var(--pw-line);overflow-x:auto}
.pw-tabs button{display:inline-flex;align-items:center;gap:8px;height:48px;padding:0 10px;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--pw-muted);font:inherit;font-size:14px;font-weight:700;white-space:nowrap;cursor:pointer}
.pw-tabs button.on{color:var(--pw-text);border-bottom-color:var(--pw-text)}
html[data-theme="dark"] .pw-tabs button.on{border-bottom-color:var(--pw-lime)}
.pw-tabs em{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:20px;padding:0 6px;border-radius:999px;background:var(--pw-soft);color:var(--pw-muted);font-style:normal;font-size:12px;font-weight:700}
.pw-tabs button.on em{color:var(--pw-text)}

.pw-tools{display:grid;grid-template-columns:minmax(180px,1.3fr) minmax(160px,1fr) minmax(170px,1fr) minmax(150px,.8fr) auto;gap:8px;padding:12px;align-items:center}
.pw-search,.pw-select,.pw-range>button{height:38px;border:1px solid var(--pw-line);border-radius:10px;background:var(--pw-card);color:var(--pw-text);font:inherit;font-size:14px}
.pw-search{display:flex;align-items:center;gap:8px;padding:0 10px;min-width:0}
.pw-search svg,.pw-range svg{flex:none;width:16px;height:16px;fill:none;stroke:var(--pw-muted);stroke-width:1.5;stroke-linecap:round}
.pw-search input{flex:1;min-width:0;height:100%;border:0!important;background:transparent!important;box-shadow:none!important;color:inherit;font:inherit;outline:none;padding:0}
.pw-search:focus-within{border-color:var(--pw-focus)}
.pw-select{width:100%;min-width:0;padding:0 10px}
.pw-range{position:relative;min-width:0}
.pw-range>button{display:flex;align-items:center;gap:8px;width:100%;padding:0 10px;cursor:pointer;text-align:left}
.pw-range>button span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pw-range>button.is-set{border-color:var(--pw-text)}
.pw-range-pop{position:absolute;z-index:20;top:44px;left:0;display:grid;gap:10px;width:260px;max-width:calc(100vw - 32px);padding:12px;background:var(--pw-card);border:1px solid var(--pw-line);border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.16)}
.pw-range-pop label{display:grid;gap:4px;font-size:12.5px;color:var(--pw-muted)}
.pw-range-pop input{height:36px;border:1px solid var(--pw-line);border-radius:8px;background:var(--pw-card);color:var(--pw-text);padding:0 8px;font:inherit}
.pw-range-actions{display:flex;justify-content:space-between;gap:8px}
.pw-range-actions button{height:34px}
.pw .pw-reset{height:38px;min-width:96px;border-radius:10px}

.pw-table-wrap{overflow-x:auto}
.pw-table{width:100%;border-collapse:collapse;min-width:640px}
.pw-table th{height:40px;padding:0 14px;background:var(--pw-soft);color:var(--pw-muted);font-size:12.5px;font-weight:600;text-align:left;border:0;border-top:1px solid var(--pw-line);border-bottom:1px solid var(--pw-line)}
.pw-table td{height:60px;padding:8px 14px;border:0;border-bottom:1px solid var(--pw-line);vertical-align:middle;font-size:14px;background:transparent}
.pw-table tbody tr:last-child td{border-bottom:0}
.pw-table .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:700}
.pw-table .num small{font-weight:500;color:var(--pw-muted)}
.pw-who{display:flex;flex-direction:column;justify-content:center;gap:2px;min-width:0}
.pw-who b{font-weight:700}
.pw-who span{font-size:12.5px;color:var(--pw-muted)}
.pw-act{text-align:right;white-space:nowrap}
.pw-more{display:inline-flex;align-items:center;gap:4px;height:34px;padding:0 10px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--pw-text);font:inherit;font-size:13.5px;font-weight:600;cursor:pointer}
.pw-more:hover{background:var(--pw-soft)}

.pw-badge{display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:999px;font-size:12.5px;font-weight:700;background:var(--pw-soft);color:var(--pw-muted)}
.pw-badge.is-paid{background:var(--pw-green-bg);color:var(--pw-green)}
.pw-badge.is-scheduled{background:var(--pw-blue-bg);color:var(--pw-blue)}
.pw-badge.is-pending{background:var(--pw-amber-bg);color:var(--pw-amber)}
.pw-badge.is-rejected{background:var(--pw-red-bg);color:var(--pw-red)}

.pw-empty{display:flex;flex-direction:column;align-items:center;gap:6px;padding:44px 16px 48px;text-align:center}
.pw-empty b{font-size:16px;font-weight:800}
.pw-empty p{max-width:420px;font-size:14px;line-height:1.45;color:var(--pw-muted)}
.pw-empty .ghost{margin-top:8px;height:36px}
.pw p.pw-foot{padding:12px 16px;border-top:1px solid var(--pw-line);font-size:12.5px;line-height:1.4;color:var(--pw-muted)}

/* drawers (shell comes from .team-drawer / .payout-drawer) */
.pw-drawer .team-drawer-body{display:block}
.pw-drawer .pw-go{min-width:132px}
.pw-seg{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin:0 0 14px;background:var(--pw-soft);border-radius:10px}
.pw-seg button{height:34px;border:0;border-radius:8px;background:transparent;color:var(--pw-muted);font:inherit;font-size:13.5px;font-weight:700;cursor:pointer}
.pw-seg button.on{background:var(--pw-card);color:var(--pw-text);box-shadow:0 1px 2px rgba(0,0,0,.08)}
.pw-bal{display:grid;gap:8px;margin:0 0 14px;padding:12px;background:var(--pw-soft);border-radius:12px}
.pw-bal div{display:flex;justify-content:space-between;gap:12px;font-size:13.5px}
.pw-bal span{color:var(--pw-muted)}
.pw-bal b{text-align:right;overflow-wrap:anywhere}
.pw-warn{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px;padding:10px 12px;background:var(--pw-warn-bg);border:1px solid var(--pw-warn-line);border-radius:12px;color:var(--pw-warn);font-size:13px;line-height:1.4}
.pw-warn .ghost{flex:none;height:32px}
.pw-amount-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.pw-amount-row .ghost{height:38px}
.pw p.pw-note{margin:10px 0 0;font-size:12.5px;line-height:1.45;color:var(--pw-muted)}
.pw-dl{display:grid;gap:0}
.pw-dl div{display:grid;grid-template-columns:minmax(110px,34%) minmax(0,1fr);gap:12px;padding:10px 0;border-bottom:1px solid var(--pw-line);font-size:14px}
.pw-dl dt{color:var(--pw-muted)}
.pw-dl dd{overflow-wrap:anywhere}
.pw-confirm .pw-dl div:last-child{border-bottom:0}
.pw-drawer .pw-danger{margin-top:14px;color:var(--pw-red);border-color:var(--pw-red-line)}
.pw-hits{margin-top:6px}

@media (max-width:1080px){
  .pw-tools{grid-template-columns:1fr 1fr 1fr}
  .pw-search{grid-column:span 2}
  .pw .pw-reset{width:100%}
}
@media (max-width:900px){
  .pw-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:720px){
  .pw-search{grid-column:1/-1}
  .pw-head{flex-direction:column;align-items:stretch}
  .pw .pw-add{width:100%}
  .pw-title h1{font-size:24px}
  .pw-tools{grid-template-columns:1fr 1fr}
  .pw-table{min-width:0}
  .pw-table thead{display:none}
  .pw-table,.pw-table tbody,.pw-table tr,.pw-table td{display:block;width:100%}
  .pw-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;padding:12px 14px;border-bottom:1px solid var(--pw-line)}
  .pw-table tbody tr:last-child{border-bottom:0}
  html[data-theme][data-theme] .main .pw-table td{height:auto!important;padding:0!important;border:0!important;width:auto}
  .pw-who{flex-direction:row;align-items:baseline;gap:8px;flex-wrap:wrap}
  .pw-table td[data-label]:not(.pw-who)::before{content:attr(data-label) ": ";color:var(--pw-muted);font-size:12.5px;font-weight:500}
  .pw-who{grid-column:1;grid-row:1}
  .pw-table td.num{grid-column:2;grid-row:1;text-align:right}
  .pw-table td.num::before{content:none!important}
  .pw-table td:nth-child(2){grid-column:1;grid-row:2;font-size:13px;color:var(--pw-muted)}
  .pw-table td:nth-child(4){grid-column:2;grid-row:2;text-align:right}
  .pw-table td:nth-child(4)::before{content:none!important}
  .pw-act{grid-column:1/-1;grid-row:3;text-align:left;margin-top:6px}
}
@media (max-width:520px){
  .pw-cards{gap:8px}
  .pw-card{padding:12px}
  .pw-card-value{font-size:21px}
  .pw-card-cap{font-size:12px}
  .pw-tools{grid-template-columns:1fr}
  .pw-dl div{grid-template-columns:1fr;gap:2px}
}
@media (prefers-reduced-motion:reduce){.pw *{transition:none!important;animation:none!important}}

/* ---------- webmaster page (pw-web) ---------- */
.pw-badge.is-cancelled{background:var(--pw-soft);color:var(--pw-muted)}
.pw-cards.is-3{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:14px}
.pw-web .pw-card{padding:16px 18px;min-height:112px}
.pw-web .pw-card-value{font-size:30px}
.pw-card.is-main{background:#1d2024;border-color:#1d2024;color:#fff}
.pw-card.is-main .pw-card-label,.pw-card.is-main .pw-card-cap{color:rgba(255,255,255,.72)}
.pw-card.is-main .pw-card-sub{color:#f1d98a}
html[data-theme="dark"] .pw-card.is-main{background:var(--pw-lime);border-color:var(--pw-lime);color:var(--pw-lime-ink)}
html[data-theme="dark"] .pw-card.is-main .pw-card-label,html[data-theme="dark"] .pw-card.is-main .pw-card-cap{color:rgba(23,22,16,.74)}
html[data-theme="dark"] .pw-card.is-main .pw-card-sub{color:#4a3b00}
.pw-card.is-main .pw-ico.is-avail{background:rgba(255,255,255,.14);color:#fff}
html[data-theme="dark"] .pw-card.is-main .pw-ico.is-avail{background:rgba(23,22,16,.14);color:var(--pw-lime-ink)}

.pw-form{margin:0 0 14px;padding:18px 20px 16px;background:var(--pw-card);border:1px solid var(--pw-line);border-radius:16px;box-shadow:var(--pw-shadow)}
.pw-form-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}
.pw-form-head h2{font-size:20px;line-height:1.2;font-weight:800}
.pw a.pw-link{display:inline-flex;align-items:center;gap:6px;color:var(--pw-text);font-size:14px;font-weight:600;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.pw-link svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.pw-form-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
.pw-field{display:grid;gap:6px;min-width:0;align-content:start}
.pw-field label{font-size:14px;font-weight:700}
.pw-amount-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
html[data-theme] .main .pw-field input{width:100%;height:42px;padding:0 12px;border:1px solid var(--pw-line);border-radius:10px;background:var(--pw-card);color:var(--pw-text);font:inherit;font-size:15px;box-shadow:none}
html[data-theme] .main .pw-field input:focus{border-color:var(--pw-focus)}
html[data-theme] .main .pw-field input[aria-invalid="true"]{border-color:var(--pw-red)}
.pw-field .pw-select{height:42px}
.pw-max{height:42px;min-width:92px}
.pw p.pw-field-note{font-size:12.5px;line-height:1.4;color:var(--pw-muted)}
.pw p.pw-field-note.is-bad{color:var(--pw-red)}
.pw-form-error{margin:12px 0 0}
.pw-form-foot{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 16px;margin:16px 0 0;padding:14px 0 0;border-top:1px solid var(--pw-line)}
.pw-form-note{flex:1 1 220px;font-size:13px;color:var(--pw-muted)}
.pw-form-hint{flex:0 1 auto;font-size:13px;color:var(--pw-muted);text-align:right}
.pw-form-hint.is-bad{color:var(--pw-red)}
.pw .pw-check{flex:none;height:42px;min-width:176px;padding:0 18px;border-radius:10px;font-weight:700}
html[data-theme][data-theme] .pw button.primary:disabled:not(.pw-check),html[data-theme][data-theme] .pw-drawer button.primary:disabled{opacity:1;background:var(--pw-soft)!important;background-image:none!important;box-shadow:none!important;color:var(--pw-muted)!important;border-color:var(--pw-line)!important;cursor:not-allowed}
.pw-web p.pw-note{margin:10px 0 0}

.pw-mgr{display:flex;align-items:center;gap:14px;margin:0 0 14px;padding:12px 16px;background:var(--pw-card);border:1px solid var(--pw-line);border-radius:16px;box-shadow:var(--pw-shadow)}
.pw-mgr-ico{flex:none;display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border:1px solid var(--pw-line);border-radius:10px;background:var(--pw-card)}
.pw-mgr-ico svg,.pw-mgr-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.pw-mgr-text{flex:1;min-width:0;display:grid;gap:2px}
.pw-mgr-text b{font-size:15px;font-weight:800}
.pw-mgr-text span{font-size:13.5px;color:var(--pw-muted)}
.pw a.pw-mgr-btn,.pw span.pw-mgr-btn{flex:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;min-width:196px;padding:0 16px;border:1px solid var(--pw-line);border-radius:10px;background:var(--pw-card);color:var(--pw-text);font-size:14px;font-weight:700;text-decoration:none;white-space:nowrap}
.pw a.pw-mgr-btn:hover{background:var(--pw-soft)}
.pw span.pw-mgr-btn.is-off{color:var(--pw-muted);font-weight:500;cursor:default}

.pw-wbar{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--pw-line)}
.pw-wbar .pw-tabs{border-bottom:0;flex:1 1 auto;min-width:0}
.pw-wtools{flex:none;display:flex;align-items:center;gap:8px;padding:8px 12px}
.pw-wtools .pw-select{width:160px}
.pw-wtools .pw-range{width:160px}
.pw-wtools .pw-range-pop{left:auto;right:0}
.pw-wtools .pw-reset{height:38px;min-width:84px}
.pw-empty-ico{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;margin-bottom:4px;color:var(--pw-muted)}
.pw-empty-ico svg{width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.pw .pw-empty b{font-size:20px}
.pw p.pw-foot{display:flex;align-items:center;gap:8px}
.pw-foot svg{flex:none;width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round}

.pw-modal-wrap{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(15,17,20,.5)}
.pw-modal{display:flex;flex-direction:column;width:100%;max-width:460px;max-height:calc(100vh - 32px);background:var(--pw-card);color:var(--pw-text);border:1px solid var(--pw-line);border-radius:16px;box-shadow:0 24px 64px rgba(0,0,0,.28)}
.pw-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--pw-line)}
.pw-modal-head h2{font-size:18px;font-weight:800}
.pw-modal-body{padding:6px 18px 8px;overflow:auto}
.pw-modal-foot{display:flex;justify-content:flex-end;gap:8px;padding:14px 18px;border-top:1px solid var(--pw-line)}
.pw-modal-foot button{height:40px;min-width:112px}
.pw-modal-foot .pw-go{width:220px;min-width:220px}

@media (max-width:1080px){
  .pw-form-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .pw-form-grid .pw-field:first-child{grid-column:1/-1}
}
@media (max-width:900px){
  .pw-cards.is-3{grid-template-columns:repeat(3,minmax(0,1fr))}
  .pw-wbar{flex-direction:column;align-items:stretch;gap:0}
  .pw-wtools{padding:0 12px 12px;flex-wrap:wrap}
  .pw-wtools .pw-select,.pw-wtools .pw-range{flex:1 1 150px;width:auto}
}
@media (max-width:720px){
  .pw-cards.is-3{grid-template-columns:1fr 1fr}
  .pw-cards.is-3 .pw-card.is-main{grid-column:1/-1}
  .pw-web .pw-card{min-height:0}
  .pw-web .pw-card-label{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.25}
  .pw-web .pw-table td.pw-who{display:flex;flex-direction:row;align-items:baseline;flex-wrap:wrap;gap:2px 8px}
  .pw-web .pw-who span{font-size:13px;color:var(--pw-muted)}
  .pw-form-note,.pw-form-hint{flex:none}
  .pw-form{padding:16px 14px 14px}
  .pw-form-grid{grid-template-columns:1fr}
  .pw-form-foot{flex-direction:column;align-items:stretch}
  .pw-form-hint{text-align:left}
  .pw .pw-check{width:100%}
  .pw-mgr{flex-wrap:wrap}
  .pw-mgr-text{flex:1 1 200px}
  .pw a.pw-mgr-btn,.pw span.pw-mgr-btn{width:100%}
  .pw-modal-wrap{align-items:flex-end;padding:0}
  .pw-modal{max-width:none;border-radius:16px 16px 0 0;max-height:92vh}
  .pw-modal-foot{flex-direction:column-reverse}
  .pw-modal-foot button,.pw-modal-foot .pw-go{width:100%;min-width:0}
}

.pw-fail{display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px}
html[data-theme][data-theme] .pw .pw-check.pw-check.pw-check.primary:disabled{background:linear-gradient(180deg,var(--btn-lime-1) 0%,var(--btn-lime-2) 100%)!important;color:var(--btn-ink)!important;opacity:.5!important;cursor:not-allowed;box-shadow:none!important;filter:none!important;transform:none!important}
/* top bar for webmasters: no crumb, so the manager chip needs no divider */
html[data-theme][data-theme] .topbar .top-left>.mgr-top:first-child,html[data-theme][data-theme] .mgr-top:first-child,html[data-theme][data-theme] .topbar-wm .mgr-top{margin-left:0;padding-left:0;border-left:0}

/* ===== header balance block (webmaster): "Ваш баланс" next to the manager contact ===== */
html[data-theme][data-theme] .topbar-wm>div:first-child{min-width:0}
html[data-theme][data-theme] .topbar-wm .wb-top{position:relative;flex:0 1 auto;min-width:0;display:flex;align-items:center;height:40px;margin-left:14px;padding-left:14px;border-left:1px solid var(--border)}
html[data-theme][data-theme] .topbar-wm .wb-btn{display:inline-flex;align-items:center;justify-content:space-between;gap:8px;box-sizing:border-box;width:158px;max-width:100%;height:46px;padding:0 8px 0 10px;border:0!important;border-radius:10px!important;background:transparent!important;box-shadow:none!important;color:var(--text);font:inherit;text-align:left;cursor:pointer;position:relative}
html[data-theme][data-theme] .topbar-wm .wb-btn:hover,html[data-theme][data-theme] .topbar-wm .wb-btn.is-open{background:color-mix(in srgb,var(--text) 7%,transparent)!important}
html[data-theme][data-theme] .topbar-wm .wb-btn:focus-visible,html[data-theme][data-theme] .wb-go:focus-visible,html[data-theme][data-theme] .wb-retry:focus-visible{outline:2px solid var(--focus,#2563eb);outline-offset:1px}
.wb-txt{display:flex;flex-direction:column;gap:1px;min-width:0;line-height:1.15}
.wb-lab{font-size:11px;font-weight:500;color:var(--muted);white-space:nowrap}
.wb-amt{display:block;box-sizing:border-box;min-width:0;height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;font-weight:700;line-height:20px;letter-spacing:-.01em;font-variant-numeric:tabular-nums lining-nums;color:var(--text)}
.wb-amt.is-none{font-size:13px;font-weight:600;color:var(--muted)}
.wb-btn.is-loading .wb-amt:not(.is-none){opacity:.6}
.wb-skel{display:block;width:72px;height:12px;margin-top:4px;border-radius:6px;background:color-mix(in srgb,var(--text) 12%,transparent);animation:wbPulse 1.1s ease-in-out infinite}
@keyframes wbPulse{0%,100%{opacity:.5}50%{opacity:1}}
@media (prefers-reduced-motion:reduce){.wb-skel{animation:none}}
.wb-chev{flex:none;color:var(--muted);transition:transform .15s}
.wb-btn.is-open .wb-chev{transform:rotate(180deg)}
.wb-flag{position:absolute;top:8px;right:5px;width:7px;height:7px;border-radius:50%;background:#e0752b;box-shadow:0 0 0 2px var(--card)}
html[data-theme][data-theme] .wb-pop{position:fixed;z-index:90;box-sizing:border-box;max-width:calc(100vw - 24px);padding:12px 14px 12px;background:var(--card);border:1px solid var(--border);border-radius:14px;box-shadow:0 14px 34px rgba(16,18,22,.14);color:var(--text)}
html[data-theme="dark"][data-theme] .wb-pop{box-shadow:0 16px 40px rgba(0,0,0,.55)}
html[data-theme][data-theme] .wb-pop::before{content:"";position:absolute;top:-6px;left:var(--wb-caret,24px);width:10px;height:10px;background:var(--card);border-left:1px solid var(--border);border-top:1px solid var(--border);transform:rotate(45deg)}
.wb-row{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding:7px 2px;font-size:14px}
.wb-row span{color:var(--muted);min-width:0}
.wb-row b{flex:none;font-weight:600;font-variant-numeric:tabular-nums lining-nums;white-space:nowrap;color:var(--text)}
.wb-row.is-main span{color:var(--text)}
.wb-row.is-main b{font-size:15px;font-weight:700}
.wb-err{margin:6px 2px 2px;padding-top:8px;border-top:1px solid var(--border);font-size:12.5px;line-height:1.4;color:#b45309}
html[data-theme="dark"][data-theme] .wb-err{color:#f0b35c}
.wb-retry{display:inline;padding:0;border:0;background:none;color:inherit;font:inherit;font-weight:600;text-decoration:underline;cursor:pointer}
html[data-theme][data-theme] .wb-pop .wb-go{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px;padding:11px 12px;border-radius:10px;background:var(--lime-soft,#eef8d8);color:var(--text);font-size:14px;font-weight:600;text-decoration:none}
html[data-theme][data-theme] .wb-pop .wb-go:hover{background:color-mix(in srgb,var(--lime,#c8f531) 38%,var(--card))}
/* the manager name needs room; below 1000px the photo and the Telegram button stay */
@media (max-width:1000px){
  html[data-theme][data-theme] .topbar-wm .mgr-top-txt{display:none}
}
/* narrow screens: manager contact stays (Telegram button), balance shows the amount only */
@media (max-width:860px){
  html[data-theme][data-theme] .topbar-wm .mgr-top{display:flex;margin-left:0;padding-left:0;border-left:0}
}
@media (max-width:640px){
  /* a blurred header would become the containing block of the fixed menu and clip it */
  html[data-theme][data-theme] .topbar-wm:has(.wb-pop){-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background:var(--bg)!important}
  html[data-theme][data-theme] .topbar-wm .menu-btn{width:38px;min-width:38px}
  html[data-theme][data-theme] .topbar-wm .mgr-top{flex:none}
  html[data-theme][data-theme] .topbar-wm .mgr-top{gap:4px}
  html[data-theme][data-theme] .topbar-wm .mgr-top-ph{display:inline-flex;flex:none;width:30px;height:30px}
  html[data-theme][data-theme] .topbar-wm .mgr-top-photo{width:30px;height:30px}
  html[data-theme][data-theme] .topbar-wm .mgr-top-tg{flex:none;width:30px;height:30px}
  html[data-theme][data-theme] .topbar-wm .wb-top{flex:none;margin-left:4px;padding-left:4px}
  html[data-theme][data-theme] .topbar-wm .wb-btn{width:76px;min-width:0;height:40px;padding:0 2px 0 6px;gap:2px}
  .wb-lab{display:none}
  .wb-amt{min-width:0;font-size:14px}
  .wb-skel{width:44px;margin-top:0}
  .wb-flag{top:6px;right:2px}
  html[data-theme][data-theme] .topbar-wm .top-actions{gap:2px!important;flex-wrap:nowrap!important;flex:none}
  html[data-theme][data-theme] .topbar-wm .top-actions .icon-btn,html[data-theme][data-theme] .topbar-wm .lang-trigger{width:30px;min-width:30px;height:34px;padding:0}
  html[data-theme][data-theme] .topbar-wm .account-chip{padding:0 2px;width:34px}
}
@media (max-width:400px){
  html[data-theme][data-theme] .topbar-wm .wb-btn{width:62px}
  .wb-chev{display:none}
}
@media (max-width:340px){
  html[data-theme][data-theme] .topbar-wm .lang-menu{display:none}
}
@media (max-width:380px){
  html[data-theme][data-theme] .topbar-wm .top-actions>button.icon-btn:has(+.lang-menu){display:none}
}
/* ===== ws: webmaster statistics (one section, built on the sx statistics kit) ===== */
html[data-theme][data-theme] .sx.ws{--ws-ok:#288550;--ws-wait:#B27D17;--ws-bad:#C65258;--ws-area:rgba(195,232,101,.26)}
html[data-theme="dark"][data-theme] .sx.ws{--ws-ok:#7BC99A;--ws-wait:#E5BC65;--ws-bad:#E59398;--ws-area:rgba(195,232,101,.11)}
/* header: title, status notes, the two page buttons (their size never depends on hover or loading) */
html[data-theme][data-theme] .sx.ws .ws-head{flex-wrap:wrap}
html[data-theme][data-theme] .sx.ws .ws-actions{display:flex;flex:none;gap:8px}
html[data-theme][data-theme] .sx.ws .ws-actions .sx-btn{flex:none}
html[data-theme][data-theme] .sx.ws .ws-actions .sx-btn.is-busy:disabled{opacity:1;cursor:progress}
html[data-theme][data-theme] .sx.ws .ws-refresh.is-busy .sx-ico{animation:ws-spin .9s linear infinite}
@keyframes ws-spin{to{transform:rotate(360deg)}}
/* top row */
html[data-theme][data-theme] .sx.ws .ws-offer{flex:0 1 230px;min-width:150px}
html[data-theme][data-theme] .sx.ws .ws-offer>.sx-dd-btn{width:100%}
html[data-theme][data-theme] .sx.ws .ws-filters{flex:0 0 auto}
html[data-theme][data-theme] .sx.ws .ws-filters-pop{left:auto;right:0;width:380px;max-width:min(380px,92vw);padding:12px}
html[data-theme][data-theme] .sx.ws .ws-subs{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}
html[data-theme][data-theme] .sx.ws .ws-subs .sx-more-row{margin:0 0 10px}
html[data-theme][data-theme] .sx.ws .ws-chips{align-items:center}
html[data-theme][data-theme] .sx.ws .ws-chips-reset{margin-left:4px}
/* cards: five, never more */
html[data-theme][data-theme] .sx.ws .ws-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}
html[data-theme][data-theme] .sx.ws .ws-kpi{min-height:96px}
html[data-theme][data-theme] .sx.ws .ws-kpi-top{gap:8px}
html[data-theme][data-theme] .sx.ws .ws-dot-c{flex:none;width:10px;height:10px;border-radius:50%;background:var(--ws-dot,#8FD26B)}
html[data-theme][data-theme] .sx.ws .ws-dot-c.is-ok{--ws-dot:#8FD26B}
html[data-theme][data-theme] .sx.ws .ws-dot-c.is-wait{--ws-dot:#F7C766}
html[data-theme][data-theme] .sx.ws .ws-dot-c.is-bad{--ws-dot:#EF8A8F}
html[data-theme][data-theme] .sx.ws .ws-kpi-link{color:inherit;text-decoration:none}
html[data-theme][data-theme] .sx.ws .ws-kpi-link:hover{text-decoration:underline;text-decoration-color:var(--sx-prev);text-underline-offset:5px}
html[data-theme][data-theme] .sx.ws .ws-kpi-sub{min-height:16px;color:var(--sx-muted);font-size:12px;line-height:1.35}
/* grouping tabs with the "More" menu looking like one more tab */
html[data-theme][data-theme] .sx.ws .ws-tabs{align-items:center}
html[data-theme][data-theme] .sx.ws .ws-tab-more>.sx-dd-btn{height:32px;padding:0 12px 0 14px;border:0;border-radius:7px;background:transparent;box-shadow:none;font:500 13.5px/1 inherit;font-family:inherit}
html[data-theme][data-theme] .sx.ws .ws-tab-more>.sx-dd-btn:hover{background:var(--sx-hover)}
html[data-theme][data-theme] .sx.ws .ws-tab-more.is-open>.sx-dd-btn,html[data-theme][data-theme] .sx.ws .ws-tab-more.is-open>.sx-dd-btn.is-active{border:0;box-shadow:none}
html[data-theme][data-theme] .sx.ws .ws-tab-more.is-on>.sx-dd-btn{background:var(--sx-lime);color:var(--sx-on-lime);font-weight:700}
html[data-theme][data-theme] .sx.ws .ws-report-h{row-gap:8px}
html[data-theme][data-theme] .sx.ws .ws-state{min-height:180px}
/* dynamics */
html[data-theme][data-theme] .sx.ws .ws-dyn{min-width:0;border:1px solid var(--sx-line);border-radius:10px;background:var(--sx-card)}
html[data-theme][data-theme] .sx.ws .ws-dyn-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;padding:12px 16px}
html[data-theme][data-theme] .sx.ws .ws-dyn-toggle{display:flex;align-items:center;gap:8px;min-width:0;margin:-4px 0 -4px -6px;padding:4px 10px 4px 4px;border:0;border-radius:8px;background:transparent;color:var(--sx-text);font:inherit;text-align:left;cursor:pointer}
html[data-theme][data-theme] .sx.ws .ws-dyn-toggle:hover{background:var(--sx-hover)}
html[data-theme][data-theme] .sx.ws .ws-dyn-chev{display:grid;place-items:center;flex:none;width:28px;height:28px;color:var(--sx-muted);transition:transform .18s ease}
html[data-theme][data-theme] .sx.ws .ws-dyn:not(.is-open) .ws-dyn-chev{transform:rotate(-90deg)}
html[data-theme][data-theme] .sx.ws .ws-dyn-title{display:flex;flex-direction:column;gap:1px;min-width:0}
html[data-theme][data-theme] .sx.ws .ws-dyn-title b{font-size:16px;font-weight:800;letter-spacing:-.01em;line-height:1.25}
html[data-theme][data-theme] .sx.ws .ws-dyn-title small{color:var(--sx-muted);font-size:12px;font-weight:500;line-height:1.3}
html[data-theme][data-theme] .sx.ws .ws-dyn-body{padding:0 16px 14px}
html[data-theme][data-theme] .sx.ws .ws-dyn-sum{display:flex;align-items:baseline;gap:9px;min-height:32px}
html[data-theme][data-theme] .sx.ws .ws-dyn-sum span{color:var(--sx-muted);font-size:12.5px}
html[data-theme][data-theme] .sx.ws .ws-dyn-sum strong{font-size:22px;font-weight:800;letter-spacing:-.02em;white-space:nowrap}
html[data-theme][data-theme] .sx.ws .ws-dyn-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;height:340px;color:var(--sx-muted);font-size:13.5px;text-align:center}
html[data-theme][data-theme] .sx.ws .ws-dyn-state p{margin:0}
html[data-theme][data-theme] .sx.ws .ws-plot{position:relative;width:100%;height:340px}
html[data-theme][data-theme] .sx.ws .ws-svg{position:absolute;left:0;top:0;display:block;overflow:visible}
html[data-theme][data-theme] .sx.ws .ws-grid{stroke:var(--sx-line);stroke-width:1}
html[data-theme][data-theme] .sx.ws .ws-frame{fill:none;stroke:var(--sx-line);stroke-width:1}
html[data-theme][data-theme] .sx.ws .ws-tick{fill:var(--sx-muted);font-size:12px;font-weight:400}
html[data-theme][data-theme] .sx.ws .ws-axis-title{fill:var(--sx-muted);font-size:12px;font-weight:500}
html[data-theme][data-theme] .sx.ws .ws-area{fill:var(--ws-area);stroke:none}
html[data-theme][data-theme] .sx.ws .ws-line{fill:none;stroke:var(--sx-cur);stroke-width:2.4;stroke-linejoin:round;stroke-linecap:round}
html[data-theme][data-theme] .sx.ws .ws-dot{fill:var(--sx-card);stroke:var(--sx-cur);stroke-width:1.7}
html[data-theme][data-theme] .sx.ws .ws-dot.is-on{fill:var(--sx-lime)}
html[data-theme][data-theme] .sx.ws .ws-guide{stroke:var(--sx-prev);stroke-width:1;stroke-dasharray:3 3}
html[data-theme][data-theme] .sx.ws .ws-peak{fill:var(--sx-text);font-size:12px;font-weight:700}
html[data-theme][data-theme] .sx.ws .ws-plot-empty{position:absolute;left:0;right:0;top:40%;margin:0;color:var(--sx-muted);font-size:13.5px;text-align:center;pointer-events:none}
html[data-theme][data-theme] .sx.ws .ws-hit{position:absolute;display:block;min-width:0;min-height:0;margin:0;padding:0;border:0!important;border-radius:0;background:transparent!important;box-shadow:none;cursor:crosshair;touch-action:pan-y;appearance:none;-webkit-appearance:none}
html[data-theme][data-theme] .sx.ws .ws-hit:focus-visible{outline:2px solid var(--sx-focus);outline-offset:2px}
html[data-theme][data-theme] .sx.ws .ws-tip{position:absolute;z-index:5;box-sizing:border-box;max-width:calc(100% - 16px);padding:12px 14px;border:1px solid var(--sx-line);border-radius:10px;background:var(--sx-card);box-shadow:var(--sx-pop-shadow);font-size:12.5px;font-variant-numeric:tabular-nums;pointer-events:none}
html[data-theme][data-theme] .sx.ws .ws-tip-date{margin-bottom:8px;font-size:13.5px;font-weight:700}
html[data-theme][data-theme] .sx.ws .ws-tip-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-top:6px}
html[data-theme][data-theme] .sx.ws .ws-tip-row span{display:inline-flex;align-items:center;gap:7px;color:var(--sx-muted)}
html[data-theme][data-theme] .sx.ws .ws-tip strong{font-weight:700;color:var(--sx-text)}
html[data-theme][data-theme] .sx.ws .ws-tip-money{display:flex;justify-content:space-between;gap:10px;margin-top:9px;padding-top:9px;border-top:1px solid var(--sx-line)}
html[data-theme][data-theme] .sx.ws .ws-tip-money span{color:var(--sx-muted)}
html[data-theme][data-theme] .sx.ws .ws-dot-key{display:inline-block;flex:none;width:7px;height:7px;border-radius:50%}
html[data-theme][data-theme] .sx.ws .ws-dot-key.is-ok{background:var(--ws-ok)}
html[data-theme][data-theme] .sx.ws .ws-dot-key.is-wait{background:var(--ws-wait)}
html[data-theme][data-theme] .sx.ws .ws-dot-key.is-bad{background:var(--ws-bad)}
html[data-theme][data-theme] .sx.ws .ws-plot-foot{position:absolute;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:space-between;gap:16px;height:24px;color:var(--sx-muted);font-size:12px}
html[data-theme][data-theme] .sx.ws .ws-plot-foot>span:first-child{display:inline-flex;align-items:center;gap:8px}
html[data-theme][data-theme] .sx.ws .ws-plot-sel{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}
html[data-theme][data-theme] .sx.ws .ws-series-key{display:inline-block;width:18px;height:3px;border-radius:3px;background:var(--sx-cur)}
html[data-theme][data-theme] .sx.ws .ws-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
/* the whole page dims, not blanks, while a changed selection loads */
html[data-theme][data-theme] .sx.ws .ws-dyn{transition:opacity .2s ease}
html[data-theme][data-theme] .sx.ws[data-phase="loading"] .ws-dyn{opacity:.55;pointer-events:none;transition:opacity .2s ease .25s}
@media (max-width:1100px){
html[data-theme][data-theme] .sx.ws .ws-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:760px){
html[data-theme][data-theme] .sx.ws .ws-offer{flex:1 1 100%}
}
@media (max-width:640px){
html[data-theme][data-theme] .sx.ws .ws-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-theme][data-theme] .sx.ws .ws-kpis>:last-child:nth-child(odd){grid-column:1/-1}
html[data-theme][data-theme] .sx.ws .ws-head .ws-actions{width:100%}
html[data-theme][data-theme] .sx.ws .ws-actions .sx-btn{flex:1 1 0}
html[data-theme][data-theme] .sx.ws .ws-bar{position:relative}
html[data-theme][data-theme] .sx.ws .ws-filters{position:static}
html[data-theme][data-theme] .sx.ws .ws-filters-pop{left:8px;right:8px;top:calc(100% + 6px);width:auto;max-width:none}
html[data-theme][data-theme] .sx.ws .ws-subs{grid-template-columns:1fr 1fr}
html[data-theme][data-theme] .sx.ws .ws-dyn-head{padding:12px}
html[data-theme][data-theme] .sx.ws .ws-dyn-body{padding:0 8px 12px}
html[data-theme][data-theme] .sx.ws .ws-tip{padding:10px 12px}
}
@media (pointer:coarse){
html[data-theme][data-theme] .sx.ws .ws-dyn-toggle{min-height:44px}
html[data-theme][data-theme] .sx.ws .ws-metrics button{min-height:40px}
}
@media (prefers-reduced-motion:reduce){
html[data-theme][data-theme] .sx.ws .ws-dyn-chev{transition:none}
html[data-theme][data-theme] .sx.ws .ws-refresh.is-busy .sx-ico{animation:none}
}
/* ===== /ws ===== */
