:root {
    --bg: #f3f1ea;
    --ink: #18201b;
    --muted: #6b716b;
    --line: #ded9ca;
    --card: #fffdf7;
    --accent: #1d7a5c;
    --accent-2: #d89033;
    --danger: #b94242;
    --shadow: 0 20px 60px rgba(36, 38, 31, .12);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(216, 144, 51, .16), transparent 32rem),
        linear-gradient(180deg, #faf7ee 0%, var(--bg) 100%);
    color: var(--ink);
    font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(18px, 4vw, 52px);
    background: rgba(250, 247, 238, .88);
    border-bottom: 1px solid rgba(222, 217, 202, .8);
    backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark {
    display: inline-flex;
    width: 44px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    font-size: 13px;
}
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.nav a {
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--muted);
}
.nav a:hover { background: #ebe5d7; color: var(--ink); }

.shell { width: min(1180px, calc(100% - 28px)); margin: 0 auto; padding: 28px 0 96px; }
.admin-body .shell { width: min(1320px, calc(100% - 28px)); }
.flash {
    width: min(1180px, calc(100% - 28px));
    margin: 14px auto 0;
    padding: 12px 16px;
    border-radius: 8px;
    background: #e3f1e9;
    color: #215b43;
}
.flash.bad { background: #f7e1dc; color: #8d2d24; }

.auth-panel {
    min-height: calc(100vh - 160px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    align-items: center;
    gap: 42px;
}
.auth-copy h1, .hero h1, .account-head h1 { margin: 0; font-size: clamp(34px, 5vw, 68px); line-height: .98; letter-spacing: 0; }
.auth-copy p { color: var(--muted); max-width: 560px; line-height: 1.8; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-weight: 800; text-transform: uppercase; }

.hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    padding: 32px 0 26px;
}
.hero.compact h1 { font-size: clamp(30px, 4vw, 54px); }
.hero p { color: var(--muted); margin-bottom: 0; }

.card, .table-card {
    background: rgba(255, 253, 247, .92);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.card { padding: 22px; }
.form { display: grid; gap: 15px; }
.form.wide { max-width: 760px; }
.form label { display: grid; gap: 7px; color: var(--muted); font-size: 14px; }
input, select, textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: var(--ink);
    outline: none;
}
textarea { min-height: 112px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29, 122, 92, .12); }
.muted-link, .hint { color: var(--muted); font-size: 14px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    white-space: nowrap;
}
.btn.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.btn.danger { border-color: var(--danger); background: var(--danger); color: #fff; }
.btn.small { min-height: 32px; padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .48; cursor: not-allowed; }

.offer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.offer { display: grid; gap: 16px; }
.offer-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.offer-head strong { display: block; font-size: 18px; }
.offer-head span { color: var(--muted); font-size: 13px; }
.merchant-identity {
    display: flex;
    align-items: center;
    gap: 10px;
}
.merchant-identity small {
    display: block;
    color: var(--muted);
    font-size: 13px;
}
.price { font-size: 44px; line-height: 1; font-weight: 900; color: var(--accent); }
.meta { display: flex; justify-content: space-between; gap: 12px; color: var(--ink); }
.methods { margin: 0; color: var(--muted); }
.status.live, .pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #e3f1e9;
    color: #1d6a51;
    font-size: 12px;
}
.status.selling {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #eceff3;
    color: #6d7481;
    font-size: 12px;
}
.pill.pending { background: #f6ead4; color: #845412; }
.pill.paid { background: #dcebf5; color: #1f5d81; }
.pill.completed { background: #e3f1e9; color: #1d6a51; }
.pill.failed, .pill.cancelled { background: #f7e1dc; color: #8d2d24; }
.inline-form, .row-form, .admin-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form select { flex: 1 1 180px; }
.row-form input { width: 140px; min-height: 34px; }
.admin-actions input { width: 150px; min-height: 34px; }

.require-box, .trade-closed { margin-top: 10px; }
.trade-closed {
    padding: 22px;
    border-radius: 8px;
    border: 1px dashed var(--line);
    background: rgba(255, 253, 247, .76);
}
.ghost-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}
.ghost-list span {
    height: 58px;
    border-radius: 8px;
    background: linear-gradient(90deg, #eee8da, #faf7ee, #eee8da);
    background-size: 200% 100%;
    animation: sweep 1.7s linear infinite;
}
@keyframes sweep { to { background-position: -200% 0; } }

.table-card { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 13px; font-weight: 700; }
small { color: var(--muted); }
.page-title { margin: 16px 0; }

.account-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 18px;
    padding: 26px 0;
}
.balance { font-size: 36px; font-weight: 900; color: var(--accent); }
.balance span { display: block; color: var(--muted); font-size: 13px; text-align: right; }
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.line-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.copy-field { background: #f6f2e8; }
.quick-amounts { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-amounts button {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}
.offer-busy {
    background: #f5f6f7;
    color: #6d7481;
}
.offer-busy .price,
.offer-busy .methods {
    color: #7f8793;
}
.offer-timer {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.offer-progress {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #e1e4e8;
}
.offer-progress span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8b929e, #c5cad1);
    animation: busy-progress 9s linear forwards;
}
@keyframes busy-progress { to { width: 0; } }

.lock-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid #efc2b9;
    border-radius: 8px;
    background: #fff0ed;
}
.lock-panel p { margin: 6px 0 0; color: #8d2d24; }

.chat {
    min-height: 280px;
    display: grid;
    align-content: start;
    gap: 10px;
    margin-bottom: 12px;
}
.bubble {
    max-width: 70%;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f0ebdd;
}
.bubble.admin { margin-left: auto; background: #e3f1e9; }
.bubble span { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
.chat-form { grid-template-columns: 1fr auto; align-items: end; }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.stat {
    padding: 20px;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
}
.stat span { display: block; opacity: .72; }
.stat strong { font-size: 34px; }
.support-admin {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
}
.support-admin aside { display: grid; align-content: start; gap: 8px; }
.support-admin aside a {
    display: grid;
    gap: 3px;
    padding: 10px;
    border-radius: 8px;
}
.support-admin aside a.active, .support-admin aside a:hover { background: #eee8da; }

.mobile-tabs { display: none; }

@media (max-width: 900px) {
    .topbar { align-items: flex-start; }
    .topbar .nav { display: none; }
    .auth-panel, .offer-grid, .dashboard-grid, .support-admin { grid-template-columns: 1fr; }
    .hero, .account-head { align-items: start; }
    .offer-grid { gap: 12px; }
    .ghost-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .account-head { grid-template-columns: 1fr; }
    .balance { grid-column: 1 / -1; }
    .chat-form { grid-template-columns: 1fr; }
    .bubble { max-width: 92%; }
    .mobile-tabs {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 20;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        background: rgba(250, 247, 238, .95);
        border-top: 1px solid var(--line);
        backdrop-filter: blur(14px);
    }
    .mobile-tabs a { padding: 12px 6px; text-align: center; color: var(--muted); }
}

@media (max-width: 560px) {
    .shell { width: min(100% - 20px, 1180px); padding-top: 18px; }
    .topbar { padding: 14px 10px; }
    .card { padding: 16px; }
    .auth-copy h1, .hero.compact h1 { font-size: 32px; }
    .price { font-size: 34px; }
    .inline-form, .admin-actions, .row-form { display: grid; grid-template-columns: 1fr; width: 100%; }
    .admin-actions input, .row-form input { width: 100%; }
    .stat strong { font-size: 26px; }
}

:root {
    --bg: #edf0ef;
    --surface: #ffffff;
    --ink: #151817;
    --muted: #69716d;
    --soft: #f4f6f5;
    --line: #e3e7e5;
    --green: #207a52;
    --teal: #168f89;
    --rose: #c93f64;
    --rose-soft: #f9dce4;
    --danger: #b83232;
}

html { background: var(--bg); }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", sans-serif;
}

.app-body .topbar {
    width: min(448px, 100%);
    min-height: 62px;
    margin: 0 auto;
    padding: 12px 18px;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(21, 24, 23, .02);
}
.app-body .topbar .nav { display: none; }
.app-body .shell {
    width: min(448px, 100%);
    min-height: calc(100vh - 62px);
    margin: 0 auto;
    padding: 0 0 104px;
    background: var(--surface);
}
.admin-body .shell {
    width: min(1320px, calc(100% - 28px));
    padding: 28px 0 80px;
}
.brand { font-weight: 900; }
.brand-mark {
    width: 42px;
    height: 30px;
    border-radius: 8px;
    background: #050505;
}
.flash {
    width: min(430px, 100%);
    margin: 0 auto;
    border-radius: 0;
    background: #e7f4e5;
    color: #215f1b;
}
.flash.bad { background: #fde7e4; color: #8d241f; }

.page-login .topbar,
.page-register .topbar,
.page-login .shell,
.page-register .shell {
    width: min(520px, 100%);
}
.page-login .shell,
.page-register .shell {
    min-height: calc(100vh - 62px);
    padding: 0 24px 48px;
    background: #f8faf9;
}
.page-login .auth-panel,
.page-register .auth-panel {
    width: 100%;
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 22px;
    padding: 46px 0 0;
}
.page-login .auth-copy,
.page-register .auth-copy {
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}
.page-login .auth-copy h1,
.page-register .auth-copy h1 {
    margin: 0;
    color: var(--ink);
    font-size: 28px;
    line-height: 1.25;
    font-weight: 900;
}
.page-login .auth-copy p,
.page-register .auth-copy p {
    margin: 10px auto 0;
    max-width: 390px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}
.page-login .auth-copy .eyebrow,
.page-register .auth-copy .eyebrow {
    margin-bottom: 8px;
    color: var(--green);
    font-size: 12px;
    letter-spacing: 0;
}
.page-login .auth-panel .form,
.page-register .auth-panel .form {
    gap: 16px;
    padding: 26px;
    border-color: #dfe5e2;
    background: #fff;
    box-shadow: 0 18px 46px rgba(34, 49, 42, .1);
}
.page-login .auth-panel .form label,
.page-register .auth-panel .form label {
    color: #4d5752;
    font-weight: 700;
}
.page-login .auth-panel .form .btn,
.page-register .auth-panel .form .btn {
    width: 100%;
    margin-top: 2px;
}
.page-login .auth-panel .muted-link,
.page-register .auth-panel .muted-link {
    padding: 2px 0;
    color: #4f655b;
    text-align: center;
    font-weight: 700;
}
.card, .table-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: none;
}
.form.wide { max-width: none; margin: 0 18px; }
input, select, textarea {
    min-height: 46px;
    border-color: var(--line);
    border-radius: 8px;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(35, 120, 23, .12);
}
.btn {
    min-height: 46px;
    border-radius: 8px;
    font-weight: 800;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.btn.primary {
    border-color: var(--green);
    background: var(--green);
    box-shadow: 0 7px 16px rgba(32, 122, 82, .2);
}

@media (hover: hover) {
    .btn:hover { transform: translateY(-1px); }
    .btn.primary:hover { background: #196844; box-shadow: 0 9px 20px rgba(32, 122, 82, .24); }
    .account-menu a:hover { background: #f8faf9; }
}

.market-head {
    border-bottom: 1px solid var(--line);
    background: #fff;
}
.market-sections {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 6px;
    padding: 18px 18px 0;
    color: #737373;
    font-size: 18px;
    font-weight: 800;
}
.market-sections span {
    min-height: 42px;
    display: grid;
    place-items: center;
    border-bottom: 4px solid transparent;
}
.market-sections .active {
    color: #000;
    border-color: #000;
}
.trade-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 16px 28px 10px;
    border-top: 1px solid var(--line);
    font-size: 21px;
    font-weight: 900;
}
.trade-tabs a { color: #737373; }
.trade-tabs .active {
    padding-bottom: 9px;
    border-bottom: 4px solid #000;
}
.trade-tabs .currency {
    color: #111;
    font-size: 18px;
}
.filter-chips {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
}
.filter-chips span,
.filter-chips a {
    flex: 0 0 auto;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--soft);
    color: #161616;
    font-weight: 800;
}
.balance-strip {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 0 18px 14px;
    color: var(--muted);
    font-size: 13px;
}
.amount-filter {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    gap: 8px;
    padding: 0 18px 12px;
}
.amount-filter input {
    min-height: 36px;
    border-radius: 999px;
    background: var(--soft);
}

.offer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}
.offer.card {
    display: grid;
    gap: 10px;
    padding: 20px 18px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
}
.offer-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}
.offer-head strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
}
.merchant-identity {
    display: flex;
    align-items: center;
    gap: 10px;
}
.merchant-identity > span:last-child {
    display: grid;
    gap: 2px;
}
.merchant-identity small {
    color: var(--muted);
    font-size: 13px;
}
.offer-head strong::after {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, #fff 0 24%, var(--teal) 25% 100%);
}
.offer-head span {
    color: var(--muted);
    font-size: 13px;
}
.price {
    color: #000;
    font-size: 34px;
}
.price span {
    margin-right: 3px;
    font-size: 22px;
}
.meta {
    display: grid;
    justify-content: stretch;
    gap: 5px;
    color: #30333a;
    font-size: 15px;
}
.methods {
    position: relative;
    margin: 0;
    padding-left: 10px;
    color: var(--muted);
}
.methods::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 3px;
    height: 14px;
    border-radius: 4px;
    background: #eba852;
}
.status.live,
.pill {
    min-height: 26px;
    border-radius: 999px;
    font-weight: 800;
}
.page-sell .offer .status.live,
.page-sell .offer .btn.primary {
    border-color: var(--rose-soft);
    background: var(--rose-soft);
    color: #a91f49;
}
.page-sell .offer .status.selling {
    border-color: #e1e4e8;
    background: #e9ecef;
    color: #717987;
}
.page-sell .offer-busy {
    background: #f4f5f6;
}
.page-sell .offer-busy .btn.primary {
    border-color: #d8dce1;
    background: #d8dce1;
    color: #777f8c;
}
.pill.pending { background: #f1f1f1; color: #6c6c6c; }
.pill.paid,
.pill.completed { background: #e8f4e6; color: #1d6a19; }
.pill.failed,
.pill.cancelled { background: #fde7e4; color: #9e2424; }
.inline-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}
.inline-form select {
    min-height: 38px;
    border-radius: 999px;
    background: var(--soft);
}

.require-box,
.trade-closed { margin: 18px; }
.trade-closed {
    border-color: var(--line);
    background: #fbfbfb;
}
.ghost-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ghost-list span {
    background: linear-gradient(90deg, #f0f0f0, #fff, #f0f0f0);
}

.page-head {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    padding: 20px 12px 10px;
}
.page-head h1 {
    margin: 0;
    text-align: center;
    font-size: 26px;
}
.back-link {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    font-size: 34px;
    line-height: 1;
}
.order-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--line);
    padding: 6px 18px 0;
    color: #777;
    font-size: 20px;
    font-weight: 900;
}
.order-tabs a {
    min-height: 48px;
    display: grid;
    place-items: center;
    border-bottom: 4px solid transparent;
    color: inherit;
}
.order-tabs .active {
    color: #000;
    border-color: #000;
}
.order-list { display: grid; }
.order-item {
    display: grid;
    gap: 12px;
    padding: 20px 18px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}
.order-item-head,
.order-item-body,
.order-item-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.order-item-head strong {
    display: block;
    font-size: 20px;
}
.order-item-head span,
.order-item-body span,
.order-item-foot { color: var(--muted); }
.order-item-body strong {
    align-self: end;
    color: #000;
    font-size: 22px;
}
.order-item-body > div {
    display: grid;
    gap: 6px;
}
.order-item-foot {
    align-items: center;
    font-size: 14px;
}
.sell-text { color: var(--rose); }
.buy-text { color: #26a269; }
.detail-card,
.doc-card {
    display: grid;
    gap: 16px;
    margin: 12px 18px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(34, 49, 42, .06);
}
.detail-title {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}
.detail-title strong {
    display: block;
    font-size: 20px;
}
.detail-title span {
    color: var(--muted);
}
.detail-grid {
    display: grid;
    gap: 10px;
    margin: 0;
}
.detail-grid div {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}
.detail-grid dt {
    color: var(--muted);
}
.detail-grid dd {
    margin: 0;
    word-break: break-word;
}
.confirm-panel {
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.sell-confirm {
    display: grid;
    gap: 18px;
    margin: 12px 18px 0;
    box-shadow: 0 10px 26px rgba(34, 49, 42, .06);
}
.confirm-summary {
    display: grid;
    gap: 6px;
    padding: 18px;
    border-radius: 8px;
    background: #08090c;
    color: #fff;
}
.confirm-summary span {
    color: rgba(255,255,255,.72);
}
.confirm-summary strong {
    font-size: 32px;
    line-height: 1.1;
}
.payment-choice {
    display: grid;
    gap: 10px;
}
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.section-title a {
    color: var(--green);
    font-size: 14px;
    font-weight: 800;
}
.payment-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 12px;
    align-items: center;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.payment-card input {
    width: 18px;
    min-height: 18px;
}
.payment-card span {
    display: grid;
    gap: 4px;
}
.payment-card small,
.payment-card em {
    color: var(--muted);
    font-style: normal;
}
.payment-card em {
    grid-column: 2;
}
.alert-text {
    margin: 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fde7e4;
    color: #9e2424;
    font-weight: 800;
}
.hero-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.empty-state {
    margin: 34px 18px;
    padding: 28px;
    border-radius: 8px;
    background: var(--soft);
    color: var(--muted);
    text-align: center;
}
.support-alert,
.admin-notice {
    margin: 12px 18px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #e8f4e6;
    color: #1d6a19;
    font-weight: 800;
}
.notify-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 80;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100% - 36px));
}
.notify-toast {
    padding: 14px 16px;
    border: 1px solid #d9e4ef;
    border-radius: 8px;
    background: rgba(255,255,255,.96);
    color: #172033;
    box-shadow: 0 18px 42px rgba(25, 34, 51, .16);
    font-weight: 800;
}
.notify-toast small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 600;
}
.processing-label {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    background: #eef1f4;
    color: #586273;
    font-size: 12px;
    font-weight: 800;
}

.account-head {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 34px 20px 28px;
    background: #171a18;
    color: #fff;
}
.account-head p {
    margin: 8px 0 0;
    color: rgba(255,255,255,.72);
}
.balance {
    grid-column: 1 / -1;
    padding-top: 22px;
    color: #fff;
    font-size: 42px;
}
.balance span {
    display: inline;
    margin-left: 8px;
    color: rgba(255,255,255,.7);
    font-size: 16px;
}
.account-menu {
    margin: 14px 14px 96px;
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(34, 49, 42, .07);
}
.account-menu a {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    align-items: center;
    min-height: 64px;
    padding: 14px 46px 14px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.account-menu a:last-child { border-bottom: 0; }
.account-menu a::after {
    content: "\203A";
    position: absolute;
    right: 18px;
    color: #b1b4bb;
    font-size: 24px;
    line-height: 1;
}
.account-menu span {
    font-weight: 900;
}
.account-menu small {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 12px;
}
.account-panel {
    margin: 12px 14px;
    box-shadow: 0 10px 26px rgba(34, 49, 42, .06);
}
.account-panel h2 {
    margin: 0 0 14px;
    font-size: 18px;
}
.account-panel .copy-field {
    width: 100%;
}
.invite-copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}
.invite-copy-row .copy-field {
    min-width: 0;
}
.invite-copy-button {
    min-width: 88px;
}
.payment-account-layout {
    display: grid;
    gap: 18px;
    margin: 12px 14px 96px;
}
.payment-method-form {
    align-content: start;
    box-shadow: 0 10px 26px rgba(34, 49, 42, .06);
}
.payment-method-form h2,
.payment-method-heading h2 {
    margin: 0;
    font-size: 18px;
}
[data-payment-method-form][data-payment-type="alipay"] [data-payment-network-field],
[data-payment-method-form][data-payment-type="wechat"] [data-payment-network-field],
[data-payment-method-form][data-payment-type="usdt"] [data-payment-qr-field] {
    display: none !important;
}
.payment-type-picker {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.payment-type-picker legend {
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 14px;
}
.payment-type-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}
.payment-type-picker legend {
    grid-column: 1 / -1;
}
.payment-type-picker label {
    position: relative;
    min-width: 0;
    cursor: pointer;
}
.payment-type-picker input {
    position: absolute;
    width: 1px;
    min-height: 1px;
    opacity: 0;
    pointer-events: none;
}
.payment-type-picker span {
    min-height: 68px;
    display: grid;
    align-content: center;
    gap: 3px;
    padding: 10px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfb;
    color: var(--ink);
    text-align: center;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.payment-type-picker small {
    overflow-wrap: anywhere;
    font-size: 11px;
    line-height: 1.35;
}
.payment-type-picker input:checked + span {
    border-color: var(--green);
    background: #edf7f2;
    box-shadow: inset 0 0 0 1px var(--green);
}
.payment-type-picker input:focus-visible + span {
    box-shadow: 0 0 0 3px rgba(32, 122, 82, .14);
}
.payment-qr-upload {
    position: relative;
}
.payment-qr-upload > input {
    position: absolute;
    width: 1px;
    min-height: 1px;
    opacity: 0;
}
.payment-qr-drop {
    min-height: 168px;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 14px;
    border: 1px dashed #b9c7c0;
    border-radius: 8px;
    background: #f7faf8;
    color: var(--ink);
    text-align: center;
    cursor: pointer;
}
.payment-qr-drop > span {
    display: grid;
    gap: 5px;
}
.payment-qr-drop small {
    font-size: 12px;
}
.payment-qr-drop img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    background: #fff;
}
.payment-method-section {
    min-width: 0;
}
.payment-method-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
.payment-method-heading p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}
.payment-method-heading > strong {
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #edf2ef;
    color: #415048;
    font-size: 13px;
}
.payment-method-list {
    display: grid;
    gap: 10px;
}
.payment-method-item {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.payment-method-item header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.payment-method-item time {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}
.payment-method-main {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}
.payment-method-edit-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.payment-method-edit-button {
    min-width: 78px;
    min-height: 38px;
    border: 1px solid #b9d8c8;
    border-radius: 999px;
    background: #edf7f2;
    color: #1d6a4a;
    box-shadow: 0 4px 12px rgba(29, 106, 74, .1);
    font-weight: 800;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.payment-method-edit-button:hover {
    border-color: #8fc3a8;
    background: #e3f3eb;
    box-shadow: 0 6px 16px rgba(29, 106, 74, .16);
    transform: translateY(-1px);
}
.payment-method-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 900;
}
.payment-method-badge.alipay {
    background: #e7f2ff;
    color: #1266b2;
}
.payment-method-badge.wechat {
    background: #e7f5ea;
    color: #19713a;
}
.payment-method-badge.usdt {
    background: #e5f5f1;
    color: #127563;
}
.payment-method-body {
    min-width: 0;
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}
.payment-method-body.without-qr {
    grid-template-columns: 1fr;
}
.payment-qr-thumb,
.payment-qr-missing {
    width: 104px;
    height: 104px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fafafa;
}
.payment-qr-thumb {
    display: block;
    overflow: hidden;
}
.payment-qr-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}
.payment-qr-missing {
    display: grid;
    place-items: center;
    padding: 8px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}
.payment-method-body dl {
    min-width: 0;
    display: grid;
    gap: 10px;
    margin: 0;
}
.payment-method-body dl div {
    min-width: 0;
}
.payment-method-body dt {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 11px;
}
.payment-method-body dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-weight: 800;
    line-height: 1.55;
}
.payment-empty {
    margin: 0;
}
.order-payment-qr {
    width: 140px;
    height: 140px;
    display: block;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}
.dashboard-grid {
    grid-template-columns: 1fr;
    gap: 0;
}
.dashboard-grid .card {
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
}
.dashboard-grid h2 {
    margin: 0 0 16px;
    font-size: 21px;
}
.copy-field,
.quick-amounts button { background: var(--soft); }
.quick-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}
.quick-amounts button {
    border-radius: 8px;
    font-weight: 800;
}

.chat {
    margin: 0 18px 12px;
    box-shadow: 0 10px 26px rgba(34, 49, 42, .06);
}
.chat-form { margin: 0 18px; }
.bubble {
    max-width: 82%;
    background: var(--soft);
}
.bubble.admin { background: #e8f4e6; }

.mobile-tabs {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 18px;
    z-index: 20;
    width: min(386px, calc(100% - 36px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    padding: 8px;
    border: 1px solid rgba(214, 220, 217, .9);
    border-radius: 8px;
    background: rgba(244, 246, 245, .96);
    box-shadow: 0 14px 30px rgba(28, 38, 33, .14);
}
.mobile-tabs a {
    min-height: 50px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 6px;
    color: #6d6d6d;
    font-size: 13px;
    font-weight: 800;
}
.mobile-tabs a.active {
    background: #fff;
    color: #000;
}

@media (min-width: 900px) {
    .app-body .shell,
    .app-body .topbar,
    .flash {
        box-shadow: 0 0 0 1px rgba(0, 0, 0, .04);
    }
    .auth-panel {
        width: min(920px, calc(100% - 40px));
        margin: 0 auto;
        grid-template-columns: 1fr 380px;
    }
    .app-body .auth-panel {
        width: 100%;
        grid-template-columns: 1fr;
    }
    .page-account_payments .topbar,
    .page-account_payments .shell {
        width: min(980px, 100%);
    }
    .payment-account-layout {
        grid-template-columns: 360px minmax(0, 1fr);
        align-items: start;
        margin-right: 24px;
        margin-left: 24px;
    }
    .payment-method-form {
        position: sticky;
        top: 82px;
    }
}

@media (max-width: 560px) {
    .app-body .shell {
        width: 100%;
        padding-top: 0;
    }
    .page-login .shell,
    .page-register .shell {
        padding: 0 16px 36px;
    }
    .page-login .auth-panel,
    .page-register .auth-panel {
        padding-top: 30px;
    }
    .page-login .auth-panel .form,
    .page-register .auth-panel .form {
        padding: 20px;
    }
    .page-login .auth-copy p,
    .page-register .auth-copy p {
        max-width: 310px;
        overflow-wrap: anywhere;
    }
    .amount-filter {
        grid-template-columns: 1fr 1fr;
    }
    .amount-filter .btn {
        width: 100%;
    }
    .inline-form,
    .row-form {
        grid-template-columns: 1fr;
        width: 100%;
    }
    .row-form input { width: 100%; }
    .payment-account-layout {
        margin-right: 12px;
        margin-left: 12px;
    }
    .payment-type-picker span {
        min-height: 64px;
        padding: 8px 5px;
    }
    .payment-method-body {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 12px;
    }
    .payment-qr-thumb,
    .payment-qr-missing {
        width: 88px;
        height: 88px;
    }
    .payment-method-main {
        gap: 8px;
    }
    .payment-method-edit-button {
        min-width: 64px;
        padding-right: 12px;
        padding-left: 12px;
    }
}

.app-body {
    font-size: 14px;
}
.app-body .hero.compact {
    display: grid;
    gap: 16px;
    padding: 28px 18px 22px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfb;
}
.app-body .hero.compact h1 {
    font-size: 28px;
    line-height: 1.2;
}
.app-body .hero.compact p {
    line-height: 1.65;
}
.app-body input,
.app-body select,
.app-body textarea {
    background: #fbfcfb;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.app-body input:focus,
.app-body select:focus,
.app-body textarea:focus {
    background: #fff;
}
.app-body .brand span:last-child {
    font-size: 14px;
}
.app-body .market-sections {
    font-size: 15px;
    padding-top: 14px;
}
.app-body .market-sections span {
    min-height: 36px;
}
.app-body .trade-tabs {
    gap: 14px;
    padding: 13px 22px 8px;
    font-size: 18px;
}
.app-body .trade-tabs .currency {
    font-size: 14px;
}
.app-body .filter-chips {
    gap: 8px;
    padding: 12px 16px;
}
.app-body .filter-chips span,
.app-body .filter-chips a {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 13px;
}
.app-body .filter-chips span::before,
.app-body .filter-chips a::before,
.app-body .balance-strip span::before,
.app-body .methods::after,
.app-body .quick-amounts button::before,
.app-body .dashboard-grid h2::before,
.app-body .line-item::before,
.app-body .btn::before {
    display: inline-grid;
    place-items: center;
    margin-right: 6px;
    font-size: 13px;
    line-height: 1;
}
.app-body .filter-chips span:nth-child(1)::before { content: "\25C7"; color: var(--teal); }
.app-body .filter-chips span:nth-child(2)::before { content: "\00A5"; color: #c89335; }
.app-body .filter-chips span:nth-child(3)::before { content: "\25A3"; color: var(--green); }
.app-body .filter-chips a::before { content: "\271A"; color: var(--rose); }
.app-body .balance-strip {
    font-size: 12px;
}
.app-body .balance-strip span:first-child::before { content: "\25C9"; color: var(--green); }
.app-body .balance-strip span:last-child::before { content: "\2197"; color: #c89335; }
.app-body .offer.card {
    gap: 8px;
    padding: 16px;
}
.app-body .offer-head strong {
    font-size: 15px;
}
.app-body .offer-head span {
    font-size: 12px;
}
.app-body .offer-head strong::after {
    width: 15px;
    height: 15px;
}
.app-body .price {
    font-size: 28px;
}
.app-body .price span {
    font-size: 16px;
}
.app-body .meta {
    font-size: 13px;
}
.app-body .methods {
    font-size: 13px;
}
.app-body .methods::after {
    content: "\25CF";
    margin-right: 0;
    margin-left: 7px;
    color: #54a2ff;
}
.app-body input,
.app-body select,
.app-body textarea,
.app-body .btn {
    min-height: 40px;
    font-size: 14px;
}
.app-body .btn.primary::before { content: "\2713"; }
.app-body .page-head {
    grid-template-columns: 38px 1fr 38px;
    padding: 16px 12px 8px;
}
.app-body .page-head h1 {
    font-size: 20px;
}
.app-body .back-link {
    width: 38px;
    height: 38px;
    font-size: 26px;
}
.app-body .order-tabs {
    padding: 4px 16px 0;
    font-size: 16px;
}
.app-body .order-tabs a {
    min-height: 40px;
}
.app-body .order-item {
    gap: 10px;
    padding: 16px;
}
.app-body .order-item-head strong {
    font-size: 16px;
}
.app-body .order-item-body strong {
    font-size: 18px;
}
.app-body .order-item-body span,
.app-body .order-item-foot {
    font-size: 13px;
}
.app-body .account-head {
    gap: 14px;
    padding: 28px 18px 22px;
}
.app-body .account-head h1 {
    font-size: 24px;
}
.app-body .account-head p {
    font-size: 12px;
}
.app-body .balance {
    padding-top: 16px;
    font-size: 30px;
}
.app-body .balance span {
    font-size: 13px;
}
.app-body .dashboard-grid .card {
    padding: 18px 16px;
}
.app-body .dashboard-grid h2 {
    display: flex;
    align-items: center;
    font-size: 17px;
}
.app-body .dashboard-grid .card:nth-child(1) h2::before { content: "\271A"; color: var(--green); }
.app-body .dashboard-grid .card:nth-child(2) h2::before { content: "\25A3"; color: #54a2ff; }
.app-body .dashboard-grid .card:nth-child(3) h2::before { content: "\2197"; color: var(--rose); }
.app-body .dashboard-grid .card:nth-child(4) h2::before { content: "\2605"; color: #d19a2a; }
.app-body .line-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}
.app-body .line-item::before {
    content: "\25CF";
    color: var(--green);
}
.app-body .quick-amounts button::before {
    content: "\25C7";
    color: var(--green);
}
.app-body .mobile-tabs {
    width: min(372px, calc(100% - 32px));
    padding: 7px;
}
.app-body .mobile-tabs a {
    min-height: 48px;
    gap: 2px;
    font-size: 12px;
}
.app-body .mobile-tabs a::before {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    color: currentColor;
    font-size: 14px;
    line-height: 1;
}
.app-body .mobile-tabs a[href="?page=sell"]::before { content: "\21C5"; }
.app-body .mobile-tabs a[href="?page=orders"]::before { content: "\25A3"; }
.app-body .mobile-tabs a[href="?page=buy"]::before { content: "\271A"; }
.app-body .mobile-tabs a[href="?page=account"]::before { content: "\25C9"; }

@media (max-width: 900px) {
    .app-body .mobile-tabs {
        display: grid;
    }
}

.admin-body {
    min-width: 320px;
    background: #f1f3f6;
    color: #26313d;
    font-size: 14px;
}
.admin-body .topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 56px;
    padding: 0 18px 0 0;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid #dfe4ea;
    box-shadow: 0 2px 8px rgba(37, 48, 61, .05);
}
.admin-brand {
    width: 230px;
    min-height: 56px;
    align-self: stretch;
    flex: 0 0 auto;
    padding: 0 18px;
    background: #26313d;
    color: #fff;
}
.admin-brand .brand-mark {
    background: #4f7de8;
}
.admin-sidebar-toggle {
    width: 44px;
    height: 40px;
    margin: 0 14px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #647181;
    cursor: pointer;
    font-size: 19px;
}
.admin-sidebar-toggle:hover {
    background: #f0f3f6;
    color: #26313d;
}
.admin-top-context {
    display: grid;
    gap: 1px;
    min-width: 0;
}
.admin-top-context span {
    color: #929ba6;
    font-size: 11px;
}
.admin-top-context strong {
    overflow: hidden;
    color: #303b47;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.admin-top-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e9eefb;
    color: #3d66c7;
    font-weight: 900;
}
.admin-top-user {
    display: grid;
    line-height: 1.2;
}
.admin-top-user strong { font-size: 13px; }
.admin-top-user small { color: #8b96a3; font-size: 11px; }
.admin-logout {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-left: 1px solid #e2e6eb;
    color: #667382;
    font-size: 13px;
    font-weight: 700;
}
.admin-layout {
    width: 100%;
    min-height: calc(100vh - 56px);
    margin: 0;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
}
.admin-sidebar {
    position: sticky;
    top: 56px;
    z-index: 35;
    height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    background: #26313d;
    color: #fff;
}
.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.admin-profile strong {
    display: block;
    font-size: 15px;
}
.admin-profile small {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    color: rgba(255, 255, 255, .58);
    font-size: 11px;
}
.admin-profile small i,
.admin-sidebar-foot i {
    width: 7px;
    height: 7px;
    display: inline-block;
    border-radius: 50%;
    background: #41c77a;
}
.admin-avatar {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #4f7de8;
    color: #fff;
    font-weight: 900;
}
.admin-menu-title {
    margin: 18px 10px 8px;
    color: rgba(255, 255, 255, .38);
    font-size: 11px;
    font-weight: 800;
}
.admin-menu {
    display: grid;
    gap: 4px;
}
.admin-menu a {
    min-height: 42px;
    display: grid;
    grid-template-columns: 26px 1fr auto;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 6px;
    color: rgba(255, 255, 255, .7);
    font-weight: 700;
}
.admin-menu a:hover,
.admin-menu a.active {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}
.admin-menu a.active {
    box-shadow: inset 3px 0 0 #6f96ee;
}
.admin-menu .menu-icon {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    background: rgba(255, 255, 255, .08);
    font-size: 14px;
}
.admin-menu a.active .menu-icon,
.admin-menu a:hover .menu-icon {
    background: #4f7de8;
    color: #fff;
}
.menu-badge {
    min-width: 20px;
    min-height: 18px;
    display: grid;
    place-items: center;
    padding: 1px 5px;
    border-radius: 8px;
    background: #45515e;
    color: #dfe6ed;
    font-size: 10px;
    font-weight: 900;
}
.admin-menu a.active .menu-badge {
    background: #fff;
    color: #3f68ca;
}
.admin-sidebar-foot {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding: 14px 10px 4px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .48);
    font-size: 11px;
}
.admin-sidebar-overlay { display: none; }
.admin-main {
    min-width: 0;
    background: #f1f3f6;
}
.admin-tabs {
    min-height: 44px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: stretch;
    border-bottom: 1px solid #dfe4ea;
    background: #fff;
}
.admin-tabs > a {
    display: grid;
    place-items: center;
    border-right: 1px solid #e6eaee;
    color: #778492;
    font-size: 17px;
}
.admin-tabs > a:last-child {
    border-right: 0;
    border-left: 1px solid #e6eaee;
}
.admin-tabs > span {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
}
.admin-tabs b {
    color: #34404c;
    font-size: 13px;
}
.admin-tabs small {
    overflow: hidden;
    color: #a0a8b1;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-body .shell.admin-content {
    width: 100%;
    margin: 0;
    padding: 20px 22px 60px;
}
.admin-page-heading {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
    padding: 15px 18px;
    border: 1px solid #dfe4ea;
    border-radius: 6px;
    background: #fff;
}
.admin-page-heading p {
    margin: 0 0 3px;
    color: #4f7de8;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}
.admin-page-heading h1 {
    margin: 0;
    color: #27333f;
    font-size: 22px;
    line-height: 1.2;
}
.admin-page-heading span,
.admin-page-heading time {
    color: #85919e;
    font-size: 12px;
}
.admin-page-heading > strong {
    color: #34404c;
    font-size: 24px;
}
.admin-page-heading > strong small {
    color: #8b96a2;
    font-size: 12px;
    font-weight: 600;
}
.admin-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #dfe4ea;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    background: #fff;
}
.admin-section-heading h2 { margin: 0; font-size: 16px; }
.admin-section-heading p { margin: 3px 0 0; color: #8994a0; font-size: 11px; }
.admin-body .admin-stats {
    gap: 14px;
    margin-bottom: 16px;
}
.admin-body .stat {
    min-height: 112px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid #dfe4ea;
    border-top: 3px solid #4f7de8;
    border-radius: 6px;
    background: #fff;
    color: #293541;
    box-shadow: 0 4px 12px rgba(42, 54, 68, .04);
}
.admin-body .stat.pending { border-top-color: #e39b33; }
.admin-body .stat.users { border-top-color: #38a278; }
.admin-body .stat.volume { border-top-color: #bd5f7d; }
.stat-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: #edf2fd;
    color: #4f7de8;
    font-size: 20px;
    font-weight: 900;
}
.stat.pending .stat-icon { background: #fff4e3; color: #c17a18; }
.stat.users .stat-icon { background: #e8f6f0; color: #288963; }
.stat.volume .stat-icon { background: #faeaf0; color: #a84666; }
.admin-body .stat > span:last-child {
    min-width: 0;
    display: grid;
}
.admin-body .stat strong {
    overflow: hidden;
    color: #27333f;
    font-size: 27px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-body .stat small { color: #7e8995; font-size: 12px; }
.admin-body .stat em { color: #a0a8b1; font-size: 10px; font-style: normal; }
.admin-body .stat:hover {
    border-color: #cbd4de;
    transform: translateY(-1px);
}
.admin-body .table-card,
.admin-body .card {
    border-color: #dfe4ea;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(42, 54, 68, .04);
}
.admin-body .table-card {
    border-radius: 0 0 6px 6px;
}
.admin-body th {
    padding: 11px 12px;
    background: #f7f8fa;
    color: #6f7c8a;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
}
.admin-body td {
    padding: 12px;
    color: #34404c;
    font-size: 13px;
    text-align: center;
}
.admin-body tbody tr:hover { background: #fafbfd; }
.admin-body table { min-width: 980px; }
.admin-body .admin-actions {
    min-width: 390px;
    gap: 6px;
}
.admin-body .admin-actions input {
    width: 128px;
    min-height: 32px;
    border-color: #dce2e8;
    background: #fafbfc;
    font-size: 12px;
}
.admin-action-done {
    color: #8d98a4;
    font-size: 12px;
}
.admin-row-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}
.page-admin_users table { min-width: 1180px; }
.admin-user-actions {
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.admin-user-actions .btn { white-space: nowrap; }
.admin-user-action-modal { width: min(460px, calc(100% - 32px)); }
.admin-list-search {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
    align-items: end;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #dfe4ea;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    background: #fff;
}
.admin-list-search.users {
    grid-template-columns: minmax(220px, 2fr) minmax(160px, 1fr) auto;
}
.admin-list-search label {
    display: grid;
    gap: 6px;
    color: #667382;
    font-size: 12px;
    font-weight: 700;
}
.admin-list-search input,
.admin-list-search select {
    min-height: 36px;
    border-color: #dce2e8;
    background: #fafbfc;
    font-size: 12px;
}
.admin-list-search > div {
    display: flex;
    gap: 7px;
}
.admin-pagination {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 14px;
    border: 1px solid #dfe4ea;
    border-top: 0;
    border-radius: 0 0 6px 6px;
    background: #fff;
}
.admin-pagination > span {
    color: #84909c;
    font-size: 12px;
}
.admin-pagination > div {
    display: flex;
    gap: 4px;
}
.admin-pagination a {
    min-width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid #dfe4ea;
    border-radius: 4px;
    background: #fff;
    color: #5e6b79;
    font-size: 12px;
}
.admin-pagination a.active {
    border-color: #4f7de8;
    background: #4f7de8;
    color: #fff;
}
.admin-pagination a.disabled {
    opacity: .42;
    pointer-events: none;
}
.admin-list-empty {
    padding: 32px 16px;
    color: #8a96a2;
    text-align: center;
}
.user-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
}
.user-status.active { background: #e6f4eb; color: #277346; }
.user-status.locked { background: #f9e7e7; color: #a33d3d; }

.admin-modal {
    width: min(620px, calc(100% - 32px));
    max-height: min(760px, calc(100vh - 40px));
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: #34404c;
    box-shadow: 0 24px 70px rgba(23, 32, 42, .28);
}
.admin-modal:not([open]) { display: none; }
.admin-modal::backdrop { background: rgba(28, 37, 47, .52); }
.admin-modal-head {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid #e3e7ec;
    background: #f8f9fb;
}
.admin-modal-head small { color: #4f7de8; font-size: 10px; font-weight: 900; }
.admin-modal-head h2 { margin: 2px 0 0; font-size: 18px; }
.admin-modal-head > button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #778391;
    cursor: pointer;
    font-size: 22px;
}
.admin-modal-head > button:hover { background: #e9edf2; color: #26313d; }
.admin-modal-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 10px 18px;
    border-bottom: 1px solid #e3e7ec;
}
.admin-modal-summary div { padding: 10px 0; }
.admin-modal-summary dt { color: #8a95a1; font-size: 11px; }
.admin-modal-summary dd { margin: 4px 0 0; font-weight: 700; }
.admin-modal-form {
    display: grid;
    gap: 16px;
    padding: 18px;
}
.admin-modal-form label {
    display: grid;
    gap: 7px;
    color: #65717e;
    font-size: 12px;
    font-weight: 700;
}
.admin-modal-form input { min-height: 38px; background: #fafbfc; }
.admin-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 4px;
}
.admin-modal-section {
    display: grid;
    gap: 12px;
    padding: 15px;
    border: 1px solid #e3e7ec;
    border-radius: 6px;
}
.admin-modal-section h3 { margin: 0; font-size: 14px; }
.admin-modal-section > .btn { justify-self: end; }
.admin-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.admin-modal-grid label:last-child { grid-column: 1 / -1; }
.admin-modal-section.danger-zone { border-color: #efd9d9; background: #fffafa; }
.admin-notice {
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #efd6a7;
    border-bottom: 0;
    border-radius: 0;
    background: #fff8e9;
    color: #8a5b17;
    font-size: 12px;
    font-weight: 700;
}
.table-link {
    color: #426dcf;
    font-weight: 900;
}
.admin-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.admin-detail-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
}
.admin-detail-actions {
    margin: 0;
}
.admin-body .detail-grid div { grid-template-columns: 110px 1fr; }
.admin-recharge-log {
    margin-bottom: 16px;
}
.mini-list {
    display: grid;
    gap: 10px;
}
.mini-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eef1f5;
}
.mini-list div:last-child {
    border-bottom: 0;
}
.mini-list span {
    color: #687386;
    font-size: 13px;
}
.admin-body .btn {
    min-height: 34px;
    border-radius: 5px;
    box-shadow: none;
    font-size: 12px;
}
.admin-body .btn.primary { background: #4f7de8; border-color: #4f7de8; }
.admin-body .btn.danger { background: #c85656; border-color: #c85656; }
.admin-body .btn:hover { transform: none; }
.admin-settings-form {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
    padding: 20px;
}
.admin-settings-form label { color: #596675; font-weight: 700; }
.admin-settings-form label:has(textarea),
.admin-settings-form > .hint,
.admin-settings-form > button {
    grid-column: 1 / -1;
}
.admin-settings-form textarea { min-height: 120px; }
.admin-settings-form > button { justify-self: start; min-width: 150px; }
.admin-body .support-admin {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 14px;
}
.admin-body .support-admin aside {
    padding: 12px;
}
.admin-body .support-admin aside a { border-radius: 5px; }
.admin-body .support-admin aside a.active,
.admin-body .support-admin aside a:hover { background: #edf2fd; color: #355dbb; }
.admin-body .chat { margin: 0 0 12px; box-shadow: none; }
.admin-body .chat-form { margin: 0; }

.admin-sidebar-collapsed .admin-layout { grid-template-columns: 70px minmax(0, 1fr); }
.admin-sidebar-collapsed .admin-brand { width: 70px; justify-content: center; padding: 0; }
.admin-sidebar-collapsed .admin-brand > span:last-child,
.admin-sidebar-collapsed .admin-profile > div,
.admin-sidebar-collapsed .admin-menu-title,
.admin-sidebar-collapsed .admin-menu .menu-label,
.admin-sidebar-collapsed .admin-menu .menu-badge,
.admin-sidebar-collapsed .admin-sidebar-foot span { display: none; }
.admin-sidebar-collapsed .admin-sidebar { padding-right: 8px; padding-left: 8px; }
.admin-sidebar-collapsed .admin-profile { justify-content: center; padding-right: 0; padding-left: 0; }
.admin-sidebar-collapsed .admin-menu a { grid-template-columns: 1fr; justify-items: center; padding-right: 0; padding-left: 0; }
.admin-sidebar-collapsed .admin-sidebar-foot { justify-content: center; }

.page-admin_login {
    min-height: 100vh;
    background: #eef2f7;
}
.page-admin_login .topbar {
    position: relative;
    width: min(460px, 100%);
    min-height: 64px;
    margin: 0 auto;
    padding: 16px 20px;
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
}
.page-admin_login .shell {
    width: min(460px, calc(100% - 32px));
    min-height: calc(100vh - 64px);
    padding: 38px 0 60px;
}
.admin-login {
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 22px;
}
.admin-login-copy {
    max-width: 420px;
    text-align: center;
}
.admin-login-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #dfe5ee;
    border-radius: 5px;
    background: #fff;
    color: #16803a;
    font-size: 13px;
    font-weight: 900;
}
.admin-login-copy h1 {
    margin: 14px 0 8px;
    color: #26313d;
    font-size: 30px;
    line-height: 1.2;
}
.admin-login-copy p {
    margin: 0 auto;
    max-width: 390px;
    color: #667085;
    font-size: 14px;
    line-height: 1.7;
}
.admin-login-card {
    display: grid;
    gap: 18px;
    padding: 28px;
    border: 1px solid #dce2e8;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(38, 49, 61, .11);
}
.admin-login-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 8px;
}
.admin-login-head > span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: #edf2fd;
    color: #426dce;
    font-size: 20px;
}
.admin-login-head strong {
    display: block;
    color: #111827;
    font-size: 20px;
}
.admin-login-head small {
    color: #7a8496;
}
.admin-login-card label {
    display: grid;
    gap: 8px;
    color: #536078;
    font-size: 14px;
    font-weight: 700;
}
.admin-login-card input {
    min-height: 46px;
    border-color: #dfe5ee;
    background: #fbfcfe;
}
.admin-login-card input:focus {
    border-color: #5a82df;
    box-shadow: 0 0 0 3px rgba(79, 125, 232, .14);
}
.admin-login-card .btn {
    min-height: 46px;
    margin-top: 4px;
    border-radius: 5px;
    background: #4f7de8;
    border-color: #4f7de8;
}
.admin-login-card .muted-link {
    text-align: center;
}

@media (max-width: 1100px) {
    .admin-body .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .admin-body .topbar { padding-right: 10px; }
    .admin-brand { width: 58px; justify-content: center; padding: 0; }
    .admin-brand > span:last-child { display: none; }
    .admin-sidebar-toggle { margin: 0 8px; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar,
    .admin-sidebar-collapsed .admin-sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        width: 230px;
        height: calc(100vh - 56px);
        padding: 16px 12px;
        transform: translateX(-100%);
        transition: transform .2s ease;
        box-shadow: 10px 0 26px rgba(25, 35, 45, .2);
    }
    .admin-sidebar-open .admin-sidebar { transform: translateX(0); }
    .admin-sidebar-collapsed .admin-profile { justify-content: flex-start; padding-right: 8px; padding-left: 8px; }
    .admin-sidebar-collapsed .admin-profile > div,
    .admin-sidebar-collapsed .admin-menu-title,
    .admin-sidebar-collapsed .admin-menu .menu-label,
    .admin-sidebar-collapsed .admin-menu .menu-badge,
    .admin-sidebar-collapsed .admin-sidebar-foot span { display: initial; }
    .admin-sidebar-collapsed .admin-menu a { grid-template-columns: 26px 1fr auto; justify-items: stretch; padding: 8px 10px; }
    .admin-sidebar-collapsed .admin-sidebar-foot { justify-content: flex-start; }
    .admin-sidebar-overlay {
        position: fixed;
        inset: 56px 0 0;
        z-index: 30;
        display: block;
        border: 0;
        background: rgba(27, 35, 43, .38);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }
    .admin-sidebar-open .admin-sidebar-overlay { opacity: 1; pointer-events: auto; }
    .admin-body .shell.admin-content { padding: 14px 14px 48px; }
    .admin-settings-form { grid-template-columns: 1fr; }
    .admin-settings-form label,
    .admin-settings-form > .hint,
    .admin-settings-form > button { grid-column: 1; }
    .admin-detail-grid,
    .admin-body .support-admin { grid-template-columns: 1fr; }
    .admin-list-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-list-search.users { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-list-search > div { align-self: end; }
    .page-admin_login .shell { padding-top: 26px; }
}

@media (max-width: 600px) {
    .admin-top-context { display: none; }
    .admin-top-user { display: none; }
    .admin-body .admin-stats { grid-template-columns: 1fr; }
    .admin-page-heading { align-items: flex-start; padding: 14px; }
    .admin-page-heading > time,
    .admin-page-heading > strong { display: none; }
    .admin-page-heading h1 { font-size: 19px; }
    .admin-tabs > span small { display: none; }
    .admin-list-search,
    .admin-list-search.users { grid-template-columns: 1fr; }
    .admin-pagination { align-items: flex-start; flex-direction: column; }
    .admin-modal-summary,
    .admin-modal-grid { grid-template-columns: 1fr; }
    .admin-modal-grid label:last-child { grid-column: 1; }
    .admin-modal-actions { justify-content: stretch; }
    .admin-modal-actions .btn { flex: 1 1 auto; }
    .admin-login-copy h1 { font-size: 27px; }
    .admin-login-card { padding: 22px; }
}
