html,
body,
*,
*::before,
*::after {
    -webkit-tap-highlight-color: transparent;
}

/* Achievement ledger ---------------------------------------------------- */
.achievement-nav-btn,
.restricted-achievement-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 34px;
    padding: 0 12px;
    color: rgba(240, 244, 255, .78);
    font: 600 11px/1 Inter, sans-serif;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    background: rgba(255, 255, 255, .035);
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.achievement-nav-btn:hover,
.restricted-achievement-btn:hover {
    color: #fff;
    border-color: rgba(190, 199, 225, .28);
    background: rgba(255, 255, 255, .065);
}

.achievement-nav-btn .material-icons-round,
.restricted-achievement-btn .material-icons-round {
    font-size: 17px;
    color: #d8b467;
}

.achievement-notification-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    display: none;
    width: 9px;
    height: 9px;
    border: 2px solid #090b14;
    border-radius: 50%;
    background: #ef4657;
    box-shadow: 0 0 0 2px rgba(239, 70, 87, .13);
}

[data-achievement-button].has-pending .achievement-notification-dot { display: block; }

[data-achievement-button].achievement-celebrate {
    animation: achievementButtonGlow 2.4s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes achievementButtonGlow {
    0%, 100% { box-shadow: none; transform: translateZ(0); }
    14% { color: #fff; border-color: rgba(225, 186, 101, .72); background: rgba(225, 186, 101, .13); box-shadow: 0 0 0 1px rgba(225, 186, 101, .22), 0 0 28px rgba(225, 186, 101, .34); transform: translateY(-1px); }
    44% { box-shadow: 0 0 0 5px rgba(225, 186, 101, 0), 0 0 15px rgba(225, 186, 101, .18); transform: translateY(0); }
    68% { border-color: rgba(225, 186, 101, .44); box-shadow: 0 0 20px rgba(225, 186, 101, .22); }
}

.restricted-achievement-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 4;
}

#achievementsView {
    overflow: auto;
    background: #080a12;
}

.achievement-shell { width: 100%; min-height: 100%; }

.achievement-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 64px;
    padding: 0 32px;
    border-bottom: 1px solid rgba(255, 255, 255, .075);
    background: rgba(8, 10, 18, .92);
    backdrop-filter: blur(18px);
}

.achievement-back {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    color: rgba(237, 241, 251, .68);
    font: 600 12px Inter, sans-serif;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.achievement-back:hover { color: #fff; }
.achievement-back .material-icons-round { font-size: 18px; }

.achievement-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(245, 247, 255, .86);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .01em;
}

.achievement-brand img { width: 25px; height: 25px; object-fit: contain; }

.achievement-content {
    width: min(1080px, calc(100% - 48px));
    margin: 0 auto;
    padding: 66px 0 72px;
}

.achievement-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 36px;
    margin-bottom: 46px;
}

.achievement-kicker,
.achievement-claim-kicker,
.admin-page-kicker {
    margin: 0 0 13px;
    color: #b7934c;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .19em;
}

.achievement-intro h1 {
    margin: 0;
    color: #f3f5fb;
    font-size: clamp(34px, 5vw, 55px);
    font-weight: 650;
    letter-spacing: -.045em;
    line-height: 1;
}

.achievement-intro p:not(.achievement-kicker) {
    max-width: 560px;
    margin-top: 15px;
    color: rgba(226, 231, 243, .55);
    font-size: 14px;
}

.achievement-scorecard {
    min-width: 138px;
    padding: 0 0 4px 20px;
    border-left: 1px solid rgba(255, 255, 255, .12);
}

.achievement-scorecard strong { display: block; color: #f2f4fb; font-size: 24px; font-weight: 630; }
.achievement-scorecard span { color: rgba(226, 231, 243, .46); font-size: 11px; }

.achievement-ledger-head,
.achievement-row {
    display: grid;
    grid-template-columns: minmax(280px, 1.8fr) minmax(130px, .8fr) minmax(120px, .65fr) minmax(140px, .7fr);
    align-items: center;
    gap: 18px;
}

.achievement-ledger-head {
    padding: 0 22px 11px;
    color: rgba(226, 231, 243, .36);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.achievement-list { border-top: 1px solid rgba(255, 255, 255, .09); }

.achievement-row {
    min-height: 116px;
    padding: 20px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .075);
    transition: background .18s ease;
}

.achievement-row:hover { background: rgba(255, 255, 255, .018); }
.achievement-row.locked { opacity: .58; }
.achievement-identity { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; align-items: center; }

.achievement-emblem {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: rgba(220, 225, 238, .5);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
    background: rgba(255, 255, 255, .025);
}

.achievement-row.unlocked .achievement-emblem { color: #dbb86d; border-color: rgba(219, 184, 109, .32); background: rgba(219, 184, 109, .07); }
.achievement-emblem .material-icons-round { font-size: 22px; }
.achievement-copy strong { display: block; color: #eef1f8; font-size: 14px; font-weight: 640; }
.achievement-copy span { display: block; margin-top: 6px; color: rgba(226, 231, 243, .48); font-size: 12px; }
.achievement-progress-track { width: 100%; height: 3px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.achievement-progress-track i { display: block; height: 100%; background: #b89551; }
.achievement-progress-label { display: block; margin-top: 8px; color: rgba(226, 231, 243, .46); font-size: 10px; }
.achievement-reward { display: flex; align-items: center; gap: 8px; color: #e8ca89; font-size: 13px; font-weight: 650; }
.achievement-reward .material-icons-round { font-size: 17px; }
.achievement-state { justify-self: start; }
.achievement-locked-label,
.achievement-claimed-label { color: rgba(226, 231, 243, .42); font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.achievement-claimed-label { color: #65c990; }

.achievement-claim-btn {
    padding: 9px 14px;
    color: #16140f;
    font: 700 11px Inter, sans-serif;
    border: 0;
    border-radius: 7px;
    background: #d5b46c;
    cursor: pointer;
}

.achievement-claim-btn:hover { background: #e1c17b; }
.achievement-claim-btn:disabled { cursor: wait; opacity: .55; }
.achievement-footnote { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: rgba(226, 231, 243, .35); font-size: 10px; }
.achievement-footnote .material-icons-round { font-size: 15px; }

.achievement-claim-overlay { position: fixed; inset: 0; z-index: 10000; display: none; place-items: center; padding: 20px; background: rgba(4, 5, 9, .78); backdrop-filter: blur(9px); }
.achievement-claim-overlay.open { display: grid; }
.achievement-claim-card { width: min(420px, 100%); padding: 38px 36px 32px; text-align: center; border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; background: #0d1019; box-shadow: 0 30px 90px rgba(0, 0, 0, .56); }
.achievement-claim-loader { display: flex; justify-content: center; gap: 7px; height: 35px; margin-bottom: 17px; }
.achievement-claim-loader span { width: 5px; height: 26px; border-radius: 4px; background: #d5b46c; animation: claimBars .9s ease-in-out infinite; }
.achievement-claim-loader span:nth-child(2) { animation-delay: .12s; }
.achievement-claim-loader span:nth-child(3) { animation-delay: .24s; }
@keyframes claimBars { 0%, 100% { transform: scaleY(.35); opacity: .35; } 50% { transform: scaleY(1); opacity: 1; } }
.achievement-claim-icon { display: none; margin-bottom: 14px; color: #67ce94; font-size: 38px; }
.achievement-claim-card.complete .achievement-claim-loader { display: none; }
.achievement-claim-card.complete .achievement-claim-icon { display: block; }
.achievement-claim-card.error .achievement-claim-icon { display: block; color: #ef5b6a; }
.achievement-claim-card h2 { margin: 8px 0 10px; color: #f3f5fb; font-size: 21px; font-weight: 650; letter-spacing: -.02em; }
.achievement-claim-card > p:not(.achievement-claim-kicker) { color: rgba(226, 231, 243, .52); font-size: 12px; line-height: 1.6; }
.achievement-claim-result { display: none; margin-top: 20px; padding: 14px; text-align: left; border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .025); }
.achievement-claim-card.complete .achievement-claim-result,
.achievement-claim-card.error .achievement-claim-result { display: grid; gap: 8px; }
.achievement-claim-result div { display: flex; justify-content: space-between; gap: 16px; color: rgba(226, 231, 243, .52); font-size: 11px; }
.achievement-claim-result strong { color: #f1f3f9; font-size: 12px; }
#achievementClaimClose { width: 100%; margin-top: 18px; padding: 10px; color: #11131a; font-weight: 700; border: 0; border-radius: 7px; background: #e4e7ef; cursor: pointer; }

/* Admin control room ----------------------------------------------------- */
.admin-title-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.admin-title-row .admin-page-title { margin-bottom: 0; }
.admin-page-kicker { margin-bottom: 5px; color: rgba(141, 166, 223, .68); }
.system-state-control { display: grid; grid-template-columns: auto minmax(150px, auto) auto; align-items: center; gap: 12px; min-height: 54px; padding: 8px 9px 8px 14px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 12px; background: rgba(255, 255, 255, .025); }
.system-state-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef5b6a; box-shadow: 0 0 0 4px rgba(239, 91, 106, .1); }
.system-state-control.open .system-state-dot { background: #4dc986; box-shadow: 0 0 0 4px rgba(77, 201, 134, .1); }
.system-state-control strong,
.system-state-control small { display: block; }
.system-state-control strong { color: #f2f4fb; font-size: 12px; }
.system-state-control small { margin-top: 3px; color: rgba(228, 234, 248, .45); font-size: 10px; }
.system-state-control button { height: 36px; padding: 0 13px; color: rgba(244, 247, 255, .78); font: 650 11px Inter; border: 1px solid rgba(255, 255, 255, .11); border-radius: 8px; background: rgba(255, 255, 255, .045); cursor: pointer; }
.system-state-control button:hover { color: #fff; background: rgba(255, 255, 255, .075); }
.admin-nav-item > .material-icons-round { width: 18px; font-size: 18px; }
.stat-card-value.negative { color: #ef6c79; }
.audit-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.audit-toolbar select.admin-search { appearance: none; color: rgba(237, 241, 251, .75); }
.audit-result-count { margin-left: auto; color: rgba(228, 234, 248, .42); font-size: 11px; white-space: nowrap; }
.audit-ledger { border: 1px solid rgba(255, 255, 255, .075); border-radius: 14px; overflow: hidden; background: rgba(8, 11, 20, .72); }
.audit-ledger-row { display: grid; grid-template-columns: 170px minmax(170px, .8fr) minmax(240px, 1.3fr) minmax(210px, 1fr); gap: 18px; padding: 15px 18px; border-bottom: 1px solid rgba(255, 255, 255, .055); }
.audit-ledger-row:last-child { border-bottom: 0; }
.audit-ledger-row.head { padding-top: 10px; padding-bottom: 10px; color: rgba(228, 234, 248, .35); font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; background: rgba(255, 255, 255, .02); }
.audit-time strong,
.audit-actor strong,
.audit-action strong { display: block; color: rgba(242, 245, 252, .88); font-size: 11px; font-weight: 620; }
.audit-time span,
.audit-actor span,
.audit-action span,
.audit-context { display: block; margin-top: 4px; color: rgba(228, 234, 248, .43); font-size: 10px; line-height: 1.45; }
.audit-action code { color: #9eb8ef; font: 600 10px Inter, sans-serif; }
.audit-context span { display: block; margin-top: 5px; }
.user-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.user-edit-grid label > span { display: block; margin-bottom: 6px; color: rgba(232, 238, 251, .5); font-size: 10px; font-weight: 650; }
.user-admin-toggle,
.create-user-admin-toggle { display: flex !important; align-items: center; gap: 9px; min-height: 38px; color: rgba(235, 240, 252, .65); font-size: 11px; }
.user-admin-toggle > span { margin: 0 !important; }
.create-user-admin-toggle { margin: 4px 0 14px; }

@media (max-width: 760px) {
    .achievement-nav-btn > span:not(.material-icons-round) { display: none; }
    .achievement-nav-btn { width: 34px; padding: 0; }
    .achievement-header { padding: 0 16px; }
    .achievement-brand span { display: none; }
    .achievement-content { width: min(100% - 28px, 1080px); padding-top: 38px; }
    .achievement-intro { align-items: flex-start; flex-direction: column; margin-bottom: 32px; }
    .achievement-scorecard { padding-left: 0; border-left: 0; }
    .achievement-ledger-head { display: none; }
    .achievement-row { grid-template-columns: 1fr auto; gap: 16px 12px; padding: 18px 8px; }
    .achievement-progress { grid-column: 1 / -1; grid-row: 2; }
    .achievement-reward { grid-column: 1; grid-row: 3; }
    .achievement-state { grid-column: 2; grid-row: 3; }
    .admin-title-row { align-items: flex-start; flex-direction: column; }
    .system-state-control { width: 100%; grid-template-columns: auto 1fr auto; }
    .audit-toolbar { align-items: stretch; flex-direction: column; }
    .audit-result-count { margin-left: 0; }
    .audit-ledger-row { grid-template-columns: 1fr 1fr; }
    .audit-ledger-row.head { display: none; }
    .user-edit-grid { grid-template-columns: 1fr; }
}

button,
a,
input,
select,
textarea,
[role="button"] {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

#restrictedView {
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

#restrictedView::before,
#restrictedView::after {
    content: "";
    position: absolute;
    inset: auto;
    pointer-events: none;
}

#restrictedView::before {
    width: 38vw;
    height: 38vw;
    min-width: 260px;
    min-height: 260px;
    top: -10vw;
    left: -8vw;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
    filter: blur(22px);
}

#restrictedView::after {
    width: 28vw;
    height: 28vw;
    min-width: 220px;
    min-height: 220px;
    right: -6vw;
    bottom: -9vw;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(122, 162, 255, 0.18), rgba(122, 162, 255, 0));
    filter: blur(18px);
}

.restricted-shell {
    position: relative;
    z-index: 1;
    gap: 26px;
}

.restricted-card,
.restricted-sidecard {
    border-radius: 28px;
    border-color: rgba(214, 230, 255, 0.16);
    box-shadow: 0 34px 90px rgba(2, 7, 16, 0.56);
}

.restricted-card {
    background:
        linear-gradient(180deg, rgba(11, 17, 28, 0.9), rgba(7, 11, 19, 0.88)),
        radial-gradient(circle at top, rgba(109, 153, 255, 0.1), rgba(109, 153, 255, 0));
}

.restricted-card h2 {
    margin-bottom: 18px;
}

.restricted-subtitle {
    font-size: 16px;
}

.restricted-note {
    margin-top: 18px;
    font-size: 13px;
}

.restricted-sidecard {
    background:
        linear-gradient(180deg, rgba(10, 15, 26, 0.84), rgba(7, 11, 19, 0.78)),
        radial-gradient(circle at top right, rgba(34, 208, 115, 0.14), rgba(34, 208, 115, 0));
}

.lobby-leaderboard-wrap {
    border-radius: 20px;
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.035);
    padding: 12px;
}

.lobby-board-list {
    display: grid;
    gap: 10px;
}

.lobby-rank-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025));
}

.lobby-rank-card.me {
    border-color: rgba(122, 162, 255, 0.34);
    background: linear-gradient(180deg, rgba(94, 94, 240, 0.18), rgba(94, 94, 240, 0.08));
}

.lobby-rank-index {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    color: #f8fbff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.lobby-rank-card.rank-1 .lobby-rank-index {
    background: linear-gradient(135deg, rgba(255, 214, 102, 0.34), rgba(255, 178, 46, 0.22));
    color: #ffd978;
}

.lobby-rank-card.rank-2 .lobby-rank-index {
    background: linear-gradient(135deg, rgba(209, 222, 245, 0.28), rgba(170, 186, 216, 0.18));
    color: #dbe8ff;
}

.lobby-rank-card.rank-3 .lobby-rank-index {
    background: linear-gradient(135deg, rgba(231, 162, 108, 0.3), rgba(190, 104, 50, 0.18));
    color: #ffc89c;
}

.lobby-rank-main {
    min-width: 0;
}

.lobby-rank-user {
    font-size: 14px;
    font-weight: 700;
    color: #f8fbff;
}

.lobby-rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
    color: rgba(235, 242, 255, 0.7);
    font-size: 11px;
}

.lobby-rank-profit {
    text-align: right;
    display: grid;
    gap: 4px;
}

.lobby-rank-profit strong {
    font-size: 15px;
    color: #f8fbff;
}

.lobby-rank-prize {
    font-size: 11px;
    color: rgba(255, 215, 103, 0.94);
}

.lobby-signout-btn {
    z-index: 10;
    min-height: 44px;
    padding: 11px 14px;
    border-radius: 16px;
}

#restrictedView.banned-mode {
    align-items: center;
    justify-content: center;
    padding: 0;
    background:
        radial-gradient(circle at 50% 16%, rgba(255, 156, 170, 0.22), rgba(255, 156, 170, 0) 32%),
        radial-gradient(circle at 14% 84%, rgba(255, 76, 108, 0.12), rgba(255, 76, 108, 0) 28%),
        linear-gradient(180deg, #6e0d1e 0%, #3b0712 42%, #190309 100%);
}

#restrictedView.banned-mode::before {
    width: 42vw;
    height: 42vw;
    top: -10vw;
    left: auto;
    right: -8vw;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
}

#restrictedView.banned-mode::after {
    width: 30vw;
    height: 30vw;
    right: auto;
    left: -8vw;
    bottom: -10vw;
    background: radial-gradient(circle, rgba(255, 125, 145, 0.16), rgba(255, 125, 145, 0));
}

#restrictedView.banned-mode .restricted-shell {
    width: min(860px, 100%);
    min-height: 100svh;
    grid-template-columns: 1fr;
    align-items: center;
    justify-items: center;
    padding: 48px 28px 92px;
}

#restrictedView.banned-mode .restricted-card {
    width: min(680px, 100%);
    min-height: auto;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

#restrictedView.banned-mode #restrictedTitle,
#restrictedView.banned-mode .restricted-note,
#restrictedView.banned-mode .restricted-contact-btn,
#restrictedView.banned-mode .restricted-error,
#restrictedView.banned-mode .restricted-sidecard,
#restrictedView.banned-mode .restricted-achievement-btn {
    display: none !important;
}

body.m8y-account-banned #dashView,
body.m8y-account-banned #adminView,
body.m8y-account-banned #achievementsView {
    display: none !important;
    pointer-events: none !important;
}

#restrictedView.banned-mode .restricted-subtitle {
    max-width: 640px;
    margin: 0 auto;
    color: #fff;
    font-size: clamp(22px, 2.9vw, 34px);
    line-height: 1.28;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.03em;
}

#restrictedView.banned-mode .lobby-signout-btn {
    left: 22px;
    bottom: 22px;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 218, 222, 0.28);
    color: #fff;
}

@media (min-width: 901px) {
    .duration-input-wrap {
        overflow: visible;
    }

    .duration-popup {
        top: 0;
        bottom: auto;
        left: auto;
        right: calc(100% + 12px);
        width: min(338px, 46vw);
    }
}

.tf-mini-badge {
    top: 7px;
    right: -2px;
    min-width: 16px;
    height: 13px;
    padding: 0 3px;
    font-size: 7px;
    transform: translate(10%, 0);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

.tf-menu {
    min-width: 316px;
    padding: 14px;
    border-radius: 18px;
    border-color: rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(180deg, rgba(10, 14, 26, 0.98), rgba(7, 10, 20, 0.98)),
        radial-gradient(circle at top right, rgba(122, 162, 255, 0.12), rgba(122, 162, 255, 0));
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.46);
    z-index: 1400;
}

.tf-menu-title {
    margin-inline: 4px;
}

.tf-menu-chart-types {
    gap: 8px;
}

.chart-type-menu-btn,
.tf-menu-btn {
    transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.chart-type-menu-btn:hover,
.tf-menu-btn:hover {
    transform: translateY(-1px);
}

.trade-item {
    gap: 12px;
    padding: 12px 12px;
    border-radius: 16px;
    border-color: rgba(255, 255, 255, 0.03);
}

.trade-item:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.08);
}

.trade-info {
    display: grid;
    gap: 6px;
}

.trade-amount-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
    color: #f5f8ff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.trade-amount-chip:hover {
    border-color: rgba(122, 162, 255, 0.34);
    background: linear-gradient(180deg, rgba(122, 162, 255, 0.16), rgba(122, 162, 255, 0.08));
}

.trade-amount-chip .material-icons-round {
    font-size: 14px;
    color: rgba(232, 240, 255, 0.66);
    transition: transform 0.16s ease;
}

.trade-amount-chip.expanded .material-icons-round {
    transform: rotate(180deg);
}

.trade-duration-reveal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 7px 11px;
    margin-top: -1px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 10, 18, 0.86);
    color: rgba(242, 246, 255, 0.84);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.trade-duration-reveal::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(122, 162, 255, 0.78);
    box-shadow: 0 0 0 5px rgba(122, 162, 255, 0.12);
}

.popup-card {
    background:
        linear-gradient(180deg, rgba(11, 15, 26, 0.98), rgba(7, 10, 18, 0.98)),
        radial-gradient(circle at top right, rgba(122, 162, 255, 0.14), rgba(122, 162, 255, 0));
}

.popup-chart-wrap {
    position: relative;
    height: 210px;
    margin-bottom: 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0;
    background:
        linear-gradient(180deg, rgba(14, 18, 31, 0.98), rgba(7, 10, 18, 0.98)),
        radial-gradient(circle at top left, rgba(34, 208, 115, 0.09), rgba(34, 208, 115, 0));
}

.popup-chart-empty {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    color: rgba(234, 240, 255, 0.68);
    text-align: center;
    padding: 20px;
}

.popup-chart-empty .material-icons-round {
    font-size: 28px;
    color: rgba(234, 240, 255, 0.38);
}

.popup-chart-empty strong {
    color: #f4f7ff;
    font-size: 14px;
    font-weight: 700;
}

.popup-chart-empty span {
    font-size: 12px;
}

.popup-chart-wrap.no-data .popup-chart-empty {
    display: flex;
}

.indicator-modal-card {
    width: min(980px, calc(100vw - 28px)) !important;
    border-radius: 24px;
    border-color: rgba(214, 230, 255, 0.16);
    background:
        linear-gradient(180deg, rgba(10, 14, 24, 0.99), rgba(6, 9, 17, 0.99)),
        radial-gradient(circle at top right, rgba(122, 162, 255, 0.18), rgba(122, 162, 255, 0));
}

.indicator-modal-card .modal-header {
    padding: 22px 26px 18px;
}

.indicator-modal-card .modal-section {
    padding: 18px 24px 24px;
}

.indicator-modal-layout {
    gap: 18px;
}

.indicator-modal-panel {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.042), rgba(255, 255, 255, 0.02));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.indicator-modal-card .indicator-grid {
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Chart studies stay available without turning the chart into a blocked modal. */
.indicator-chipbar {
    transition: left .22s cubic-bezier(.22,1,.36,1), right .22s cubic-bezier(.22,1,.36,1), transform .22s cubic-bezier(.22,1,.36,1);
}
.indicator-chipbar.is-docked-right {
    left:auto;
    right:12px;
    justify-content:flex-end;
}
.indicator-chip {
    border-color:rgba(211,225,247,.12);
    background:linear-gradient(180deg,rgba(15,19,29,.9),rgba(9,12,20,.88));
    box-shadow:0 10px 25px rgba(0,0,0,.28),inset 0 1px rgba(255,255,255,.035);
}
.indicator-settings-overlay {
    align-items:flex-start !important;
    justify-content:flex-end !important;
    padding:70px 18px 18px !important;
    background:transparent !important;
    pointer-events:none;
}
.indicator-settings-overlay.is-docked-left { justify-content:flex-start !important; }
.indicator-settings-card {
    width:340px !important;
    max-width:calc(100vw - 36px) !important;
    max-height:calc(100dvh - 88px);
    overflow:auto;
    pointer-events:auto;
    border:1px solid rgba(211,225,247,.15);
    border-radius:18px;
    background:linear-gradient(180deg,rgba(13,17,27,.98),rgba(8,11,19,.98));
    box-shadow:0 24px 64px rgba(0,0,0,.52),inset 0 1px rgba(255,255,255,.05);
    transition:transform .22s cubic-bezier(.22,1,.36,1);
}
.indicator-settings-card .modal-header { padding:15px 17px; }
.indicator-settings-card .modal-section { padding:14px 17px 17px; }
.indicator-settings-card .settings-form-v2 { display:grid;grid-template-columns:1fr 1fr;gap:9px; }
.indicator-settings-card .settings-field-row { min-width:0;display:grid;grid-template-columns:1fr auto;gap:8px;padding:9px 10px;border:1px solid rgba(255,255,255,.065);border-radius:11px;background:rgba(255,255,255,.025); }
.indicator-settings-card .settings-field-label { min-width:0;font-size:10px;text-transform:uppercase;letter-spacing:.055em; }
.indicator-settings-card .settings-field-input { width:74px;padding:6px 8px;text-align:right; }
.indicator-settings-card .settings-field-color { width:34px;height:29px; }
.indicator-settings-card .settings-form-actions { grid-column:1/-1;position:sticky;bottom:0;padding-top:12px;background:linear-gradient(180deg,transparent,#090c14 28%); }

.indicator-card {
    align-items: center;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
}

.indicator-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
}

.indicator-card-actions {
    gap: 8px;
}

.ind-btn {
    min-height: 34px;
    border-radius: 999px;
}

#adminView {
    background:
        radial-gradient(circle at top right, rgba(122, 162, 255, 0.15), rgba(122, 162, 255, 0) 34%),
        radial-gradient(circle at bottom left, rgba(34, 208, 115, 0.12), rgba(34, 208, 115, 0) 26%),
        #070915;
}

.admin-sidebar {
    width: 232px;
    padding: 18px 14px;
    gap: 8px;
    background: rgba(8, 12, 22, 0.92);
    border-right-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

.admin-nav-item {
    min-height: 44px;
    padding: 11px 14px;
    border-radius: 14px;
}

.admin-nav-item.active {
    background: linear-gradient(180deg, rgba(122, 162, 255, 0.22), rgba(94, 94, 240, 0.12));
    color: #f5f8ff;
    border: 1px solid rgba(122, 162, 255, 0.28);
}

.admin-content {
    padding: 28px;
}

.admin-page-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    min-height: 118px;
    padding: 20px;
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(14, 20, 34, 0.92), rgba(9, 13, 24, 0.96)),
        radial-gradient(circle at top right, rgba(122, 162, 255, 0.12), rgba(122, 162, 255, 0));
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.stat-card-value {
    font-size: 30px;
}

.admin-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.95fr);
    gap: 18px;
}

.admin-panel {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(13, 18, 31, 0.96), rgba(8, 11, 20, 0.98)),
        radial-gradient(circle at top right, rgba(122, 162, 255, 0.08), rgba(122, 162, 255, 0));
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.26);
    overflow: hidden;
}

.admin-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: #f5f8ff;
}

.admin-panel-subtitle {
    color: rgba(234, 240, 255, 0.6);
    font-size: 12px;
}

.admin-panel-body {
    padding: 16px 18px 18px;
}

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

.admin-health-card {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
}

.admin-health-card .label {
    color: rgba(234, 240, 255, 0.54);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-health-card .value {
    margin-top: 7px;
    color: #f8fbff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.28;
}

.admin-activity-feed {
    display: grid;
    gap: 10px;
}

.admin-activity-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 14px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-activity-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #f8fbff;
}

.admin-activity-row .title {
    color: #f6f9ff;
    font-size: 13px;
    font-weight: 700;
}

.admin-activity-row .meta {
    margin-top: 4px;
    color: rgba(232, 239, 255, 0.64);
    font-size: 11px;
    line-height: 1.5;
}

.admin-activity-row .time {
    color: rgba(232, 239, 255, 0.44);
    font-size: 11px;
    white-space: nowrap;
}

.admin-kpi-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.admin-kpi-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.035);
    color: rgba(240, 245, 255, 0.82);
    font-size: 12px;
    font-weight: 700;
}

.admin-table-wrap {
    border-radius: 22px;
    border-color: rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(13, 18, 31, 0.96), rgba(8, 11, 20, 0.98)),
        radial-gradient(circle at top right, rgba(122, 162, 255, 0.08), rgba(122, 162, 255, 0));
}

.admin-table-header {
    padding: 18px 20px;
    border-bottom-color: rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.admin-search {
    height: 40px;
    min-width: 220px;
    border-radius: 12px;
}

.admin-btn,
.save-btn,
.danger-btn,
.reset-balance-btn {
    min-height: 38px;
    border-radius: 12px;
}

.admin-user-cell {
    display: grid;
    gap: 4px;
}

.admin-user-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #f8fbff;
    font-size: 14px;
    font-weight: 700;
}

.admin-user-meta {
    color: rgba(234, 240, 255, 0.58);
    font-size: 11px;
}

.admin-balance-stack {
    display: grid;
    gap: 4px;
}

.admin-balance-main {
    color: #f8fbff;
    font-size: 14px;
    font-weight: 700;
}

.admin-balance-sub {
    color: rgba(234, 240, 255, 0.58);
    font-size: 11px;
}

#userModal .modal-card {
    width: min(980px, calc(100vw - 24px));
    border-radius: 26px;
    background:
        linear-gradient(180deg, rgba(11, 15, 26, 0.99), rgba(7, 10, 18, 0.99)),
        radial-gradient(circle at top right, rgba(122, 162, 255, 0.16), rgba(122, 162, 255, 0));
}

#userModal .modal-header {
    padding: 22px 24px 18px;
}

.user-profile-summary {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.user-profile-card,
.balance-history-card {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
}

.user-profile-card .eyebrow,
.balance-history-card .eyebrow {
    color: rgba(234, 240, 255, 0.52);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.user-profile-card .title,
.balance-history-card .title {
    margin-top: 8px;
    color: #f8fbff;
    font-size: 16px;
    font-weight: 700;
}

.user-profile-card .meta {
    margin-top: 10px;
    color: rgba(234, 240, 255, 0.66);
    font-size: 12px;
    line-height: 1.6;
}

.balance-history-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    max-height: 220px;
    overflow-y: auto;
}

.balance-history-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 13px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.balance-history-item .meta {
    color: rgba(234, 240, 255, 0.58);
    font-size: 11px;
    margin-top: 4px;
}

.balance-history-item .delta {
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.balance-history-item .delta.pos {
    color: #57db94;
}

.balance-history-item .delta.neg {
    color: #ff667a;
}

.analytics-grid {
    gap: 10px;
}

.analytics-card {
    padding: 14px;
    border-radius: 16px;
}

.audit-log-list {
    gap: 10px;
    max-height: 260px;
}

.audit-log-item {
    padding: 12px 14px;
    border-radius: 16px;
}

.audit-log-title {
    font-size: 13px;
}

@media (max-width: 900px) {
    .admin-overview-grid,
    .user-profile-summary {
        grid-template-columns: 1fr;
    }

    .admin-health-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    #restrictedView:not(.banned-mode) {
        display: none;
        height: 100svh;
        padding: max(12px, env(safe-area-inset-top)) 10px calc(76px + env(safe-area-inset-bottom));
        align-items: flex-start;
    }

    #restrictedView:not(.banned-mode).active { display: flex; }

    #restrictedView:not(.banned-mode) .restricted-shell {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    #restrictedView:not(.banned-mode) .restricted-card,
    #restrictedView:not(.banned-mode) .restricted-sidecard {
        width: 100%;
        min-height: auto;
    }

    #restrictedView:not(.banned-mode) .restricted-card { padding: 24px 18px; }
    #restrictedView:not(.banned-mode) .restricted-sidecard { padding: 14px 12px; }
    #restrictedView:not(.banned-mode) .lobby-leaderboard-wrap { max-height: none; overflow: visible; }

    #restrictedView.banned-mode .restricted-shell {
        padding: 28px 16px 88px;
    }

    #restrictedView.banned-mode .restricted-subtitle {
        font-size: 24px;
    }

    .lobby-leaderboard-wrap {
        padding: 10px;
    }

    .lobby-rank-card {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .lobby-rank-profit {
        grid-column: 2;
        text-align: left;
    }

    .tf-menu {
        min-width: 0;
        width: auto;
        max-width: none;
    }

    .popup-chart-wrap {
        height: 188px;
    }

    .trade-duration-reveal {
        font-size: 10px;
    }

    .admin-content {
        padding: 16px;
    }

    .admin-page-title {
        font-size: 24px;
    }

    .stats-grid,
    .admin-health-grid {
        grid-template-columns: 1fr;
    }

    .admin-search {
        min-width: 0;
        width: 100%;
    }
}

/* Live support: calm, readable assistance surfaces. */
.live-support-indicator {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 10020;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(103, 211, 154, .36);
    border-radius: 999px;
    background: rgba(12, 22, 17, .94);
    color: #d8f4e4;
    box-shadow: 0 14px 42px rgba(0, 0, 0, .38);
    backdrop-filter: blur(14px);
    font-family: "DM Sans", system-ui, sans-serif;
    pointer-events: none;
    user-select: none;
}

.live-support-indicator > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #70d49f;
    box-shadow: 0 0 0 5px rgba(112, 212, 159, .11);
    animation: liveSupportPulse 1.7s ease-in-out infinite;
}

.live-support-indicator strong { font-size: 12px; font-weight: 650; }

.live-support-welcome-layer {
    position: fixed;
    inset: 0;
    z-index: 10030;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(3, 7, 10, .7);
    backdrop-filter: blur(12px);
}

.live-support-welcome {
    width: min(470px, 100%);
    padding: 38px 38px 32px;
    border: 1px solid rgba(126, 220, 169, .24);
    border-radius: 26px;
    background:
        radial-gradient(circle at 50% 0, rgba(91, 204, 143, .14), transparent 38%),
        linear-gradient(180deg, #111a16, #0b110e);
    color: #f0f8f3;
    text-align: center;
    box-shadow: 0 34px 100px rgba(0, 0, 0, .58);
}

.live-support-welcome-icon {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(112, 212, 159, .36);
    border-radius: 50%;
    background: rgba(112, 212, 159, .08);
    color: #83dfae;
}

.live-support-welcome-icon .material-icons-round { font-size: 31px; }
.live-support-welcome-icon i { position:absolute; right:2px; top:7px; width:11px; height:11px; border:2px solid #111a16; border-radius:50%; background:#70d49f; }
.live-support-welcome-kicker { color:#82d9aa; font:700 10px/1 "DM Sans",sans-serif; letter-spacing:.16em; }
.live-support-welcome h2 { margin:12px 0 13px; font-family:"Newsreader",Georgia,serif; font-size:clamp(30px,5vw,38px); font-weight:500; line-height:1.08; letter-spacing:-.035em; }
.live-support-welcome p { margin:0 auto; max-width:390px; color:rgba(229,242,234,.74); font:400 14px/1.72 "DM Sans",system-ui,sans-serif; }
.live-support-welcome button { width:100%; min-height:46px; margin-top:26px; border:0; border-radius:12px; background:#72d6a0; color:#07110b; font:700 13px "DM Sans",system-ui,sans-serif; cursor:pointer; }
.live-support-welcome button:hover { filter:brightness(1.06); }

@keyframes liveSupportPulse { 50% { opacity:.56; transform:scale(.82); } }

@media (max-width: 520px) {
    .live-support-welcome { padding:32px 23px 24px; border-radius:22px; }
    .live-support-welcome p { font-size:13px; line-height:1.65; }
    .live-support-indicator {
        right: 8px;
        top: calc(max(6px, env(safe-area-inset-top)) + 44px);
        bottom: auto;
        min-height: 27px;
        padding: 0 9px;
        gap: 7px;
        border-radius: 7px;
        box-shadow: 0 7px 20px rgba(0,0,0,.3);
    }
    .live-support-indicator > span { width: 6px; height: 6px; box-shadow: 0 0 0 3px rgba(112,212,159,.1); }
    .live-support-indicator strong { font-size: 0; }
    .live-support-indicator strong::after { content: "Support live"; font-size: 10px; letter-spacing: .02em; }
}

.login-ban-layer {
    position: fixed;
    inset: 0;
    z-index: 10040;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(18, 3, 7, .78);
    backdrop-filter: blur(12px);
}

.login-ban-card {
    width: min(440px, 100%);
    padding: 34px 32px 28px;
    border: 1px solid rgba(255, 119, 139, .26);
    border-radius: 24px;
    background: radial-gradient(circle at 50% 0, rgba(255, 91, 118, .13), transparent 42%), #160b0e;
    color: #fff5f6;
    text-align: center;
    box-shadow: 0 32px 90px rgba(0, 0, 0, .58);
}

.login-ban-icon { width:60px; height:60px; margin:0 auto 18px; display:grid; place-items:center; border:1px solid rgba(255,119,139,.28); border-radius:50%; background:rgba(255,91,118,.08); color:#ff8b9d; }
.login-ban-icon .material-icons-round { font-size:28px; }
.login-ban-kicker { color:#ff8b9d; font:700 10px "DM Sans",sans-serif; letter-spacing:.15em; }
.login-ban-card h2 { margin:11px 0 12px; font-family:"Newsreader",Georgia,serif; font-size:32px; font-weight:500; letter-spacing:-.03em; }
.login-ban-card p { margin:0; color:rgba(255,235,239,.7); font:400 13px/1.65 "DM Sans",sans-serif; }
.login-ban-card button { width:100%; min-height:44px; margin-top:24px; border:1px solid rgba(255,119,139,.28); border-radius:11px; background:#d9405b; color:white; font:700 13px "DM Sans",sans-serif; cursor:pointer; }
/* Cash wallet: deliberately compact so it reads as part of the trading chrome. */
.wallet-nav-btn {
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid var(--border2);
    border-radius: 7px;
    background: rgba(255,255,255,.025);
    color: var(--text2);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.wallet-nav-btn:hover {
    color: var(--text);
    border-color: rgba(255,255,255,.18);
    background: rgba(255,255,255,.045);
}

.wallet-nav-btn .material-icons-round { font-size: 16px; }
.wallet-nav-btn strong { color: var(--text); font-weight: 600; }

.wallet-card,
.payment-confirm-card {
    width: min(440px, calc(100vw - 28px));
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 28px 80px rgba(0,0,0,.48);
}

.wallet-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--border);
}

.wallet-kicker,
.payment-confirm-kicker {
    color: var(--text3);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .13em;
}

.wallet-balance {
    margin-top: 8px;
    color: var(--text);
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -.04em;
}

.wallet-balance-label { margin-top: 3px; color: var(--text3); font-size: 11px; }

.wallet-benefit {
    display: flex;
    gap: 11px;
    margin: 18px 24px 14px;
    padding: 13px 14px;
    border-left: 2px solid var(--accent);
    background: rgba(94,94,240,.07);
    color: var(--text2);
    font-size: 12px;
    line-height: 1.55;
}

.wallet-benefit .material-icons-round { color: #8c8cf7; font-size: 18px; }
.wallet-benefit strong { color: var(--text); font-weight: 600; }

.wallet-deposit-btn {
    width: calc(100% - 48px);
    height: 40px;
    margin: 0 24px 22px;
    border: 0;
    border-radius: 7px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.wallet-deposit-btn:hover:not(:disabled),
.payment-submit-btn:hover:not(:disabled) { filter: brightness(1.08); }
.wallet-deposit-btn:disabled,
.payment-submit-btn:disabled { opacity: .55; cursor: wait; }

.wallet-history-head {
    display: flex;
    justify-content: space-between;
    padding: 0 24px 10px;
    color: var(--text2);
    font-size: 11px;
    font-weight: 600;
}

.wallet-history-head span:last-child { color: var(--text3); font-weight: 400; }
.wallet-history { max-height: 270px; overflow-y: auto; border-top: 1px solid var(--border); }
.wallet-empty { padding: 24px; text-align: center; color: var(--text3); font-size: 12px; }

.wallet-history-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    padding: 13px 24px;
    border-bottom: 1px solid var(--border);
}

.wallet-history-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 15px;
}

.wallet-history-icon.credit { color: var(--up); background: var(--up2); }
.wallet-history-icon.debit { color: #ff9f6e; background: rgba(255,128,76,.1); }
.wallet-history-copy { min-width: 0; }
.wallet-history-copy strong { display: block; overflow: hidden; color: var(--text); font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.wallet-history-copy span,
.wallet-history-amount span { display: block; margin-top: 4px; color: var(--text3); font-size: 10px; font-weight: 400; }
.wallet-history-amount { text-align: right; font-size: 12px; font-weight: 600; }
.wallet-history-amount.credit { color: var(--up); }
.wallet-history-amount.debit { color: #ff9f6e; }

.payment-confirm-card { padding: 24px; }
.payment-confirm-head { display: flex; align-items: center; gap: 12px; }
.payment-confirm-head > .material-icons-round {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--accent2);
    color: #9494ff;
    font-size: 20px;
}
.payment-confirm-head h3 { margin-top: 4px; color: var(--text); font-size: 17px; font-weight: 600; }
.payment-confirm-copy { margin: 18px 0; color: var(--text2); font-size: 12px; line-height: 1.6; }
.payment-breakdown { border: 1px solid var(--border2); border-radius: 8px; overflow: hidden; }
.payment-breakdown > div { display: flex; justify-content: space-between; padding: 11px 13px; color: var(--text2); font-size: 12px; border-bottom: 1px solid var(--border); }
.payment-breakdown > div:last-child { border-bottom: 0; }
.payment-breakdown strong { color: var(--text); font-weight: 600; }
.payment-breakdown .payment-total { background: rgba(255,255,255,.025); color: var(--text); }
.payment-manual-note,
.payment-confirm-error { margin-top: 13px; padding: 11px 12px; border-radius: 6px; font-size: 11px; line-height: 1.5; }
.payment-manual-note { color: #e8c98d; background: rgba(219,163,66,.09); border: 1px solid rgba(219,163,66,.18); }
.payment-confirm-error { color: #ff9aa4; background: var(--down2); border: 1px solid rgba(240,72,88,.18); }
.payment-confirm-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 9px; margin-top: 18px; }
.payment-cancel-btn,
.payment-submit-btn { height: 40px; border-radius: 7px; font-weight: 600; cursor: pointer; }
.payment-cancel-btn { border: 1px solid var(--border2); background: transparent; color: var(--text2); }
.payment-submit-btn { border: 0; background: var(--accent); color: #fff; }

@media (max-width: 700px) {
    .wallet-nav-btn > span:not(.material-icons-round) { display: none; }
    .wallet-nav-btn { padding: 0 8px; }
    .wallet-history-row { padding-left: 17px; padding-right: 17px; }
    .indicator-settings-overlay { padding:58px 10px 10px !important;align-items:flex-end !important; }
    .indicator-settings-card { width:100% !important;max-width:none !important;max-height:min(72dvh,620px);border-radius:18px; }
    .indicator-settings-card .settings-form-v2 { grid-template-columns:1fr; }
}

/* Active/History trade ledger: a focused, full-screen workspace on every device. */
body.trade-ledger-visible { overflow: hidden !important; }
#tradePopup { z-index: 2147483646 !important; }
.trade-list-wrap.ledger-open {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    padding: max(18px, env(safe-area-inset-top)) clamp(14px, 4vw, 54px) max(12px, env(safe-area-inset-bottom)) !important;
    border: 0 !important;
    background: radial-gradient(circle at 16% -5%, rgba(34,208,115,.14), transparent 34%), linear-gradient(180deg,#0c0f19,#06070d 76%) !important;
    box-shadow: none !important;
    overflow: hidden !important;
    overscroll-behavior: none;
    isolation: isolate;
}
.trade-ledger-heading { display: none; }
.trade-list-wrap.ledger-open .trade-ledger-heading {
    width: min(100%, 1080px);
    min-height: 54px;
    margin: 0 auto 12px;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
}
.trade-list-wrap.ledger-open .trade-ledger-heading > div { display:flex;flex-direction:column;gap:4px; }
.trade-list-wrap.ledger-open .trade-ledger-kicker { color:rgba(216,180,103,.72);font-size:9px;font-weight:700;letter-spacing:.18em; }
.trade-list-wrap.ledger-open .trade-ledger-heading strong { color:#f4f6fb;font-size:21px;font-weight:650;letter-spacing:-.025em; }
.trade-list-wrap.ledger-open .trade-list-tabs { width: min(100%, 1080px); min-height: 52px; flex:0 0 auto; margin: 0 auto 10px; padding: 0; border-bottom: 1px solid rgba(255,255,255,.09); }
.trade-list-wrap.ledger-open .trade-tab { flex: 0 0 auto; min-width: 150px; padding: 14px 22px; font-size: 12px; }
.trade-list-wrap.ledger-open .trade-list { display: block !important; flex:1 1 0 !important; min-height:0 !important; width: min(100%, 1080px); max-height: none !important; margin: 0 auto; padding: 8px 0 max(34px,env(safe-area-inset-bottom)); overflow-x:hidden !important; overflow-y:auto !important; overscroll-behavior-y:contain; -webkit-overflow-scrolling:touch; touch-action:pan-y; }
.trade-list-wrap.ledger-open .trade-list-close { display: grid !important; flex:0 0 auto; place-items: center; position:static; width: 40px; height: 40px; padding:0; border: 1px solid rgba(255,255,255,.13); border-radius: 12px; background: rgba(255,255,255,.055); color: rgba(245,247,255,.86); cursor: pointer; }
.trade-list-wrap.ledger-open .trade-list-close .material-icons-round { font-size:19px; }
.trade-list-wrap.ledger-open .trade-item { min-height: 68px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.055); border-radius: 10px; }
.trade-list-wrap.ledger-open .trade-item-header { margin-top: 22px; text-align: left; border: 0; border-bottom: 1px solid rgba(255,255,255,.12); border-radius: 0; padding-left: 4px; }

/* Achievements entry: compact trophy seal, tuned separately for desktop/mobile. */
.achievement-nav-btn {
    height:36px;
    padding:0 13px 0 7px;
    gap:9px;
    border:1px solid rgba(226,194,122,.19);
    border-radius:10px;
    background:linear-gradient(180deg,rgba(226,194,122,.075),rgba(226,194,122,.025));
    color:rgba(245,240,226,.88);
    box-shadow:inset 0 1px rgba(255,255,255,.045);
    font-size:11px;
    font-weight:650;
    letter-spacing:.01em;
}
.achievement-nav-btn:hover { color:#fff8e8;border-color:rgba(226,194,122,.38);background:linear-gradient(180deg,rgba(226,194,122,.13),rgba(226,194,122,.055));transform:translateY(-1px); }
.achievement-button-emblem { width:24px;height:24px;display:grid;place-items:center;flex:0 0 auto;border-radius:7px;background:linear-gradient(145deg,#e0bc70,#9c7132);color:#16100a;box-shadow:inset 0 1px rgba(255,255,255,.42),0 3px 10px rgba(119,81,26,.2); }
.achievement-button-emblem svg { width:17px;height:17px;display:block; }
.restricted-achievement-btn { height:42px;padding:0 15px 0 8px;gap:10px;border-color:rgba(226,194,122,.2);border-radius:12px;background:linear-gradient(180deg,rgba(17,19,28,.94),rgba(10,12,19,.94));color:rgba(245,240,226,.9);box-shadow:0 14px 38px rgba(0,0,0,.35),inset 0 1px rgba(255,255,255,.05);font-size:11px;font-weight:650; }
.restricted-achievement-btn:hover { border-color:rgba(226,194,122,.4);background:linear-gradient(180deg,rgba(31,29,28,.96),rgba(15,15,19,.96)); }
.restricted-achievement-btn .achievement-button-emblem { width:28px;height:28px;border-radius:8px; }
.restricted-achievement-btn .achievement-button-emblem svg { width:19px;height:19px; }
.mobile-achievement-btn { display:none;position:relative;width:38px;height:38px;padding:0;place-items:center;border:1px solid rgba(226,194,122,.2);border-radius:11px;background:linear-gradient(180deg,rgba(226,194,122,.08),rgba(226,194,122,.025));box-shadow:inset 0 1px rgba(255,255,255,.04);cursor:pointer; }
.mobile-achievement-btn .achievement-button-emblem { width:26px;height:26px;border-radius:8px; }
.mobile-achievement-btn .achievement-button-emblem svg { width:18px;height:18px; }
.achievement-nav-btn .achievement-notification-dot,.mobile-achievement-btn .achievement-notification-dot { top:-3px;right:-3px;border-color:#090b14; }
.participant-group-head { display:flex;align-items:center;justify-content:space-between;margin:18px 0 8px;padding:8px 2px;color:var(--text);font-size:12px;text-transform:uppercase;letter-spacing:.08em; }
.participant-group-head span { min-width:25px;padding:3px 8px;text-align:center;border-radius:999px;background:rgba(34,208,115,.12);color:var(--up); }
.participant-group-head.removed { margin-top:28px;color:#ff9aa4;border-top:1px solid var(--border);padding-top:20px; }
.participant-group-head.removed span { background:rgba(240,72,88,.12);color:#ff9aa4; }
.removed-participants tr { opacity:.82; }
.restore-participant-btn { padding:6px 10px;border:1px solid rgba(34,208,115,.28);border-radius:7px;background:rgba(34,208,115,.08);color:var(--up);font-size:11px;cursor:pointer;white-space:nowrap; }
.participant-empty-note { padding:18px;border:1px dashed var(--border2);border-radius:8px;color:var(--text3);font-size:12px;text-align:center; }

@media (max-width:760px) and (min-width:641px) {
    .achievement-nav-btn { width:38px;padding:0; }
    .achievement-nav-btn > .achievement-button-emblem { display:grid !important; }
    .achievement-nav-btn > .achievement-label { display:none !important; }
}

@media (max-width:640px) {
    /* Compact phone header: logo, achievements, wallet, rebuy, balance. */
    #dashView .topbar { grid-template-columns:auto auto minmax(0,1fr) auto auto !important;gap:6px !important; }
    #dashView .topbar-logo { order:0; }
    #dashView .mobile-achievement-btn { order:1; }
    #dashView .wallet-nav-btn { order:2; }
    #dashView .rebuy-btn.is-visible { display:inline-flex !important;align-items:center;justify-content:center;min-height:32px;width:auto;padding:0 8px;order:3;font-size:9px;letter-spacing:.06em; }
    #dashView .topbar-balance { min-width:0;max-width:82px;padding-left:7px;padding-right:7px;order:4;font-size:0;overflow:hidden;text-overflow:ellipsis; }
    #dashView .topbar-balance strong { font-size:11px; }
    /* Keep the cash amount visible on phones; the Wallet word is already hidden
       above, so this remains compact without reducing the control to an icon. */
    #dashView .wallet-nav-btn { width:auto; min-width:64px; max-width:82px; padding:0 7px; justify-content:center; gap:4px; overflow:hidden; }
    #dashView .wallet-nav-btn strong { display:inline; font-size:11px; font-variant-numeric:tabular-nums; white-space:nowrap; }
    .mobile-achievement-btn { display:grid; }
    .trade-list-wrap.ledger-open { padding: max(12px,env(safe-area-inset-top)) 10px max(8px,env(safe-area-inset-bottom)) !important; }
    .trade-list-wrap.ledger-open .trade-ledger-heading { min-height:48px;margin-bottom:8px;padding:0 2px; }
    .trade-list-wrap.ledger-open .trade-ledger-heading strong { font-size:19px; }
    .trade-list-wrap.ledger-open .trade-list-tabs { min-height:44px;margin:0 0 8px;padding:3px;border:1px solid rgba(255,255,255,.08);border-radius:12px;background:rgba(255,255,255,.025); }
    .trade-list-wrap.ledger-open .trade-tab { flex:1;min-width:0; }
    .trade-list-wrap.ledger-open .trade-list-close { width:38px;height:38px;border-radius:11px; }
    .trade-list-wrap.ledger-open .trade-list { width:100%;padding-top:3px; }
    .trade-list-wrap.ledger-open .trade-item { padding-left:12px;padding-right:12px; }
    .restricted-achievement-btn { right:14px;bottom:max(14px,env(safe-area-inset-bottom));height:40px;padding:0 12px 0 7px; }

    /* Give the chart a little more breathing room above the trade controls. */
    #dashView .main-layout { grid-template-rows:42px minmax(0,1fr) 210px; }
    #dashView .right-panel { height:210px;max-height:210px;grid-template-rows:166px 44px; }
    #dashView .trade-panel-toggle { bottom:210px; }
    #dashView .trade-form { grid-template-rows:64px 56px;padding:8px 10px 7px;gap:6px; }
    #dashView .trade-btns-wrap .btn { min-height:40px;border-radius:13px;font-size:12px; }
}

/* Desktop header: preserve the native flex layout and only reorder controls. */
@media (min-width:641px) {
    #dashView .topbar { display:flex; gap:10px; }
    #dashView .topbar-logo { order:0; }
    #dashView .topbar-actions { display:contents; }
    #dashView .topbar-actions > .achievement-nav-btn { order:1; }
    #dashView .wallet-nav-btn { order:2; }
    #dashView .topbar-actions > *:not(.achievement-nav-btn) { order:3; }
    #dashView .topbar-spacer { display:block !important; order:4; flex:1 1 auto; }
    #dashView .rebuy-btn { order:5; }
    #dashView .topbar-balance { order:6; flex:0 0 auto; }
    #dashView .topbar-sep,
    #dashView .topbar-user,
    #dashView .mobile-achievement-btn { display:none !important; }
}
