
:root{
  --bg:#090b12;--bg2:#0d1019;--panel:#11141e;--card:rgba(21,24,35,.90);--card2:rgba(29,31,44,.72);
  --line:rgba(255,255,255,.085);--line-strong:rgba(255,255,255,.14);--text:#f7f4f7;--muted:#8f93a3;
  --pink:#f666ad;--pink2:#ff9bca;--pink-soft:rgba(246,102,173,.12);--green:#63d590;--amber:#f0bd59;--red:#ff6578;
  --radius:20px;--sidebar:226px;--tg-safe-top:0px;--tg-safe-bottom:0px;
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:#090b12;color:var(--text)}
body{min-height:100dvh;background:radial-gradient(circle at 24% -5%,#291226 0,transparent 29%),linear-gradient(145deg,#080a10,#0b0e16 62%,#130b14);overflow-x:hidden}
button,input{font:inherit}button{color:inherit}
.bg-glow{position:fixed;inset:0;pointer-events:none;background:radial-gradient(circle at 88% 7%,rgba(255,112,183,.07),transparent 25%);z-index:-2}
.petals{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:-1}.petals i{position:absolute;left:var(--x);top:-30px;width:var(--s);height:calc(var(--s)*.7);background:linear-gradient(135deg,#ff84bd,#ffd1e5);border-radius:90% 10% 90% 10%;opacity:.38;animation:fall 24s linear infinite;animation-delay:var(--d)}
@keyframes fall{to{transform:translate(100px,110vh) rotate(520deg)}}

.app-shell{min-height:100dvh;display:grid;grid-template-columns:var(--sidebar) minmax(0,1fr)}
.sidebar{position:sticky;top:0;height:100dvh;border-right:1px solid var(--line);background:rgba(7,9,15,.84);backdrop-filter:blur(20px);padding:24px 16px 18px;display:flex;flex-direction:column;z-index:8}
html[data-tg-platform="tdesktop"] .sidebar{padding-top:58px}
.brand{display:flex;gap:11px;align-items:center;padding:2px 6px 26px}.brand-mark{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,#431731,#1b1420);box-shadow:0 0 28px rgba(255,112,183,.12)}
.brand strong,.brand span{display:block}.brand strong{font-size:17px}.brand span{color:var(--muted);font-size:11px;margin-top:4px}
.desktop-nav{display:grid;gap:7px}.nav-btn{border:0;background:transparent;color:#a6aab7;border-radius:13px;padding:12px 13px;display:flex;align-items:center;gap:12px;cursor:pointer;text-align:left;transition:.18s}
.nav-btn span{font-size:18px;width:22px;text-align:center}.nav-btn b{font-weight:500}.nav-btn:hover,.nav-btn.active{background:rgba(246,102,173,.12);color:#fff}.nav-btn.active{box-shadow:inset 3px 0 var(--pink)}
.badge{margin-left:auto;background:#5b1838;color:#ffc3df;border:1px solid #8b2a5d;padding:2px 7px;border-radius:999px;font-size:10px;font-style:normal}
.sidebar-bottom{margin-top:auto;display:grid;gap:10px}.farm-health,.settings-btn{width:100%;border-radius:14px;border:1px solid var(--line);background:var(--card2);padding:12px;display:flex;align-items:center;gap:10px;text-align:left;cursor:pointer}
.farm-health b,.farm-health small{display:block}.farm-health small{color:var(--muted);font-size:10px;margin-top:3px}.settings-btn{justify-content:center;background:rgba(255,255,255,.02);color:#aaaebb}.dot{width:8px;height:8px;border-radius:50%;display:inline-block}.green{background:var(--green)}.amber{background:var(--amber)}.red{background:var(--red)}

.content{padding:0 28px 42px;min-width:0}.topbar{height:96px;display:flex;align-items:center;justify-content:space-between;gap:22px;padding-top:var(--tg-safe-top)}
html[data-tg-platform="tdesktop"] .topbar{height:100px}
.eyebrow{font-size:10px;letter-spacing:.12em;color:#a8aabb;margin:0 0 7px;text-transform:uppercase}.topbar h1{margin:0;font-size:24px}.top-actions{display:flex;align-items:center;gap:9px}
.search{height:40px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.035);display:flex;align-items:center;padding:0 11px;gap:8px}.search input{border:0;outline:none;background:transparent;color:white;width:126px}.search input::placeholder{color:#676b79}
.search.wide{width:100%;margin:12px 0 16px}.search.wide input{width:100%}.icon-btn{position:relative;width:40px;height:40px;border:1px solid var(--line);border-radius:12px;background:var(--card);cursor:pointer}.icon-btn b{position:absolute;right:-4px;top:-5px;background:#a42c65;border-radius:99px;padding:1px 5px;font-size:9px}.avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#ff78b7,#402139);font-weight:800;font-size:12px}
.view{display:none}.view.active{display:block}.card{background:linear-gradient(145deg,rgba(25,28,40,.94),rgba(14,17,25,.91));border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 18px 50px rgba(0,0,0,.14);backdrop-filter:blur(14px)}
.card-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.card-head h2,.card-head h3{margin:0}.card-head h2{font-size:25px}.card-head h2 span,.pink{color:var(--pink)}.pill{font-size:11px;padding:6px 9px;border-radius:999px;background:rgba(255,112,183,.1);color:#ffc0df;border:1px solid rgba(255,112,183,.23);white-space:nowrap}.pill.danger{background:rgba(255,101,120,.09);border-color:rgba(255,101,120,.2);color:#ff9aa7}
.muted{color:var(--muted);font-size:10px}.logic-note,.safe-note{color:#707583;font-size:10px;line-height:1.5;margin:12px 0 0}

.hero-grid{display:grid;grid-template-columns:1.62fr 1fr;gap:16px}.payback{padding:23px;background:radial-gradient(circle at 92% 18%,rgba(255,112,183,.14),transparent 33%),linear-gradient(145deg,rgba(30,22,34,.96),rgba(14,17,25,.9))}
.money-row{display:grid;grid-template-columns:1fr 1fr;margin-top:25px}.money-row small,.money-row strong{display:block}.money-row small{color:var(--muted);font-size:11px}.money-row strong{font-size:19px;margin-top:7px}
.progress{height:9px;border-radius:999px;background:#262835;overflow:hidden;margin:16px 0}.progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ff5da9,#ff9bd0);box-shadow:0 0 18px rgba(255,93,169,.35)}
.forecast{display:flex;justify-content:space-between;color:#b9bac3;font-size:11px}.attention{padding:20px}.attention-item{width:100%;border:0;background:transparent;color:white;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:14px 0;border-top:1px solid var(--line);cursor:pointer;text-align:left}.attention-item b,.attention-item small{display:block}.attention-item small{color:var(--muted);margin-top:3px}.attention-item em{font-style:normal;color:var(--pink);font-size:10px}.state-icon{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;font-weight:900}.state-icon.warn{background:rgba(240,189,89,.1);color:var(--amber)}.state-icon.error{background:rgba(255,101,120,.1);color:var(--red)}

.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;margin:16px 0}.metric{padding:17px}.metric small,.metric strong,.metric span{display:block}.metric small{color:var(--muted);font-size:10px}.metric strong{font-size:22px;margin:8px 0 5px}.metric span{font-size:10px;color:#777c8c}
.desktop-columns{display:grid;grid-template-columns:1fr 1.04fr;gap:16px}.chart-card,.timeline-card{padding:20px}.chart{height:210px;display:flex;align-items:flex-end;gap:10px;padding:28px 5px 6px;border-bottom:1px solid var(--line)}
.bar{flex:1;height:var(--h);border-radius:7px 7px 3px 3px;background:linear-gradient(to top,rgba(255,112,183,.15),rgba(255,112,183,.52));position:relative;min-width:14px}.bar.today{background:linear-gradient(to top,#d94c91,#ff93c7);box-shadow:0 0 24px rgba(255,112,183,.16)}.bar span{position:absolute;bottom:-25px;left:50%;transform:translateX(-50%);font-size:9px;color:#7c7f8e}.bar em{position:absolute;top:-19px;left:50%;transform:translateX(-50%);font-style:normal;font-size:8px;color:#797d8b;opacity:0;transition:.2s}.bar:hover em{opacity:1}
.timeline>div,.event-row{display:grid;grid-template-columns:44px 30px 1fr auto;gap:9px;align-items:center;padding:11px 0;border-top:1px solid var(--line)}.timeline time,.event-row time{color:#747887;font-size:10px}.timeline p,.event-row p{margin:0}.timeline b,.timeline small,.event-row b,.event-row small{display:block}.timeline small,.event-row small{color:var(--muted);font-size:10px;margin-top:3px}
.mini-icon{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;font-size:10px}.mini-icon.money{background:rgba(99,213,144,.1);color:var(--green)}.mini-icon.guard{background:rgba(255,112,183,.1);color:var(--pink2)}.mini-icon.warn{background:rgba(240,189,89,.1);color:var(--amber)}.mini-icon.error{background:rgba(255,101,120,.1);color:var(--red)}.ok{color:var(--green)}.bad{color:var(--red)}.warn-txt{color:var(--amber)}

.view-tools{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:16px}.segmented,.filter-chips{display:inline-flex;gap:3px;background:rgba(255,255,255,.035);border:1px solid var(--line);padding:4px;border-radius:13px;overflow:auto;max-width:100%}.segmented button,.filter-chips button{border:0;background:transparent;color:#969aa8;padding:8px 12px;border-radius:9px;white-space:nowrap;font-size:11px;cursor:pointer}.segmented button.active,.filter-chips button.active{background:#f66cad;color:#1d0e18;font-weight:800}
.table-card{padding:20px}.data-table{margin-top:16px;overflow:auto}.tr{display:grid;grid-template-columns:72px 78px minmax(230px,1fr) 150px 92px;gap:10px;align-items:center;padding:13px 7px;border-top:1px solid var(--line);font-size:12px;min-width:720px}.tr.th{color:#717684;font-size:9px;text-transform:uppercase}.tr strong{text-align:right}
.status{font-style:normal;font-size:9px;border-radius:999px;padding:4px 7px;border:1px solid;white-space:nowrap}.status.success{color:#8aeba7;border-color:rgba(99,213,144,.25);background:rgba(99,213,144,.08)}.status.pending{color:#f5cb79;border-color:rgba(240,189,89,.25);background:rgba(240,189,89,.08)}.status.listed{color:#b3b8c7;border-color:rgba(255,255,255,.13);background:rgba(255,255,255,.04)}.status.error-status{color:#ff9ba7;border-color:rgba(255,101,120,.25);background:rgba(255,101,120,.08)}
.ghost,.primary,.danger-outline{border-radius:11px;padding:10px 13px;cursor:pointer}.ghost{border:1px solid var(--line);background:rgba(255,255,255,.025);color:#aeb1bd}.ghost.small{padding:7px 10px;font-size:10px}.primary{border:0;background:linear-gradient(90deg,#f65ead,#ff8bc6);color:#210d18;font-weight:800}.danger-outline{border:1px solid rgba(255,101,120,.34);background:transparent;color:#ff8f9d}.text-btn{border:0;background:transparent;color:var(--pink);cursor:pointer}

.guard-layout{display:grid;grid-template-columns:278px minmax(430px,1fr) 294px;gap:14px;align-items:stretch;min-height:calc(100dvh - 124px)}
.guard-list,.guard-detail,.confirmations{padding:18px;height:100%}.guard-list{overflow:auto;max-height:calc(100dvh - 124px)}
.group-title{display:flex;align-items:center;gap:7px;color:#737786;font-size:9px;margin:13px 4px 7px}.bot-row,.account-row{width:100%;border:0;background:transparent;color:white;border-radius:13px;padding:9px;display:grid;grid-template-columns:auto 1fr auto;gap:9px;align-items:center;text-align:left;cursor:pointer}.bot-row:hover,.bot-row.active,.account-row:hover,.account-row.active{background:rgba(255,112,183,.09)}.bot-row.active,.account-row.active{box-shadow:inset 2px 0 var(--pink)}.bot-row p,.account-row p{margin:0}.bot-row b,.bot-row small,.account-row b,.account-row small{display:block}.bot-row small,.account-row small{font-size:9px;color:var(--muted);margin-top:3px}
.bot-avatar{width:36px;height:36px;border-radius:11px;background:linear-gradient(135deg,#703152,#24151f);display:grid;place-items:center;font-size:10px;font-weight:800;border:1px solid rgba(255,112,183,.22);flex:0 0 auto}.bot-avatar.amber{background:linear-gradient(135deg,#5f421f,#201915)}.bot-avatar.redish{background:linear-gradient(135deg,#5e2631,#241216)}.bot-avatar.big{width:50px;height:50px;border-radius:15px}.bot-avatar.xl{width:58px;height:58px;border-radius:17px;font-size:14px}
.guard-title{display:flex;justify-content:space-between;align-items:flex-start}.guard-title>div{display:flex;gap:11px;align-items:center}.guard-title h2{margin:0 0 3px;font-size:20px}.demo-tag{font-size:8px;letter-spacing:.1em;color:#c480a4;border:1px solid rgba(255,112,183,.16);background:rgba(255,112,183,.05);padding:5px 7px;border-radius:999px}
.guard-detail{display:flex;flex-direction:column}.guard-ring{--progress:60%;width:min(335px,72%);aspect-ratio:1;border:0;border-radius:50%;padding:11px;margin:26px auto 12px;display:grid;place-items:center;cursor:pointer;background:conic-gradient(var(--pink2) 0 var(--progress),#262934 var(--progress) 100%);box-shadow:0 0 55px rgba(255,112,183,.07);transition:background .15s}
.guard-inner{width:100%;height:100%;border-radius:50%;background:radial-gradient(circle,#17141e,#10131c 72%);display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.035)}.guard-inner strong{font-size:34px;letter-spacing:.21em;margin-left:.21em}.guard-inner small{font-size:10px;color:#8d919e;margin-top:9px}.guard-inner em{font-style:normal;color:var(--pink2);font-size:10px;margin-top:7px}
.toast{text-align:center;color:var(--pink2);font-size:10px;opacity:0;transform:translateY(-4px);transition:.2s;height:15px}.toast.show{opacity:1;transform:none}.guard-status-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:auto}.guard-status-grid>div{border:1px solid var(--line);background:rgba(255,255,255,.025);border-radius:12px;padding:10px}.guard-status-grid small,.guard-status-grid b{display:block}.guard-status-grid small{font-size:9px;color:var(--muted);margin-bottom:5px}.guard-status-grid b{font-size:10px}.guard-foot{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end;border-top:1px solid var(--line);margin-top:12px;padding-top:12px}.guard-foot small,.guard-foot b{display:block}.guard-foot small{color:var(--muted);font-size:8px}.guard-foot b{font-size:10px;margin-top:4px}
.confirmations{overflow:auto;max-height:calc(100dvh - 124px)}.confirmation-scope{margin:13px 0 3px;width:100%}.confirmation-scope button{flex:1}.confirm-item{display:grid;grid-template-columns:auto 1fr auto;gap:9px;align-items:center;padding:12px 0;border-top:1px solid var(--line)}.confirm-item p{margin:0}.confirm-item b,.confirm-item small{display:block}.confirm-item b{font-size:11px}.confirm-item small{font-size:8px;color:var(--muted);margin-top:3px}.item-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#231721;font-size:12px}.confirm-item>div{display:flex;gap:5px}.approve,.reject{width:30px;height:30px;border-radius:9px;border:1px solid;cursor:pointer}.approve{background:rgba(99,213,144,.08);border-color:rgba(99,213,144,.25);color:var(--green)}.reject{background:rgba(255,101,120,.08);border-color:rgba(255,101,120,.25);color:var(--red)}.confirmations>.primary,.confirmations>.danger-outline{width:100%;margin-top:9px}

.event-log{padding:10px 20px}.day-title,.section-title{font-size:9px;letter-spacing:.1em;color:#767a87;padding:11px 0}.event-row{padding:14px 4px}

.accounts-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:15px}.accounts-list{padding:18px;min-height:calc(100dvh - 124px)}.account-main{display:grid;gap:15px}.account-overview{padding:21px}.account-header{display:flex;gap:13px;align-items:center}.account-header h2{margin:0 0 5px}.account-finance-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.account-finance-grid>div{border:1px solid var(--line);border-radius:12px;padding:12px;background:rgba(255,255,255,.02)}.account-finance-grid small,.account-finance-grid b{display:block}.account-finance-grid small{color:var(--muted);font-size:9px}.account-finance-grid b{font-size:15px;margin-top:6px}.account-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.account-detail{padding:19px}.kv{margin:0}.kv>div{display:flex;justify-content:space-between;gap:18px;padding:9px 0;border-top:1px solid var(--line);font-size:11px}.kv dt{color:#9ea1ae}.kv dd{margin:0;font-weight:700;text-align:right}
.storage-card{background:radial-gradient(circle at 90% 10%,rgba(255,112,183,.08),transparent 32%),linear-gradient(145deg,rgba(25,28,40,.94),rgba(14,17,25,.91))}
.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.settings-card{padding:22px}.settings-card h2,.settings-card h3{margin-top:0}.checklist{list-style:none;margin:0;padding:0}.checklist li{padding:10px 0;border-top:1px solid var(--line);font-size:11px;color:#b4b7c1}

.mobile-nav{display:none}.app-toast{position:fixed;left:50%;bottom:26px;transform:translate(-50%,15px);background:#171a24;border:1px solid var(--line-strong);border-radius:12px;padding:10px 14px;color:#fff;font-size:11px;opacity:0;pointer-events:none;transition:.2s;z-index:60}.app-toast.show{opacity:1;transform:translate(-50%,0)}
dialog{border:0;padding:0;background:transparent}dialog::backdrop{background:rgba(0,0,0,.72);backdrop-filter:blur(8px)}.modal{width:min(410px,90vw);background:#151821;border:1px solid var(--line);border-radius:21px;padding:24px;color:white;text-align:center}.modal-icon{font-size:32px}.modal h3{font-size:20px}.modal p{color:#969aa8;line-height:1.5;font-size:11px}.modal>div:last-child{display:flex;gap:9px;justify-content:center}.modal .primary,.modal .ghost{min-width:115px}

@media(max-width:1300px){
  :root{--sidebar:84px}.brand{justify-content:center}.brand-copy,.nav-btn b,.settings-btn b,.farm-health>span:last-child{display:none}.desktop-nav .nav-btn{justify-content:center;padding:13px}.nav-btn span{font-size:19px}.badge{font-size:8px;margin-left:-6px}.sidebar-bottom .farm-health{justify-content:center;background:transparent;border:0}.settings-btn{justify-content:center}
  .guard-layout{grid-template-columns:255px minmax(380px,1fr) 270px}.account-cards{grid-template-columns:1fr 1fr}.account-cards article:last-child{grid-column:1/-1}
}
@media(max-width:1050px){
  .guard-layout{grid-template-columns:260px 1fr}.confirmations{grid-column:1/-1;max-height:none}.guard-list{max-height:none}.accounts-layout{grid-template-columns:240px 1fr}.account-cards{grid-template-columns:1fr}.account-cards article:last-child{grid-column:auto}
}
@media(max-width:760px){
  :root{--sidebar:0px}.app-shell{display:block}.sidebar{display:none}.content{padding:0 13px calc(90px + var(--tg-safe-bottom))}.topbar{height:76px;padding-top:max(var(--tg-safe-top),env(safe-area-inset-top))}.topbar .eyebrow{display:none}.topbar h1{font-size:21px}.top-search{display:none}.top-actions .avatar{display:none}
  .hero-grid,.desktop-columns,.guard-layout,.accounts-layout,.settings-grid{grid-template-columns:1fr}.metrics{grid-template-columns:1fr 1fr}.account-cards{grid-template-columns:1fr}.guard-layout{min-height:0}.guard-list,.confirmations{max-height:none}.guard-detail{min-height:510px}.guard-ring{width:min(305px,86%);margin-top:24px}.guard-inner strong{font-size:30px}.guard-status-grid{grid-template-columns:1fr 1fr}.guard-foot{grid-template-columns:1fr 1fr}.guard-foot button{grid-column:1/-1}.view-tools{align-items:flex-start;flex-direction:column}.forecast{gap:8px;flex-direction:column}.card{border-radius:17px}.payback{padding:19px}.card-head h2{font-size:20px}.money-row strong{font-size:16px}.chart{height:165px}.timeline>div,.event-row{grid-template-columns:38px 29px 1fr auto}.account-finance-grid{grid-template-columns:1fr 1fr}.mobile-nav{position:fixed;display:grid;grid-template-columns:repeat(6,1fr);bottom:0;left:0;right:0;z-index:30;background:rgba(10,12,19,.92);backdrop-filter:blur(18px);border-top:1px solid var(--line);padding:8px 5px calc(8px + max(var(--tg-safe-bottom),env(safe-area-inset-bottom)));gap:2px}.mobile-nav .nav-btn{font-size:9px;padding:5px 2px;display:flex;flex-direction:column;gap:1px;border-radius:11px;box-shadow:none}.mobile-nav .nav-btn span{font-size:17px}.mobile-nav .nav-btn small{font-size:8px}.mobile-nav .nav-btn.active{background:rgba(255,112,183,.11);color:var(--pink2)}.mobile-nav .guard-nav span{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#4b1836;border:1px solid #8d2b61;margin-top:-17px}.app-toast{bottom:88px}.tr{min-width:690px}
}
@media(max-width:430px){.metrics{grid-template-columns:1fr 1fr}.metric{padding:14px}.metric strong{font-size:18px}.payback .card-head{align-items:center}.money-row{gap:8px}}


/* LIVE v2 */
.live-tag{font-size:8px;letter-spacing:.11em;color:#8aeba7;border:1px solid rgba(99,213,144,.25);background:rgba(99,213,144,.07);padding:5px 8px;border-radius:999px;white-space:nowrap}
.live-kicker{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.loading-shell{min-height:320px;display:grid;place-items:center;text-align:center;color:var(--muted)}
.loading-spinner{width:34px;height:34px;border:3px solid rgba(255,255,255,.08);border-top-color:var(--pink);border-radius:50%;animation:spin .8s linear infinite;margin:0 auto 13px}
@keyframes spin{to{transform:rotate(360deg)}}
.error-box{padding:20px;border:1px solid rgba(255,101,120,.22);background:rgba(255,101,120,.06);border-radius:16px;color:#ffb1ba}
.error-box b,.error-box small{display:block}.error-box small{margin-top:7px;color:#a88d94;line-height:1.5}
.empty-state{padding:24px;text-align:center;color:var(--muted);font-size:11px}
.refresh-btn{border:1px solid var(--line);background:rgba(255,255,255,.025);border-radius:11px;width:40px;height:40px;cursor:pointer}
.refresh-btn.busy{opacity:.5;pointer-events:none}
.backend-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--line);background:rgba(255,255,255,.02);border-radius:13px;margin-bottom:14px}
.backend-banner small{color:var(--muted);font-size:9px}.backend-banner b{font-size:10px}
.account-list-scroll{max-height:calc(100dvh - 240px);overflow:auto}
.confirm-item.disabled{opacity:.55}.confirm-meta{display:flex;gap:5px;flex-wrap:wrap;margin-top:5px}.confirm-bot{font-size:8px;color:#d8a2bd;border:1px solid rgba(246,102,173,.16);border-radius:999px;padding:2px 6px}
.guard-code-loading{font-size:12px!important;letter-spacing:0!important;margin:0!important;color:#8d919e}
.guard-code-error{font-size:12px!important;letter-spacing:0!important;margin:0!important;color:var(--red)}
.guard-live-note{text-align:center;color:#6f7381;font-size:9px;margin:0 0 5px}
.confirm-scan-note{font-size:9px;color:#777b89;line-height:1.45;margin:8px 0 0}
.cashout-pending-card{border:1px solid rgba(240,189,89,.2);background:rgba(240,189,89,.05);border-radius:14px;padding:12px;margin-top:12px}
.cashout-pending-card b,.cashout-pending-card small{display:block}.cashout-pending-card small{color:var(--muted);font-size:9px;margin-top:4px}
.status.unknown{color:#b3b8c7;border-color:rgba(255,255,255,.13);background:rgba(255,255,255,.04)}
.status.blocked{color:#f5cb79;border-color:rgba(240,189,89,.25);background:rgba(240,189,89,.08)}
.status.active-live{color:#8aeba7;border-color:rgba(99,213,144,.25);background:rgba(99,213,144,.08)}
@media(max-width:760px){.backend-banner{align-items:flex-start;flex-direction:column}.account-list-scroll{max-height:none}}

#autopilotToggle,#autopilotResume,#autopilotApprove{min-height:42px}


/* =========================================================
   Vector Farm v2.2.0 — mobile control center / UX hotfix
   ========================================================= */
html,body{max-width:100%;overflow-x:hidden}.content,.view,.card,.event-row,.timeline>div,.attention-item{min-width:0;max-width:100%}
.autopilot-card{padding:20px;margin-bottom:16px;background:radial-gradient(circle at 96% 0,rgba(255,112,183,.12),transparent 38%),rgba(20,22,31,.94)}
.autopilot-card .card-head{margin-bottom:10px}.autopilot-state{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:center;padding:12px 0;border-top:1px solid var(--line)}.autopilot-state b,.autopilot-state small{display:block}.autopilot-state small{color:var(--muted);margin-top:4px;overflow-wrap:anywhere}.autopilot-card>button{width:100%;margin-top:8px;min-height:42px}.compact-card{margin:0}.finance-warning{margin:14px 0 10px;padding:11px 12px;border-radius:12px;background:rgba(240,189,89,.07);border:1px solid rgba(240,189,89,.18);color:#d7bd83;font-size:10px;line-height:1.5}.empty-state.compact{padding:16px 8px}.empty-report{padding:42px 12px!important}.compact-finance{margin-top:16px}
.timeline p,.event-row p,.event-click p{min-width:0;overflow:hidden}.timeline b,.event-row b,.event-click b{white-space:normal;overflow-wrap:anywhere;word-break:break-word}.timeline small,.event-row small,.event-click small{white-space:normal;overflow-wrap:anywhere;word-break:break-word}.raw-code{display:block!important;font-style:normal!important;font-family:ui-monospace,SFMono-Regular,Menlo,monospace!important;font-size:8px!important;color:#656a79!important;margin-top:4px!important;overflow-wrap:anywhere}.event-tail{font-size:9px;white-space:nowrap}.event-click{width:100%;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.event-log{overflow:hidden}.event-row{grid-template-columns:44px 30px minmax(0,1fr) auto!important}
.account-actions{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 5px}.account-actions button{min-height:40px;flex:1;min-width:150px}.raw-dd{max-width:260px;overflow-wrap:anywhere;color:#8b8f9d!important;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:9px}.guard-foot em{display:block;color:#717684;font-style:normal;font-size:8px;margin-top:4px}.mobile-detail-head{display:none;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.mobile-back{border:1px solid var(--line);background:rgba(255,255,255,.025);color:#d7d9e1;border-radius:11px;padding:9px 11px;font-size:10px;cursor:pointer}.mobile-detail-stack{display:grid;gap:14px}.small-load{min-height:180px}.confirmations .primary:disabled,.confirmations .danger-outline:disabled{display:none}.confirmations:has(#confirmationList .empty-state)>.primary,.confirmations:has(#confirmationList .empty-state)>.danger-outline{display:none}.bot-row small,.account-row small{overflow-wrap:anywhere}.home-main-grid{margin-top:0}

@media(max-width:760px){
  .content{padding:0 13px calc(118px + max(var(--tg-safe-bottom),env(safe-area-inset-bottom)))!important;overflow-x:hidden}
  .mobile-nav{padding-bottom:calc(10px + max(var(--tg-safe-bottom),env(safe-area-inset-bottom)));min-height:74px}
  .mobile-detail-head{display:flex}.guard-detail{min-height:0!important;padding:17px!important}.confirmations{padding:17px!important}
  .guard-ring{width:min(230px,68vw)!important;margin:15px auto 8px!important;padding:8px!important}.guard-inner strong{font-size:27px!important}.guard-inner small{font-size:9px!important;margin-top:7px!important}.guard-live-note{max-width:290px;margin:4px auto 14px!important;line-height:1.45}
  .guard-title h2{font-size:22px}.guard-status-grid{gap:8px}.guard-status-grid>div{padding:10px!important}.guard-foot{margin-top:12px!important}
  .guard-list,.accounts-list{padding:17px!important;min-height:0!important}.account-list-scroll{max-height:none!important}.bot-row,.account-row{padding:11px 8px}.bot-row p,.account-row p{min-width:0}
  .accounts-layout{display:block!important}.account-main{gap:13px}.account-overview{padding:18px}.account-header h2{font-size:27px}.account-finance-grid{grid-template-columns:1fr 1fr!important}.account-finance-grid>div{padding:11px}.account-finance-grid b{font-size:13px}.account-cards-v220{grid-template-columns:1fr!important}.account-detail{padding:17px}.kv>div{align-items:flex-start}.kv dd{max-width:58%;overflow-wrap:anywhere}
  .event-log{padding:8px 14px!important}.event-row{grid-template-columns:31px 28px minmax(0,1fr)!important;gap:8px!important;padding:13px 0!important}.event-row .event-tail{grid-column:3;justify-self:start;color:#7b7f8d}.event-row time{font-size:8px}.event-row b{font-size:12px;line-height:1.25}.event-row small{font-size:9px;line-height:1.35}
  .timeline>div{grid-template-columns:31px 28px minmax(0,1fr)!important}.timeline>div .event-tail{display:none}
  .backend-banner{overflow:hidden}.backend-banner b,.backend-banner small{overflow-wrap:anywhere}.backend-banner small{display:block;margin-top:3px}
  .autopilot-card{padding:17px;margin-bottom:14px}.autopilot-card h3{font-size:18px}.hero-grid{gap:14px}.metrics{gap:10px}.metric{padding:14px!important}.metric strong{font-size:18px!important}.metric span{font-size:9px!important}
  .view-tools .muted{font-size:9px;line-height:1.4}.report-period{width:100%;display:grid!important;grid-template-columns:repeat(4,1fr)}.report-period button{padding:9px 5px!important}.table-card{padding:17px}.table-card .card-head h3{font-size:20px}.data-table{overflow-x:auto;max-width:100%}
  .topbar{overflow:hidden}.topbar h1{white-space:nowrap}.app-toast{bottom:104px}
}


/* =========================================================
   Vector Farm v2.2.1 — iPhone / Telegram mobile final pass
   ========================================================= */
html,body,.app-shell,.content,.view{width:100%;max-width:100%;min-width:0}
html,body{overflow-x:clip!important;overscroll-behavior-x:none}
.app-shell,.content,.view{overflow-x:clip;touch-action:pan-y}
img,svg,canvas{max-width:100%}
.card-head>*,.topbar>*,.top-actions,.guard-title>*,.account-header>*{min-width:0}

@media(max-width:900px){
  .sidebar{display:none!important}
  .app-shell{display:block!important;min-height:100dvh!important}
  .content{width:100%!important;padding:0 12px calc(124px + max(var(--tg-safe-bottom),env(safe-area-inset-bottom)))!important;margin:0!important}
  .topbar{height:auto!important;min-height:86px!important;padding:12px 0 10px!important;gap:10px!important;overflow:visible!important}
  .topbar .title-wrap{min-width:0;flex:1}.topbar h1{font-size:25px!important;white-space:normal!important;overflow-wrap:anywhere}
  .top-search,.avatar{display:none!important}.top-actions{gap:7px!important;flex:0 0 auto}.refresh-btn,.icon-btn{width:42px!important;height:42px!important}
  .backend-banner{display:none!important}
  .autopilot-card{order:-10;padding:15px!important;margin:0 0 12px!important;border-radius:16px!important}
  .autopilot-card .card-head{align-items:center!important;margin-bottom:7px!important}.autopilot-card .card-head h3{font-size:17px!important}
  .autopilot-state{padding:9px 0!important}.autopilot-state .state-icon{width:31px!important;height:31px!important}.autopilot-state small{font-size:9px!important}
  .autopilot-card>button{min-height:44px!important;font-size:11px!important}
  .home-main-grid,.hero-grid,.desktop-columns,.guard-layout,.accounts-layout,.settings-grid{display:grid!important;grid-template-columns:1fr!important;gap:12px!important}
  .card{width:100%;max-width:100%;border-radius:16px!important}
  .payback,.attention,.chart-card,.timeline-card{padding:16px!important}
  .metrics{grid-template-columns:1fr 1fr!important;gap:9px!important;margin:12px 0!important}.metric{padding:13px!important}.metric strong{font-size:18px!important}.metric small,.metric span{font-size:9px!important}
  .money-row{margin-top:18px!important;gap:8px!important}.money-row strong{font-size:16px!important}
  .logic-note,.safe-note{font-size:9px!important;line-height:1.4!important}

  /* Guard: list OR detail, never both in one long mobile column. */
  #guard>.guard-list,#accounts>.accounts-list{display:block}
  .mobile-detail-stack{width:100%;display:grid!important;gap:12px!important}
  .mobile-detail-head{display:flex!important;position:sticky;top:0;z-index:8;padding:3px 0 7px;background:linear-gradient(#090b12 72%,rgba(9,11,18,0))}
  .mobile-back{min-height:42px!important;font-size:11px!important;padding:9px 13px!important}
  .guard-list,.accounts-list{padding:15px!important;min-height:0!important}.account-list-scroll{max-height:none!important;overflow:visible!important}
  .bot-row,.account-row{grid-template-columns:auto minmax(0,1fr) auto!important;padding:10px 6px!important;gap:9px!important}.bot-row p,.account-row p{min-width:0!important}.bot-row small,.account-row small{font-size:9px!important;line-height:1.25!important}
  .status{font-size:8px!important;padding:4px 6px!important;max-width:104px;overflow:hidden;text-overflow:ellipsis}

  .guard-detail{padding:15px!important;min-height:0!important}.guard-title{gap:9px!important}.guard-title h2{font-size:22px!important}.guard-title .live-tag{font-size:7px!important}
  .guard-ring{width:min(198px,58vw)!important;height:min(198px,58vw)!important;margin:13px auto 7px!important;padding:7px!important}
  .guard-inner strong{font-size:24px!important;letter-spacing:.18em!important}.guard-inner small{font-size:8px!important;margin-top:6px!important}.guard-inner em{font-size:9px!important}
  .guard-live-note{font-size:8px!important;max-width:270px!important;margin:2px auto 11px!important}
  .guard-status-grid{grid-template-columns:1fr 1fr!important;gap:7px!important}.guard-status-grid>div{padding:9px!important}.guard-status-grid small{font-size:8px!important}.guard-status-grid b{font-size:11px!important}
  .guard-foot{grid-template-columns:1fr!important;gap:8px!important;margin-top:10px!important}.guard-foot button{grid-column:auto!important;min-height:40px}
  .confirmations{padding:15px!important}.confirmation-scope{width:100%;display:grid!important;grid-template-columns:1fr 1fr!important}.confirm-scan-note{margin:7px 0!important}
  .confirm-item{grid-template-columns:auto minmax(0,1fr) auto!important;gap:8px!important;padding:11px 0!important}.confirm-item p{min-width:0!important}.confirm-item b,.confirm-item small{overflow-wrap:anywhere!important;word-break:break-word!important}

  /* Accounts: detail becomes a separate compact screen. */
  .account-main{display:grid!important;gap:11px!important}.account-overview{padding:15px!important}.account-header{gap:10px!important}.account-header h2{font-size:24px!important}
  .account-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important;margin:12px 0 4px!important}.account-actions button{min-width:0!important;width:100%!important;min-height:42px!important}
  .account-finance-grid{grid-template-columns:1fr 1fr!important;gap:7px!important}.account-finance-grid>div{padding:9px!important}.account-finance-grid b{font-size:12px!important}.account-detail{padding:15px!important}.kv>div{gap:10px!important}.kv dt,.kv dd{font-size:10px!important}.kv dd{max-width:60%!important;overflow-wrap:anywhere!important}

  /* Events: never allow long machine codes to push the page sideways. */
  .event-log{width:100%!important;overflow:hidden!important;padding:7px 13px!important}.event-row{width:100%!important;grid-template-columns:30px 27px minmax(0,1fr)!important;gap:7px!important;padding:12px 0!important}.event-row>*{min-width:0!important}.event-row b,.event-row small,.raw-code{max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important}.event-row b{font-size:11px!important}.event-row small{font-size:9px!important}.event-row .event-tail{grid-column:3!important;font-size:8px!important}
  .timeline>div{grid-template-columns:30px 27px minmax(0,1fr)!important;gap:7px!important}.timeline b,.timeline small{overflow-wrap:anywhere!important;word-break:break-word!important}

  /* Reports: compact mobile cards; table can scroll locally only. */
  .view-tools{gap:9px!important;margin-bottom:12px!important}.report-period{width:100%!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;overflow:hidden!important}.report-period button{min-width:0!important;padding:9px 3px!important;font-size:10px!important}
  .table-card{padding:15px!important}.table-card .card-head h3{font-size:19px!important}.empty-report{padding:28px 8px!important}.data-table{max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}

  .mobile-nav{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;left:0!important;right:0!important;width:100%!important;padding:8px 4px calc(10px + max(var(--tg-safe-bottom),env(safe-area-inset-bottom)))!important;min-height:76px!important}.mobile-nav .nav-btn{min-width:0!important}.mobile-nav .nav-btn small{font-size:8px!important}
  .app-toast{max-width:calc(100% - 28px)!important;bottom:106px!important}
}

@media(max-width:390px){
  .content{padding-left:10px!important;padding-right:10px!important}.topbar h1{font-size:23px!important}.metrics{gap:7px!important}.metric{padding:11px!important}.metric strong{font-size:17px!important}.guard-ring{width:min(188px,56vw)!important;height:min(188px,56vw)!important}.guard-inner strong{font-size:22px!important}.account-actions{grid-template-columns:1fr!important}
}


/* =========================================================
   Vector Farm v2.3.1 — cumulative mobile + export + PC shell + guarded auto Steam approval
   ========================================================= */
.export-menu{margin:12px 0 14px;border:1px solid var(--line);border-radius:13px;background:rgba(255,255,255,.025);overflow:hidden}
.export-menu summary{list-style:none;cursor:pointer;padding:12px 13px;font-size:11px;font-weight:700;color:#f0eef2;display:flex;align-items:center;justify-content:space-between;gap:10px}
.export-menu summary::-webkit-details-marker{display:none}.export-menu summary:after{content:'⌄';color:var(--muted);transition:.18s}.export-menu[open] summary:after{transform:rotate(180deg)}
.export-menu-body{border-top:1px solid var(--line);padding:10px;display:grid;grid-template-columns:1fr 1fr;gap:8px}.export-menu-body button{min-width:0;min-height:42px}.export-menu-body small{grid-column:1/-1;color:var(--muted);font-size:9px;line-height:1.45;padding:1px 2px 3px}

.pc-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.8fr);gap:16px;align-items:start}.pc-hero{padding:22px}.pc-schedule,.pc-roadmap{padding:20px}.pc-roadmap{grid-column:2}.pc-machine{display:grid;grid-template-columns:auto minmax(0,1fr);gap:13px;align-items:center;padding:18px 0;border-top:1px solid var(--line);margin-top:14px}.pc-machine b,.pc-machine small{display:block}.pc-machine small{color:var(--muted);font-size:10px;line-height:1.45;margin-top:4px}.pc-icon{width:52px;height:52px;border-radius:15px;display:grid;place-items:center;background:rgba(246,102,173,.09);border:1px solid rgba(246,102,173,.18);font-size:24px;color:var(--pink2)}
.pc-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.pc-actions button{min-width:0;min-height:44px}.pc-actions button:disabled,.pc-schedule button:disabled,.pc-schedule input:disabled,.pc-schedule select:disabled{opacity:.42;cursor:not-allowed}
.pc-not-ready{margin-top:14px;padding:12px 13px;border:1px solid rgba(240,189,89,.18);background:rgba(240,189,89,.05);border-radius:13px}.pc-not-ready b,.pc-not-ready small{display:block}.pc-not-ready b{color:#e6c987;font-size:11px}.pc-not-ready small{color:#8f8878;font-size:9px;line-height:1.45;margin-top:4px}
.pc-schedule form{display:grid;gap:10px;margin-top:15px}.pc-schedule label{display:grid;gap:6px}.pc-schedule label small{font-size:9px;color:var(--muted)}.pc-schedule input,.pc-schedule select{width:100%;min-height:44px;border-radius:11px;border:1px solid var(--line);background:rgba(255,255,255,.035);color:var(--text);padding:0 11px;font:inherit;font-size:12px;outline:none}.pc-schedule option{background:#11141e;color:var(--text)}.pc-schedule-list{display:grid;gap:7px;margin-top:12px}.pc-schedule-list>div{border-top:1px solid var(--line);padding:9px 0}.pc-schedule-list b,.pc-schedule-list small{display:block}.pc-schedule-list small{font-size:9px;color:var(--muted);margin-top:3px}
.pc-roadmap-row{display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px;align-items:start;padding:12px 0;border-top:1px solid var(--line)}.pc-roadmap-row>span{width:28px;height:28px;border-radius:9px;background:rgba(255,255,255,.045);display:grid;place-items:center;color:var(--pink2);font-size:10px}.pc-roadmap-row p{margin:0}.pc-roadmap-row b,.pc-roadmap-row small{display:block}.pc-roadmap-row b{font-size:11px}.pc-roadmap-row small{font-size:9px;color:var(--muted);line-height:1.45;margin-top:3px}

@media(max-width:1050px){.pc-grid{grid-template-columns:1fr}.pc-roadmap{grid-column:auto}}
@media(max-width:900px){
  .export-menu{margin:10px 0 12px}.export-menu summary{min-height:44px}.export-menu-body{grid-template-columns:1fr}.export-menu-body small{grid-column:auto}
  .pc-grid{grid-template-columns:1fr!important;gap:12px!important}.pc-hero,.pc-schedule,.pc-roadmap{padding:15px!important}.pc-actions{grid-template-columns:1fr 1fr!important}.pc-actions button{font-size:10px}.pc-machine{padding:13px 0;margin-top:10px}.pc-icon{width:44px;height:44px;font-size:20px}.pc-machine small{font-size:9px}.pc-schedule input,.pc-schedule select{font-size:16px}.mobile-nav .nav-btn{padding-left:0!important;padding-right:0!important}.mobile-nav .nav-btn span{font-size:16px!important}.mobile-nav .nav-btn small{font-size:7px!important}
}
@media(max-width:360px){.pc-actions{grid-template-columns:1fr!important}.mobile-nav .nav-btn small{font-size:6.5px!important}}

/* SAKURA_VECTOR_TELEMETRY_V1 */
.vector-progress-block{margin:14px 0;padding:14px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.02)}
.vector-progress-head{display:flex;justify-content:space-between;align-items:center}.vector-progress-head b{font-size:18px}.vector-progress-head span{color:var(--pink2);font-weight:800}.vector-progress{margin:9px 0 7px}.vector-progress-block>small,.vector-current small,.vector-drop>small,.vector-override small{display:block;color:var(--muted);font-size:9px;line-height:1.45}
.vector-current{margin:10px 0;padding:13px;border-radius:13px;background:rgba(246,102,173,.06);border:1px solid rgba(246,102,173,.14)}.vector-current b,.vector-current small{display:block}.vector-current b{margin:4px 0;font-size:13px}.muted-box{background:rgba(255,255,255,.02);border-color:var(--line)}
.vector-timing{margin-bottom:12px}.vector-drop{margin:12px 0;padding:13px;border-radius:14px;border:1px solid var(--line);background:rgba(255,255,255,.02)}.vector-drop-items{display:grid;gap:7px;margin:8px 0}.vector-drop-item{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:9px}.vector-drop-item img,.vector-drop-item>span{width:38px;height:38px;border-radius:9px;object-fit:contain;background:rgba(255,255,255,.04);display:grid;place-items:center}.vector-drop-item b,.vector-drop-item small{display:block;overflow-wrap:anywhere}.vector-drop-item b{font-size:10px}.vector-drop-item small{color:var(--muted);font-size:8px;margin-top:2px}
.vector-telemetry-empty{margin:13px 0;padding:13px;border:1px dashed var(--line);border-radius:13px}.vector-telemetry-empty b,.vector-telemetry-empty small{display:block}.vector-telemetry-empty small{color:var(--muted);font-size:9px;line-height:1.5;margin-top:4px}.vector-override{display:grid;gap:5px;margin-top:9px}.danger-soft{border-color:rgba(255,103,103,.28)!important;color:#ffabab!important;background:rgba(255,80,80,.06)!important}
@media(max-width:600px){.vector-progress-block,.vector-current,.vector-drop,.vector-telemetry-empty{padding:11px}.vector-progress-head b{font-size:16px}.vector-drop-items{grid-template-columns:1fr}.vector-timing dt,.vector-timing dd{font-size:9px!important}}

/* =========================================================
   v2.4.0 — account quality classes + autopilot queue
   ========================================================= */
.classification-order{display:flex;align-items:center;gap:10px;margin:12px 0 4px;padding:9px 12px;border:1px solid var(--border);border-radius:12px;background:rgba(255,255,255,.018);min-width:0}.classification-order small{color:var(--muted)}.classification-order b{font-size:12px;letter-spacing:.08em;color:#f0b6d4;white-space:nowrap}.account-class-group{min-width:0}.account-class-title{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:8px;margin:14px 8px 6px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em}.account-class-title span{display:grid;place-items:center;width:26px;height:26px;border-radius:9px;border:1px solid rgba(255,125,190,.22);background:rgba(255,125,190,.07);color:#ffacd3;font-weight:800}.account-class-title b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-class-title em{font-style:normal;border:1px solid var(--border);border-radius:999px;padding:3px 7px;color:var(--text)}.row-badges{display:flex;align-items:center;justify-content:flex-end;gap:7px;min-width:0;flex-wrap:wrap}.class-chip{display:inline-flex;align-items:center;width:max-content;max-width:100%;padding:5px 8px;border-radius:999px;font-size:10px;font-style:normal;font-weight:750;line-height:1;border:1px solid var(--border);white-space:nowrap}.class-clean{color:#75e3a8;border-color:rgba(73,214,143,.32);background:rgba(73,214,143,.08)}.class-hold{color:#ffd082;border-color:rgba(255,189,85,.32);background:rgba(255,189,85,.08)}.class-market{color:#e8bd75;border-color:rgba(201,151,70,.32);background:rgba(201,151,70,.08)}.class-lost{color:#ff9cb4;border-color:rgba(255,92,129,.35);background:rgba(255,92,129,.09)}.class-ban{color:#ff738e;border-color:rgba(255,68,105,.42);background:rgba(255,68,105,.1)}.class-unknown{color:var(--muted);background:rgba(255,255,255,.03)}.classification-detail{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 14px}.classification-detail span{font-size:12px;color:var(--muted)}
.autopilot-queue-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0 14px}.autopilot-queue-grid>div{min-width:0;border:1px solid var(--border);border-radius:13px;padding:11px 12px;background:rgba(255,255,255,.018)}.autopilot-queue-grid small{display:block;color:var(--muted);font-size:10px;margin-bottom:5px}.autopilot-queue-grid b{display:block;font-size:13px;overflow-wrap:anywhere}.autopilot-queue-grid em{display:block;font-style:normal;color:var(--muted);font-size:10px;margin-top:3px}.autopilot-queue-grid .countdown{font-variant-numeric:tabular-nums;letter-spacing:.06em;color:#ff9dcc}.autopilot-queue-grid .countdown.ready{color:#7be4aa}
@media(max-width:900px){.autopilot-queue-grid{grid-template-columns:1fr 1fr}.autopilot-queue-grid>div:last-child{grid-column:1/-1}.row-badges{gap:5px}.row-badges .status{display:none}.class-chip{font-size:9px;padding:5px 7px}.account-class-title{margin-top:12px}.classification-order{overflow-x:auto}.guard-status-grid{grid-template-columns:1fr 1fr}}
@media(max-width:390px){.autopilot-queue-grid{grid-template-columns:1fr}.autopilot-queue-grid>div:last-child{grid-column:auto}.classification-order b{font-size:11px}.account-class-title{grid-template-columns:28px minmax(0,1fr) auto}}

/* Sakura v2.5 — safe exports, compact navigation, reporting and offline PC contracts */
.technical-details{margin-top:5px;max-width:100%;font-size:9px;color:var(--muted)}
.technical-details summary{cursor:pointer;color:#8f93a1;list-style:none}.technical-details summary::-webkit-details-marker{display:none}
.technical-details code{display:block;margin-top:5px;padding:7px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.025);font-size:8px;white-space:normal;overflow-wrap:anywhere;color:#777c8a}
.attention-group{border-left:2px solid rgba(255,96,129,.42);padding-left:4px}.collapsed-group>summary{cursor:pointer;list-style:none}.collapsed-group>summary::-webkit-details-marker{display:none}
.reporting-rules{padding:14px 16px;margin:13px 0}.reporting-rules b,.reporting-rules small{display:block}.reporting-rules small{color:var(--muted);font-size:10px;line-height:1.5;margin-top:5px}
.report-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.report-list{padding:18px;min-width:0}.report-event-list>div{display:grid;grid-template-columns:105px minmax(0,1fr) auto;gap:10px;align-items:center;padding:11px 0;border-top:1px solid var(--line)}.report-event-list time{font-size:9px;color:var(--muted)}.report-event-list p{margin:0;min-width:0}.report-event-list b,.report-event-list small{display:block;overflow-wrap:anywhere}.report-event-list b{font-size:11px}.report-event-list small{font-size:9px;color:var(--muted);margin-top:3px}.report-event-list em{font-size:8px;font-style:normal;color:#979baa}
.pc-console{padding:20px}.pc-console form{display:grid;gap:9px}.pc-console select,.pc-console textarea{width:100%;border:1px solid var(--line);border-radius:11px;background:rgba(255,255,255,.035);color:var(--text);padding:11px;font:inherit}.pc-console textarea{min-height:110px;resize:vertical;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.pc-console-output{min-height:105px;white-space:pre-wrap;overflow-wrap:anywhere;color:#8f94a2;background:#090b11;border:1px solid var(--line);border-radius:11px;padding:12px;font-size:10px}

@media(max-width:900px){
  .mobile-nav{grid-template-columns:repeat(5,minmax(0,1fr))!important}
  .report-grid{grid-template-columns:1fr}.report-list{padding:15px}.report-event-list>div{grid-template-columns:82px minmax(0,1fr)}.report-event-list em{grid-column:2}
  .pc-console{padding:15px}.pc-console textarea{font-size:16px}
}


/* SAKURA_PC_WOL_SCHEDULE_STYLE_V1 */
.pc-schedule-list{display:flex;flex-direction:column;gap:8px;margin-top:14px}
.pc-schedule-row{display:grid;grid-template-columns:minmax(0,1fr) auto 38px;align-items:center;gap:10px;padding:11px 12px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.018)}
.pc-schedule-row>div{min-width:0;display:flex;flex-direction:column;gap:3px}
.pc-schedule-row b{font-size:11px}
.pc-schedule-row small{font-size:9px;color:#8f93a3}
.pc-schedule-row.is-inactive{opacity:.58}
.pc-schedule-delete{width:38px;height:38px;min-width:38px!important;padding:0!important;font-size:18px!important}
@media(max-width:600px){.pc-schedule-row{grid-template-columns:minmax(0,1fr) 34px}.pc-schedule-row>.pill{display:none}.pc-schedule-delete{width:34px;height:34px;min-width:34px!important}}


/* SAKURA_SERVER_TERMINAL_STYLE_V1 */
.server-terminal-banner{
  margin-bottom:14px;
}

.server-offline-tag{
  opacity:.55;
}

.server-ready-pill{
  opacity:.85;
}

.server-host{
  font-size:18px !important;
  overflow-wrap:anywhere;
}

.server-terminal-card{
  margin-top:14px;
}

.server-terminal-prompt{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:14px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  background:#080a0f;
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
}

.server-terminal-prompt>span{
  flex:0 0 auto;
  color:#f3a6cf;
  padding-top:3px;
  font-size:13px;
}

.server-terminal-input{
  min-height:24px;
  width:100%;
  outline:none;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  color:#f3f4f7;
}

.server-terminal-input:empty:before{
  content:attr(data-placeholder);
  color:#686d79;
}

.server-terminal-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}

.server-terminal-output-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin:18px 2px 7px;
  font-size:11px;
  letter-spacing:.12em;
  color:#8e94a3;
}

.server-terminal-output{
  min-height:190px;
  max-height:520px;
  overflow:auto;
  margin:0;
  padding:15px;
  border-radius:14px;
  background:#05070a;
  border:1px solid rgba(255,255,255,.07);
  color:#e8eaf0;
  font-size:12px;
  line-height:1.55;
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.server-history-card{
  margin-top:14px;
}

.server-history-list{
  display:flex;
  flex-direction:column;
  gap:7px;
}

.server-history-row{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:11px 12px;
  border:1px solid rgba(255,255,255,.06);
  border-radius:12px;
  background:rgba(255,255,255,.025);
  color:inherit;
  text-align:left;
}

.server-history-row span{
  min-width:0;
}

.server-history-row b{
  display:block;
  max-width:100%;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:12px;
}

.server-history-row small{
  display:block;
  margin-top:4px;
  color:#7f8492;
}

.server-history-row em{
  flex:0 0 auto;
  font-style:normal;
  font-size:11px;
}

@media(max-width:900px){
  .mobile-nav{
    overflow-x:auto;
  }

  .mobile-nav .nav-btn{
    min-width:54px;
  }

  .server-metrics{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .server-terminal-prompt{
    display:block;
  }

  .server-terminal-prompt>span{
    display:block;
    margin-bottom:8px;
  }

  .server-terminal-output{
    min-height:240px;
    max-height:55vh;
  }
}

/* SAKURA_TWO_SERVERS_STYLE_FIX_V2 */
.server-switcher{display:flex;gap:9px;overflow-x:auto;padding:2px 1px 12px;scrollbar-width:none}
.server-switcher::-webkit-scrollbar{display:none}
.server-switch{flex:0 0 auto;display:flex;align-items:center;gap:8px;min-height:43px;padding:8px 13px;border:1px solid rgba(255,255,255,.07);border-radius:13px;background:rgba(255,255,255,.025);color:#afb3bd}
.server-switch.active{border-color:rgba(244,164,205,.35);background:rgba(244,164,205,.08);color:#fff}
.server-switch>span{font-size:18px}
.server-switch>i{width:7px;height:7px;border-radius:50%;background:#646976}
.server-switch>i.online{background:#61d69c;box-shadow:0 0 9px rgba(97,214,156,.45)}
.server-switch>i.offline{background:#e7ad63}
.server-switch>i.unpaired{background:#686d78}
.server-pair-card{margin-top:14px}
.server-pair-code{display:flex;flex-direction:column;gap:8px;margin:14px 0;padding:15px;border:1px solid rgba(244,164,205,.2);border-radius:14px;background:rgba(244,164,205,.05)}
.server-pair-code strong{color:#f3a6cf;font-size:20px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere}
.server-install-command{margin:10px 0;padding:13px;border-radius:12px;background:#05070a;border:1px solid rgba(255,255,255,.07);font-size:11px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}


/* SAKURA_SERVER_TELEMETRY_STYLE_V1 */

.server-services-card{
  margin-top:14px;
}

.server-services-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  margin-top:12px;
}

.server-service-row{
  min-width:0;
  display:grid;
  grid-template-columns:10px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:12px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:14px;
  background:rgba(255,255,255,.025);
}

.server-service-row>div{
  min-width:0;
}

.server-service-row b,
.server-service-row small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.server-service-row b{
  font-size:13px;
}

.server-service-row small{
  margin-top:3px;
  opacity:.62;
  font-size:11px;
}

.server-service-row>strong{
  font-size:11px;
  font-weight:600;
  opacity:.72;
  white-space:nowrap;
}

.server-service-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:#686d79;
  box-shadow:0 0 0 3px rgba(255,255,255,.035);
}

.server-service-dot.online{
  background:#68d391;
}

.server-service-dot.offline{
  background:#f3a6cf;
  opacity:.6;
}

.server-wg-status{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  margin-top:9px;
}

.server-wg-status>div{
  padding:11px 12px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:13px;
  background:rgba(243,166,207,.035);
}

.server-wg-status small,
.server-wg-status b{
  display:block;
}

.server-wg-status small{
  opacity:.62;
  font-size:10px;
}

.server-wg-status b{
  margin-top:4px;
  font-size:12px;
}

@media(max-width:680px){
  .server-services-grid,
  .server-wg-status{
    grid-template-columns:1fr;
  }

  .server-service-row{
    padding:11px;
  }
}


/* SAKURA_HISTORY_TOTAL_UI_V1 */
.server-history-total{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.08);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  font-size:13px;
}
.server-history-total span{
  opacity:.62;
}
.server-history-total b{
  font-size:15px;
  font-weight:750;
  white-space:nowrap;
}

/* SAKURA_AUTOPILOT_RUNTIME_CARD_V1 */
.autopilot-runtime-hero{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:16px;
  margin:14px 0;
  border-radius:18px;
  background:rgba(255,255,255,.035);
  border:1px solid rgba(255,255,255,.07);
}

.autopilot-runtime-hero > span:nth-child(2){
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}

.autopilot-runtime-hero > span:nth-child(2) b{
  font-size:15px;
}

.autopilot-runtime-hero > span:nth-child(2) small{
  opacity:.72;
  line-height:1.35;
}

.autopilot-runtime-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  font-weight:800;
  font-size:17px;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.08);
}

.autopilot-runtime-icon.running{
  box-shadow:0 0 0 1px rgba(90,220,150,.16) inset;
}

.autopilot-runtime-icon.backoff,
.autopilot-runtime-icon.cooldown{
  box-shadow:0 0 0 1px rgba(255,190,90,.18) inset;
}

.autopilot-runtime-icon.circuit,
.autopilot-runtime-icon.error{
  box-shadow:0 0 0 1px rgba(255,90,110,.20) inset;
}

.autopilot-runtime-icon.maintenance{
  box-shadow:0 0 0 1px rgba(210,130,255,.18) inset;
}

.autopilot-time-block{
  text-align:right;
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:112px;
}

.autopilot-time-block small{
  opacity:.6;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.autopilot-time-block b{
  font-size:18px;
  font-variant-numeric:tabular-nums;
}

.autopilot-time-block em{
  opacity:.6;
  font-size:11px;
  font-style:normal;
}

.autopilot-runtime-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  margin:12px 0;
}

.autopilot-runtime-grid > div{
  padding:12px;
  border-radius:14px;
  background:rgba(255,255,255,.025);
  border:1px solid rgba(255,255,255,.055);
  min-width:0;
}

.autopilot-runtime-grid small{
  display:block;
  opacity:.6;
  margin-bottom:5px;
  font-size:10px;
  text-transform:uppercase;
}

.autopilot-runtime-grid b{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
}

.autopilot-deferred{
  font-size:12px;
}

.autopilot-queue-v2{
  margin:14px 0;
}

.autopilot-queue-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
}

.autopilot-queue-head small{
  opacity:.58;
  letter-spacing:.08em;
  font-size:10px;
}

.autopilot-queue-head span{
  opacity:.65;
  font-size:11px;
}

.autopilot-queue-pills{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}

.autopilot-bot-pill{
  padding:7px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.07);
  font-size:11px;
  font-weight:700;
}

.autopilot-bot-pill.next{
  box-shadow:0 0 0 1px rgba(255,130,190,.18) inset;
}

.autopilot-bot-pill.more{
  opacity:.65;
}

.autopilot-queue-empty{
  opacity:.55;
  font-size:12px;
}

.autopilot-runtime-pill.backoff,
.autopilot-runtime-pill.cooldown{
  box-shadow:0 0 0 1px rgba(255,190,90,.18) inset;
}

.autopilot-runtime-pill.circuit,
.autopilot-runtime-pill.error{
  box-shadow:0 0 0 1px rgba(255,90,110,.20) inset;
}

.autopilot-runtime-pill.maintenance{
  box-shadow:0 0 0 1px rgba(210,130,255,.18) inset;
}

.autopilotResume:disabled{
  opacity:.48;
  cursor:not-allowed;
}

@media(max-width:700px){
  .autopilot-runtime-hero{
    grid-template-columns:auto minmax(0,1fr);
  }

  .autopilot-time-block{
    grid-column:1 / -1;
    text-align:left;
    padding-left:56px;
  }

  .autopilot-runtime-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:420px){
  .autopilot-runtime-grid{
    grid-template-columns:1fr;
  }

  .autopilot-time-block{
    padding-left:0;
  }
}

/* SAKURA_PC_SCREENSHOT_DISPLAY_FIX_V1 */
.pc-shot-card {
  overflow: hidden;
}

.pc-shot-frame {
  width: 100%;
  min-height: 180px;
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,.035);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.pc-shot-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
}

.pc-shot-frame.is-zoomed {
  position: fixed;
  inset: 12px;
  z-index: 9999;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 12px;
  border-radius: 18px;
  background: rgba(10,10,16,.97);
  cursor: zoom-out;
}

.pc-shot-frame.is-zoomed img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.pc-shot-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.pc-shot-actions {
  display: flex;
  gap: 8px;
}

.pc-mini-action {
  cursor: pointer;
  user-select: none;
}

.pc-shot-empty {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: .8;
}



/* SAKURA_PC_DISCORD_STYLE_V1 */
.pc-discord-card{
  overflow:hidden;
}

.pc-discord-state{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin:8px 0 14px;
}

.pc-discord-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.pc-discord-actions button{
  width:100%;
}

.pc-discord-actions button:last-child{
  grid-column:1/-1;
}

@media (min-width:760px){
  .pc-discord-actions{
    grid-template-columns:repeat(5,minmax(0,1fr));
  }

  .pc-discord-actions button:last-child{
    grid-column:auto;
  }
}

/* SAKURA_PC_DISCORD_3BUTTONS_V2 */
.pc-discord-actions-3{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}

.pc-discord-actions-3 button{
  width:100%;
}

.pc-discord-actions-3 button:last-child{
  grid-column:auto;
}

@media (max-width:520px){
  .pc-discord-actions-3{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .pc-discord-actions-3 button:last-child{
    grid-column:1/-1;
  }
}

/* SAKURA_P1_CLASSIFICATION_STYLE_V1 */

.p1-filter-wrap{
  margin:12px 0 14px;
}

.p1-filter-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.p1-filter-title small{
  opacity:.62;
}

.p1-filter-bar{
  display:flex;
  gap:7px;
  overflow-x:auto;
  padding:2px 1px 7px;
  scrollbar-width:none;
}

.p1-filter-bar::-webkit-scrollbar{
  display:none;
}

.p1-filter-chip{
  display:flex;
  align-items:center;
  gap:7px;
  flex:0 0 auto;
  min-height:36px;
  padding:7px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
  white-space:nowrap;
}

.p1-filter-chip b{
  min-width:21px;
  height:21px;
  padding:0 6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  font-size:11px;
}

.p1-filter-chip.active{
  border-color:rgba(255,145,190,.48);
  background:rgba(255,126,180,.13);
}

.p1-filter-chip.active b{
  background:rgba(255,126,180,.21);
}

.p1-row-reason{
  margin:-4px 10px 8px 58px;
  padding:0 0 7px;
  font-size:11px;
  line-height:1.35;
  opacity:.62;
}

.p1-empty{
  padding:24px 12px;
  text-align:center;
  opacity:.6;
}

@media (max-width:520px){
  .p1-filter-title{
    align-items:flex-start;
    flex-direction:column;
    gap:2px;
  }

  .p1-row-reason{
    margin-left:52px;
  }
}

/* SAKURA_P1_HISTORY_STYLE_V1 */

.p1-history-mini{
  margin:-4px 10px 10px 58px;
  border-top:1px solid rgba(255,255,255,.05);
  padding-top:6px;
}

.p1-history-mini summary{
  cursor:pointer;
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  font-size:11px;
  opacity:.7;
}

.p1-history-mini summary::-webkit-details-marker{
  display:none;
}

.p1-history-mini summary span{
  min-width:19px;
  height:19px;
  padding:0 5px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:rgba(255,255,255,.07);
  font-size:10px;
}

.p1-history-list{
  padding-top:7px;
}

.p1-history-event{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:6px 0;
}

.p1-history-event + .p1-history-event{
  border-top:1px solid rgba(255,255,255,.05);
}

.p1-history-event b{
  font-size:11px;
  font-weight:650;
}

.p1-history-event small{
  font-size:10px;
  line-height:1.35;
  opacity:.58;
}

@media (max-width:520px){
  .p1-history-mini{
    margin-left:52px;
  }
}

/* SAKURA_PC_MOBILE_OVERFLOW_FIX_V1 */

/*
 * PC cards:
 * - never let flex/grid children force the card wider
 * - keep eyebrow text away from the rounded border
 * - allow helper text to wrap normally
 */

#pc .card,
#pc .card *,
#pc .card-head,
#pc .card-head > div {
  box-sizing:border-box;
  min-width:0;
}

#pc .card {
  max-width:100%;
  overflow:hidden;
}

/* VOICE CONTROL / LIVE DESKTOP */
#pc .eyebrow {
  display:block;
  width:100%;
  max-width:100%;
  margin-left:0 !important;
  margin-right:0 !important;
  padding-left:12px;
  padding-right:12px;
  white-space:normal;
  overflow-wrap:normal;
}

/*
 * Discord explanatory line:
 * «Зайти» автоматически включает...
 */
#pc .logic-note {
  display:block;
  width:100%;
  max-width:100%;
  margin-left:0 !important;
  margin-right:0 !important;
  padding-left:12px;
  padding-right:12px;
  white-space:normal !important;
  overflow-wrap:anywhere;
  word-break:normal;
  line-height:1.4;
}

/* Prevent long status/title text from expanding the card */
#pc .card p,
#pc .card small,
#pc .card strong,
#pc .card h2,
#pc .card h3 {
  max-width:100%;
  min-width:0;
}

/* Discord status specifically gets normal wrapping on phones */
#pc .card h2,
#pc .card h3 {
  overflow-wrap:anywhere;
}

@media (max-width:520px) {
  #pc .eyebrow {
    padding-left:14px;
    padding-right:14px;
  }

  #pc .logic-note {
    padding-left:14px;
    padding-right:14px;
    font-size:11px;
    line-height:1.45;
  }
}

/* SAKURA_P8_NICHE_SHELL_V1 */

.niche-switcher{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  max-width:100%;
  padding:10px 18px 2px;
  overflow-x:auto;
  overflow-y:hidden;
  white-space:nowrap;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  box-sizing:border-box;
}

.niche-switcher::-webkit-scrollbar{
  display:none;
}

.niche-btn{
  appearance:none;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.035);
  color:inherit;
  min-height:40px;
  padding:8px 13px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  flex:0 0 auto;
  cursor:pointer;
  font:inherit;
  transition:
    transform .16s ease,
    border-color .16s ease,
    background .16s ease;
}

.niche-btn span{
  font-size:16px;
  line-height:1;
}

.niche-btn b{
  font-size:13px;
  font-weight:700;
}

.niche-btn:active{
  transform:scale(.97);
}

.niche-btn.active{
  border-color:rgba(255,150,190,.38);
  background:rgba(255,120,175,.12);
  box-shadow:0 0 0 1px rgba(255,120,175,.04) inset;
}

.niche-placeholder[hidden]{
  display:none !important;
}

.niche-placeholder{
  width:100%;
  box-sizing:border-box;
  padding:18px;
}

.niche-placeholder-wrap{
  width:min(920px,100%);
  margin:0 auto;
}

.niche-placeholder-card{
  display:flex;
  gap:22px;
  align-items:flex-start;
}

.niche-placeholder-icon{
  width:64px;
  height:64px;
  min-width:64px;
  border-radius:20px;
  display:grid;
  place-items:center;
  font-size:30px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.07);
}

.niche-placeholder-copy{
  min-width:0;
  flex:1;
}

.niche-placeholder-text{
  margin:12px 0 16px;
  line-height:1.55;
  opacity:.82;
}

.niche-future-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:14px 0;
}

.niche-future-item{
  min-width:0;
  padding:13px;
  border-radius:14px;
  background:rgba(255,255,255,.025);
  border:1px solid rgba(255,255,255,.055);
  display:grid;
  gap:5px;
}

.niche-future-item>span{
  opacity:.55;
}

.niche-future-item>b{
  overflow-wrap:anywhere;
}

.niche-future-item>small{
  opacity:.55;
}

.app-shell.niche-external{
  grid-template-columns:minmax(0,1fr) !important;
}

.app-shell.niche-external .sidebar,
.app-shell.niche-external .mobile-nav{
  display:none !important;
}

.app-shell.niche-external .content{
  width:100%;
  max-width:none;
  min-width:0;
  grid-column:1 / -1;
  flex:1 1 auto;
}

.app-shell.niche-external .top-actions{
  display:none;
}

@media (max-width:760px){
  .niche-switcher{
    padding:8px 12px 2px;
    gap:7px;
  }

  .niche-btn{
    min-height:38px;
    padding:8px 11px;
  }

  .niche-btn b{
    font-size:12px;
  }

  .niche-placeholder{
    padding:12px;
  }

  .niche-placeholder-card{
    display:block;
  }

  .niche-placeholder-icon{
    width:54px;
    height:54px;
    min-width:54px;
    margin-bottom:14px;
    border-radius:17px;
    font-size:25px;
  }

  .niche-future-grid{
    grid-template-columns:1fr;
  }

  .app-shell.niche-external .content{
    padding-bottom:calc(24px + env(safe-area-inset-bottom));
  }
}

/* SAKURA_P8_NICHE_COMPACT_V2 */

/* ровная панель пяти ниш */
.niche-switcher{
  display:grid !important;
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:7px !important;

  width:100% !important;
  max-width:760px !important;

  margin:0 auto !important;
  padding:8px 18px 10px !important;

  overflow:visible !important;
  white-space:normal !important;

  box-sizing:border-box !important;
}

.niche-btn{
  width:100% !important;
  min-width:0 !important;
  min-height:52px !important;

  padding:7px 4px !important;
  border-radius:15px !important;

  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:3px !important;

  overflow:hidden !important;
}

.niche-btn span{
  display:block !important;
  font-size:19px !important;
  line-height:1.05 !important;
}

.niche-btn b{
  display:block !important;
  width:100% !important;

  font-size:11px !important;
  line-height:1.1 !important;
  font-weight:700 !important;

  text-align:center !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.niche-btn.active{
  transform:none !important;
}

/* компактная заглушка раздела */
.niche-placeholder{
  padding:8px 18px 18px !important;
}

.niche-placeholder-wrap{
  width:min(760px,100%) !important;
}

.niche-placeholder-card{
  display:block !important;
  padding:16px !important;
  border-radius:20px !important;
}

/* большой emoji сверху больше не нужен — он уже есть во вкладке */
.niche-placeholder-icon{
  display:none !important;
}

/* название уже есть в верхнем заголовке страницы */
.niche-placeholder-card .card-head h2{
  display:none !important;
}

.niche-placeholder-card .card-head{
  min-height:30px !important;
  margin:0 0 5px !important;
  align-items:center !important;
}

.niche-placeholder-card .card-head .eyebrow{
  margin:0 !important;
}

.niche-placeholder-card .card-head .pill{
  margin-left:auto !important;
}

.niche-placeholder-text{
  margin:5px 0 12px !important;
  font-size:15px !important;
  line-height:1.42 !important;
}

/* три будущих блока — компактными строками */
.niche-future-grid{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:7px !important;
  margin:8px 0 10px !important;
}

.niche-future-item{
  padding:10px 12px !important;
  border-radius:13px !important;

  display:grid !important;
  grid-template-columns:22px minmax(0,1fr) !important;
  grid-template-rows:auto auto !important;

  column-gap:8px !important;
  row-gap:2px !important;

  align-items:center !important;
}

.niche-future-item > span{
  grid-column:1 !important;
  grid-row:1 / span 2 !important;

  align-self:center !important;
  font-size:18px !important;
  line-height:1 !important;
}

.niche-future-item > b{
  grid-column:2 !important;
  grid-row:1 !important;

  font-size:14px !important;
  line-height:1.2 !important;
}

.niche-future-item > small{
  grid-column:2 !important;
  grid-row:2 !important;

  font-size:11px !important;
  line-height:1.2 !important;
}

/* нижняя пояснялка тоже компактнее */
.niche-placeholder-card .logic-note{
  margin-top:8px !important;
  font-size:11px !important;
  line-height:1.3 !important;
}

/* мобильная версия */
@media (max-width:760px){

  .niche-switcher{
    width:100% !important;
    max-width:none !important;

    gap:5px !important;
    padding:6px 18px 8px !important;
  }

  .niche-btn{
    min-height:50px !important;
    padding:6px 2px !important;
    border-radius:14px !important;
  }

  .niche-btn span{
    font-size:18px !important;
  }

  .niche-btn b{
    font-size:10px !important;
    letter-spacing:-.15px !important;
  }

  .niche-placeholder{
    padding:6px 18px 18px !important;
  }

  .niche-placeholder-card{
    padding:14px !important;
  }

  .niche-placeholder-text{
    font-size:14px !important;
  }
}

/* SAKURA_BONJOUR_LIVE_V1 */

.bonjour-live{
  display:grid;
  gap:12px;
}

.bonjour-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:18px;
}

.bonjour-hero-main{
  display:flex;
  align-items:center;
  min-width:0;
  gap:13px;
}

.bonjour-logo{
  width:50px;
  height:50px;
  min-width:50px;
  display:grid;
  place-items:center;
  border-radius:16px;
  font-size:24px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.07);
}

.bonjour-hero h2{
  margin:2px 0 3px;
}

.bonjour-hero small{
  opacity:.62;
}

.bonjour-status{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:30px;
  padding:5px 10px;
  border-radius:999px;
  flex:0 0 auto;
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
  border:1px solid rgba(255,255,255,.08);
}

.bonjour-status i{
  width:7px;
  height:7px;
  border-radius:50%;
}

.bonjour-status.online i{
  background:#48d597;
  box-shadow:0 0 10px rgba(72,213,151,.55);
}

.bonjour-status.offline i{
  background:#ff718c;
}

.bonjour-metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}

.bonjour-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.bonjour-card{
  min-width:0;
}

.bonjour-stat-list{
  display:grid;
  gap:2px;
  margin-top:8px;
}

.bonjour-stat-list>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:9px 0;
  border-bottom:1px solid rgba(255,255,255,.055);
}

.bonjour-stat-list>div:last-child{
  border-bottom:0;
}

.bonjour-stat-list span{
  min-width:0;
  opacity:.68;
  font-size:12px;
}

.bonjour-stat-list b{
  flex:0 0 auto;
}

.bonjour-traffic{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin-top:8px;
}

.bonjour-traffic>div{
  padding:12px;
  border-radius:14px;
  background:rgba(255,255,255,.025);
  border:1px solid rgba(255,255,255,.055);
}

.bonjour-traffic small{
  display:block;
  opacity:.55;
  font-size:10px;
  margin-bottom:4px;
}

.bonjour-traffic b{
  font-size:17px;
}

.bonjour-updated{
  margin-top:10px;
  opacity:.55;
  font-size:11px;
}

.bonjour-updated b{
  opacity:1;
}

.bonjour-services{
  display:grid;
  gap:7px;
}

.bonjour-service-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
  border-bottom:1px solid rgba(255,255,255,.055);
}

.bonjour-service-row:last-child{
  border-bottom:0;
}

.bonjour-service-main{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}

.bonjour-service-main>div{
  min-width:0;
  display:grid;
}

.bonjour-service-main small,
.bonjour-service-side small{
  opacity:.55;
  font-size:10px;
}

.bonjour-service-side{
  display:grid;
  justify-items:end;
  gap:3px;
  flex:0 0 auto;
}

.bonjour-dot{
  width:8px;
  height:8px;
  min-width:8px;
  border-radius:50%;
}

.bonjour-dot.ok{
  background:#48d597;
}

.bonjour-dot.bad{
  background:#ff718c;
}

.bonjour-privacy-note{
  font-size:10px;
  opacity:.48;
  text-align:center;
  padding:2px 10px;
}

.bonjour-loading-card,
.bonjour-error-card{
  display:flex;
  align-items:center;
  gap:13px;
  padding:18px;
}

.bonjour-loading-card>div:last-child{
  display:grid;
  gap:3px;
}

.bonjour-loading-card small{
  opacity:.55;
}

.bonjour-error-icon{
  width:38px;
  height:38px;
  min-width:38px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(255,90,120,.1);
  border:1px solid rgba(255,90,120,.2);
  font-weight:900;
}

.bonjour-error-card p{
  margin:4px 0;
}

@media (max-width:760px){

  .bonjour-live{
    gap:8px;
  }

  .bonjour-hero{
    padding:14px;
    gap:10px;
  }

  .bonjour-logo{
    width:42px;
    height:42px;
    min-width:42px;
    border-radius:14px;
    font-size:20px;
  }

  .bonjour-hero h2{
    font-size:18px;
  }

  .bonjour-hero small{
    font-size:10px;
  }

  .bonjour-status{
    min-height:27px;
    padding:4px 8px;
    font-size:9px;
  }

  .bonjour-metrics{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
  }

  .bonjour-metrics .metric{
    padding:11px;
  }

  .bonjour-metrics .metric strong{
    font-size:20px;
  }

  .bonjour-grid{
    grid-template-columns:1fr;
    gap:8px;
  }

  .bonjour-card{
    padding:14px;
  }

  .bonjour-service-row{
    align-items:flex-start;
  }
}



/* SAKURA_CRYPTO_LIVE_V1 */

.crypto-wrap{
  display:grid;
  gap:14px;
}

.crypto-hero{
  padding:18px;
}

.crypto-hero-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
}

.crypto-hero-top h2{
  margin:3px 0 5px;
}

.crypto-muted{
  margin:0;
  opacity:.66;
  font-size:13px;
}

.crypto-live-side{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:6px;
  text-align:right;
}

.crypto-live-side small{
  opacity:.62;
}

.crypto-status-strip{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:16px;
}

.crypto-status-strip>div{
  display:grid;
  grid-template-columns:auto 1fr;
  column-gap:8px;
  align-items:center;
  padding:11px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--soft);
}

.crypto-status-strip b{
  font-size:13px;
}

.crypto-status-strip small{
  grid-column:2;
  opacity:.62;
  font-size:11px;
  margin-top:1px;
}

.crypto-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  display:block;
  background:#888;
}

.crypto-dot.ok{
  background:#42d981;
  box-shadow:0 0 0 4px rgba(66,217,129,.10);
}

.crypto-dot.bad{
  background:#ff6475;
  box-shadow:0 0 0 4px rgba(255,100,117,.10);
}

.crypto-metrics-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.crypto-metric{
  padding:15px;
  min-width:0;
}

.crypto-metric span{
  display:block;
  opacity:.62;
  font-size:12px;
  margin-bottom:6px;
}

.crypto-metric strong{
  display:block;
  font-size:24px;
  line-height:1.05;
  letter-spacing:-.02em;
}

.crypto-metric small{
  display:block;
  margin-top:7px;
  opacity:.64;
  font-size:11px;
}

.crypto-negative{
  color:#ff7180;
}

.crypto-two-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.crypto-breakdown{
  padding:16px;
}

.crypto-outcomes{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-top:13px;
}

.crypto-outcomes>div{
  padding:10px;
  border:1px solid var(--line);
  border-radius:12px;
  text-align:center;
  background:var(--soft);
}

.crypto-outcomes span{
  display:block;
  font-size:11px;
  opacity:.6;
}

.crypto-outcomes b{
  display:block;
  margin-top:4px;
  font-size:18px;
}

.crypto-footnote{
  margin-top:11px;
  font-size:11px;
  opacity:.66;
  line-height:1.45;
}

.crypto-money-state{
  margin-top:13px;
  padding:13px;
  border:1px solid var(--line);
  border-radius:13px;
  background:var(--soft);
}

.crypto-money-state strong{
  display:block;
  font-size:14px;
}

.crypto-money-state p{
  margin:7px 0 0;
  opacity:.68;
  font-size:12px;
  line-height:1.5;
}

.crypto-recent-card{
  padding:16px;
}

.crypto-last-activity{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  text-align:right;
}

.crypto-last-activity b{
  font-size:12px;
}

.crypto-last-activity small{
  margin-top:2px;
  opacity:.58;
  font-size:10px;
}

.crypto-signal-list{
  display:grid;
  gap:7px;
  margin-top:13px;
}

.crypto-signal-row{
  display:grid;
  grid-template-columns:minmax(95px,1.25fr) 70px 65px minmax(110px,1fr);
  gap:9px;
  align-items:center;
  padding:10px 11px;
  border:1px solid var(--line);
  border-radius:13px;
  background:var(--soft);
}

.crypto-signal-market{
  min-width:0;
}

.crypto-signal-market b{
  display:block;
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.crypto-signal-market small{
  display:block;
  margin-top:2px;
  opacity:.58;
  font-size:10px;
}

.crypto-signal-direction{
  font-size:11px;
  font-weight:800;
  text-align:center;
  padding:5px 7px;
  border-radius:9px;
  background:rgba(255,255,255,.06);
}

.crypto-signal-direction.long{
  color:#49d98a;
}

.crypto-signal-direction.short{
  color:#ff7180;
}

.crypto-signal-score{
  text-align:center;
}

.crypto-signal-score span{
  display:block;
  opacity:.48;
  font-size:9px;
}

.crypto-signal-score b{
  display:block;
  font-size:13px;
}

.crypto-signal-status{
  text-align:right;
  min-width:0;
}

.crypto-signal-status b{
  display:block;
  font-size:11px;
}

.crypto-signal-status small{
  display:block;
  opacity:.55;
  font-size:9px;
  margin-top:2px;
}

.crypto-empty{
  padding:18px;
  text-align:center;
  opacity:.6;
}

.crypto-loading-card{
  min-height:180px;
}

@media(max-width:900px){
  .crypto-wrap{
    gap:10px;
  }

  .crypto-hero{
    padding:14px;
  }

  .crypto-hero-top{
    gap:10px;
  }

  .crypto-live-side small{
    font-size:9px;
  }

  .crypto-status-strip{
    grid-template-columns:1fr;
    gap:6px;
    margin-top:12px;
  }

  .crypto-status-strip>div{
    padding:9px 10px;
  }

  .crypto-metrics-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }

  .crypto-metric{
    padding:12px;
  }

  .crypto-metric strong{
    font-size:20px;
  }

  .crypto-two-grid{
    grid-template-columns:1fr;
    gap:10px;
  }

  .crypto-breakdown,
  .crypto-recent-card{
    padding:13px;
  }

  .crypto-outcomes{
    gap:6px;
  }

  .crypto-outcomes>div{
    padding:8px 4px;
  }

  .crypto-outcomes b{
    font-size:16px;
  }

  .crypto-signal-row{
    grid-template-columns:minmax(85px,1fr) 57px 48px minmax(82px,.9fr);
    gap:5px;
    padding:9px 8px;
  }

  .crypto-signal-direction{
    padding:4px;
    font-size:9px;
  }

  .crypto-signal-market b{
    font-size:11px;
  }

  .crypto-signal-status b{
    font-size:10px;
  }
}



/* SAKURA_FINANCE_LIVE_V1 */

.finance-wrap{
  display:grid;
  gap:12px;
  padding-bottom:82px;
}

.finance-loading{
  min-height:220px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
}

.finance-total-card{
  padding:22px 18px 16px;
  text-align:center;
}

.finance-total-label{
  display:block;
  margin-top:5px;
  opacity:.65;
  font-size:13px;
}

.finance-total-value{
  display:block;
  margin:7px 0 5px;
  font-size:38px;
  line-height:1;
  letter-spacing:-.04em;
}

.finance-total-card>small{
  opacity:.58;
}

.finance-month-row{
  margin-top:17px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.finance-month-row>div{
  border:1px solid var(--line);
  background:var(--soft);
  border-radius:13px;
  padding:10px;
}

.finance-month-row span{
  display:block;
  opacity:.58;
  font-size:10px;
}

.finance-month-row b{
  display:block;
  margin-top:4px;
  font-size:14px;
}

.finance-positive{
  color:#49d98a;
}

.finance-accounts-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.finance-account-card{
  padding:14px;
  min-width:0;
}

.finance-account-card.pending{
  opacity:.78;
}

.finance-account-top{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:8px;
  align-items:center;
}

.finance-account-icon{
  width:32px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:var(--soft);
  font-size:17px;
}

.finance-account-name{
  min-width:0;
}

.finance-account-name b{
  display:block;
  font-size:12px;
}

.finance-account-name small{
  display:block;
  margin-top:2px;
  opacity:.52;
  font-size:9px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.finance-source-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#777;
}

.finance-source-dot.ok{
  background:#49d98a;
  box-shadow:0 0 0 4px rgba(73,217,138,.09);
}

.finance-account-balance{
  margin-top:15px;
  font-size:21px;
  font-weight:800;
  letter-spacing:-.03em;
}

.finance-account-since{
  display:block;
  margin-top:3px;
  opacity:.48;
  font-size:9px;
}

.finance-account-actions{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:11px;
}

.finance-mini-btn{
  appearance:none;
  border:1px solid var(--line);
  background:var(--soft);
  color:inherit;
  border-radius:10px;
  padding:8px 9px;
  font:inherit;
  font-size:10px;
  font-weight:700;
  cursor:pointer;
}

.finance-mini-btn.positive{
  background:rgba(73,217,138,.10);
  border-color:rgba(73,217,138,.20);
}

.finance-mini-btn.ghost{
  opacity:.72;
}

.finance-summary-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.finance-summary-card{
  padding:14px;
}

.finance-summary-card span{
  display:block;
  opacity:.6;
  font-size:11px;
}

.finance-summary-card strong{
  display:block;
  margin-top:5px;
  font-size:20px;
}

.finance-summary-card small{
  display:block;
  margin-top:4px;
  opacity:.55;
  font-size:9px;
}

.finance-section-head{
  padding:17px;
}

.finance-section-head h2{
  margin:4px 0 2px;
  font-size:28px;
}

.finance-section-head small{
  opacity:.58;
}

.finance-add-card{
  padding:0;
  overflow:hidden;
}

.finance-add-card summary{
  list-style:none;
  cursor:pointer;
  padding:15px;
  font-weight:750;
  font-size:13px;
}

.finance-add-card summary::-webkit-details-marker{
  display:none;
}

.finance-add-card[open] summary{
  border-bottom:1px solid var(--line);
}

.finance-form{
  display:grid;
  gap:11px;
  padding:14px;
}

.finance-form label{
  display:grid;
  gap:5px;
}

.finance-form label>span{
  opacity:.65;
  font-size:10px;
  font-weight:650;
}

.finance-form input,
.finance-form select{
  width:100%;
  box-sizing:border-box;
  border:1px solid var(--line);
  background:var(--soft);
  color:inherit;
  border-radius:11px;
  padding:11px 12px;
  font:inherit;
  outline:none;
}

.finance-form-two{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.finance-submit-btn{
  appearance:none;
  border:0;
  border-radius:12px;
  padding:12px;
  font:inherit;
  font-weight:800;
  color:inherit;
  background:rgba(255,128,180,.16);
  cursor:pointer;
}

.finance-list{
  display:grid;
  gap:9px;
}

.finance-debt-card,
.finance-sub-card{
  padding:14px;
}

.finance-debt-card.closed{
  opacity:.63;
}

.finance-debt-top,
.finance-sub-top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}

.finance-debt-top b,
.finance-sub-top b{
  display:block;
}

.finance-debt-top small,
.finance-sub-top small{
  display:block;
  margin-top:3px;
  opacity:.58;
  font-size:10px;
}

.finance-debt-top small.warn,
.finance-sub-due.warn{
  color:#f0b65a;
  opacity:1;
}

.finance-debt-top small.danger,
.finance-sub-due.danger{
  color:#ff7180;
  opacity:1;
}

.finance-debt-money{
  display:grid;
  grid-template-columns:1.3fr 1fr 1fr;
  gap:7px;
  margin-top:13px;
}

.finance-debt-money>div{
  padding:9px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--soft);
}

.finance-debt-money span{
  display:block;
  opacity:.5;
  font-size:9px;
}

.finance-debt-money strong,
.finance-debt-money b{
  display:block;
  margin-top:3px;
  font-size:13px;
}

.finance-debt-actions,
.finance-sub-actions{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:11px;
}

.finance-payment-history{
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid var(--line);
}

.finance-payment-history>small{
  display:block;
  margin-bottom:5px;
  opacity:.5;
  font-size:9px;
}

.finance-payment-history>div{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:3px 0;
  font-size:10px;
}

.finance-sub-top strong{
  font-size:16px;
}

.finance-sub-due{
  display:grid;
  grid-template-columns:1fr auto;
  gap:3px 10px;
  margin-top:12px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--soft);
}

.finance-sub-due span{
  opacity:.55;
  font-size:9px;
}

.finance-sub-due b{
  font-size:12px;
}

.finance-sub-due small{
  grid-column:1 / -1;
  opacity:.6;
  font-size:9px;
}

.finance-empty-card{
  min-height:150px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:5px;
  padding:18px;
}

.finance-empty-card>div{
  font-size:26px;
}

.finance-empty-card small{
  max-width:280px;
  opacity:.58;
  line-height:1.45;
}

.finance-bottom-nav{
  position:sticky;
  bottom:10px;
  z-index:20;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:4px;
  padding:5px;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(20,20,24,.92);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  box-shadow:0 8px 28px rgba(0,0,0,.28);
}

.finance-bottom-nav button{
  appearance:none;
  border:0;
  background:transparent;
  color:inherit;
  border-radius:12px;
  padding:8px 5px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:2px;
  font:inherit;
  cursor:pointer;
  opacity:.55;
}

.finance-bottom-nav button.active{
  background:rgba(255,128,180,.13);
  opacity:1;
}

.finance-bottom-nav span{
  font-size:16px;
}

.finance-bottom-nav b{
  font-size:9px;
}

@media(max-width:900px){
  .finance-wrap{
    gap:9px;
    padding-bottom:68px;
  }

  .finance-total-card{
    padding:18px 13px 13px;
  }

  .finance-total-value{
    font-size:34px;
  }

  .finance-month-row{
    margin-top:14px;
  }

  .finance-accounts-grid{
    gap:7px;
  }

  .finance-account-card{
    padding:11px;
  }

  .finance-account-icon{
    width:28px;
    height:28px;
    font-size:15px;
  }

  .finance-account-balance{
    font-size:18px;
  }

  .finance-account-actions{
    gap:4px;
  }

  .finance-mini-btn{
    padding:7px 7px;
    font-size:9px;
  }

  .finance-summary-grid{
    gap:7px;
  }

  .finance-section-head{
    padding:14px;
  }

  .finance-form{
    padding:12px;
  }

  .finance-form-two{
    grid-template-columns:1fr 1fr;
  }

  .finance-debt-card,
  .finance-sub-card{
    padding:12px;
  }

  .finance-debt-money{
    gap:5px;
  }

  .finance-debt-money>div{
    padding:8px 6px;
  }

  .finance-bottom-nav{
    bottom:8px;
  }
}


/* SAKURA_FINANCE_OVERFLOW_FIX_V2 */

/* Любой grid/flex-ребёнок должен иметь право ужиматься */
.finance-wrap *,
.finance-wrap *::before,
.finance-wrap *::after{
  box-sizing:border-box;
}

.finance-wrap article,
.finance-wrap div,
.finance-wrap label,
.finance-wrap form,
.finance-wrap nav{
  min-width:0;
}

/* Текст никогда не должен вылетать наружу */
.finance-wrap b,
.finance-wrap strong,
.finance-wrap span,
.finance-wrap small,
.finance-wrap p,
.finance-wrap h2,
.finance-wrap h3{
  max-width:100%;
  overflow-wrap:anywhere;
  word-break:normal;
}

/* Главная */
.finance-accounts-grid,
.finance-summary-grid,
.finance-month-row{
  min-width:0;
}

.finance-account-card,
.finance-summary-card,
.finance-total-card{
  overflow:hidden;
}

.finance-account-name{
  min-width:0;
  overflow:hidden;
}

.finance-account-name b,
.finance-account-name small{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}

.finance-account-balance{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}

.finance-account-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
}

.finance-account-actions .finance-mini-btn{
  flex:1 1 auto;
  min-width:0;
  white-space:normal;
  line-height:1.2;
  text-align:center;
}

/* Долги */
.finance-debt-card{
  overflow:hidden;
}

.finance-debt-top{
  min-width:0;
}

.finance-debt-top>div{
  min-width:0;
  flex:1 1 auto;
}

.finance-debt-top>div>b{
  overflow-wrap:anywhere;
}

.finance-debt-top .pill{
  flex:0 0 auto;
  white-space:nowrap;
}

.finance-debt-money{
  min-width:0;
}

.finance-debt-money>div{
  min-width:0;
  overflow:hidden;
}

.finance-debt-money strong,
.finance-debt-money b{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.finance-debt-actions{
  min-width:0;
}

.finance-debt-actions .finance-mini-btn{
  min-width:0;
  white-space:normal;
  line-height:1.2;
}

/* Подписки */
.finance-sub-card{
  overflow:hidden;
}

.finance-sub-top{
  min-width:0;
}

.finance-sub-top>div{
  min-width:0;
  flex:1 1 auto;
}

.finance-sub-top>div>b{
  overflow-wrap:anywhere;
}

.finance-sub-top>strong{
  flex:0 0 auto;
  white-space:nowrap;
  margin-left:8px;
}

.finance-sub-due{
  min-width:0;
}

.finance-sub-due>*{
  min-width:0;
}

.finance-sub-due b{
  text-align:right;
  overflow-wrap:anywhere;
}

.finance-sub-actions{
  min-width:0;
}

.finance-sub-actions .finance-mini-btn{
  min-width:0;
  white-space:normal;
}

/* Формы */
.finance-form input,
.finance-form select{
  min-width:0;
  max-width:100%;
}

.finance-form-two>*{
  min-width:0;
}

/* Нижняя панель */
.finance-bottom-nav{
  min-width:0;
  overflow:hidden;
}

.finance-bottom-nav button{
  min-width:0;
  overflow:hidden;
}

.finance-bottom-nav button b{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* ПК — не даём карточкам растягивать сетку */
@media(min-width:901px){
  .finance-accounts-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .finance-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .finance-debt-money{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

/* Телефон */
@media(max-width:900px){
  .finance-total-value{
    font-size:30px;
  }

  .finance-accounts-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .finance-account-card{
    padding:10px;
  }

  .finance-account-top{
    grid-template-columns:auto minmax(0,1fr) auto;
  }

  .finance-account-name b{
    font-size:11px;
  }

  .finance-account-name small{
    font-size:8px;
  }

  .finance-account-balance{
    font-size:17px;
  }

  .finance-account-actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .finance-account-actions .finance-mini-btn{
    width:100%;
  }

  .finance-account-actions .finance-mini-btn:last-child{
    grid-column:1 / -1;
  }

  .finance-debt-top,
  .finance-sub-top{
    gap:7px;
  }

  .finance-debt-money{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .finance-debt-money span{
    font-size:8px;
  }

  .finance-debt-money strong,
  .finance-debt-money b{
    font-size:11px;
  }

  .finance-debt-actions,
  .finance-sub-actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .finance-debt-actions .finance-mini-btn,
  .finance-sub-actions .finance-mini-btn{
    width:100%;
  }

  .finance-form-two{
    grid-template-columns:1fr;
  }

  .finance-sub-due{
    grid-template-columns:minmax(0,1fr) auto;
  }
}

/* Совсем узкие экраны */
@media(max-width:430px){
  .finance-accounts-grid{
    grid-template-columns:1fr;
  }

  .finance-summary-grid{
    grid-template-columns:1fr 1fr;
  }

  .finance-month-row{
    grid-template-columns:1fr 1fr;
  }

  .finance-debt-money{
    grid-template-columns:1fr 1fr 1fr;
  }

  .finance-bottom-nav b{
    font-size:9px;
  }
}


/* SAKURA_FINANCE_PENDING_CARDS_V3 */

/* Неподключённые источники — компактные, а не огромные пустые карточки */
.finance-account-card.pending{
  padding:12px 14px;
  min-height:0;
  opacity:.82;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
}

/* Верх карточки чуть плотнее */
.finance-account-card.pending .finance-account-top{
  margin:0;
}

/* Убираем огромную надпись "Не подключено" */
.finance-account-card.pending .finance-account-balance{
  width:fit-content;
  max-width:100%;
  margin-top:10px;
  padding:5px 9px;
  border:1px solid var(--line);
  border-radius:9px;
  background:rgba(255,255,255,.025);

  font-size:11px;
  font-weight:650;
  line-height:1.2;
  letter-spacing:0;
  color:rgba(255,255,255,.50);
}

/* Подзаголовок тоже делаем спокойнее */
.finance-account-card.pending .finance-account-name small{
  opacity:.38;
}

/* Серая точка менее навязчивая */
.finance-account-card.pending .finance-source-dot{
  width:7px;
  height:7px;
  opacity:.55;
}

/* На ПК уменьшаем вертикальную пустоту */
@media(min-width:901px){
  .finance-account-card.pending{
    padding-top:11px;
    padding-bottom:11px;
  }

  .finance-account-card.pending .finance-account-balance{
    margin-top:8px;
  }
}

/* На телефоне ещё компактнее */
@media(max-width:900px){
  .finance-account-card.pending{
    padding:9px 10px;
  }

  .finance-account-card.pending .finance-account-balance{
    margin-top:7px;
    padding:4px 7px;
    font-size:10px;
  }
}


/* SAKURA_FINANCE_GRID_EQUAL_V4 */

/* 4 источника = ровная сетка 2x2 */
@media(min-width:901px){
  .finance-accounts-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }

  .finance-account-card{
    height:160px;
    min-height:160px;
    max-height:160px;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }

  /* Header всегда сверху */
  .finance-account-top{
    flex:0 0 auto;
  }

  /* Баланс / статус у всех на одной вертикали */
  .finance-account-balance{
    margin-top:18px;
    flex:0 0 auto;
  }

  /* Bonjour-кнопки прижаты вниз */
  .finance-account-actions{
    margin-top:auto;
  }

  /* Pending тоже занимают всю высоту карточки */
  .finance-account-card.pending{
    height:160px;
    min-height:160px;
    max-height:160px;
    padding:14px;
  }

  /* Маленький статус "Не подключено" — внизу,
     примерно там же, где у Bonjour кнопки */
  .finance-account-card.pending .finance-account-balance{
    margin-top:auto;
    margin-bottom:2px;
  }

  /* Не даём старому V3 уменьшать карточку */
  .finance-account-card.pending{
    justify-content:flex-start;
  }

  /* Долги / Подписки под сеткой тоже одинаковой высоты */
  .finance-summary-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }

  .finance-summary-card{
    height:78px;
    min-height:78px;
    max-height:78px;
    display:flex;
    flex-direction:column;
    justify-content:center;
  }
}

/* На мобильном высоту не фиксируем */
@media(max-width:900px){
  .finance-account-card,
  .finance-account-card.pending{
    height:auto;
    min-height:0;
    max-height:none;
  }

  .finance-account-card.pending .finance-account-balance{
    margin-top:8px;
  }
}


/* SAKURA_FINANCE_GRID_EQUAL_V4 */

/* 4 источника = ровная сетка 2x2 */
@media(min-width:901px){
  .finance-accounts-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }

  .finance-account-card{
    height:160px;
    min-height:160px;
    max-height:160px;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }

  /* Header всегда сверху */
  .finance-account-top{
    flex:0 0 auto;
  }

  /* Баланс / статус у всех на одной вертикали */
  .finance-account-balance{
    margin-top:18px;
    flex:0 0 auto;
  }

  /* Bonjour-кнопки прижаты вниз */
  .finance-account-actions{
    margin-top:auto;
  }

  /* Pending тоже занимают всю высоту карточки */
  .finance-account-card.pending{
    height:160px;
    min-height:160px;
    max-height:160px;
    padding:14px;
  }

  /* Маленький статус "Не подключено" — внизу,
     примерно там же, где у Bonjour кнопки */
  .finance-account-card.pending .finance-account-balance{
    margin-top:auto;
    margin-bottom:2px;
  }

  /* Не даём старому V3 уменьшать карточку */
  .finance-account-card.pending{
    justify-content:flex-start;
  }

  /* Долги / Подписки под сеткой тоже одинаковой высоты */
  .finance-summary-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }

  .finance-summary-card{
    height:78px;
    min-height:78px;
    max-height:78px;
    display:flex;
    flex-direction:column;
    justify-content:center;
  }
}

/* На мобильном высоту не фиксируем */
@media(max-width:900px){
  .finance-account-card,
  .finance-account-card.pending{
    height:auto;
    min-height:0;
    max-height:none;
  }

  .finance-account-card.pending .finance-account-balance{
    margin-top:8px;
  }
}


/* SAKURA_NICHE_GAP_V5 */

/* Чуть больше воздуха между верхними нишами */
@media(min-width:901px){
  [data-niche] + [data-niche]{
    margin-left:10px;
  }

  [data-niche]{
    row-gap:4px;
  }
}

/* На телефоне тоже добавляем воздух, но меньше,
   чтобы 5 кнопок продолжали помещаться */
@media(max-width:900px){
  [data-niche] + [data-niche]{
    margin-left:4px;
  }

  [data-niche]{
    row-gap:3px;
  }
}


/* SAKURA_FINANCE_CARD_GAP_V6 */

@media(min-width:901px){
  .finance-accounts-grid{
    column-gap:18px !important;
    row-gap:14px !important;
  }

  .finance-summary-grid{
    column-gap:18px !important;
    row-gap:12px !important;
    margin-top:4px;
  }
}

@media(max-width:900px){
  .finance-accounts-grid{
    column-gap:10px !important;
    row-gap:10px !important;
  }

  .finance-summary-grid{
    column-gap:10px !important;
    row-gap:10px !important;
  }
}


/* SAKURA_FINANCE_TOP_GAP_V7 */

/* Больше воздуха между общим балансом и 4 источниками */
.finance-accounts-grid{
  margin-top:24px !important;
}

/* На телефоне чуть компактнее */
@media(max-width:900px){
  .finance-accounts-grid{
    margin-top:16px !important;
  }
}


/* SAKURA_FINANCE_X_GAP_EQUAL_V8 */

/* единый горизонтальный шаг для финансовых сеток */
.finance-accounts-grid,
.finance-bottom-grid,
.finance-summary-grid{
  column-gap: 18px !important;
}

/* 2 ровные колонки без перекоса */
.finance-accounts-grid,
.finance-bottom-grid{
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* убираем возможные внутренние смещения у карточек */
.finance-accounts-grid > *,
.finance-bottom-grid > *,
.finance-summary-grid > *{
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  justify-self: stretch !important;
}

/* на мобиле одна колонка */
@media (max-width: 900px){
  .finance-accounts-grid,
  .finance-bottom-grid{
    grid-template-columns: 1fr !important;
    column-gap: 0 !important;
  }
}


/* SAKURA_FINANCE_ROW_GAP_V9 */

/* Steam/Gifts -> Долги/Подписки:
   такой же вертикальный отступ, как внутри сетки источников */
@media(min-width:901px){
  .finance-summary-grid{
    margin-top:14px !important;
  }
}

@media(max-width:900px){
  .finance-summary-grid{
    margin-top:10px !important;
  }
}


/* SAKURA_FINANCE_DEBTS_COMPACT_V10 */

@media(min-width:901px){

  /* Вся страница долгов немного плотнее */
  .finance-debts{
    display:grid;
    gap:12px;
  }

  /* Верхний блок "Долги / 22 800 ₽" */
  .finance-debts > .finance-section-head{
    min-height:0 !important;
    padding:16px 18px !important;
  }

  .finance-debts > .finance-section-head h2{
    margin:5px 0 2px !important;
    font-size:26px !important;
    line-height:1 !important;
  }

  .finance-debts > .finance-section-head small{
    font-size:11px;
  }

  /* "Добавить долг" — аккуратная узкая строка */
  .finance-debts > .finance-add-card{
    min-height:0 !important;
  }

  .finance-debts > .finance-add-card > summary{
    padding:12px 16px !important;
    line-height:1.2;
  }

  /* Список долгов */
  .finance-debts .finance-list{
    gap:12px !important;
  }

  /* Сами карточки */
  .finance-debt-card{
    padding:15px 16px !important;
    min-height:0 !important;
    height:auto !important;
  }

  /* Заголовок долга */
  .finance-debt-top{
    align-items:center !important;
  }

  .finance-debt-top > div > b{
    font-size:15px;
    line-height:1.2;
  }

  .finance-debt-top > div > small{
    margin-top:2px !important;
  }

  /* ACTIVE компактнее */
  .finance-debt-top .pill{
    padding:6px 10px !important;
    font-size:9px !important;
  }

  /* Три суммы */
  .finance-debt-money{
    margin-top:12px !important;
    gap:10px !important;
  }

  .finance-debt-money > div{
    padding:9px 10px !important;
    min-height:48px;
    display:flex;
    flex-direction:column;
    justify-content:center;
  }

  .finance-debt-money span{
    font-size:9px !important;
  }

  .finance-debt-money strong,
  .finance-debt-money b{
    margin-top:3px !important;
    font-size:13px !important;
  }

  /* Кнопки сразу под суммами */
  .finance-debt-actions{
    margin-top:10px !important;
    gap:7px !important;
  }

  .finance-debt-actions .finance-mini-btn{
    padding:8px 11px !important;
    font-size:10px !important;
    flex:0 0 auto !important;
  }

  /* История платежей тоже без лишнего воздуха */
  .finance-payment-history{
    margin-top:10px !important;
    padding-top:8px !important;
  }
}

/* Телефон оставляем удобным, только чуть выравниваем интервалы */
@media(max-width:900px){
  .finance-debts{
    gap:9px;
  }

  .finance-debt-card{
    padding:12px !important;
  }

  .finance-debt-money{
    margin-top:10px !important;
  }

  .finance-debt-actions{
    margin-top:9px !important;
  }
}


/* SAKURA_FINANCE_SUBS_COMPACT_V11 */

@media(min-width:901px){

  .finance-subscriptions{
    display:grid;
    gap:12px;
  }

  /* Верхний блок "Подписки / 4" */
  .finance-subscriptions > .finance-section-head{
    min-height:0 !important;
    padding:16px 18px !important;
  }

  .finance-subscriptions > .finance-section-head h2{
    margin:5px 0 2px !important;
    font-size:26px !important;
    line-height:1 !important;
  }

  .finance-subscriptions > .finance-section-head small{
    font-size:11px;
  }

  /* Добавить подписку */
  .finance-subscriptions > .finance-add-card{
    min-height:0 !important;
  }

  .finance-subscriptions > .finance-add-card > summary{
    padding:12px 16px !important;
    line-height:1.2;
  }

  .finance-subscriptions .finance-list{
    gap:12px !important;
  }

  /* Карточка подписки */
  .finance-sub-card{
    padding:14px 16px !important;
    min-height:0 !important;
    height:auto !important;
  }

  .finance-sub-top{
    align-items:center !important;
  }

  .finance-sub-top > div > b{
    font-size:15px !important;
    line-height:1.2;
  }

  .finance-sub-top > div > small{
    margin-top:2px !important;
    font-size:9px !important;
  }

  .finance-sub-top > strong{
    font-size:16px !important;
    line-height:1 !important;
  }

  /* Следующая оплата — одна аккуратная строка */
  .finance-sub-due{
    margin-top:11px !important;
    padding:9px 11px !important;

    display:grid !important;
    grid-template-columns:auto minmax(0,1fr) auto !important;
    align-items:center !important;
    column-gap:14px !important;
    row-gap:0 !important;
  }

  .finance-sub-due span{
    font-size:9px !important;
    white-space:nowrap;
  }

  .finance-sub-due b{
    font-size:11px !important;
    text-align:center !important;
    white-space:nowrap;
  }

  .finance-sub-due small{
    grid-column:auto !important;
    margin:0 !important;
    font-size:9px !important;
    text-align:right;
    white-space:nowrap;
  }

  /* Кнопки сразу после даты */
  .finance-sub-actions{
    margin-top:9px !important;
    gap:7px !important;
  }

  .finance-sub-actions .finance-mini-btn{
    flex:0 0 auto !important;
    padding:8px 11px !important;
    font-size:10px !important;
  }
}

/* На телефоне снова складываем дату удобнее */
@media(max-width:900px){

  .finance-subscriptions{
    gap:9px;
  }

  .finance-sub-card{
    padding:12px !important;
  }

  .finance-sub-due{
    margin-top:9px !important;
    padding:9px !important;

    grid-template-columns:minmax(0,1fr) auto !important;
    gap:3px 8px !important;
  }

  .finance-sub-due span{
    grid-column:1;
  }

  .finance-sub-due b{
    grid-column:2;
    text-align:right !important;
  }

  .finance-sub-due small{
    grid-column:1 / -1 !important;
    text-align:left;
  }

  .finance-sub-actions{
    margin-top:8px !important;
  }
}


/* SAKURA_BONJOUR_WIDE_V3 */

/* ПК: Bonjour использует всю доступную ширину, как Finance */
@media(min-width:901px){

  .niche-placeholder-wrap.bonjour-live{
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }

  .bonjour-live{
    width:100% !important;
    max-width:none !important;
  }

  .bonjour-hero{
    width:100%;
    padding:20px 22px !important;
  }

  /* 4 верхние метрики шире и с нормальным воздухом */
  .bonjour-metrics{
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:16px !important;
    margin-top:16px !important;
  }

  .bonjour-metrics .metric{
    min-width:0;
    padding:16px !important;
  }

  /* Основные карточки 2x2/2 колонки */
  .bonjour-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    column-gap:16px !important;
    row-gap:16px !important;
    margin-top:16px !important;
  }

  .bonjour-card{
    min-width:0;
    width:100%;
    padding:18px !important;
  }

  /* Чуть больше расстояния внутри карточек */
  .bonjour-stat-list{
    margin-top:12px !important;
  }

  .bonjour-traffic{
    gap:12px !important;
    margin-top:12px !important;
  }

  .bonjour-service-row{
    padding-top:11px !important;
    padding-bottom:11px !important;
  }
}

/* Телефон оставляем компактным */
@media(max-width:900px){
  .niche-placeholder-wrap.bonjour-live,
  .bonjour-live{
    width:100% !important;
    max-width:100% !important;
  }
}


/* SAKURA_DISCORD_LAYOUT_V2 */

.pc-discord-card{
  min-width:0 !important;
  overflow:hidden !important;
  padding:16px !important;
}

/* Верх карточки */
.pc-discord-card .card-head{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:12px !important;
  min-width:0;
}

.pc-discord-card .card-head > div{
  min-width:0;
  flex:1 1 auto;
}

.pc-discord-card .card-head h3{
  margin-top:3px !important;
  line-height:1.15 !important;
}

.pc-discord-card .card-head .pill{
  flex:0 0 auto;
  white-space:nowrap;
}

/* Статус Discord */
.pc-discord-state{
  margin-top:12px !important;
  min-width:0;
}

.pc-discord-state b{
  display:block;
  max-width:100%;
  white-space:normal !important;
  overflow-wrap:anywhere;
  line-height:1.3 !important;
}

.pc-discord-state small{
  display:block;
  margin-top:5px !important;
  line-height:1.3 !important;
  white-space:normal !important;
  overflow-wrap:anywhere;
}

/* 3 одинаковые кнопки */
.pc-discord-actions-3{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:9px !important;
  margin-top:14px !important;
}

.pc-discord-actions-3 button{
  width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  padding:10px 8px !important;
  line-height:1.15 !important;
  white-space:normal !important;
  text-align:center !important;
}

.pc-discord-actions-3 button:last-child{
  grid-column:auto !important;
  width:100% !important;
}

/* Нижняя поясняющая строка */
.pc-discord-card > small,
.pc-discord-card .safe-note{
  display:block;
  margin-top:12px !important;
  padding-top:9px !important;
  border-top:1px solid var(--line);
  line-height:1.35 !important;
  white-space:normal !important;
  overflow-wrap:anywhere;
  opacity:.58;
}

/* На средних ПК не оставляем Discord в слишком узкой колонке */
@media(min-width:901px) and (max-width:1350px){
  .pc-discord-card{
    grid-column:1 / -1 !important;
  }
}

/* Телефон */
@media(max-width:900px){
  .pc-discord-card{
    padding:13px !important;
  }

  .pc-discord-actions-3{
    gap:6px !important;
  }

  .pc-discord-actions-3 button{
    padding:9px 5px !important;
    font-size:11px !important;
  }
}

/* Совсем узко — две кнопки сверху, статус на всю ширину */
@media(max-width:430px){
  .pc-discord-actions-3{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .pc-discord-actions-3 button:last-child{
    grid-column:1 / -1 !important;
  }
}


/* SAKURA_CRYPTO_POLISH_V2 */

.crypto-bot-state{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  max-width:100%;
  padding:6px 10px;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
  line-height:1;
  letter-spacing:.02em;
}

.crypto-bot-state.ok{
  background:rgba(93,220,150,.10);
  border:1px solid rgba(93,220,150,.22);
}

.crypto-bot-state.bad{
  background:rgba(255,105,125,.10);
  border:1px solid rgba(255,105,125,.22);
}

.crypto-last-activity{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:14px !important;
}

.crypto-last-activity-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.crypto-activity-state{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 9px;
  border-radius:999px;
  font-size:9px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
}

.crypto-activity-state.fresh{
  background:rgba(93,220,150,.09);
  border:1px solid rgba(93,220,150,.20);
}

.crypto-activity-state.stale{
  background:rgba(239,198,111,.08);
  border:1px solid rgba(239,198,111,.18);
}

@media(max-width:900px){
  .crypto-last-activity{
    align-items:flex-start !important;
    flex-direction:column !important;
    gap:7px !important;
  }

  .crypto-activity-state{
    white-space:normal;
  }
}


/* SAKURA_STEAM_HOLD_V1 */

.finance-steam-hold{
  margin-top:10px;
  padding:10px 11px;
  border-radius:12px;
  border:1px solid rgba(239,198,111,.16);
  background:rgba(239,198,111,.055);
  min-width:0;
}

.finance-steam-hold-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.finance-steam-hold-top>div{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}

.finance-steam-hold-top span{
  font-size:9px;
  opacity:.65;
}

.finance-steam-hold-top strong{
  font-size:12px;
  line-height:1.2;
}

.finance-steam-hold-pill{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 8px;
  border-radius:999px;
  border:1px solid rgba(239,198,111,.20);
  background:rgba(239,198,111,.07);
  font-size:9px !important;
  font-weight:800;
  opacity:1 !important;
}

.finance-steam-hold-meta{
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin-top:7px;
  padding-top:7px;
  border-top:1px solid rgba(255,255,255,.045);
}

.finance-steam-hold-meta span{
  min-width:0;
  font-size:9px;
  opacity:.55;
  line-height:1.25;
}

.finance-steam-hold-meta span:last-child{
  text-align:right;
}

@media(max-width:900px){
  .finance-steam-hold-top{
    align-items:flex-start;
  }

  .finance-steam-hold-meta{
    flex-direction:column;
    gap:3px;
  }

  .finance-steam-hold-meta span:last-child{
    text-align:left;
  }
}


/* SAKURA_FINANCE_AUTO_HEIGHT_V12 */

/*
  Старый GRID_EQUAL фиксировал карточки на 160px.
  Теперь строка сама становится выше по содержимому,
  при этом соседняя карточка растягивается до той же высоты.
*/
@media(min-width:901px){

  .finance-accounts-grid{
    align-items:stretch !important;
  }

  .finance-accounts-grid > .card,
  .finance-account-card{
    height:auto !important;
    min-height:160px !important;
    max-height:none !important;
  }

  /* Steam Hold */
  .finance-steam-hold{
    margin-top:9px !important;
    margin-bottom:0 !important;
    padding:9px 11px !important;
  }

  .finance-steam-hold-top strong{
    margin:0 !important;
    font-size:11px !important;
  }

  .finance-steam-hold-meta{
    margin-top:6px !important;
    padding-top:6px !important;
  }
}

/* На телефоне высоту вообще не ограничиваем */
@media(max-width:900px){

  .finance-accounts-grid > .card,
  .finance-account-card{
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
  }
}


/* SAKURA_FARM_SERVICES_CARD_V1 */
.farm-services-card{margin-bottom:16px}
.farm-service-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 0;border-top:1px solid var(--line)}
.farm-service-row>div:first-child{min-width:0}
.farm-service-row b,.farm-service-row small{display:block}
.farm-service-row small{margin-top:4px;color:var(--muted);font-size:9px}
.farm-service-control{display:flex;align-items:center;gap:8px;flex-shrink:0}
.farm-service-control button{min-height:38px}
.seller-shot-block{padding:14px 0;border-top:1px solid var(--line)}
.seller-shot-block>small{display:block;margin-top:8px;color:var(--muted)}
.farm-sales-list{display:grid;gap:7px}
.farm-sale-row{display:flex;gap:9px;align-items:center;padding:10px 11px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.018)}
.farm-sale-row>span{font-size:18px}
.farm-sale-row p{margin:0;min-width:0}
.farm-sale-row b,.farm-sale-row small{display:block}
.farm-sale-row small{margin-top:3px;color:var(--muted);font-size:9px}
@media(max-width:520px){.farm-service-row{align-items:flex-start;flex-direction:column}.farm-service-control{width:100%;justify-content:space-between}.farm-service-control button{min-width:130px}}

/* SAKURA_FARM_SERVICES_CSS_V2 */

.farm-services-card{
  margin-bottom:16px;
}

.farm-service-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:15px 0;
  border-top:1px solid var(--line);
}

.farm-service-row b,
.farm-service-row small{
  display:block;
}

.farm-service-row small{
  margin-top:4px;
  color:var(--muted);
  font-size:10px;
}

.farm-service-control{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}

.farm-service-control button{
  min-height:38px;
}

.seller-shot-block{
  padding:14px 0;
  border-top:1px solid var(--line);
}

.seller-shot-frame{
  margin-top:10px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid var(--line);
  background:#08080b;
}

.seller-shot-frame img{
  display:block;
  width:100%;
  height:auto;
}

.seller-shot-block>small{
  display:block;
  margin-top:8px;
  color:var(--muted);
}

.farm-sales-list{
  display:grid;
  gap:7px;
  margin-top:9px;
}

.farm-sale-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 11px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.018);
}

.farm-sale-row>span{
  font-size:18px;
}

.farm-sale-row b,
.farm-sale-row small{
  display:block;
}

.farm-sale-row small{
  margin-top:3px;
  color:var(--muted);
  font-size:10px;
}

@media(max-width:520px){

  .farm-service-row{
    flex-direction:column;
    align-items:flex-start;
  }

  .farm-service-control{
    width:100%;
    justify-content:space-between;
  }

  .farm-service-control button{
    min-width:130px;
  }
}



/* SAKURA_P7_STEAM_SECURITY_CSS_V1 */

.steam-security-card{
  padding:20px;
  margin-bottom:16px;
  background:
    radial-gradient(
      circle at 96% 0,
      rgba(99,213,144,.09),
      transparent 38%
    ),
    rgba(20,22,31,.94);
}

.steam-security-card .card-head{
  margin-bottom:14px;
}

.steam-security-grid{
  display:grid;
  grid-template-columns:
    repeat(6,minmax(0,1fr));
  gap:8px;
}

.steam-security-grid>div{
  min-width:0;
  padding:11px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.018);
}

.steam-security-grid small,
.steam-security-grid b{
  display:block;
}

.steam-security-grid small{
  color:var(--muted);
  font-size:9px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.steam-security-grid b{
  margin-top:5px;
  font-size:16px;
}

.steam-security-times{
  margin-top:12px;
}

.steam-security-new{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  margin-top:12px;
}

.steam-security-new>span{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:5px 8px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--muted);
  font-size:9px;
}

.steam-security-new>span b{
  color:#e9ebf2;
}

.steam-security-new>small{
  color:var(--muted);
  font-size:9px;
}

.steam-account-security .status{
  display:inline-block;
}

.row-badges{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:4px;
}

@media(max-width:760px){
  .steam-security-card{
    padding:15px!important;
    margin-bottom:12px!important;
  }

  .steam-security-grid{
    grid-template-columns:
      repeat(2,minmax(0,1fr));
  }

  .steam-security-grid>div{
    padding:9px;
  }

  .steam-security-times .kv{
    width:100%;
  }
}

