* {
    box-sizing: border-box;
}

:root {
    --bg: #050507;
    --panel: rgba(18, 18, 24, 0.82);
    --panel-solid: #111118;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #1f2937;
    --primary: #ffffff;
    --primary-text: #050507;
    --danger: #ef4444;
    --green: #22c55e;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.app-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 32rem),
        radial-gradient(circle at bottom right, rgba(120, 120, 255, 0.10), transparent 30rem),
        #050507;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #020203;
}

.auth-shell {
    width: min(92vw, 430px);
}

.auth-card {
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 8px;
    background: #09090d;
    box-shadow: 0 30px 120px rgba(0, 0, 0, .60);
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: white;
    color: black;
    font-weight: 900;
    font-size: 18px;
    letter-spacing: -0.04em;
    margin-bottom: 28px;
}

.auth-card h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -0.04em;
    color: #fff;
}

.auth-card p {
    color: rgba(255, 255, 255, .50);
    margin: 10px 0 26px;
}

.auth-form {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    border-radius: 6px;
    padding: 12px 14px;
    outline: none;
    transition: border-color .18s ease;
}

select option {
    background: #09090d;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(255, 255, 255, .30);
}

.btn {
    border: 0;
    border-radius: 6px;
    padding: 12px 18px;
    cursor: pointer;
    transition: .18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
}

.btn-primary {
    background: #ffe600;
    color: #020203;
    font-weight: 800;
}

.btn-primary:hover {
    background: #ffed33;
}

.btn-muted {
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .85);
    border: 1px solid rgba(255, 255, 255, .10);
}

.btn-muted:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.btn-full {
    width: 100%;
}

.alert {
    border-radius: 16px;
    padding: 13px 14px;
    margin-bottom: 18px;
    font-size: 14px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.24);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 76px;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    gap: 22px;
    border-bottom: 1px solid var(--border);
    background: rgba(5, 5, 7, 0.74);
    backdrop-filter: blur(24px);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
}

.topbar-brand span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: white;
    color: black;
}

.topbar-brand small {
    color: var(--muted);
    font-weight: 600;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.topbar-nav a {
    color: var(--muted);
    padding: 10px 13px;
    border-radius: 13px;
    transition: .2s ease;
    font-size: 14px;
}

.topbar-nav a:hover {
    background: rgba(255, 255, 255, 0.07);
    color: white;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-user span {
    color: var(--muted);
    font-size: 14px;
}

.topbar-user button {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-radius: 13px;
    padding: 9px 12px;
    cursor: pointer;
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 70px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 22px;
}

.page-head h1 {
    margin: 0;
    font-size: 34px;
    letter-spacing: -0.05em;
}

.page-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.stat-card,
.panel-card {
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 8px;
    background: #09090d;
    box-shadow: 0 26px 80px rgba(0, 0, 0, .45);
}

.stat-card {
    padding: 28px 32px;
}

.stat-card span {
    color: rgba(255, 255, 255, .50);
    font-size: 13px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.stat-card strong {
    display: block;
    margin-top: 12px;
    font-size: 40px;
    letter-spacing: -0.05em;
    color: #ffe600;
}

.panel-card {
    overflow: hidden;
}

.panel-head {
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.panel-head h2 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.03em;
    color: #fff;
}

.panel-head p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .50);
    font-size: 14px;
}

.search-input {
    max-width: 260px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    color: rgba(255, 255, 255, .42);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .10em;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

td {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    vertical-align: middle;
    color: rgba(255, 255, 255, .88);
}

td small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.right {
    text-align: right;
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 34px;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-cell img {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    object-fit: cover;
    background: var(--soft);
}

.token-badge {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 6px;
    background: rgba(255, 230, 0, .10);
    color: #ffe600;
    border: 1px solid rgba(255, 230, 0, .22);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: -0.02em;
}

.status-badge {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-badge.active {
    color: #86efac;
    background: rgba(34, 197, 94, 0.10);
}

.status-badge.passive {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.10);
}

.mini-btn {
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .05);
    color: rgba(255, 255, 255, .85);
    border-radius: 6px;
    padding: 7px 12px;
    cursor: pointer;
    margin-left: 5px;
    font-size: 13px;
    transition: .18s ease;
}

.mini-btn:hover {
    background: rgba(255, 255, 255, .10);
    color: #fff;
}

.mini-btn.danger {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, .22);
    background: rgba(239, 68, 68, .08);
}

.mini-btn.danger:hover {
    background: rgba(239, 68, 68, .14);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-card {
    width: min(680px, 100%);
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 8px;
    background: #09090d;
    box-shadow: 0 40px 140px rgba(0, 0, 0, .75);
    padding: 28px;
}

.modal-card.small {
    width: min(460px, 100%);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.modal-head h2 {
    margin: 0;
    letter-spacing: -0.04em;
}

.modal-close {
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .06);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.modal form {
    display: grid;
    gap: 14px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.tx-amount {
    color: #ffe600;
    font-weight: 700;
}

.tx-date {
    color: rgba(255, 255, 255, .42);
    font-size: 13px;
}

.muted {
    color: var(--muted);
}

.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 80;
    max-width: 360px;
    padding: 14px 16px;
    border-radius: 18px;
    background: white;
    color: black;
    font-weight: 800;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: .22s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    background: #ef4444;
    color: white;
}

.toast.success {
    background: #ffffff;
    color: #050507;
}

@media (max-width: 820px) {
    .topbar {
        height: auto;
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-nav {
        margin-left: 0;
        flex-wrap: wrap;
    }

    .topbar-user {
        width: 100%;
        justify-content: space-between;
    }

    .page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

.progress-page-shell {
    display: grid;
    gap: 26px;
}

.progress-list-card {
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 28px;
    background:
        radial-gradient(circle at 20% 0%, rgba(255,255,255,0.06), transparent 28rem),
        rgba(10, 10, 14, 0.92);
    padding: 24px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.45);
}

.progress-user-row {
    display: grid;
    grid-template-columns: 390px 1fr 140px;
    align-items: center;
    min-height: 118px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    background: rgba(255,255,255,0.025);
    overflow: hidden;
}

.progress-user-row + .progress-user-row {
    margin-top: 12px;
}

.progress-profile {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 26px;
    border-right: 1px solid rgba(255,255,255,0.09);
}

.progress-profile img {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    object-fit: cover;
    background: #111827;
    border: 1px solid rgba(255,255,255,0.12);
}

.progress-profile strong {
    display: block;
    font-size: 23px;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: #f8fafc;
}

.progress-profile span {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(255,255,255,0.68);
    font-size: 16px;
}

.progress-profile small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    min-width: 24px;
    padding: 0 4px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.55);
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.progress-main {
    padding: 24px 34px;
}

.progress-number {
    display: flex;
    align-items: baseline;
    gap: 9px;
    margin-bottom: 18px;
}

.progress-number b {
    font-size: 24px;
    color: #ffe928;
    letter-spacing: -0.04em;
}

.progress-number span {
    font-size: 18px;
    color: rgba(255,255,255,0.72);
}

.progress-number em {
    margin-left: auto;
    font-style: normal;
    color: rgba(255,255,255,0.62);
    font-weight: 700;
}

.progress-track {
    position: relative;
    width: 100%;
    height: 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.075);
    overflow: hidden;
}

.progress-track div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #fff45a, #f5d400, #ffe928);
    box-shadow: 0 0 18px rgba(255, 226, 38, 0.38);
}

.lion-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 26px;
}

.lion-shape {
    width: 92px;
    height: 92px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 30% 25%, #0d7ca4, #07506f);
    color: #050507;
    font-size: 54px;
    font-weight: 900;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.18),
        0 18px 35px rgba(0, 0, 0, 0.35);
}

.progress-info {
    width: min(760px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 18px;
    color: rgba(255,255,255,0.58);
    font-size: 17px;
    line-height: 1.55;
}

.progress-info p {
    margin: 0;
}

.progress-info strong {
    color: rgba(255,255,255,0.82);
}

.info-icon {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,0.28);
    color: rgba(255,255,255,0.66);
    font-weight: 800;
}

.progress-empty {
    padding: 50px;
    text-align: center;
    color: rgba(255,255,255,0.55);
}

@media (max-width: 980px) {
    .progress-user-row {
        grid-template-columns: 1fr;
    }

    .progress-profile {
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,0.09);
    }

    .lion-badge {
        justify-content: flex-start;
        padding: 0 34px 24px;
    }
}

/* RLX progress page */

.admin-body {
    background: #020203;
}

.page {
    width: min(1450px, calc(100% - 32px));
    margin: 28px auto 60px;
}

.topbar {
    height: 70px;
    padding: 0 34px;
    background: #020203;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.topbar-brand span {
    width: auto;
    height: auto;
    background: transparent;
    color: #fff;
    border-radius: 0;
    font-size: 34px;
    letter-spacing: -0.06em;
}

.topbar-brand small {
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.topbar-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 70px;
    gap: 52px;
}

.topbar-nav a {
    position: relative;
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0;
    color: rgba(255,255,255,.72);
    font-size: 16px;
}

.topbar-nav a:hover {
    background: transparent;
    color: #fff;
}

.topbar-nav a.nav-active {
    color: #fff;
    font-weight: 800;
}

.topbar-nav a.nav-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 68px;
    height: 3px;
    transform: translateX(-50%);
    background: #ffe600;
}

.topbar-user span {
    display: none;
}

.topbar-user button {
    height: 44px;
    padding: 0 20px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: transparent;
    color: rgba(255, 255, 255, .85);
    font-size: 14px;
    cursor: pointer;
    transition: .18s ease;
    letter-spacing: .01em;
}

.topbar-user button:hover {
    border-color: rgba(255, 255, 255, .35);
    color: #fff;
}

.rlx-rank-page {
    display: grid;
    gap: 28px;
}

.rlx-rank-card {
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 8px;
    background: #09090d;
    overflow: hidden;
    box-shadow: 0 26px 80px rgba(0,0,0,.45);
}

.rlx-rank-row {
    min-height: 123px;
    display: grid;
    grid-template-columns: 500px 1fr 150px;
    align-items: center;
    background: linear-gradient(90deg, #111116 0%, #09090d 48%, #08080b 100%);
}

.rlx-rank-row + .rlx-rank-row {
    border-top: 1px solid rgba(255,255,255,.08);
}

.rlx-user-area {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 0 32px;
    border-right: 1px solid rgba(255,255,255,.09);
}

.rlx-user-area img {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    object-fit: cover;
    flex: 0 0 auto;
}

.rlx-user-area strong {
    display: block;
    color: #fff;
    font-size: 25px;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.rlx-user-area span {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(255,255,255,.66);
    font-size: 17px;
}

.rlx-user-area i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,.7);
    color: #fff;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.rlx-progress-area {
    padding: 0 42px;
}

.rlx-token-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
}

.rlx-token-line b {
    color: #ffe600;
    font-size: 24px;
    line-height: 1;
    letter-spacing: -0.04em;
    font-weight: 800;
}

.rlx-token-line span {
    color: rgba(255,255,255,.72);
    font-size: 20px;
}

.rlx-token-line small {
    color: rgba(255,255,255,.55);
    font-size: 13px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.rlx-token-line em {
    margin-left: auto;
    font-style: normal;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,.50);
    letter-spacing: .02em;
}

.rlx-progress-track {
    height: 11px;
    width: 100%;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    overflow: hidden;
}

.rlx-progress-track div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #fff46a 0%, #ffe600 50%, #ffd000 100%);
    box-shadow: 0 0 18px rgba(255,230,0,.45);
    transition: width .6s ease;
}

.rlx-lion {
    display: flex;
    justify-content: center;
    align-items: center;
}

.rlx-lion span {
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, #0a83ae, #075875 70%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.18),
        0 10px 32px rgba(7, 88, 117, .40);
    overflow: hidden;
}

.rlx-note {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 18px;
    color: rgba(255,255,255,.52);
    font-size: 15px;
    line-height: 1.55;
}

.rlx-note div {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.28);
    color: rgba(255,255,255,.60);
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
    align-self: start;
    margin-top: 2px;
}

.rlx-note p {
    margin: 0;
}

.rlx-note strong {
    color: rgba(255,255,255,.80);
}

.rlx-empty {
    padding: 50px;
    text-align: center;
    color: rgba(255,255,255,.40);
    font-size: 15px;
}

@media (max-width: 1050px) {
    .topbar {
        height: auto;
        padding: 18px;
    }

    .topbar-nav {
        position: static;
        transform: none;
        height: auto;
        gap: 18px;
    }

    .topbar-nav a,
    .topbar-nav a.nav-active {
        height: auto;
    }

    .topbar-nav a.nav-active::after {
        display: none;
    }

    .rlx-rank-row {
        grid-template-columns: 1fr;
        padding-bottom: 22px;
    }

    .rlx-user-area {
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,.08);
        padding: 22px;
        height: auto;
    }

    .rlx-progress-area {
        padding: 22px;
    }

    .rlx-lion {
        justify-content: flex-start;
        padding: 0 22px 6px;
    }
}