/* TradeCraftly · admin.php styles (colour tokens are in base.css) */
* {
    box-sizing: border-box
}

html,
body {
    background: var(--bg)
}

body {
    margin: 0;
    color: var(--fg);
    font-family: var(--ui);
    font-size: 14px;
    padding: 0 16px
}

a {
    color: var(--link)
}

button,
input,
select {
    font: inherit
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px
}

.brandbar {
    margin-inline: -16px;
    padding: 10px 16px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 5
}

.brandin {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: var(--fg)
}

.brand img {
    height: 32px;
    width: auto;
    border-radius: 6px
}

.brand b {
    font-size: 16px
}

.brand small {
    display: block;
    font-size: 11px;
    color: var(--muted)
}

.navlinks {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--input-line);
    border-radius: 999px;
    background: var(--well);
    color: var(--fg2);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600
}

.pill:hover {
    border-color: var(--accent);
    color: var(--fg)
}

main {
    max-width: 1200px;
    margin: 22px auto 40px;
    display: flex;
    flex-direction: column;
    gap: 16px
}

.top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap
}

h1 {
    font-size: 22px;
    margin: 0
}

.top span {
    color: var(--muted);
    font-size: 12.5px
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0
}

.card h2 {
    margin: 0;
    font-size: 15px
}

.card p {
    margin: 0;
    color: var(--fg3);
    line-height: 1.5
}

.tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden
}

.tiles div {
    background: var(--panel);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px
}

.tiles b {
    font: 600 22px var(--mono)
}

.tiles span {
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted)
}

.tiles small {
    font-size: 11.5px;
    color: var(--dim)
}

.split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px
}

.bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 90px;
    padding-top: 6px
}

.bars div {
    flex: 1;
    background: rgba(124, 156, 255, .55);
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    position: relative
}

.bars div:hover {
    background: var(--accent)
}

.bars div span {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    font: 600 10px var(--mono);
    color: var(--fg3);
    margin-bottom: 2px
}

.axis {
    display: flex;
    justify-content: space-between;
    font-size: 10.5px;
    color: var(--dim)
}

.tools {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center
}

.txt,
.sel {
    background: var(--well);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--fg);
    outline: none
}

.txt:focus,
.sel:focus {
    border-color: var(--accent)
}

.tools .txt {
    flex: 1;
    min-width: 200px
}

.tablebox {
    overflow-x: auto;
    margin: 0 -18px;
    padding: 0 18px
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px
}

th {
    font: 600 10.5px var(--ui);
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap
}

td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line2);
    vertical-align: middle;
    white-space: nowrap
}

td.num {
    font-family: var(--mono);
    text-align: right
}

th.num {
    text-align: right
}

td .em {
    font-weight: 600;
    color: var(--fg);
    display: block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

td .nm {
    display: block;
    font-size: 12px;
    color: var(--muted)
}

tbody tr:hover td {
    background: rgba(255, 255, 255, .02)
}

.tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px
}

.tag.ok {
    background: rgba(61, 220, 132, .14);
    color: #8ff5bf
}

.tag.off {
    background: rgba(255, 107, 107, .14);
    color: #f3a3a3
}

.tag.adm {
    background: rgba(124, 156, 255, .18);
    color: #b8c6ff
}

.tag.usr {
    background: var(--line2);
    color: var(--fg3)
}

.btn {
    padding: 7px 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--input-line);
    background: transparent;
    color: var(--fg2);
    font-size: 12.5px
}

.btn:hover {
    border-color: var(--accent);
    color: var(--fg)
}

.btn.main {
    border: 0;
    background: var(--accent);
    color: var(--on-accent)
}

.btn.danger {
    border: 0;
    background: var(--put);
    color: #2a0606
}

.btn.warn {
    border-color: rgba(255, 107, 107, .5);
    color: #f3a3a3
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed
}

.pager {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    font-size: 12.5px;
    color: var(--muted)
}

/* admin activity */
.actcard {
    display: flex;
    flex-direction: column;
    min-width: 0
}

.acthead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    margin-bottom: 8px
}

.acthead h2 {
    margin: 0
}

.seg {
    display: flex;
    flex-wrap: wrap;
    gap: 4px
}

.seg button {
    all: unset;
    cursor: pointer;
    font-size: 11.5px;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--fg3);
    border: 1px solid var(--line2)
}

.seg button:hover {
    color: var(--fg)
}

.seg button[aria-selected="true"] {
    color: var(--fg);
    background: var(--well);
    border-color: var(--line)
}

.seg button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px
}

.audit {
    max-height: 560px;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0 -4px;
    padding: 0 4px
}

.audit .ev {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 9px 0;
    border-top: 1px solid var(--line2);
    font-size: 12.5px
}

.audit .ev:first-child {
    border-top: 0
}

.audit .ev>i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    background: var(--dim)
}

.audit .g-users>i {
    background: #8ea2ff
}

.audit .g-access>i {
    background: #3ecf8e
}

.audit .g-plans>i {
    background: #f0cf86
}

.audit .g-settings>i {
    background: #ff8a8a
}

.audit .evb {
    min-width: 0
}

.audit .evt {
    color: var(--fg3);
    line-height: 1.45;
    overflow-wrap: anywhere
}

.audit .evt b {
    color: var(--fg);
    font-weight: 600
}

.audit .evt .tg {
    color: var(--fg2)
}

.audit .evd {
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.45;
    margin-top: 2px;
    overflow-wrap: anywhere
}

.audit time {
    color: var(--muted);
    font-size: 11.5px;
    white-space: nowrap;
    padding-top: 1px
}

.audit .muted {
    padding: 8px 0
}

.actmore {
    display: flex;
    justify-content: center;
    padding-top: 8px
}

.actmore .btn[hidden] {
    display: none
}

.muted {
    color: var(--muted)
}

.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--line);
}

.tabs button {
    border: 0;
    background: transparent;
    color: var(--fg3);
    font-weight: 600;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px
}

.tabs button[aria-selected="true"] {
    color: var(--fg);
    border-bottom-color: var(--accent)
}

.tabp[hidden] {
    display: none
}

.form {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12.5px;
    color: var(--muted)
}

.form label small,
.form small {
    font-size: 11px;
    color: var(--dim)
}

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

.form .fh {
    font-size: 12px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 4px
}

.form textarea {
    resize: vertical;
    min-height: 70px;
    font-family: var(--ui)
}

.radio {
    flex-direction: row !important;
    align-items: flex-start;
    gap: 10px !important;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer
}

.radio:has(input:checked) {
    border-color: var(--accent);
    background: rgba(124, 156, 255, .06)
}

.radio span {
    display: flex;
    flex-direction: column;
    gap: 2px
}

.radio b {
    color: var(--fg);
    font-size: 13.5px
}

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

.chk {
    flex-direction: row !important;
    align-items: center;
    gap: 8px !important;
    color: var(--fg2) !important;
    font-size: 13px !important;
    cursor: pointer
}

.planrow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-top: 1px solid var(--line2)
}

.planrow:first-child {
    border-top: 0
}

.planrow b {
    display: block;
    font-size: 13.5px
}

.planrow span {
    font-size: 12px;
    color: var(--muted)
}

.planrow.off {
    opacity: .55
}

.planrow .pf {
    display: block;
    font-size: 11.5px;
    color: #b8c6ff;
    margin-top: 2px
}

.chk input:disabled+span {
    opacity: .75
}

tr.dim td {
    opacity: .5
}

.mono {
    font-family: var(--mono)
}

.cp {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
    padding: 0 2px
}

.cp:hover {
    color: var(--accent)
}

.made {
    display: flex;
    flex-direction: column;
    gap: 6px
}

@media (max-width:640px) {

    .form .two,
    .checks {
        grid-template-columns: 1fr
    }
}

/* manage drawer */
.scrim {
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 12, .6);
    z-index: 40
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 440px;
    max-width: 100vw;
    z-index: 41;
    background: var(--panel);
    border-left: 1px solid var(--line);
    box-shadow: -20px 0 50px rgba(0, 0, 0, .45);
    display: flex;
    flex-direction: column
}

.drawer[hidden],
.scrim[hidden] {
    display: none
}

.dh {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line)
}

.dh h2 {
    margin: 0;
    font-size: 16px;
    word-break: break-all
}

.dh span {
    font-size: 12px;
    color: var(--muted)
}

.xbtn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--input-line);
    background: var(--well);
    color: var(--fg3);
    cursor: pointer;
    flex: none
}

.db {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px
}

.kv {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    font-size: 13px
}

.kv span {
    color: var(--muted)
}

.acts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.sec h3 {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted)
}

.li {
    font-size: 12.5px;
    color: var(--fg3);
    padding: 6px 0;
    border-top: 1px solid var(--line2)
}

.li:first-of-type {
    border-top: 0
}

.pw {
    font: 700 16px var(--mono);
    background: var(--well);
    border: 1px dashed var(--call);
    border-radius: 8px;
    padding: 10px 12px;
    color: #8ff5bf;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px
}

.msg {
    font-size: 12.5px;
    min-height: 1em;
    color: var(--put)
}

.msg.ok {
    color: var(--call)
}

.center {
    align-items: center;
    text-align: center
}

footer {
    max-width: 1200px;
    margin: 0 auto 30px;
    font-size: 12px;
    color: var(--dim)
}

@media (max-width:900px) {
    .split {
        grid-template-columns: 1fr
    }

    .tiles {
        grid-template-columns: 1fr 1fr
    }
}

@media (max-width:640px) {
    .hide-s {
        display: none
    }
}

@media (max-width:1200px) {
    #tab-users .tablebox .hide-s {
        display: none
    }
}

/* joined + setups: also in the user drawer */
/* Delta referrals: CSV drop zone */
.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 14px;
  border: 1.5px dashed var(--input-line, #2c3548);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: border-color .12s, background .12s
}

.drop:hover,
.drop.over {
  border-color: var(--accent, #7c9cff);
  background: rgba(124, 156, 255, .06)
}

.drop b {
  font-size: 14px
}

.drop span {
  font-size: 12px;
  color: var(--muted, #8a93a6)
}

/* full-width layout: use the whole screen, with roomier side margins on wide screens */
.brandin,
main,
footer {
    max-width: none
}

@media (min-width:900px) {
    body {
        padding: 0 28px
    }

    .brandbar {
        margin-inline: -28px;
        padding: 10px 28px
    }
}

@media (min-width:1500px) {
    .split {
        grid-template-columns: 5fr 2fr
    }
}

/* announcements list */
.newsrow {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--line2)
}

.newsrow:first-child {
    border-top: 0
}

.newsrow b {
    font-size: 14px
}

.newsrow p {
    margin: 4px 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--fg2);
    white-space: pre-line
}

.newsrow .nm {
    display: block;
    font-size: 11.5px;
    color: var(--muted)
}

.newsrow.off {
    opacity: .55
}

.newsrow .acts {
    flex: none
}

/* ---------- user page (replaces the side panel) ---------- */
.upage {
    display: flex;
    flex-direction: column;
    gap: 16px
}

.upage[hidden] {
    display: none
}

.uback {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12.5px
}

.btn.back {
    padding: 7px 14px
}

.uhero {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 22px 24px
}

.uav {
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font: 700 26px var(--ui, sans-serif);
    color: #0a0d14;
    background: linear-gradient(135deg, #7c9cff, #3ddc84)
}

.uwho {
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 5px
}

.uwho h1 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
    word-break: break-all
}

.uem {
    font-size: 13px;
    color: var(--muted)
}

.ubadges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px
}

.umeta {
    font-size: 12.5px;
    color: var(--muted)
}

.linkbtn {
    border: 0;
    background: none;
    padding: 0;
    color: var(--link, #8fb0ff);
    font: inherit;
    cursor: pointer
}

.linkbtn:hover {
    text-decoration: underline
}

.uquick {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.utiles {
    grid-template-columns: repeat(4, 1fr)
}

.usplit {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 16px;
    align-items: start
}

.ucol {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0
}

.ucol .card .fh {
    margin: 14px 0 8px
}

.unow {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13.5px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--well, #0d121c);
    border: 1px solid var(--line, #232b3b)
}

.ulocks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px
}

.ulocks span {
    font-size: 11.5px;
    color: #f0cf86;
    background: rgba(232, 182, 76, .1);
    border: 1px solid rgba(232, 182, 76, .25);
    border-radius: 999px;
    padding: 3px 10px
}

.ugrant .sel {
    flex: 1;
    min-width: 160px
}

.ugrant .txt {
    width: 90px
}

/* access history as a timeline */
.utl {
    display: flex;
    flex-direction: column
}

.utl-i {
    display: flex;
    gap: 12px;
    position: relative;
    padding: 0 0 14px
}

.utl-i::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 14px;
    bottom: 0;
    width: 2px;
    background: var(--line, #232b3b)
}

.utl-i:last-child::before {
    display: none
}

.utl-i > i {
    flex: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 3px;
    background: var(--line, #232b3b);
    border: 2px solid var(--panel, #121826);
    box-shadow: 0 0 0 1px var(--line, #232b3b)
}

.utl-i.s-active > i {
    background: #3ddc84;
    box-shadow: 0 0 0 1px #3ddc84
}

.utl-i.s-queued > i {
    background: #7c9cff;
    box-shadow: 0 0 0 1px #7c9cff
}

.utl-i b {
    font-size: 13.5px
}

.utl-i .nm {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px
}

.ulist .li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 6px;
    padding: 8px 0;
    border-top: 1px solid var(--line2, #1b2232);
    font-size: 13px
}

.ulist .li:first-child {
    border-top: 0
}

.ulist .li .nm {
    display: block;
    width: 100%;
    font-size: 11.5px;
    color: var(--muted)
}

.uempty {
    margin: 0;
    font-size: 12.5px
}

.hcnt {
    display: inline-block;
    min-width: 20px;
    padding: 0 6px;
    margin-left: 4px;
    border-radius: 10px;
    background: var(--well, #0d121c);
    border: 1px solid var(--line, #232b3b);
    font-size: 11px;
    text-align: center;
    vertical-align: 2px
}

.udanger {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 107, .3);
    background: rgba(255, 107, 107, .05)
}

.udanger .fh {
    margin-top: 0 !important;
    color: #ff8a8a
}

@media (max-width: 1000px) {
    .usplit {
        grid-template-columns: 1fr
    }
}

@media (max-width: 640px) {
    .utiles {
        grid-template-columns: 1fr 1fr
    }

    .uhero {
        padding: 18px
    }

    .uquick {
        width: 100%
    }
}

.card.uhero {
    flex-direction: row
}

/* a word (plan name) in a stat tile: smaller than a number */
.utiles b.word {
    font-size: 18px;
    line-height: 1.3;
    font-family: var(--ui, sans-serif)
}

/* payments to check */
.tag.warn {
    background: rgba(232, 182, 76, .16);
    color: #f0cf86
}

.tag[hidden] {
    display: none
}

.payhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap
}

.payhead h2 {
    margin: 0
}

.paylist {
    display: flex;
    flex-direction: column;
    margin-top: 6px
}

.payrow {
    display: grid;
    grid-template-columns: 120px minmax(160px, 1.3fr) minmax(150px, 1fr) 150px auto;
    gap: 6px 16px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--line2)
}

.payrow:first-child {
    border-top: 0
}

.payrow > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0
}

.payrow .nm {
    font-size: 11.5px;
    color: var(--muted)
}

.pr-amt b {
    font-size: 15px
}

.pr-amt span {
    font-size: 12px;
    color: var(--muted)
}

.pr-who a {
    color: var(--fg);
    font-weight: 600;
    font-size: 13.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.pr-ref {
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px !important
}

.pr-ref .mono {
    font-size: 13.5px
}

.pr-ref .nm {
    width: 100%
}

.pr-at {
    font-size: 12.5px
}

.pr-act {
    flex-direction: row !important;
    gap: 8px !important;
    justify-content: flex-end
}

.pr-rej {
    grid-column: 1 / -1;
    flex-direction: row !important;
    gap: 8px !important
}

.pr-rej[hidden] {
    display: none !important
}

.pr-rej .txt {
    flex: 1
}

.payrow.s-pending {
    background: linear-gradient(90deg, rgba(232, 182, 76, .06), transparent 40%)
}

.payrow .msg {
    grid-column: 1 / -1
}

@media (max-width: 900px) {
    .payrow {
        grid-template-columns: 1fr 1fr
    }

    .pr-act {
        grid-column: 1 / -1;
        justify-content: flex-start
    }
}

/* payments report */
.rfilters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px
}

.rfilters label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--muted)
}

.rfilters .txt {
    width: auto;
    padding: 6px 10px
}

.rfilters #rCsv {
    margin-left: auto
}

.rtiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 14px
}

.rtiles div {
    background: var(--well, #0d121c);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 3px
}

.rtiles b {
    font-size: 24px
}

.rtiles span {
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted)
}

.rtiles small {
    font-size: 12px;
    color: var(--dim, #5d667a)
}

.rsplit {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

.rtab {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px
}

.rtab th {
    text-align: left;
    font-size: 11px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line)
}

.rtab td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line2, #1b2232)
}

.rtab .num {
    text-align: right;
    font-variant-numeric: tabular-nums
}

.rtab tfoot td {
    font-weight: 700;
    border-top: 1px solid var(--line);
    border-bottom: 0
}

.rlist .nm {
    display: block;
    font-size: 11.5px;
    color: var(--muted)
}

@media (max-width: 760px) {
    .rtiles,
    .rsplit {
        grid-template-columns: 1fr
    }

    .rfilters #rCsv {
        margin-left: 0
    }
}

#payBody .fh {
    margin: 22px 0 6px;
    font-weight: 600;
    font-size: 13px;
    color: var(--fg2, #c9d1e0)
}

#payBody .tablebox {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch
}

.rlist td,
.rlist th {
    white-space: nowrap
}

.tabs {
    overflow-x: auto;
    scrollbar-width: none
}

.tabs::-webkit-scrollbar {
    display: none
}

/* voided payments and payments whose account was deleted */
.pr-act {
    align-items: center
}

.pr-void {
    flex-wrap: wrap
}

.pr-void .nm {
    width: 100%
}

.pr-who .gone {
    font-size: 13.5px;
    color: var(--fg3, #aab3c5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.payrow.s-voided .pr-amt b {
    text-decoration: line-through;
    color: var(--muted)
}

.rvoid td {
    color: var(--muted)
}

/* markets on plans */
.mtag {
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 600;
    border: 1px solid var(--line);
    color: var(--fg3);
    background: var(--well, #0d121c)
}

.mtag.m-india {
    color: #ffb36b;
    border-color: rgba(255, 179, 107, .35)
}

.mtag.m-all {
    color: var(--accent);
    border-color: rgba(124, 156, 255, .4)
}

.mkset {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px 12px;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.mkset legend {
    font-size: 12px;
    color: var(--muted);
    padding: 0 4px
}

.mkset .radio {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1 1 140px;
    padding: 8px 10px;
    border: 1px solid var(--line2);
    border-radius: 8px;
    cursor: pointer
}

.mkset .radio:has(input:checked) {
    border-color: var(--accent)
}

.mkset .radio span {
    display: flex;
    flex-direction: column;
    gap: 1px
}

.mkset .radio small {
    font-size: 11px;
    color: var(--muted)
}

/* ---------- plans & codes (cards, list, drawers) ---------- */
.sechead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap
}

.sechead h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600
}

.sechead h2 small {
    margin-left: 8px;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--muted)
}

.sechead-r {
    display: flex;
    align-items: center;
    gap: 10px
}

.seg.box {
    flex-wrap: nowrap;
    gap: 2px;
    padding: 3px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px
}

.seg.box button {
    padding: 5px 11px;
    border-radius: 5px;
    border: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted)
}

.seg.box button[aria-selected="true"] {
    background: #2a3550;
    color: var(--fg)
}

.seg.box.wide button {
    flex: 1;
    text-align: center;
    padding: 6px
}

.btn.sm {
    padding: 6px 12px;
    font-size: 12px
}

.btn.quiet {
    color: var(--fg3)
}

.pgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px
}

.pcard {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0
}

.pcard.off {
    opacity: .55
}

.pc-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px
}

.pc-top h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    min-width: 0;
    overflow-wrap: anywhere
}

.pc-top .mtag {
    margin-left: 0;
    flex: none
}

.pc-price {
    display: flex;
    align-items: baseline;
    gap: 6px
}

.pc-price b {
    font-family: var(--mono);
    font-size: 22px;
    font-weight: 700
}

.pc-price b.none {
    font-family: var(--ui);
    font-size: 15px;
    color: var(--muted)
}

.pc-price span {
    font-size: 12px;
    color: var(--muted)
}

.pc-stats {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--muted);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line2)
}

.pc-stats b {
    font-family: var(--mono);
    color: var(--fg)
}

.pc-stats b.g,
td.g {
    color: var(--call)
}

.pc-feat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    line-height: 1.45;
    flex: 1
}

.pc-feat .pf,
.ptab .pf {
    color: #a9bdff
}

.pc-feat .pl {
    color: var(--muted)
}

.pc-acts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px
}

.pc-acts .btn {
    padding: 7px
}

.mtag {
    font-weight: 700;
    letter-spacing: .03em;
    border-radius: 5px
}

/* plans as a list */
.card.plist {
    padding: 0
}

.plist .tablebox {
    margin: 0;
    padding: 0
}

.ptab th,
.ptab td {
    padding-left: 18px;
    padding-right: 18px
}

.ptab th {
    color: var(--dim)
}

.ptab td {
    padding-top: 12px;
    padding-bottom: 12px
}

.ptab tr:last-child td {
    border-bottom: 0
}

.ptab td:nth-child(6) {
    white-space: normal;
    min-width: 220px;
    font-size: 12px
}

.ptab td .pf {
    display: block
}

.ptab td.acts {
    text-align: right
}

.ptab td.acts .btn+.btn {
    margin-left: 6px
}

.ptab tr.dim td {
    opacity: .55
}

/* access codes */
.card.codes {
    padding: 0;
    gap: 0
}

.codes-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line)
}

.codes-head h2 {
    margin-right: 8px;
    font-size: 16px
}

.codes-head .txt {
    flex: 1 1 220px;
    min-width: 0
}

.codes .tablebox {
    margin: 0;
    padding: 0
}

.ctab th,
.ctab td {
    padding-left: 18px;
    padding-right: 18px
}

.ctab th {
    color: var(--dim)
}

.ctab tr:last-child td {
    border-bottom: 0
}

.ccode {
    display: inline-flex;
    align-items: center;
    gap: 8px
}

.ccode .em {
    display: inline
}

.cpy {
    border: 1px solid var(--input-line);
    background: transparent;
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 11px;
    color: var(--muted);
    cursor: pointer
}

.cpy:hover {
    color: var(--fg);
    border-color: var(--accent)
}

.ubar {
    display: block;
    width: 80px;
    height: 3px;
    margin-top: 5px;
    border-radius: 2px;
    background: var(--line2);
    overflow: hidden
}

.ubar i {
    display: block;
    height: 100%;
    background: var(--muted)
}

.ctab .tag {
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: 5px
}

/* drawers: new / edit plan, create codes */
.drawer {
    width: 500px
}

.noscroll {
    overflow: hidden
}

.dh h2 {
    word-break: normal
}

.dmain {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column
}

.dform {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin: 0
}

.dform .db {
    gap: 18px
}

.fl {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 12.5px;
    color: var(--muted);
    min-width: 0
}

.fl small,
.ctext small {
    font-size: 11.5px;
    color: var(--muted)
}

.fl small.inl {
    display: inline;
    color: var(--dim)
}

.fl .txt,
.fl .sel {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px
}

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

.flabel {
    font-size: 12.5px;
    color: var(--muted)
}

.flabel small {
    color: var(--dim);
    font-size: 12px
}

.fgroup {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.mkpick,
.incl {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0
}

.mkpick legend,
.incl legend {
    font-size: 12.5px;
    color: var(--muted);
    padding: 0;
    margin-bottom: 8px
}

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

.mkopt {
    position: relative;
    display: block;
    cursor: pointer
}

.mkopt input {
    position: absolute;
    opacity: 0;
    pointer-events: none
}

.mkopt span {
    display: flex;
    flex-direction: column;
    gap: 3px;
    height: 100%;
    padding: 12px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--well)
}

.mkopt b {
    font-size: 13.5px;
    color: var(--fg)
}

.mkopt small {
    font-size: 11.5px;
    color: var(--muted)
}

.mkopt input:checked+span {
    border-color: var(--accent);
    background: rgba(124, 156, 255, .1)
}

.mkopt input:focus-visible+span {
    outline: 2px solid var(--accent);
    outline-offset: 2px
}

.allbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--well);
    cursor: pointer;
    margin-bottom: 10px
}

.allbox.on {
    border-color: var(--accent);
    background: rgba(124, 156, 255, .1)
}

.allbox span {
    display: flex;
    flex-direction: column;
    gap: 1px
}

.allbox b {
    font-size: 13.5px;
    color: var(--fg)
}

.allbox small {
    font-size: 11.5px;
    color: var(--muted)
}

.incl .checks {
    gap: 4px 16px;
    padding: 0 4px
}

.incl .chk {
    display: flex;
    padding: 6px 0;
    line-height: 1.3
}

.dform input[type=checkbox] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    flex: none
}

.ctext {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px
}

.ctext > div[data-cpane] {
    display: flex;
    flex-direction: column;
    gap: 7px
}

.ctext .txt {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px
}

.ctext b.mono {
    color: var(--fg)
}

.up {
    text-transform: uppercase
}

.df {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 20px;
    border-top: 1px solid var(--line);
    background: #0f1420
}

.df .dsum {
    flex: 1 1 auto;
    font-size: 12px;
    color: var(--muted);
    min-width: 0
}

.df .msg {
    flex-basis: 100%;
    order: -1;
    margin: 0
}

.df .msg:empty {
    display: none
}

.df .btn {
    padding: 10px 18px;
    font-size: 13.5px
}

.made textarea {
    width: 100%;
    resize: vertical
}

@media (max-width: 640px) {
    .drawer {
        width: 100vw
    }

    .mkpick {
        grid-template-columns: 1fr
    }

    .dform .two,
    .incl .checks {
        grid-template-columns: 1fr
    }

    .sechead-r {
        width: 100%;
        justify-content: space-between
    }

    .codes-head h2 {
        flex-basis: 100%
    }

    .pc-price b {
        font-size: 20px
    }
}

#tab-plans {
    display: flex;
    flex-direction: column;
    gap: 18px
}

/* ---------- referrals: platform chooser, column matching, manual checks ---------- */
#tab-referrals {
    display: flex;
    flex-direction: column;
    gap: 16px
}

.ptns {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px
}

.ptn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--fg);
    cursor: pointer;
    font: inherit;
    min-width: 0
}

.ptn:hover {
    border-color: var(--input-line)
}

.ptn.on {
    border-color: var(--accent);
    background: rgba(124, 156, 255, .08)
}

.ptn.off {
    opacity: .6
}

.ptn.add {
    border-style: dashed;
    color: var(--fg2)
}

.ptn-t {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px
}

.ptn-t b {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.ptn-t .mtag {
    margin-left: 0;
    flex: none
}

.ptn-s {
    font-size: 12px;
    color: var(--muted)
}

.ptn-s em {
    font-style: normal;
    color: var(--amber)
}

.mapr {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: 12.5px;
    color: var(--fg2);
    padding: 8px 10px;
    border: 1px solid var(--line2);
    border-radius: 8px;
    background: var(--well)
}

.mapr label {
    display: flex;
    align-items: center;
    gap: 8px
}

.mapr .muted {
    font-size: 12px
}

td.racts {
    text-align: right;
    white-space: nowrap
}

td.racts .btn+.btn {
    margin-left: 4px
}

.mapbox {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--accent);
    border-radius: 10px;
    background: rgba(124, 156, 255, .05);
    display: flex;
    flex-direction: column;
    gap: 10px
}

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

.mapgrid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--muted)
}

.mapgrid label b {
    color: var(--put)
}

.mapgrid .sel {
    width: 100%
}

.mapsample {
    max-height: 160px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line2);
    border-radius: 8px
}

.mapsample th,
.mapsample td {
    font-size: 11.5px;
    padding: 5px 8px
}

.chkcol {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px
}

@media (max-width: 640px) {
    .mapgrid {
        grid-template-columns: 1fr
    }

    td.racts {
        white-space: normal
    }

    td.racts .btn {
        margin: 2px 0
    }
}

/* ---------- Night Spike Bot ---------- */
#tab-bot {
    display: flex;
    flex-direction: column;
    gap: 16px
}

.bothead {
    display: flex;
    gap: 6px;
    flex-wrap: wrap
}

.card.warnbox {
    border-color: rgba(232, 182, 76, .45);
    background: rgba(232, 182, 76, .06);
    font-size: 13px;
    gap: 4px
}

.card.warnbox b {
    color: var(--amber)
}

.botgrid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start
}

.botcol {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0
}

.statusbar2 {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--well)
}

.statusbar2>div {
    display: flex;
    flex-direction: column;
    gap: 2px
}

.statusbar2 .lbl,
.botcol .lbl {
    font-size: 10.5px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted)
}

.statusbar2 b {
    font-size: 13.5px
}

#botLive tr.pick td {
    background: rgba(124, 156, 255, .09)
}

#botLive tr.pick td:first-child {
    box-shadow: inset 3px 0 0 var(--accent)
}

#botLive tr.dim td {
    color: var(--muted)
}

.botcol .g,
#botStats .g {
    color: var(--call)
}

.botcol .r,
#botStats .r {
    color: var(--put)
}

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

.tiergrid label {
    font-size: 12px
}

.bposgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px
}

.bpos {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--well);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0
}

.bpos-h {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px
}

.bpos-h b {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis
}

.ladder2 {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.rung2 {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 10px;
    align-items: center;
    font-size: 12px
}

.rung2 .bar {
    height: 6px;
    border-radius: 3px;
    background: var(--line2);
    overflow: hidden
}

.rung2 .bar i {
    display: block;
    height: 100%;
    background: var(--call)
}

.botlog {
    font-family: var(--mono);
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 260px;
    overflow: auto;
    color: var(--fg2)
}

.botlog i {
    font-style: normal;
    color: var(--muted);
    margin-right: 8px
}

.botlog .lv-error {
    color: var(--put)
}

.botlog .lv-warn {
    color: var(--amber)
}

.botlog .lv-win {
    color: var(--call)
}

@media (max-width: 900px) {
    .botgrid {
        grid-template-columns: 1fr
    }
}

/* Bot tab: replay on Delta's history */
#botReplay { margin-top: 14px }
.rpform { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 10px; align-items: end }
.rpform .acts { margin: 0 }
.rpkpi { margin: 12px 0 }
.rpcurve { width: 100%; height: 120px; display: block; margin-top: 8px; background: var(--bg2, rgba(127, 127, 127, .05)); border-radius: 8px }
.rpcurve polyline { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke }
.rpcurve line.z { stroke: var(--line); stroke-dasharray: 4 4; vector-effect: non-scaling-stroke }
.rpaxis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 2px }
.rpgrid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 4fr); gap: 14px; margin-top: 10px }
.rpnights { max-height: 460px; overflow: auto }
.rpnights td small { display: block }
#botReplay .g { color: var(--call) }
#botReplay .r { color: var(--put) }
@media (max-width: 900px) {
    .rpform { grid-template-columns: 1fr 1fr }
    .rpform .acts { grid-column: 1 / -1 }
    .rpgrid { grid-template-columns: minmax(0, 1fr) }
}

/* ===== Bot tab, v2 layout: hero, panes ===== */
#tab-bot { display: flex; flex-direction: column; gap: 14px }
#tab-bot h3 { margin: 0; font-size: 14px; font-weight: 700 }
#tab-bot .card p.muted { margin: 0; font-size: 12.5px }
#tab-bot .sechead { margin: 0 }
#tab-bot .lbl { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted) }
#tab-bot .g { color: var(--call) }
#tab-bot .r { color: var(--put) }
.bt-hero { gap: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--panel)), var(--panel) 70%) }
.bt-hero.is-live { background: linear-gradient(180deg, color-mix(in srgb, var(--amber) 10%, var(--panel)), var(--panel) 70%); border-color: color-mix(in srgb, var(--amber) 40%, var(--line)) }
.bt-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap }
.bt-id h2 { font-size: 20px !important; letter-spacing: -.01em }
.bt-id p { margin: 2px 0 10px; color: var(--muted); font-size: 13px }
.bt-chips { display: flex; flex-wrap: wrap; gap: 6px }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--fg2) }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim) }
.chip.c-ok::before { background: var(--call) }
.chip.c-bad { color: var(--put); border-color: color-mix(in srgb, var(--put) 40%, var(--line)) }
.chip.c-bad::before { background: var(--put) }
.chip.c-info::before { background: var(--accent) }
.chip.c-warn { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, var(--line)) }
.chip.c-warn::before { background: var(--amber) }
.bt-ctl { display: flex; flex-direction: column; align-items: flex-end; gap: 10px }
.bt-ctl .seg { min-width: 200px }
.bt-ctl .acts { margin: 0; justify-content: flex-end }
.bt-hero .msg:empty { display: none }
.bt-kpis { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden }
.bt-kpis > div { padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; border-left: 1px solid var(--line) }
.bt-kpis > div:first-child { border-left: 0 }
.bt-kpis b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.bt-kpis small { font-size: 12px; color: var(--muted) }
.bt-state b { display: flex; align-items: center; gap: 8px }
.bt-state b i { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); flex: none }
.bt-state.s-on b i { background: var(--call); box-shadow: 0 0 0 4px color-mix(in srgb, var(--call) 22%, transparent); animation: btpulse 1.6s infinite }
.bt-state.s-wait b i { background: var(--accent) }
@keyframes btpulse { 50% { box-shadow: 0 0 0 7px transparent } }
@media (prefers-reduced-motion: reduce) { .bt-state.s-on b i { animation: none } }
.bt-meter { height: 4px; border-radius: 4px; background: var(--line2); overflow: hidden; margin: 3px 0 1px }
.bt-meter i { display: block; height: 100%; background: var(--accent) }
.bt-warn { flex-direction: row; flex-wrap: wrap; gap: 6px; font-size: 13px }

.bt-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none }
.bt-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: 14px; padding: 9px 14px; cursor: pointer; white-space: nowrap }
.bt-tabs button:hover { color: var(--fg) }
.bt-tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent) }
.bt-pane { display: flex; flex-direction: column; gap: 14px }
.bt-pane[hidden] { display: none }
#botTonight, #botResults { display: flex; flex-direction: column; gap: 14px }

.bt-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px }
.bt-pick { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px }
.bt-pick.none { border-style: dashed }
.bt-pick-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px }
.bt-pick .side { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 9px; border-radius: 6px }
.bt-pick .side.c { color: var(--call); background: color-mix(in srgb, var(--call) 13%, transparent) }
.bt-pick .side.p { color: var(--put); background: color-mix(in srgb, var(--put) 13%, transparent) }
.bt-pick .big { font-size: 28px; line-height: 1.1; letter-spacing: -.01em }
.bt-pick.none .big { font-size: 17px }
.bt-pick-f { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line) }
.bt-pick-f b { font-size: 14px }
.bpos .bt-pick-f { margin-top: 4px }
.bt-settle { margin: 6px 0 0 !important; font-size: 13px }
.bt-scans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px }
.bt-scan { width: 100%; border-collapse: collapse; font-size: 13px }
.bt-scan th { text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 0 8px 6px }
.bt-scan td { padding: 6px 8px; border-top: 1px solid var(--line) }
.bt-scan tr.over td { color: var(--dim) }
.bt-scan tr.pick td { background: color-mix(in srgb, var(--accent) 14%, transparent); font-weight: 700; color: var(--fg) }
.bt-scan tr.pick td:first-child { box-shadow: inset 3px 0 0 var(--accent) }
#botTonight .btn.sm { align-self: flex-start }

.bt-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch }
.bt-rules .card { gap: 10px }
.bt-grid { width: 100%; border-collapse: collapse }
.bt-grid th { text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 0 4px 6px }
.bt-grid td { padding: 3px 4px }
.bt-grid .txt { width: 100% }
.bt-alloc { display: flex; height: 26px; border-radius: 8px; overflow: hidden; gap: 2px }
.bt-alloc i { background: color-mix(in srgb, var(--accent) calc(var(--o) * 100%), var(--line2)); display: flex; align-items: center; justify-content: center; min-width: 0; font-style: normal }
.bt-alloc i.keep { background: repeating-linear-gradient(45deg, var(--line2) 0 6px, transparent 6px 12px); border: 1px dashed var(--line) }
.bt-alloc span { font-size: 10.5px; font-weight: 700; color: var(--on-accent); white-space: nowrap; overflow: hidden; padding: 0 3px }
.bt-alloc i.keep span { color: var(--muted) }
.bt-save { grid-column: 1 / -1; display: flex; flex-direction: row; align-items: center; gap: 12px; position: sticky; bottom: 8px; padding: 12px 16px; z-index: 2; box-shadow: 0 -8px 24px rgba(0, 0, 0, .25) }
.bt-save .msg { margin: 0 }

.bt-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px }
.bt-hits { display: flex; flex-wrap: wrap; gap: 6px }
.bt-hits span { display: inline-flex; gap: 6px; align-items: baseline; font-size: 12.5px; font-family: var(--mono); padding: 4px 9px; border-radius: 8px; background: var(--well); color: var(--dim) }
.bt-hits span.on { color: var(--fg); background: color-mix(in srgb, var(--call) 14%, var(--well)) }
#botLog { max-height: 560px }

/* replay pane: KPI tiles like the hero */
#botReplay .rpkpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; padding: 0; background: none }
#botReplay .rpkpi > div { padding: 10px 12px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); margin: -1px 0 0 -1px; display: flex; flex-direction: column; gap: 2px }
#botReplay .rpkpi b { font-size: 15px }

@media (max-width: 1100px) {
    .bt-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)) }
    .bt-kpis > div { border-top: 1px solid var(--line); margin-top: -1px }
    .bt-kpis > div:nth-child(4) { border-left: 0 }
}
@media (max-width: 720px) {
    .bt-ctl { align-items: stretch; width: 100% }
    .bt-ctl .acts { justify-content: flex-start }
    .bt-kpis { grid-template-columns: 1fr 1fr }
    .bt-kpis > div:first-child { grid-column: 1 / -1 }
    .bt-kpis > div:nth-child(4) { border-left: 1px solid var(--line) }
    .bt-kpis > div:nth-child(2n) { border-left: 0 }
    .bt-rules, .bt-two, .bt-scans { grid-template-columns: minmax(0, 1fr) }
    .bt-kpis b { white-space: normal; font-size: 15px }
}
#botReplay .rpform { margin-top: 4px }
#botReplay .rpgrid h3 { margin-bottom: 8px }
.rphits { display: flex; align-items: center; gap: 12px; flex-wrap: wrap }
.bt-tip { border-bottom: 1px dotted var(--muted); cursor: help }

/* trading add-on plans */
.mkpick { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.incl[hidden], .fgroup[hidden] { display: none !important }
.mtag.m-addon { color: var(--call); border-color: color-mix(in srgb, var(--call) 40%, transparent) }
.addonincl small.muted { display: block; margin-top: 8px; font-size: 12px; line-height: 1.45 }

/* bot rules: plain-words guide */
.bt-help { gap: 10px; position: sticky; max-height: calc(100vh - 24px); overflow: auto }
.bt-help h3 { margin: 0 }
#botHelp > p.muted { margin: -4px 0 0 }
.bt-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.55; color: var(--fg2, var(--fg)) }
.bt-steps li::marker { color: var(--accent); font-weight: 700 }
.bt-steps b { color: var(--fg) }
.bt-steps ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px }
.bt-help-n { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; line-height: 1.5; color: var(--muted) }
.bt-help-n p { margin: 0 }
.bt-help-n b { color: var(--fg) }
.bt-help-w { border: 1px solid color-mix(in srgb, var(--amber, #f5a524) 45%, var(--line)); background: color-mix(in srgb, var(--amber, #f5a524) 8%, transparent); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; line-height: 1.5 }
.bt-help-w ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px }
.bt-help-ok { margin: 0; font-size: 13px; color: var(--call, #3fb950) }

/* rules: three equal cards + guide on the right */
.bt-rwrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 14px; align-items: start }
.bt-rules > .card { display: flex; flex-direction: column }
.bt-rows { display: flex; flex-direction: column; gap: 6px }
.bt-rh, .bt-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 120px) 30px; gap: 8px; align-items: center }
.bt-rh span { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 0 2px }
.bt-row .txt { width: 100%; min-width: 0 }
.bt-x { width: 30px; height: 34px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; font-size: 13px }
.bt-x:hover, .bt-x:focus-visible { border-color: var(--line); color: var(--fg) }
.bt-add { border: 1px dashed var(--line); background: none; color: var(--accent); border-radius: 8px; padding: 9px; font-weight: 600; font-size: 13px; cursor: pointer }
.bt-add:hover { border-color: var(--accent) }
.bt-add:disabled { opacity: .45; cursor: default; border-color: var(--line) }
.bt-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted) }
.bt-foot .msg { margin: 0; font-size: 12.5px }
@media (max-width: 1500px) { .bt-rwrap { grid-template-columns: minmax(0, 1fr) } .bt-help { position: static; max-height: none } }
@media (max-width: 1100px) { .bt-rules { grid-template-columns: 1fr 1fr } .bt-rules > .bt-c1 { grid-column: 1 / -1 } }
@media (max-width: 720px) { .bt-rules { grid-template-columns: minmax(0, 1fr) } .bt-rules > .bt-c1 { grid-column: auto } }
.bt-rules > .bt-save { flex-direction: row; align-items: center; justify-content: flex-start }
.bt-rules .two > label, .bt-rules label { min-width: 0 }
.bt-rules .txt, .bt-rules .sel { min-width: 0; width: 100%; max-width: 100% }
.bt-help .bt-steps { font-size: 13.5px; gap: 8px }

/* drag-to-resize edges */
.bt-rules { grid-template-columns: minmax(0, var(--bc1, 1fr)) minmax(0, var(--bc2, 1fr)) minmax(0, var(--bc3, 1fr)) }
.bt-rwrap { grid-template-columns: minmax(0, 1fr) var(--bhelp, minmax(300px, 380px)) }
.bt-rules > .card, .bt-help { position: relative }
.bt-grip { position: absolute; top: 12px; bottom: 12px; right: -11px; width: 8px; cursor: col-resize; z-index: 3; border-radius: 4px; touch-action: none }
.bt-grip.help { right: auto; left: -11px }
.bt-grip::after { content: ""; position: absolute; left: 3px; top: 50%; height: 36px; margin-top: -18px; width: 2px; border-radius: 2px; background: var(--line); transition: background .15s, height .15s }
.bt-grip:hover::after, .bt-grip.on::after { background: var(--accent); height: 60px; margin-top: -30px }
body.bt-dragging, body.bt-dragging * { cursor: col-resize !important; user-select: none !important }
.bt-help { overflow: visible }
.bt-help > #botHelp { display: flex; flex-direction: column; gap: 10px; overflow: auto; max-height: calc(100vh - 56px) }
@media (max-width: 1500px) { .bt-rwrap { grid-template-columns: minmax(0, 1fr) } .bt-grip.help { display: none } .bt-help > #botHelp { max-height: none } }
@media (max-width: 1100px) { .bt-rules { grid-template-columns: 1fr 1fr } .bt-rules .bt-grip { display: none } }
@media (max-width: 720px) { .bt-rules { grid-template-columns: minmax(0, 1fr) } }

/* rule observations: full width above the save bar */
.bt-warn { grid-column: 1 / -1 }
.bt-warn .bt-help-w { padding: 12px 16px }
.bt-warn .bt-help-w ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 6px 24px }
.bt-warn .bt-help-ok { padding: 2px 4px }

/* guide as a drawer from the right */
.bt-rwrap { display: block }
.bt-tabsrow { display: flex; align-items: flex-end; gap: 12px; border-bottom: 1px solid var(--line) }
.bt-tabsrow .bt-tabs { border-bottom: 0; flex: 1; min-width: 0 }
.bt-helpbtn { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 6px; background: none; border: 1px solid var(--line); color: var(--fg2); border-radius: 99px; padding: 4px 12px 4px 4px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap }
.bt-helpbtn span { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); font-weight: 800 }
.bt-helpbtn b { font-weight: 600 }
.bt-helpbtn:hover, .bt-helpbtn[aria-expanded="true"] { border-color: var(--accent); color: var(--fg) }
.bt-guide { position: fixed; top: 0; right: 0; bottom: 0; width: var(--bguide, 420px); max-width: 100vw; z-index: 38; background: var(--panel); border-left: 1px solid var(--line); box-shadow: -20px 0 50px rgba(0, 0, 0, .4); display: flex; flex-direction: column; animation: btGuideIn .18s ease-out }
.bt-guide[hidden] { display: none }
@keyframes btGuideIn { from { transform: translateX(24px); opacity: 0 } }
@media (prefers-reduced-motion: reduce) { .bt-guide { animation: none } }
.bt-gh { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 20px; border-bottom: 1px solid var(--line) }
.bt-gh h3 { margin: 0; font-size: 15px }
.bt-guide #botHelp { flex: 1; overflow: auto; padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 12px; max-height: none }
.bt-guide #botHelp > p.muted { margin: 0 }
.bt-guide .bt-steps { font-size: 13.5px; gap: 9px }
.bt-guide .bt-grip.help { display: block; left: -4px; right: auto; top: 0; bottom: 0 }
@media (min-width: 1300px) { #main:has(#tab-bot:not([hidden]) #botGuide:not([hidden])) { padding-right: calc(var(--bguide, 420px) + 8px) } }
@media (max-width: 720px) { .bt-helpbtn b { display: none } .bt-helpbtn { padding: 4px } .bt-guide { width: 100vw } .bt-guide .bt-grip.help { display: none } }

/* saved rule sets */
.bt-sets { gap: 10px; margin-bottom: 14px }
.bt-sets-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap }
.bt-sets-h h3 { margin: 0 }
.bt-sets-h .muted { font-size: 13px }
.bt-sets-h b { color: var(--fg) }
.bt-sets-row { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between }
.bt-sets-g { display: flex; gap: 8px; align-items: center; flex: 1 1 420px; min-width: 0 }
.bt-sets-g .sel, .bt-sets-g .txt { flex: 1; min-width: 0 }
.bt-sets-g .btn { white-space: nowrap }
.bt-sets .btn.danger { border-color: var(--put, #f85149); color: var(--put, #f85149) }
.bt-sets .msg:empty { display: none }
.bt-sets .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }
@media (max-width: 720px) { .bt-sets-g { flex-wrap: wrap } .bt-sets-g .sel, .bt-sets-g .txt { flex-basis: 100% } }

/* rules editor: radio segments (strike range, take-profit kind), ATR row */
.bt-seg { display: inline-flex; width: 100% }
.bt-seg label { flex: 1; display: flex; margin: 0; cursor: pointer; min-width: 0 }
.bt-seg input { position: absolute; opacity: 0; width: 1px; height: 1px }
.bt-seg span { flex: 1; text-align: center; padding: 7px 10px; font-size: 13px; font-weight: 600; color: var(--muted); border-radius: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.bt-seg input:checked + span { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--fg) }
.bt-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px }
.bt-rules .fgroup { display: flex; flex-direction: column; gap: 6px }
.bt-rules .flabel { font-size: 13px; color: var(--muted) }
.form .three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px }
.bt-atr { display: flex; flex-direction: column; gap: 8px; border: 1px dashed var(--line); border-radius: 10px; padding: 10px }
.bt-atrnow { margin: 0; font-size: 12.5px; line-height: 1.45 }
.bt-atrnow b { color: var(--fg) }
@media (max-width: 520px) { .form .three { grid-template-columns: 1fr 1fr } }
/* rule sets: publish to users */
.bt-pub { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px }
.bt-pub.on .chk b { color: var(--call) }
/* users list, order times */
.bt-users td small, .tablebox td small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400 }
.rpsells { display: block; margin-top: 2px; color: var(--call); font-size: 12px }
.rpsells b, .bt-pick-f small { font-weight: 600 }
.bt-pick-f small { display: block; font-size: 11.5px }
.bt-pub > * { flex: none }

/* entries rule */
.bt-seg4 span { font-size: 12px; padding: 7px 4px }
.bt-entry { display: flex; flex-direction: column; gap: 8px; border: 1px dashed var(--line); border-radius: 10px; padding: 10px }
.rpextra { display: block; margin-top: 2px; color: var(--amber); font-size: 12px }
hr.rpleg { border: 0; border-top: 1px dashed var(--line); margin: 6px 0 }
@media (max-width: 520px) { .bt-seg4 { flex-wrap: wrap } .bt-seg4 label { flex: 1 1 45% } }

/* bots switcher (several bots per account) */
.bt-bots { gap: 10px; margin-bottom: 14px }
.bt-botsh { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap }
.bt-botsh .muted { font-size: 12.5px }
.bt-botlist { display: flex; gap: 8px; flex-wrap: wrap }
.bt-botc { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--well); color: var(--fg); cursor: pointer; text-align: left; font: inherit }
.bt-botc span { display: flex; flex-direction: column; line-height: 1.25 }
.bt-botc b { font-size: 13.5px }
.bt-botc small { font-size: 11.5px; color: var(--muted) }
.bt-botc:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)) }
.bt-botc.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: color-mix(in srgb, var(--accent) 8%, var(--well)) }
.bt-botc.add { border-style: dashed; color: var(--accent); font-weight: 600; font-size: 13px }
.bt-botc .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none }
.bt-botc .dot.on { background: var(--call) }
.bt-botc .dot.live { background: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 25%, transparent) }
.bt-botact { display: flex; gap: 16px }
.bt-botact .danger { color: var(--put) }
.bt-botform { display: flex; gap: 8px; align-items: center; flex-wrap: wrap }
.bt-botform[hidden] { display: none }
.bt-botform .txt { flex: 1 1 220px; max-width: 320px }

/* which rule set each bot runs (bots bar, hero) */
.bt-botc small.bt-botrules { color: var(--link); max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.chip.bt-runset b { font-weight: 600 }

/* rules: window clock, US releases, breakout */
.bt-evchk { margin: 4px 0 2px }
.bt-ev, .bt-brk { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px }
.bt-evlist { font-size: 12px; line-height: 1.5 }
/* Tonight: breakout watch */
.bt-brkbox .sechead span { display: flex; gap: 6px; flex-wrap: wrap }
.bt-brkgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 6px 0 }
.bt-brkgrid > div { display: flex; flex-direction: column; gap: 2px }
.bt-brkgrid .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em }
.bt-brkgrid small { font-size: 11px }
.bt-brkwhy, .bt-brkev { font-size: 12.5px; margin: 4px 0 0 }

/* the window card: full width, settings on the left, the US calendar on the right */
.bt-rules > .bt-wincard { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 18px; align-items: start }
.bt-winl { display: flex; flex-direction: column; gap: 10px; min-width: 0 }
.bt-cal { border-left: 1px solid var(--line); padding-left: 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; align-self: stretch }
.bt-calh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px }
.bt-calh h3 { margin: 0 }
.bt-callist { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow: auto }
.bt-cald { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px }
.bt-calev { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line2); font-size: 13px }
.bt-calev.past { opacity: .45 }
.bt-calt { display: flex; flex-direction: column; font-size: 12.5px }
.bt-calt small { color: var(--muted); font-size: 10.5px }
.bt-calname { min-width: 0; overflow: hidden; text-overflow: ellipsis }
.bt-calnote { font-size: 11.5px; margin: 0 }
@media (min-width: 1101px) { .bt-wincard .bt-winl > .two, .bt-wincard .bt-winl > .three { max-width: 760px } }
@media (max-width: 860px) { .bt-rules > .bt-wincard { grid-template-columns: minmax(0, 1fr) } .bt-cal { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 12px } }

/* re-entry after the targets */
.bt-re { display: flex; flex-direction: column; gap: 8px }
.bt-rep { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px }

/* rule sets dropdown: never wider than its box */
#botSet { min-width: 0; max-width: 100%; width: 100%; text-overflow: ellipsis }

/* exit before expiry */
.bt-exit { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line2) }
.bt-rules label.bt-exitat { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; font-size: 13px }
.bt-rules label.bt-exitat[hidden] { display: none }
.bt-exitat input { max-width: 140px }

/* futures wick bot */
.wk .wk-note { font-size: 12.5px; margin: 8px 0 0 }
.wk-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 12px 0 }
.wk-levels > div { display: flex; flex-direction: column; gap: 2px }
.wk-levels .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em }
.wk-levels small { font-size: 11.5px }
.wk-form h4 { margin: 14px 0 6px; font-size: 14px }
.wk-grid { display: flex; flex-direction: column; gap: 10px; max-width: 760px }
.wk-rungs { display: flex; flex-direction: column; gap: 8px; max-width: 520px; margin-bottom: 8px }
.wk-rung { display: grid; grid-template-columns: 1fr 1fr 32px; gap: 10px; align-items: end }
.wk-check { margin: 14px 0; font-size: 13px; line-height: 1.6 }
.wk-check.okbox { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg2, transparent) }
.wk-rpf { flex-wrap: wrap; align-items: flex-end; margin: 10px 0 }
.wk-rpf label { display: flex; flex-direction: column; gap: 4px; font-size: 12px }
.wk-fills { font-size: 12.5px }
.wk-rpt { margin-top: 10px }
.bt-botform select[hidden] { display: none }
