/* Frontend layout adapted from the supplied static screens. */
html:has(.app-template2) { background: #e2e8f0; }
body.app-template2 {
    --bg: #f8fafc;
    --surface: #fff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --purple: #2563eb;
    --purple-dark: #1d4ed8;
    --purple-soft: #eff6ff;
    --green: #10b981;
    --rose: #ef4444;
    --danger: #ef4444;
    background: #e2e8f0;
    color: var(--ink);
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
}
.app-template2 .topbar,
.app-template2 .shell,
.app-template2 .flash { width: min(448px, 100%); box-shadow: none; }
.app-template2 .topbar {
    display: flex; grid-template-columns: none; min-height: 60px;
    padding: 10px 16px;
    border: 0;
    background: var(--bg);
    color: var(--ink);
}
.app-template2 .brand { gap: 8px; color: var(--ink); font-size: 18px; }
.app-template2 .brand span:last-child { font-size: 18px; }
.app-template2 .brand-mark {
    width: 40px; height: 28px; border: 0; border-radius: 6px;
    background: var(--ink); color: #fff; font-size: 12px;
}
.app-template2 .topbar .nav { display: none; }
.app-template2.page-login .topbar,
.app-template2.page-register .topbar { display: none; }
.app-template2 .front-help { color: var(--purple); font-size: 13px; font-weight: 600; }
.app-template2 .shell { display: block; min-height: calc(100vh - 60px); padding: 0 0 90px; background: var(--bg); }
.app-template2 .flash { margin: 0 auto; background: #ecfdf5; color: #047857; }
.app-template2 .flash.bad { background: #fef2f2; color: #b91c1c; }
.app-template2 .card,
.app-template2 .table-card,
.app-template2 .detail-card,
.app-template2 .doc-card,
.app-template2 .sell-confirm,
.app-template2 .account-panel,
.app-template2 .payment-method-item,
.app-template2 .notification-item,
.app-template2 .order-item {
    border: 1px solid var(--line); border-radius: 8px;
    background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(15, 23, 42, .04);
}
.app-template2 .form label,
.app-template2.page-account_payments .payment-method-form label { color: var(--ink); }
.app-template2 input,
.app-template2 select,
.app-template2 textarea,
.app-template2 .copy-field,
.app-template2 input:focus,
.app-template2 select:focus,
.app-template2 textarea:focus,
.app-template2 input:focus-visible,
.app-template2 select:focus-visible,
.app-template2 textarea:focus-visible {
    border-color: var(--line); border-radius: 8px; background: #fff;
    color: var(--ink); caret-color: var(--ink);
}
.app-template2 input:focus,
.app-template2 select:focus,
.app-template2 textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px #dbeafe; }
.app-template2 input::placeholder,
.app-template2 textarea::placeholder { color: #94a3b8; }
.app-template2 input:-webkit-autofill,
.app-template2 input:-webkit-autofill:hover,
.app-template2 input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 1000px #fff inset;
}
.app-template2 .btn { min-height: 40px; border-color: var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.app-template2 .btn.primary { border-color: var(--purple); background: var(--purple); color: #fff; box-shadow: none; }
.app-template2 .btn.danger { border-color: #fee2e2; background: #fef2f2; color: #dc2626; }
.app-template2 .btn.template2-support { border-color: var(--purple); background: var(--purple); color: #fff; }
.app-template2 .hint,
.app-template2 .muted-link,
.app-template2 small { color: var(--muted); }

/* Market overview, quote and filters. */
.app-template2.page-sell .template2-market-summary {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
    margin: 8px 16px 12px; padding: 14px 8px;
    border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: none;
}
.app-template2.page-sell .template2-market-summary::after { content: none; }
.app-template2.page-sell .template2-market-summary div,
.app-template2.page-sell .template2-market-summary div:last-child {
    display: grid; align-content: center; justify-items: center; gap: 4px;
    min-width: 0; min-height: 48px; padding: 0 4px; border: 0;
    border-right: 1px solid var(--line);
}
.app-template2.page-sell .template2-market-summary div:last-child { border-right: 0; }
.app-template2.page-sell .template2-market-summary span { color: var(--muted); font-size: 11px; font-weight: 400; text-align: center; }
.app-template2.page-sell .template2-market-summary strong { color: var(--ink); font-size: 15px; font-weight: 700; overflow-wrap: anywhere; text-align: center; }
.app-template2.page-sell .template2-market-summary div:last-child strong { color: var(--purple); }
.app-template2 .template2-market-head { margin: 0; padding: 0 16px 14px; background: var(--bg); }
.app-template2 .template2-market-head .balance-strip {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 4px 0 14px; color: var(--muted); font-size: 12px; font-weight: 400;
}
.app-template2 .template2-market-head .balance-strip span:first-child::before {
    width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--green); content: "";
}
.app-template2 .template2-market-head .balance-strip strong { color: var(--ink); font-size: 15px; }
.app-template2 .template2-market-head .balance-strip .template2-icon { display: none; }
.app-template2 .template2-market-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.app-template2 .template2-market-actions .sell-payment-form { display: block; min-width: 0; }
.app-template2 .template2-action,
.app-template2 .template2-market-actions > button {
    min-width: 0; min-height: 42px; justify-content: space-between; gap: 6px;
    padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
    background: #fff; color: var(--ink); box-shadow: none; font-size: 13px; font-weight: 600;
}
.app-template2 .template2-action strong { overflow: hidden; text-overflow: ellipsis; }
.app-template2 .template2-action .template2-icon { color: var(--muted); }
.app-template2 .template2-action:hover { border-color: var(--purple); background: #eff6ff; color: var(--purple); }
.app-template2 .sell-filter-picker { left: 0; right: auto; width: min(280px, calc(100vw - 32px)); border-color: var(--line); background: #fff; box-shadow: 0 8px 24px #0f172a21; }
.app-template2 .sell-payment-option span { border-color: var(--line); background: #fff; }
.app-template2 .sell-payment-option strong { color: var(--ink); }
.app-template2 .sell-payment-option input:checked + span { border-color: var(--purple); background: #eff6ff; box-shadow: none; }
.app-template2 .sell-payment-option.selected span { color: var(--purple); background: #eff6ff; }
.app-template2 .amount-sort-picker { right: 0; left: auto; width: min(220px, calc(100vw - 32px)); }
.app-template2 .amount-sort-picker .sell-payment-options { grid-template-columns: 1fr; }
.app-template2 .amount-sort-picker .sell-payment-option { display: block; color: inherit; text-decoration: none; }
.app-template2 .amount-sort-picker .sell-payment-option span { min-height: 0; padding: 10px 12px; border: 0; border-radius: 6px; }
.app-template2 .template2-amount-filter { margin-top: 10px; border-color: var(--line); }
.app-template2 .template2-amount-filter input { background: #fff; }
.app-template2.page-sell .offer-grid { grid-template-columns: 1fr; gap: 12px; padding: 0 16px 20px; }
.app-template2 .offer.card { padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 1px 4px #0f172a0a; }
.app-template2 .offer.card:hover { border-color: #bfdbfe; background: #fff; }
.app-template2 .template2-offer-head { min-height: 48px; padding: 12px 14px; border-color: var(--line); background: #fff; }
.app-template2 .template2-merchant strong { color: var(--ink); font-size: 13px; }
.app-template2 .template2-avatar,
.app-template2 .template2-avatar::before,
.app-template2 .template2-avatar::after { content: none; }
.app-template2 .template2-avatar {
    display: grid; place-items: center; width: 26px; height: 26px; border: 0;
    border-radius: 50%; background: #eff6ff; color: var(--purple); box-shadow: none; font-size: 12px; font-weight: 700;
}
.app-template2 .offer-tag { padding: 3px 8px; border-radius: 4px; background: #fef2f2; color: #dc2626; font-size: 11px; font-weight: 600; white-space: nowrap; }
.app-template2 .reference-offer-main { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 16px 12px; }
.app-template2 .reference-offer-main > div,
.app-template2 .reference-offer-sub > div { display: grid; min-width: 0; gap: 4px; }
.app-template2 .reference-offer-main > div:last-child,
.app-template2 .reference-offer-sub > div:last-child { text-align: right; }
.app-template2 .reference-offer-main span,
.app-template2 .reference-offer-sub span { color: var(--muted); font-size: 12px; }
.app-template2 .reference-offer-main strong { color: var(--ink); font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.app-template2 .reference-offer-main strong.reference-highlight { color: var(--purple); }
.app-template2 .reference-offer-main small { font-size: 12px; font-weight: 400; }
.app-template2 .reference-offer-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 16px 14px; padding: 10px 12px; border-radius: 6px; background: var(--bg); }
.app-template2 .reference-offer-sub strong { color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.app-template2 .template2-offer-foot { align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); background: #fafbfc; color: var(--muted); font-size: 12px; }
.app-template2 .template2-offer-foot > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.app-template2 .template2-offer-foot b { color: #dc2626; }
.app-template2 .template2-sell-badge,
.app-template2 a.template2-sell-badge {
    min-width: 62px; padding: 7px 14px; border-radius: 6px;
    background: var(--purple); color: #fff; box-shadow: none; text-align: center; font-size: 13px;
}
.app-template2 .reference-offer-disabled { color: var(--muted); white-space: nowrap; }
.app-template2 .offer-progress { margin: 0; background: var(--line); }
.app-template2 .offer-progress span { background: var(--purple); }
.app-template2.page-sell .admin-notice,
.app-template2.page-sell .trade-closed { margin: 0 16px 14px; border-color: var(--line); background: #fff; color: var(--ink); }

/* Records, status screens and account navigation. */
.app-template2 .page-head { min-height: 54px; margin: 0 16px; padding: 8px 0; border-color: var(--line); }
.app-template2 .page-head h1 { color: var(--ink); font-size: 17px; }
.app-template2 .back-link { color: var(--ink); }
.app-template2 .order-tabs { margin: 0 16px; border-color: var(--line); color: var(--muted); }
.app-template2 .order-tabs .active { border-color: var(--purple); color: var(--purple); }
.app-template2 .order-list { gap: 12px; padding: 16px; }
.app-template2 .order-item { padding: 0; }
.app-template2 .order-item-head { align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.app-template2 .order-item-head strong { color: var(--ink); font-size: 13px; }
.app-template2 .order-item-body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
.app-template2 .reference-order-stat { display: grid; min-width: 0; gap: 4px; }
.app-template2 .reference-order-stat:last-child { text-align: right; }
.app-template2 .reference-order-stat span { color: var(--muted); font-size: 12px; }
.app-template2 .reference-order-stat strong { color: var(--ink); font-size: 17px; overflow-wrap: anywhere; }
.app-template2 .reference-order-stat small { color: var(--muted); font-size: 12px; font-weight: 400; }
.app-template2 .order-item-foot { padding: 12px 16px; border-top: 1px solid var(--line); background: #fafbfc; color: var(--muted); }
.app-template2 .order-item-foot > span { min-width: 0; overflow-wrap: anywhere; }
.app-template2 .order-item-foot .muted-link { color: var(--purple); white-space: nowrap; }
.app-template2 .pill.awaiting_user_payment,
.app-template2 .pill.payment_submitted,
.app-template2 .pill.awaiting_payment_method,
.app-template2 .pill.awaiting_platform_payment { background: #eff6ff; color: #1d4ed8; }
.app-template2 .pill.platform_paid,
.app-template2 .pill.completed { background: #ecfdf5; color: #047857; }
.app-template2 .pill.payout_exception,
.app-template2 .pill.failed,
.app-template2 .pill.cancelled { background: #fef2f2; color: #b91c1c; }
.app-template2 .order-payment-panel,
.app-template2 .order-state-panel,
.app-template2 .order-payout-snapshot,
.app-template2 .order-payment-choice { border-color: var(--line); border-radius: 8px; background: #fff; color: var(--ink); box-shadow: none; }
.app-template2 .detail-card,
.app-template2 .doc-card,
.app-template2 .sell-confirm { margin: 16px 16px 0; }
.app-template2 .detail-grid div,
.app-template2 .order-flow-card > .detail-title { border-color: var(--line); }
.app-template2 .detail-grid dt { color: var(--muted); }
.app-template2 .order-panel-heading span,
.app-template2 .order-state-panel > p { color: var(--muted); }
.app-template2 .order-panel-heading strong { color: var(--danger); }
.app-template2 .order-state-panel > strong { color: var(--ink); }
.app-template2 .order-countdown { background: var(--ink); }
.app-template2 .order-payment-tip { background: #eff6ff; color: #475569; }
.app-template2 .template2-network { color: var(--ink); }
.app-template2 .order-copy-row input { border-color: var(--line); background: #fff; color: var(--ink); }
.app-template2 .order-pay-qr { border-color: var(--line); }
.app-template2 .account-head { margin: 12px 16px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.app-template2 .account-head h1,
.app-template2 .balance { color: var(--ink); }
.app-template2 .account-head p { color: var(--muted); }
.app-template2 .account-menu { margin: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.app-template2 .account-menu a { border-color: var(--line); color: var(--ink); }
.app-template2 .account-menu a::after { color: #94a3b8; }
.app-template2 .account-panel { margin-left: 16px; margin-right: 16px; }
.app-template2 .notification-list { margin: 16px; gap: 10px; }
.app-template2 .notification-item { grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; }
.app-template2 .notification-item > span:nth-child(2) { min-width: 0; display: grid; gap: 5px; }
.app-template2 .notification-item .notification-dot { width: 8px; height: 8px; margin: 0; }
.app-template2 .notification-item,
.app-template2 .notification-item:last-child { border-color: var(--line); background: #fff; }
.app-template2 .notification-item.unread { border-color: #bfdbfe; background: #eff6ff; }
.app-template2 .notification-item strong { color: var(--ink); }
.app-template2 .notification-item small,
.app-template2 .notification-item time { color: var(--muted); }
.app-template2 .notification-dot { background: var(--purple); }
.app-template2 .reference-notification-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 50%; background: #eff6ff; color: var(--purple); }
.app-template2 .reference-profile-avatar { display: grid; place-items: center; flex: 0 0 52px; height: 52px; border-radius: 50%; background: #eff6ff; color: var(--purple); font-size: 22px; font-weight: 700; }
.app-template2.page-account .account-head { display: flex; align-items: center; justify-content: flex-start; gap: 14px; }
.app-template2.page-account .account-head h1 { margin: 0; font-size: 20px; }
.app-template2 .account-menu span { font-weight: 500; }
.app-template2 .account-menu a:hover { background: #eff6ff; }
.app-template2 .mobile-tabs {
    position: fixed; display: grid; bottom: 0; left: 50%; transform: translateX(-50%);
    width: min(448px, 100%); max-width: 448px; height: 64px; margin: 0;
    padding: 0 8px; border: 1px solid var(--line); border-radius: 0; background: #fff; box-shadow: none;
}
.app-template2 .mobile-tabs a { min-height: 60px; color: var(--muted); font-size: 11px; font-weight: 500; }
.app-template2 .mobile-tabs a.active { color: var(--purple); background: transparent; }
.app-template2 .mobile-tabs .template2-icon { color: currentColor; }
.app-template2.page-support .hero.compact { border-color: var(--line); background: #fff; }
.app-template2.page-support .hero.compact h1 { color: var(--ink); }
.app-template2.page-support .chat { border-color: var(--line); background: #fff; }
.app-template2.page-support .bubble { border-color: var(--line); background: #eff6ff; color: var(--ink); }
.app-template2.page-support .bubble.admin { border-color: #d1fae5; background: #ecfdf5; color: var(--ink); }
.app-template2.page-support .chat-form { background: transparent; }
.app-template2 .auth-panel { width: 100%; min-width: 0; min-height: calc(100dvh - 60px); grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 28px 24px; }
.app-template2 .auth-panel .auth-copy,
.app-template2 .auth-panel .form { min-width: 0; max-width: 100%; margin: 0; }
.app-template2 .auth-panel .auth-copy { text-align: center; }
.app-template2 .auth-panel .auth-copy::before {
    display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 16px;
    border-radius: 16px; background: var(--ink); color: #fff; font-size: 20px; font-weight: 800; content: "C2C";
}
.app-template2 .auth-panel .eyebrow { display: none; }
.app-template2 .auth-panel .form { box-shadow: none; }
.app-template2 .auth-panel .auth-copy h1 { color: var(--ink); font-size: 24px; }
.app-template2 .auth-panel .auth-copy p,
.app-template2 .auth-panel .form label { color: var(--muted); }
.app-template2 .auth-panel .card,
.app-template2 .require-box { border-color: var(--line); background: #fff; }
.app-template2 .confirm-summary { background: var(--ink); }
.app-template2 .payment-card { border-color: var(--line); background: #fff; color: var(--ink); }
.app-template2 .payment-card:hover { border-color: var(--purple); }
.app-template2 .order-payment-choice .payment-card:has(input:checked),
.app-template2 .payment-card:has(input:checked) { border-color: var(--purple); background: #eff6ff; }
.app-template2 .payment-card b { color: var(--ink); }
.app-template2 .payment-card small,
.app-template2 .payment-card em { color: var(--muted); }
.app-template2 .payment-card input[type="radio"] { accent-color: var(--purple); }
.app-template2 .order-state-panel.success { border-color: #a7f3d0; background: #ecfdf5; }
.app-template2 .order-state-panel.success > strong { color: #047857; }
.app-template2 .order-state-panel.exception { border-color: #fecaca; background: #fef2f2; }
.app-template2 .order-state-panel.exception > strong { color: #b91c1c; }
.app-template2 .order-state-panel.exception > p { color: #7f1d1d; }
.app-template2 .order-feedback-button { border-color: var(--line); background: var(--bg); color: var(--muted); }
.app-template2.page-account_payments .payment-method-form,
.app-template2.page-account_payments .payment-method-item {
    border-color: var(--line); background: #fff; color: var(--ink);
}
.app-template2.page-account_payments .payment-method-item { padding: 12px; }
.app-template2.page-account_payments .payment-method-main { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.app-template2.page-account_payments .payment-method-body { grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: start; }
.app-template2.page-account_payments .payment-method-body.without-qr { grid-template-columns: minmax(0, 1fr); }
.app-template2.page-account_payments .payment-method-body dl { gap: 8px; }
.app-template2.page-account_payments .payment-method-body dl div { display: grid; grid-template-columns: minmax(76px, .7fr) minmax(0, 1.3fr); gap: 8px; align-items: start; }
.app-template2.page-account_payments .payment-method-body dt { margin: 0; }
.app-template2.page-account_payments .payment-method-body dd { text-align: right; overflow-wrap: anywhere; }
.app-template2.page-account_payments .payment-method-edit-action { justify-content: flex-end; }
.app-template2.page-account_payments .payment-qr-thumb,
.app-template2.page-account_payments .payment-qr-missing { width: 76px; height: 76px; }
.app-template2.page-account_payments .payment-method-form h2,
.app-template2.page-account_payments .payment-method-heading h2,
.app-template2.page-account_payments .payment-method-body dd { color: var(--ink); }
.app-template2.page-account_payments .payment-type-trigger,
.app-template2.page-account_payments .payment-type-picker,
.app-template2.page-account_payments .payment-type-picker span,
.app-template2.page-account_payments .payment-qr-drop {
    border-color: var(--line); background: #fff; color: var(--ink);
}
.app-template2.page-account_payments .payment-type-trigger span,
.app-template2.page-account_payments .payment-method-body dt,
.app-template2.page-account_payments .payment-method-item time { color: var(--muted); }
.app-template2.page-account_payments .payment-type-trigger strong,
.app-template2.page-account_payments .payment-type-trigger::after { color: var(--purple); }
.app-template2.page-account_payments .payment-type-picker input:checked + span { border-color: var(--purple); background: #eff6ff; box-shadow: none; }
.app-template2.page-account_payments .payment-qr-drop b,
.app-template2.page-account_payments .payment-method-heading p { color: var(--ink); }
.app-template2.page-account_payments .payment-qr-drop small { color: var(--muted); }
.app-template2.page-account_payments .payment-edit-modal { border-color: var(--line); background: #fff; color: var(--ink); }
.app-template2.page-account_payments .payment-edit-modal .admin-modal-head { border-color: var(--line); background: var(--bg); }
.app-template2.page-account_payments .payment-edit-modal .admin-modal-form label { color: var(--ink); }
.app-template2.page-account_payments .payment-qr-missing { border-color: var(--line); background: var(--bg); color: var(--muted); }
.app-template2.page-account_payments .payment-method-edit-button { border-color: var(--line); background: #fff; color: var(--purple); }
.app-template2.page-account_payments .payment-template-preview { border-color: #a7f3d0; background: #ecfdf5; }
.app-template2.page-account_payments .payment-template-preview strong { color: #047857; }
.app-template2.page-account_payments .payment-template-preview p { color: #475569; }
.app-template2.page-account_payments .payment-method-heading > strong { background: #eff6ff; color: var(--purple); }
.app-template2.page-account_payments .payment-method-edit-button:hover { border-color: var(--purple); background: #eff6ff; }
.app-template2.page-support .hero.compact .eyebrow { color: var(--purple); }
.app-template2.page-support .support-alert { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.app-template2.page-support .bubble span { color: var(--muted); }
body.app-template2.page-support .screens { overflow-y: hidden; }
body.app-template2.page-support .reference-screen { height: 100%; min-height: 0; gap: 8px; }
body.app-template2.page-support .reference-screen > .reference-header { margin-bottom: 0; }
body.app-template2.page-support .reference-screen > .support-alert { flex: 0 0 auto; margin: 0 0 4px; }
body.app-template2.page-support .reference-screen > .chat { flex: 1 1 auto; min-height: 0; height: auto; margin: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
body.app-template2.page-support .reference-screen > .chat-form { flex: 0 0 auto; margin: 0; }
.app-template2 .empty-state { border-color: var(--line); background: #fff; color: var(--muted); }
.app-template2.page-recharge_pay .topbar { display: flex !important; }
.app-template2.page-recharge_pay .mobile-tabs { display: grid !important; }
.app-template2.page-recharge_pay .shell { width: min(448px, 100%); min-height: calc(100vh - 60px); margin: 0 auto; padding: 0 0 90px; background: var(--bg); }
.app-template2.page-recharge_pay .recharge-copy-button { border-color: var(--line); background: #fff; color: var(--purple); }
.app-template2.page-recharge_pay .recharge-copy-state,
.app-template2.page-recharge_pay .recharge-pay-expire { color: var(--muted); }
.app-template2.page-recharge_pay .recharge-pay-expire b { color: var(--ink); }
.app-template2.page-recharge_pay .pill.pending { background: #eff6ff; color: #1d4ed8; }
.app-template2.page-recharge_pay .pill.completed { background: #ecfdf5; color: #047857; }
.app-template2.page-recharge_pay .pill.failed,
.app-template2.page-recharge_pay .pill.cancelled { background: #fef2f2; color: #b91c1c; }
@media (max-width: 500px) {
    body.app-template2 { background: var(--bg); }
    .app-template2 .shell { min-height: calc(100dvh - 60px); }
    .app-template2 .template2-amount-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 350px) {
    .app-template2 .template2-market-head .balance-strip { flex-wrap: wrap; }
    .app-template2.page-sell .template2-market-summary strong { font-size: 13px; }
}

/* Scoped original reference styles. */

body.app-template2 {
    --primary: #2563eb;
    --primary-light: #eff6ff;
    --bg: #f8fafc;           
    --card: #ffffff;
    --text: #0f172a;
    --text2: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --success-light: #ecfdf5;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 12px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  }
body.app-template2 .reference-phone * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body.app-template2 {
    font-family: var(--font); background: #e2e8f0; color: var(--text);
    font-size: 14px; line-height: 1.5; display: flex; justify-content: center; min-height: 100vh;
  }
body.app-template2 { touch-action: pan-x pan-y; }
body.app-template2 .reference-phone.phone {
    width: 390px; height: min(844px, 100dvh); background: var(--bg); position: relative;
    border-radius: 40px; overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1), 0 0 0 10px #fff;
  }
  @media (max-width: 500px) {
body.app-template2 { background: var(--bg); }
body.app-template2 .reference-phone.phone { width: 100%; height: 100dvh; border-radius: 0; box-shadow: none; }
body.app-template2 .reference-phone .status-bar { display: none; }
  }
body.app-template2 .reference-phone .status-bar {
    height: 44px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; font-size: 14px; font-weight: 600; background: var(--bg); z-index: 10;
  }
body.app-template2 .reference-phone .screens { flex: 1; overflow-y: auto; position: relative; scrollbar-width: none; }
body.app-template2 .reference-phone .screens::-webkit-scrollbar { display: none; }
body.app-template2 .reference-phone .screen { display: none; padding: 16px; padding-bottom: 30px; flex-direction: column; gap: 14px; min-height: 100%; }
body.app-template2 .reference-phone .screen.active { display: flex; animation: fade .2s ease; }
  @keyframes fade { from { opacity: .5; } to { opacity: 1; } }
body.app-template2 .reference-phone .header { display: flex; align-items: center; justify-content: space-between; height: 44px; margin-bottom: 2px; }
body.app-template2 .reference-phone .header-left { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; }
body.app-template2 .reference-phone .brand-mark { background: #0f172a; color: #fff; padding: 4px 8px; border-radius: 6px; font-size: 12px; }
body.app-template2 .reference-phone .header-service { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--primary); font-weight: 600; cursor: pointer; padding: 4px 8px; border-radius: 6px; background: var(--primary-light); }
body.app-template2 .reference-phone .header-service svg { width: 14px; height: 14px; }
body.app-template2 .reference-phone .header-service:active { opacity: 0.7; }
body.app-template2 .reference-phone .header-right { font-size: 14px; color: var(--text2); cursor: pointer; }
body.app-template2 .reference-phone .back-btn { font-size: 24px; font-weight: 300; background: none; border: none; cursor: pointer; color: var(--text); width: 30px; margin-left: -8px; }
body.app-template2 .reference-phone .page-title { font-size: 17px; font-weight: 700; }
body.app-template2 .reference-phone .overview-panel {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--card); border-radius: var(--radius); padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02); border: 1px solid var(--border);
  }
body.app-template2 .reference-phone .overview-item { flex: 1; text-align: center; }
body.app-template2 .reference-phone .overview-item label { display: block; font-size: 11.5px; color: var(--text2); margin-bottom: 4px; }
body.app-template2 .reference-phone .overview-item strong { font-size: 15px; font-weight: 700; font-family: var(--mono); color: var(--text); }
body.app-template2 .reference-phone .overview-item strong.highlight { color: var(--primary); }
body.app-template2 .reference-phone .quote-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
body.app-template2 .reference-phone .quote-left { font-size: 13px; color: var(--text2); display: flex; align-items: center; gap: 6px; }
body.app-template2 .reference-phone .quote-dot { width: 6px; height: 6px; background: var(--success); border-radius: 50%; }
body.app-template2 .reference-phone .quote-price { font-size: 15px; font-weight: 700; color: var(--text); font-family: var(--mono); }
body.app-template2 .reference-phone .quote-right { font-size: 12px; color: var(--text2); }
body.app-template2 .reference-phone .filter-bar { display: flex; gap: 12px; position: relative; z-index: 50; }
body.app-template2 .reference-phone .dropdown { position: relative; flex: 1; }
body.app-template2 .reference-phone .dropdown-btn {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    background: var(--card); border: 1px solid var(--border); padding: 10px 12px;
    border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer;
  }
body.app-template2 .reference-phone .dropdown-btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
body.app-template2 .reference-phone .dropdown-btn svg { width: 14px; height: 14px; transition: transform 0.2s; }
body.app-template2 .reference-phone .dropdown-btn.active svg { transform: rotate(180deg); }
body.app-template2 .reference-phone .dropdown-menu {
    position: absolute; top: 110%; left: 0; right: 0; background: var(--card);
    border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 6px; display: none; flex-direction: column; gap: 2px;
  }
body.app-template2 .reference-phone .dropdown-menu.show { display: flex; }
body.app-template2 .reference-phone .dropdown-item {
    padding: 10px 12px; font-size: 13px; border-radius: 6px; cursor: pointer;
    color: var(--text); font-weight: 500;
  }
body.app-template2 .reference-phone .dropdown-item:hover { background: #f1f5f9; }
body.app-template2 .reference-phone .dropdown-item.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }
body.app-template2 .reference-phone .card { background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 4px rgba(0,0,0,0.02); border: 1px solid var(--border); overflow: hidden; }
body.app-template2 .reference-phone .card-head { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
body.app-template2 .reference-phone .user-info { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--text); }
body.app-template2 .reference-phone .avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; justify-content: center; align-items: center; font-size: 11px; font-weight: 700; }
body.app-template2 .reference-phone .tag-sell { background: #fef2f2; color: var(--danger); padding: 2px 8px; border-radius: 4px; font-size: 11.5px; font-weight: 600; }
body.app-template2 .reference-phone .list-card-body { padding: 16px; }
body.app-template2 .reference-phone .main-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 12px; }
body.app-template2 .reference-phone .stat-box .label { font-size: 12px; color: var(--text2); margin-bottom: 4px; }
body.app-template2 .reference-phone .stat-box .num { font-size: 18px; font-weight: 800; font-family: var(--mono); color: var(--text); }
body.app-template2 .reference-phone .stat-box .num small { font-size: 12px; font-weight: 500; font-family: var(--font); color: var(--text2); }
body.app-template2 .reference-phone .stat-box.highlight .num { color: var(--primary); }
body.app-template2 .reference-phone .sub-stats { background: #f8fafc; border-radius: 8px; padding: 10px 12px; display: flex; justify-content: space-between; }
body.app-template2 .reference-phone .sub-row { display: flex; flex-direction: column; gap: 2px; }
body.app-template2 .reference-phone .sub-row .k { font-size: 11.5px; color: var(--text2); }
body.app-template2 .reference-phone .sub-row .v { font-size: 13px; font-weight: 700; font-family: var(--mono); color: var(--text); }
body.app-template2 .reference-phone .card-foot { padding: 12px 16px; background: #fafbfc; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); }
body.app-template2 .reference-phone .timer { font-size: 12px; color: var(--text2); font-weight: 500; }
body.app-template2 .reference-phone .timer span { color: var(--danger); font-family: var(--mono); font-weight: 700; }
body.app-template2 .reference-phone .btn-sm { background: var(--primary); color: #fff; border: none; padding: 6px 24px; border-radius: 6px; font-size: 13px; font-weight: 700; cursor: pointer; }
body.app-template2 .reference-phone .auth-wrap { display: flex; flex-direction: column; justify-content: center; min-height: 100%; padding: 20px 10px; }
body.app-template2 .reference-phone .auth-logo { text-align: center; margin-bottom: 30px; }
body.app-template2 .reference-phone .auth-logo .icon { width: 56px; height: 56px; background: #0f172a; color: #fff; border-radius: 16px; font-size: 20px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
body.app-template2 .reference-phone .auth-logo h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
body.app-template2 .reference-phone .auth-logo p { font-size: 13px; color: var(--text2); margin-top: 4px; }
body.app-template2 .reference-phone .auth-form { display: flex; flex-direction: column; gap: 16px; }
body.app-template2 .reference-phone .input-group { display: flex; flex-direction: column; gap: 6px; }
body.app-template2 .reference-phone .input-group label { font-size: 13px; font-weight: 600; color: var(--text); }
body.app-template2 .reference-phone .input-group input { width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; outline: none; background: var(--card); transition: border-color 0.2s; }
body.app-template2 .reference-phone .input-group input:focus { border-color: var(--primary); }
body.app-template2 .reference-phone .auth-btn { width: 100%; padding: 15px; border-radius: 10px; background: var(--primary); color: #fff; font-size: 16px; font-weight: 700; border: none; cursor: pointer; margin-top: 10px; }
body.app-template2 .reference-phone .auth-switch { text-align: center; font-size: 13px; color: var(--text2); margin-top: 16px; }
body.app-template2 .reference-phone .auth-switch a { color: var(--primary); font-weight: 600; cursor: pointer; text-decoration: none; }
body.app-template2 .reference-phone .page-tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
body.app-template2 .reference-phone .page-tab { padding: 10px 0; font-size: 14px; font-weight: 600; color: var(--text2); cursor: pointer; position: relative; }
body.app-template2 .reference-phone .page-tab.active { color: var(--primary); }
body.app-template2 .reference-phone .page-tab.active::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--primary); border-radius: 2px; }
body.app-template2 .reference-phone .list-item { display: flex; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border); background: var(--card); cursor: pointer; }
body.app-template2 .reference-phone .list-item:last-child { border-bottom: none; }
body.app-template2 .reference-phone .list-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; justify-content: center; align-items: center; font-size: 18px; flex: 0 0 auto; }
body.app-template2 .reference-phone .list-content { flex: 1; }
body.app-template2 .reference-phone .list-title { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
body.app-template2 .reference-phone .list-time { font-size: 12px; color: var(--text2); font-weight: normal; }
body.app-template2 .reference-phone .list-desc { font-size: 13px; color: var(--text2); }
body.app-template2 .reference-phone .unread-dot { width: 8px; height: 8px; background: var(--danger); border-radius: 50%; margin-top: 6px; }
body.app-template2 .reference-phone .profile-card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.02); }
body.app-template2 .reference-phone .profile-top { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
body.app-template2 .reference-phone .profile-avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; justify-content: center; align-items: center; font-size: 24px; font-weight: 800; }
body.app-template2 .reference-phone .profile-info h2 { font-size: 18px; font-weight: 800; }
body.app-template2 .reference-phone .profile-info p { font-size: 12px; color: var(--text2); margin-top: 2px; }
body.app-template2 .reference-phone .menu-group { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.02); }
body.app-template2 .reference-phone .menu-item { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 500; cursor: pointer; }
body.app-template2 .reference-phone .menu-item:last-child { border-bottom: none; }
body.app-template2 .reference-phone .menu-item .right { color: var(--text2); font-size: 13px; font-weight: normal; display: flex; align-items: center; gap: 4px; }
body.app-template2 .reference-phone .menu-item .chev { color: #cbd5e1; font-size: 16px; }
body.app-template2 .reference-phone .detail-meta { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
body.app-template2 .reference-phone .order-no { font-size: 11.5px; color: var(--text2); font-family: var(--mono); }
body.app-template2 .reference-phone .info-block { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
body.app-template2 .reference-phone .info-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
body.app-template2 .reference-phone .info-title::before { content: ""; display: block; width: 3px; height: 14px; background: var(--primary); border-radius: 2px; }
body.app-template2 .reference-phone .pay-amount-box { text-align: center; padding: 12px 0; background: #fff; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 12px; }
body.app-template2 .reference-phone .pay-amount-box .label { font-size: 13px; color: var(--text2); }
body.app-template2 .reference-phone .pay-amount-box .val { font-size: 28px; font-weight: 800; color: var(--danger); font-family: var(--mono); margin-top: 4px; }
body.app-template2 .reference-phone .timer-block { background: #0f172a; color: #fff; border-radius: 8px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
body.app-template2 .reference-phone .timer-block span { font-size: 13px; color: #cbd5e1; }
body.app-template2 .reference-phone .timer-block strong { font-size: 20px; font-family: var(--mono); font-weight: 700; letter-spacing: 1px; }
body.app-template2 .reference-phone .input-row { display: flex; gap: 8px; margin-top: 8px; }
body.app-template2 .reference-phone .input-row input { flex: 1; padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: #fff; font-family: var(--mono); color: var(--text2); outline: none; }
body.app-template2 .reference-phone .input-row button { padding: 0 16px; border: 1px solid var(--border); background: #fff; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); }
body.app-template2 .reference-phone .btn-group { display: flex; gap: 10px; margin-top: auto; padding-top: 16px; }
body.app-template2 .reference-phone .btn { flex: 1; padding: 14px; border-radius: 8px; border: none; font-size: 15px; font-weight: 700; cursor: pointer; text-align: center; }
body.app-template2 .reference-phone .btn-primary { background: var(--primary); color: #fff; }
body.app-template2 .reference-phone .btn-danger { background: #fef2f2; color: var(--danger); }
body.app-template2 .reference-phone .btn-success { background: var(--success); color: #fff; }
body.app-template2 .reference-phone .status-header { text-align: center; padding: 24px 0 16px; }
body.app-template2 .reference-phone .status-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; justify-content: center; align-items: center; margin: 0 auto 12px; font-size: 24px; font-weight: bold; }
body.app-template2 .reference-phone .status-icon.success { background: var(--success-light); color: var(--success); }
body.app-template2 .reference-phone .status-header h3 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
body.app-template2 .reference-phone .status-header p { font-size: 13px; color: var(--text2); }
body.app-template2 .reference-phone .detail-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
body.app-template2 .reference-phone .detail-row:last-child { border-bottom: none; padding-bottom: 0; }
body.app-template2 .reference-phone .detail-row .k { color: var(--text2); }
body.app-template2 .reference-phone .detail-row .v { font-weight: 600; font-family: var(--mono); }
body.app-template2 .reference-phone .radio-box { border: 1px solid var(--border); border-radius: 8px; padding: 12px; background: #fff; display: flex; gap: 12px; align-items: center; margin-top: 10px; }
body.app-template2 .reference-phone .radio-circle { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--success); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
body.app-template2 .reference-phone .radio-circle::after { content: ""; width: 8px; height: 8px; background: var(--success); border-radius: 50%; }
body.app-template2 .reference-phone .radio-title { font-weight: 700; font-size: 13px; color: var(--text); }
body.app-template2 .reference-phone .radio-desc { font-size: 12px; color: var(--text2); font-family: var(--mono); margin-top: 2px; word-break: break-all; }
body.app-template2 .reference-phone .tabbar { position: absolute; bottom: 0; left: 0; right: 0; height: 60px; background: #fff; border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(4, 1fr); z-index: 100; }
body.app-template2 .reference-phone .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text2); font-size: 11px; font-weight: 500; cursor: pointer; }
body.app-template2 .reference-phone .tab.active { color: var(--primary); font-weight: 600; }
body.app-template2 .reference-phone .tab svg { width: 20px; height: 20px; }
body.app-template2 .reference-phone .debug { position: absolute; bottom: 72px; left: 50%; transform: translateX(-50%); background: rgba(15,23,42,0.9); padding: 6px 12px; border-radius: 99px; display: flex; gap: 8px; z-index: 100; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
body.app-template2 .reference-phone .debug button { background: none; border: none; color: #fff; font-size: 11px; font-weight: 600; cursor: pointer; padding: 2px 4px; }

/* Connect existing functionality to the reference layout. */
body.app-template2 { margin: 0; align-items: flex-start; }
body.app-template2 .reference-phone { flex: 0 0 auto; }
body.app-template2 .reference-phone .status-bar { flex-shrink: 0; }
body.app-template2 .reference-phone .screens { min-height: 0; }
body.app-template2 .reference-phone .reference-screen {
    width: 100%; margin: 0; background: transparent;
    grid-template-columns: none; align-items: stretch; justify-content: normal; box-shadow: none;
}
body.app-template2 .reference-phone .reference-header { flex-shrink: 0; }
body.app-template2 .reference-phone .reference-header .nav,
body.app-template2 .reference-phone .reference-screen > .page-head { display: none; }
body.app-template2 .reference-phone .brand-mark { width: auto; height: auto; border: 0; }
body.app-template2 .reference-phone .brand-mark.has-site-logo {
    width: 40px; height: 26px; flex: 0 0 40px; padding: 0; border-radius: 0; background: transparent;
}
body.app-template2 .reference-phone .auth-logo .icon.has-site-logo { padding: 0; border-radius: 0; background: transparent; }
body.app-template2 .reference-phone .back-btn { display: inline-block; text-align: center; line-height: normal; }
body.app-template2 .reference-phone .template2-icon { width: 20px; height: 20px; color: currentColor; }
body.app-template2 .reference-phone .header-service .template2-icon { width: 14px; height: 14px; }
body.app-template2 .reference-phone .mobile-tabs {
    position: static; flex: 0 0 auto;
    width: 100%; max-width: none; height: calc(60px + env(safe-area-inset-bottom, 0px));
    margin: 0; padding: 0 0 env(safe-area-inset-bottom, 0px); transform: none;
    gap: normal; border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; animation: none;
}
body.app-template2 .reference-phone .mobile-tabs a { min-height: 0; padding: 0; border-radius: 0; grid-template-rows: none; background: transparent; }
body.app-template2 .reference-phone .mobile-tabs a::before { content: none; display: none; }
body.app-template2 .reference-phone .reference-align-right { text-align: right; }
body.app-template2 .reference-phone .reference-market { display: contents; }
body.app-template2 .reference-phone .template2-market-actions { display: flex; gap: 12px; }
body.app-template2 .reference-phone .template2-market-actions .sell-payment-form,
body.app-template2 .reference-phone .template2-market-actions > .amount-sort-selector { flex: 1; min-width: 0; }
body.app-template2 .reference-phone .template2-action {
    display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 44px;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--card); color: var(--text); box-shadow: none; font-size: 13px; font-weight: 600;
}
body.app-template2 .reference-phone .template2-action .template2-icon { width: 14px; height: 14px; transition: transform .2s; }
body.app-template2 .reference-phone .template2-action[aria-expanded="true"] { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
body.app-template2 .reference-phone .template2-action[aria-expanded="true"] .template2-icon { transform: rotate(180deg); }
body.app-template2 .reference-phone .sell-filter-picker { top: 110%; width: 100%; min-width: 0; padding: 6px; border-radius: 8px; box-shadow: 0 4px 12px #0000001a; }
body.app-template2 .reference-phone .sell-payment-options { gap: 2px; }
body.app-template2 .reference-phone button.sell-payment-option { width: 100%; border: 0; padding: 0; background: transparent; text-align: left; font: inherit; }
body.app-template2 .reference-phone .sell-payment-option input { position: absolute; opacity: 0; pointer-events: none; }
body.app-template2 .reference-phone .sell-payment-option span { min-height: 44px; padding: 10px 12px; border: 0; border-radius: 6px; background: transparent; }
body.app-template2 .reference-phone .sell-payment-option strong { font-size: 13px; font-weight: 500; }
body.app-template2 .reference-phone .sell-payment-option small { display: none; }
body.app-template2 .reference-phone .sell-payment-option input:checked + span,
body.app-template2 .reference-phone .sell-payment-option.selected span { color: var(--primary); background: var(--primary-light); box-shadow: none; }
body.app-template2 .reference-phone .sell-payment-option input:checked + span strong,
body.app-template2 .reference-phone .sell-payment-option.selected span strong { color: var(--primary); font-weight: 600; }
body.app-template2 .reference-phone .template2-amount-filter { margin: 0; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
body.app-template2 .reference-phone .reference-offer-grid,
body.app-template2 .reference-phone .reference-order-list { display: flex; flex-direction: column; gap: 14px; }
body.app-template2 .reference-phone .reference-offer-grid > .card,
body.app-template2 .reference-phone .reference-order-card { padding: 0; animation: none; }
body.app-template2 .reference-phone .main-stats > .stat-box { min-width: 0; }
body.app-template2 .reference-phone .stat-box .num { overflow-wrap: anywhere; }
body.app-template2 .reference-phone .btn-sm { display: inline-block; font-family: Arial; line-height: normal; text-align: center; }
body.app-template2 .reference-phone .reference-detail-link { color: var(--primary); font-size: 13px; font-weight: 600; white-space: nowrap; }
body.app-template2 .reference-phone .pill { min-height: 0; padding: 2px 8px; border: 0; border-radius: 4px; font-size: 11.5px; font-weight: 600; }
body.app-template2 .reference-phone .reference-notifications { padding: 0; }
body.app-template2 .reference-phone .list-content { min-width: 0; }
body.app-template2 .reference-phone .list-title { gap: 8px; }
body.app-template2 .reference-phone .list-time { flex-shrink: 0; }
body.app-template2 .reference-phone .reference-notice-success { background: var(--success-light); color: var(--success); }
body.app-template2 .reference-phone .profile-card { flex-shrink: 0; }
body.app-template2 .reference-phone .profile-top { flex-shrink: 0; }
body.app-template2 .reference-phone .profile-avatar { flex-shrink: 0; }
body.app-template2 .reference-phone .menu-group { flex-shrink: 0; }
body.app-template2 .reference-phone .reference-logout { justify-content: center; color: var(--danger); font-weight: 600; }
body.app-template2.page-login .reference-phone .reference-header,
body.app-template2.page-register .reference-phone .reference-header { display: none; }
body.app-template2 .reference-phone .auth-wrap { flex: 0 0 auto; }
body.app-template2 .reference-phone .auth-logo p { margin-top: 4px; }
body.app-template2 .reference-phone .auth-form .input-group { color: var(--text); font-size: 13px; font-weight: 600; }
body.app-template2 .reference-phone .auth-form .input-group input { min-height: 0; box-shadow: none; font-family: Arial; font-weight: 400; line-height: normal; }
body.app-template2 .reference-phone .auth-form .input-group input:focus { border-color: var(--primary); }
body.app-template2 .reference-phone .detail-card,
body.app-template2 .reference-phone .doc-card,
body.app-template2 .reference-phone .sell-confirm,
body.app-template2 .reference-phone .account-panel { margin: 0; padding: 16px; border-radius: 12px; box-shadow: none; }
body.app-template2 .reference-phone .form.wide { margin: 0; }
body.app-template2 .reference-phone .form label { gap: 6px; color: var(--text); font-size: 13px; font-weight: 600; }
body.app-template2 .reference-phone .form input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
body.app-template2 .reference-phone .form select,
body.app-template2 .reference-phone .form textarea { padding: 14px; border-radius: 10px; font-size: 14px; font-weight: 400; }
body.app-template2 .reference-phone .payment-account-layout { margin: 0; padding: 0; }
body.app-template2 .reference-phone .payment-type-trigger { min-height: 60px; padding: 12px 36px 12px 14px; align-items: flex-start; text-align: left; }
body.app-template2 .reference-phone .payment-type-picker { top: calc(100% + 4px); padding: 6px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 0; max-height: min(62dvh, 440px); overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
body.app-template2 .reference-phone .payment-type-group { min-width: 0; }
body.app-template2 .reference-phone .payment-type-group > div { grid-template-columns: minmax(0, 1fr); gap: 1px; }
body.app-template2 .reference-phone .payment-type-group h3 { padding: 7px 10px 4px; }
body.app-template2 .reference-phone .payment-type-picker span { min-height: 42px; padding: 9px 11px; }
body.app-template2 .reference-phone .payment-type-picker label { display: block; }
body.app-template2 .reference-phone .payment-type-picker span { display: flex; align-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--text); text-align: left; box-shadow: none; }
body.app-template2 .reference-phone .payment-type-picker b { font-size: 13px; font-weight: 600; }
body.app-template2 .reference-phone .payment-type-picker small { display: none; }
body.app-template2 .reference-phone .payment-type-picker input:checked + span { background: #eff6ff; color: #2563eb; box-shadow: none; }
body.app-template2 .reference-phone .payment-template-preview { padding: 12px 14px; }
body.app-template2 .reference-phone .payment-template-preview strong { line-height: 1.5; }
body.app-template2 .reference-phone .payment-template-preview p { margin-top: 5px; line-height: 1.6; overflow-wrap: anywhere; }
body.app-template2 .reference-phone .payment-method-heading { margin: 12px 0; }
body.app-template2 .reference-phone .payment-method-heading > div { display: grid; gap: 8px; min-width: 0; }
body.app-template2 .reference-phone .payment-method-heading p { margin: 0; }
body.app-template2 .reference-phone .payment-method-item > header { margin-bottom: 12px; }
body.app-template2 .reference-phone .payment-method-badge { padding: 4px 9px; }
body.app-template2 .reference-phone .payment-qr-missing { padding: 4px; }
body.app-template2 .reference-phone .payment-edit-modal { margin: auto; }
body.app-template2 .reference-phone .payment-edit-modal .admin-modal-head { padding: 16px 20px; }
body.app-template2 .reference-phone .payment-edit-modal .admin-modal-head h2 { margin-top: 2px; }
body.app-template2 .reference-phone .payment-edit-modal .admin-modal-head small { color: var(--primary); }
body.app-template2 .reference-phone .payment-edit-modal .admin-modal-head > button { color: var(--text2); }
body.app-template2 .reference-phone .payment-edit-modal .admin-modal-form { padding: 20px; gap: 18px; }
body.app-template2 .reference-phone .payment-edit-modal .admin-modal-form label { gap: 8px; }
body.app-template2 .reference-phone .payment-edit-modal .admin-modal-form input:not([type="file"]),
body.app-template2 .reference-phone .payment-edit-modal .admin-modal-form select { min-width: 0; width: 100%; padding: 12px 14px; border-radius: 10px; }
body.app-template2 .reference-phone .payment-edit-modal .admin-modal-actions { padding-top: 4px; }
body.app-template2 .reference-phone .payment-edit-modal .payment-qr-drop { padding: 14px; }
body.app-template2 .reference-phone .payment-edit-modal .payment-qr-drop > span { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
body.app-template2 .reference-phone .payment-edit-modal .payment-template-preview { padding: 12px 14px; }
body.app-template2 .reference-phone .payment-carrier-trigger {
    width: 100%; min-height: 44px; padding: 10px 36px 10px 14px; position: relative;
    border: 1px solid var(--border); border-radius: 10px; background: var(--card);
    color: var(--text); text-align: left; font-size: 14px; cursor: pointer;
}
body.app-template2 .reference-phone .payment-carrier-trigger::after {
    content: "⌄"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text2); font-size: 18px;
}
body.app-template2 .reference-phone .payment-carrier-options {
    display: grid; gap: 2px; max-height: 132px; overflow-y: auto; overscroll-behavior: contain;
    padding: 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--card);
}
body.app-template2 .reference-phone .payment-carrier-options[hidden] { display: none; }
body.app-template2 .reference-phone .payment-carrier-options button {
    min-height: 40px; padding: 8px 12px; border: 0; border-radius: 6px;
    background: transparent; color: var(--text); text-align: left; cursor: pointer;
}
body.app-template2 .reference-phone .payment-carrier-options button[aria-pressed="true"] { background: var(--primary-light); color: var(--primary); }
body.app-template2 .reference-phone .admin-notice,
body.app-template2 .reference-phone .trade-closed,
body.app-template2 .reference-phone .empty-state { margin: 0; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
body.app-template2 .reference-phone .flash { width: 100%; margin: 0; padding: 12px 16px; }
body.app-template2 .reference-phone .btn { min-height: 0; line-height: normal; box-shadow: none; }
body.app-template2 .reference-phone .btn.primary { background: var(--primary); color: #fff; }
body.app-template2 .reference-phone .btn.danger { background: #fef2f2; color: var(--danger); }
body.app-template2 .reference-phone .payment-method-edit-button {
    flex: 0 0 auto; min-height: 34px; padding: 7px 16px;
    border: 1px solid var(--border); box-shadow: none; font-size: 13px; font-weight: 600;
}
body.app-template2 .reference-phone .order-copy-row .btn { flex: 0 0 auto; }
body.app-template2 .reference-phone .reference-order-flow { display: contents; }
body.app-template2 .reference-phone .reference-order-summary { padding: 0; }
body.app-template2 .reference-phone .reference-payment-panel { flex-shrink: 0; }
body.app-template2 .reference-phone .reference-address-label { margin-top: 12px; font-size: 13px; font-weight: 600; }
body.app-template2 .reference-phone .input-row input { width: 0; min-width: 0; min-height: 0; box-shadow: none; }
body.app-template2 .reference-phone .reference-payment-panel .pay-amount-box .val { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
body.app-template2 .reference-phone .reference-payment-panel .pay-amount-box .val button { padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--primary); font-size: 12px; font-weight: 600; }
body.app-template2 .reference-phone .order-payment-tip { margin-top: 12px; padding: 10px 12px; border-radius: 8px; font-size: 13px; font-weight: 400; line-height: 1.6; }
body.app-template2 .reference-phone .reference-order-actions form { flex: 1; min-width: 0; }
body.app-template2 .reference-phone .reference-order-actions .btn { width: 100%; }
body.app-template2 .reference-phone .status-header { flex-shrink: 0; }
body.app-template2 .reference-phone .reference-order-flow ~ .status-header { margin: 0; }
body.app-template2 .reference-phone .order-state-panel { margin: 0; padding: 16px; border-radius: 12px; text-align: left; }
body.app-template2 .reference-phone .order-state-panel > strong { display: block; color: var(--text); font-size: 14px; font-weight: 700; }
body.app-template2 .reference-phone .order-state-panel > p { margin-top: 8px; color: var(--text2); font-size: 13px; line-height: 1.6; }
body.app-template2 .reference-phone .order-countdown { min-height: 0; margin-top: 12px; padding: 14px 16px; border-radius: 8px; background: var(--text); color: #fff; }
body.app-template2 .reference-phone .order-countdown span { color: #cbd5e1; font-size: 13px; font-weight: 400; }
body.app-template2 .reference-phone .order-countdown b { color: #fff; font-family: var(--mono); font-size: 20px; font-weight: 700; letter-spacing: 1px; }
body.app-template2 .reference-phone .order-payout-snapshot,
body.app-template2 .reference-phone .order-payment-choice { margin: 0; padding: 16px; border-radius: 12px; background: var(--bg); }
body.app-template2 .reference-phone .detail-grid { gap: 0; margin: 0; }
body.app-template2 .reference-phone .detail-grid > div { grid-template-columns: minmax(72px, auto) minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
body.app-template2 .reference-phone .detail-grid > div:last-child { padding-bottom: 0; border-bottom: 0; }
body.app-template2 .reference-phone .detail-grid dd { font-family: var(--mono); font-weight: 600; text-align: right; }
body.app-template2 .reference-phone .section-title { margin-bottom: 12px; font-size: 14px; font-weight: 700; }
body.app-template2 .reference-phone .section-title > strong::before { display: inline-block; width: 3px; height: 14px; margin-right: 6px; border-radius: 2px; background: var(--primary); vertical-align: -2px; content: ""; }
body.app-template2 .reference-phone .template2-state-actions { display: flex; margin-top: 12px; gap: 10px; }
body.app-template2 .reference-phone .confirm-panel { margin-top: auto; padding-top: 16px; border: 0; }
body.app-template2 .reference-phone .order-state-panel.success + .confirm-panel .btn { background: var(--success); }
body.app-template2 .reference-phone .reference-status-warning { background: #fef3c7; color: var(--warning); }
body.app-template2 .reference-phone .status-header:has(.status-icon.success) h3 { color: var(--success); }
body.app-template2 .reference-phone .reference-primary-text { color: var(--primary); }
body.app-template2 .reference-phone .reference-danger-text { color: var(--danger); }
body.app-template2 .reference-phone .detail-row { gap: 12px; }
body.app-template2 .reference-phone .detail-row .k { flex-shrink: 0; }
body.app-template2 .reference-phone .detail-row .v { min-width: 0; overflow-wrap: anywhere; text-align: right; }
body.app-template2 .reference-phone .reference-confirm-info { border-color: #a7f3d0; background: var(--success-light); }
body.app-template2 .reference-phone .reference-confirm-info .info-title { color: #065f46; }
body.app-template2 .reference-phone .reference-confirm-amount { margin-top: 12px; color: #047857; font-size: 13px; text-align: center; }
body.app-template2 .reference-phone .reference-confirm-amount strong { color: #065f46; font-family: var(--mono); font-size: 18px; }
body.app-template2 .reference-phone .reference-receipt-timer { margin-top: 12px; }
body.app-template2 .reference-phone .reference-order-extra { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; color: var(--text2); font-size: 12px; }
body.app-template2 .reference-phone .reference-order-extra summary { cursor: pointer; }
body.app-template2 .reference-phone .reference-order-extra[open] > .reference-order-summary,
body.app-template2 .reference-phone .reference-order-extra[open] > .order-payment-choice { margin-top: 12px; }
body.app-template2 .reference-phone .reference-order-extra .section-title { margin-top: 12px; }
body.app-template2 .reference-phone .reference-confirm-summary { flex-shrink: 0; min-width: 0; margin: 0; padding: 0; animation: none; }
body.app-template2 .reference-phone .reference-confirm-summary .card-head { gap: 12px; }
body.app-template2 .reference-phone .reference-confirm-summary .user-info { min-width: 0; }
body.app-template2 .reference-phone .reference-confirm-summary .user-info strong { min-width: 0; overflow-wrap: anywhere; }
body.app-template2 .reference-phone .reference-confirm-summary .avatar,
body.app-template2 .reference-phone .reference-confirm-summary .detail-meta { flex-shrink: 0; }
body.app-template2 .reference-phone .reference-confirm-summary .main-stats,
body.app-template2 .reference-phone .reference-confirm-summary .sub-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
body.app-template2 .reference-phone .reference-confirm-summary .sub-row { min-width: 0; overflow-wrap: anywhere; }
body.app-template2 .reference-phone .sell-confirm .payment-choice { min-width: 0; gap: 12px; }
body.app-template2 .reference-phone .sell-confirm .payment-card {
    grid-template-columns: 18px minmax(0, 1fr);
    min-width: 0;
    padding: 12px;
    border-color: var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
}
body.app-template2 .reference-phone .sell-confirm .payment-card input[type="radio"] { width: 18px; height: 18px; min-height: 18px; margin: 0; accent-color: var(--primary); }
body.app-template2 .reference-phone .sell-confirm .payment-card span { min-width: 0; gap: 4px; }
body.app-template2 .reference-phone .sell-confirm .payment-card b { color: var(--text); }
body.app-template2 .reference-phone .sell-confirm .payment-card small,
body.app-template2 .reference-phone .sell-confirm .payment-card em { color: var(--text2); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
body.app-template2 .reference-phone .sell-confirm .payment-card em { grid-column: 2; font-style: normal; }
body.app-template2 .reference-phone .sell-confirm .payment-choice > .btn.primary { width: 100%; min-height: 48px; }
@media (max-width: 500px) {
    body.app-template2 .reference-phone .reference-screen { min-height: 100%; }
}

