/* portfolio-ui.css — cabinet polish (menu "Ещё", detail pages, tables, a11y). Theme: #03150f #0a1e16 #2BE3A0 #F5C451 #FF5A6E */
.cabinet-body{--pui-gold:#F5C451;--pui-mint:#2BE3A0;--pui-red:#FF5A6E;--pui-gap:12px}
.cabinet-body :focus-visible{outline:2px solid var(--pui-mint);outline-offset:2px;border-radius:10px}
.cabinet-body button,.cabinet-body a.desk-button,.cabinet-body select,.cabinet-body input{touch-action:manipulation}

/* Typography + card rhythm */
.cabinet-body .desk-screen>h1,.cabinet-body #moreDetail h1{margin:0 0 6px;font-size:clamp(22px,5.5vw,28px);line-height:1.2;letter-spacing:-.01em}
.cabinet-body .desk-kicker{color:var(--pui-mint);letter-spacing:.08em}
.cabinet-body .desk-lead{max-width:62ch}
.cabinet-body .desk-card{margin-bottom:var(--pui-gap);padding:18px;border-radius:18px;box-shadow:0 1px 0 #ffffff08 inset,0 8px 24px #00000033}
.cabinet-body .desk-card h2{margin:0 0 8px;font-size:16px;line-height:1.3}
.cabinet-body .desk-card p{line-height:1.55}

/* More menu: grouped, readable rows with chevron, 56px+ targets */
.cabinet-body .more-links{padding:6px;border-radius:18px}
.cabinet-body .more-links button,.cabinet-body .more-links a{min-height:56px;padding:8px 12px;border-radius:12px;border-bottom:0;transition:background .15s}
.cabinet-body .more-links button+button{box-shadow:0 -1px 0 #ffffff0d}
.cabinet-body .more-links button:hover,.cabinet-body .more-links button:active{background:#0e2a1f}
.cabinet-body .more-links span{width:36px;height:36px;font-size:15px;background:#123327;color:var(--pui-mint)}
.cabinet-body .more-links b{font-size:14px;font-weight:600}
.cabinet-body .more-links em:after{content:"›";font-size:22px;line-height:1;color:var(--desk-muted)}
.cabinet-body .more-links:empty:before{content:"Загрузка…";display:block;padding:20px;color:var(--desk-muted);text-align:center;font-size:13px}
.cabinet-body .profile-card{padding:16px}
.cabinet-body .profile-card p{margin:2px 0 0;color:var(--desk-muted);font-size:12px;overflow-wrap:anywhere}
.cabinet-body .profile-card .status-chip{position:static;margin-left:auto;font-size:10px;padding:5px 10px}
.cabinet-body #deskLogout{margin-top:6px;min-height:48px;border-color:#ff5a6e55;color:var(--pui-red);background:#ff5a6e10}
.cabinet-body #deskLogout:hover{background:#ff5a6e1f}

/* Detail pages */
.cabinet-body #moreDetail{animation:desk-in .25s ease}
.cabinet-body #moreBack{position:sticky;top:78px;z-index:10;min-height:44px;margin:0 0 12px;padding:0 16px;backdrop-filter:blur(12px);background:#0b2419ee}
.cabinet-body #moreBack:before{content:"‹ "}
.cabinet-body #moreDetailBody{display:grid;gap:var(--pui-gap)}
.cabinet-body .rule-list{gap:var(--pui-gap)}
.cabinet-body .rule-list article{border-left:3px solid #2BE3A055}
.cabinet-body .rule-list article h2{font-size:15px;color:#f1fbf6}
.cabinet-body .rule-list article p{font-size:14px;line-height:1.6}
.cabinet-body .rule-meta{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:var(--pui-gap)}
.cabinet-body .rule-meta div{padding:14px;border-color:#ffffff12;background:#0a1e16}
.cabinet-body .rule-meta small{font-size:11px;text-transform:uppercase;letter-spacing:.05em}
.cabinet-body a.desk-button.accent{min-height:48px}

/* Lists, empty / loading states */
.cabinet-body .desk-list{gap:8px}
.cabinet-body .desk-list:empty:before,.cabinet-body .ledger-list:empty:before{content:"Пока пусто";display:block;padding:22px 8px;color:var(--desk-muted);text-align:center;font-size:13px}
.cabinet-body .desk-empty{padding:26px 12px;border:1px dashed #ffffff18;border-radius:14px;background:#0a1e1688;font-size:13px}
.cabinet-body .desk-row,.cabinet-body .ledger-row{border-radius:14px}

/* PnL colours */
.cabinet-body .positive{color:var(--pui-mint)}
.cabinet-body .negative,.cabinet-body .loss,.cabinet-body .down{color:var(--pui-red)}
.cabinet-body .gold{color:var(--pui-gold)}

/* Tables: horizontal scroll, never break layout */
.cabinet-body table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border-collapse:collapse;font-size:13px}
.cabinet-body table th,.cabinet-body table td{padding:10px 12px;white-space:nowrap;text-align:left;border-bottom:1px solid #ffffff10}
.cabinet-body table th{position:sticky;top:0;background:#0a1e16;color:var(--desk-muted);font-weight:600;font-size:11px;text-transform:uppercase;letter-spacing:.05em}
.cabinet-body table td{font-variant-numeric:tabular-nums}

/* Mobile: 44px targets, comfortable spacing */
@media(max-width:600px){
  .cabinet-body .desk-pill,.cabinet-body .desk-mini,.cabinet-body .icon-button,.cabinet-body .desk-segment button,.cabinet-body .desk-sort button,.cabinet-body .desk-tags button,.cabinet-body .quick-amounts button,.cabinet-body .desk-language button{min-height:44px}
  .cabinet-body .desk-language button{min-width:44px}
  .cabinet-body .desk-nav button{min-height:52px}
  .cabinet-body .desk-card{padding:16px}
  .cabinet-body #moreBack{top:70px}
  .cabinet-body .rule-meta{grid-template-columns:1fr 1fr}
}
@media(min-width:900px){
  .cabinet-body .more-links{max-width:560px}
}
@media(prefers-reduced-motion:reduce){.cabinet-body #moreDetail{animation:none}}

/* More page: two-column layout + bets history */
.cabinet-body .more-grid{display:grid;gap:16px;grid-template-columns:minmax(0,1fr);align-items:start}
.cabinet-body .more-side,.cabinet-body .more-main{min-width:0;display:grid;gap:12px;align-content:start}
.cabinet-body .more-side .desk-card,.cabinet-body .more-main .desk-card{margin-bottom:0}
.cabinet-body .more-links h3{margin:0;padding:12px 12px 6px;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--desk-muted);font-weight:700}
.cabinet-body .more-links a{display:grid;width:100%;grid-template-columns:38px 1fr auto;align-items:center;gap:9px;box-sizing:border-box}
.cabinet-body .more-links a+a,.cabinet-body .more-links button+a,.cabinet-body .more-links a+button{box-shadow:0 -1px 0 #ffffff0d}
.cabinet-body .more-links a:hover{background:#0e2a1f}
.cabinet-body .more-links{max-width:none}
.cabinet-body .bh-head{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;margin-bottom:12px}
.cabinet-body .bh-head h2{margin:0;font-size:18px}
.cabinet-body .bh-seg{display:inline-flex;gap:4px;padding:4px;border:1px solid var(--desk-line);border-radius:12px;background:#03120d;flex-wrap:wrap}
.cabinet-body .bh-seg button{min-height:34px;padding:0 12px;border:0;border-radius:8px;background:none;color:var(--desk-muted);font-weight:700;font-size:13px;cursor:pointer}
.cabinet-body .bh-seg button.on{background:#123327;color:var(--desk-accent)}
.cabinet-body .bh-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:14px}
.cabinet-body .bh-stats>div{padding:10px 12px;border:1px solid var(--desk-line);border-radius:12px;background:#07190f}
.cabinet-body .bh-stats small{display:block;color:var(--desk-muted);font-size:11px;margin-bottom:3px}
.cabinet-body .bh-stats b{font-size:15px;overflow-wrap:anywhere}
.cabinet-body .bh-stats em{display:block;font-style:normal;color:var(--desk-muted);font-size:11px;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cabinet-body .bh-sub{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;margin:14px 0 8px}
.cabinet-body .bh-sub h3{margin:0;font-size:14px}
.cabinet-body .bh-chart{width:100%;height:150px;display:block;border:1px solid var(--desk-line);border-radius:12px;background:#07190f}
.cabinet-body .bh-chart .bp{fill:#39f2b1}.cabinet-body .bh-chart .bn{fill:#ff8d93}.cabinet-body .bh-chart .bz{stroke:#86a39866;stroke-width:1}
.cabinet-body .bh-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
.cabinet-body .bh-table{width:100%;border-collapse:collapse;font-size:12px;min-width:560px}
.cabinet-body .bh-table.compact{min-width:0}
.cabinet-body .bh-table th{padding:6px 8px;text-align:left;color:var(--desk-muted);font-weight:600;border-bottom:1px solid var(--desk-line);white-space:nowrap}
.cabinet-body .bh-table td{padding:8px;border-bottom:1px solid #ffffff0a;vertical-align:top}
.cabinet-body .bh-table td.num,.cabinet-body .bh-table th.num{text-align:right;white-space:nowrap}
.cabinet-body .bh-table td.ttl{min-width:160px;max-width:260px;overflow-wrap:anywhere}
.cabinet-body .bh-badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:700;border:1px solid var(--desk-line);white-space:nowrap}
.cabinet-body .bh-badge.win{color:#39f2b1;border-color:#39f2b155}.cabinet-body .bh-badge.lose{color:#ff8d93;border-color:#ff8d9355}
.cabinet-body .bh-badge.open{color:#9cc9ff;border-color:#9cc9ff55}.cabinet-body .bh-badge.void{color:var(--desk-muted)}
.cabinet-body .bh-more{margin-top:10px}
@media(min-width:900px){
  .cabinet-body .desk-screen[data-screen=more].active{max-width:1240px}
  .cabinet-body .more-grid{grid-column:1/-1;grid-template-columns:minmax(300px,380px) minmax(0,1fr);gap:20px}
  .cabinet-body .bh-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* open bets / need closing */
.cabinet-body .ring-wrap{display:flex;flex-direction:column;align-items:center;gap:4px}
.cabinet-body .ring-label{font-size:10px;color:var(--desk-muted);text-align:center;max-width:96px;line-height:1.2}
.cabinet-body #ringValue.positive{color:#39f2b1}.cabinet-body #ringValue.negative{color:#ff8d93}
.cabinet-body .ob-st{display:inline-block;padding:1px 7px;border-radius:999px;font-size:11px;font-weight:700;border:1px solid var(--desk-line);white-space:nowrap;color:#9cc9ff}
.cabinet-body .ob-st.paused,.cabinet-body .ob-st.ended{color:#ffd27a;border-color:#ffd27a55}
.cabinet-body .ob-st.closed{color:#ff8d93;border-color:#ff8d9355}
.cabinet-body .ob-note{margin:6px 0 10px;padding:10px 12px;border:1px solid #ffd27a55;border-radius:12px;background:#1d1a0b}
.cabinet-body .ob-note p{margin:4px 0 8px;font-size:12px;color:var(--desk-muted)}
.cabinet-body .ob-need td,.cabinet-body .desk-row.ob-need{background:#ffd27a0d}
.cabinet-body .ob-wait{font-size:11px;color:#ffd27a;white-space:nowrap}
