:root { --teal: #0E6E6E; --teal2: #0b5757; --ink: #18232f; --muted: #5f6b78; --line: #e2e7ec; --bg: #eef3f3; --ok: #1e7b34; --bad: #b42318; --warn: #8a4b00; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); }
.banner { background: #fff4d6; color: var(--warn); text-align: center; font-size: 12.5px; padding: 6px 10px; border-bottom: 1px solid #f0d9a8; }
.wrap { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 22px; max-width: 1180px; margin: 20px auto; padding: 0 16px; align-items: start; }
.phone { background: #fff; border-radius: 28px; box-shadow: 0 10px 40px rgba(16, 40, 48, .14); overflow: hidden; min-height: 720px; display: flex; flex-direction: column; border: 1px solid var(--line); }
.appbar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; background: var(--teal); color: #fff; } .appbar img { width: 28px; height: 28px; border-radius: 7px; }
.appbar .link { color: #d9f2ee; }
.spacer { flex: 1; }
main { padding: 18px; flex: 1; }
.powered { text-align: center; color: var(--muted); font-size: 12px; padding: 10px; border-top: 1px solid var(--line); }
h1 { font-size: 22px; margin: 4px 0 8px; } h2 { font-size: 16px; margin: 0 0 8px; }
.muted { color: var(--muted); } .center { text-align: center; } .small { font-size: 12.5px; }
.card { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 12px 0; background: #fff; }
.balance { background: linear-gradient(135deg, #0E6E6E, #12908a); color: #fff; border: 0; }
.balance .amt { font-size: 34px; font-weight: 700; letter-spacing: -.5px; } .balance .muted { color: #d4efeb; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input, select { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; }
button { font: 600 15px/1 inherit; border: 0; border-radius: 12px; padding: 13px 16px; background: var(--teal); color: #fff; cursor: pointer; width: 100%; margin-top: 12px; }
button.ghost { background: #fff; color: var(--teal); border: 1px solid var(--line); } button.link { background: none; color: var(--teal); width: auto; padding: 4px; margin: 0; font-weight: 500; text-decoration: underline; }
button:disabled { opacity: .55; }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .actions button { margin: 0; padding: 12px 6px; font-size: 13px; }
.tx { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #f0f3f5; font-size: 14px; } .tx:last-child { border: 0; }
.tx .pos { color: var(--ok); font-weight: 600; } .tx .pending { color: var(--warn); font-size: 12px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #eef1f4; color: var(--muted); }
.pill.ok { background: #e7f5ea; color: var(--ok); } .pill.warn { background: #fff4d6; color: var(--warn); } .pill.bad { background: #fdecea; color: var(--bad); }
.qr { border: 2px dashed var(--teal); border-radius: 14px; padding: 14px; text-align: center; font: 12px ui-monospace, Menlo, monospace; word-break: break-all; background: #f5fbfa; }
.tip { background: #f2f7f7; border-left: 3px solid #f6c453; border-radius: 8px; padding: 8px 10px; font-size: 13px; color: var(--muted); margin: 10px 0; }
.backstage { background: #0f1b2b; color: #cfe0ff; border-radius: 18px; padding: 18px; min-height: 720px; max-height: calc(100vh - 80px); overflow: auto; position: sticky; top: 16px; }
.backstage h2 { color: #fff; } .backstage .muted { color: #8ea3c4; }
.bs { border-top: 1px solid #22324b; padding: 9px 0; font: 12.5px/1.45 ui-monospace, Menlo, Consolas, monospace; }
.bs .k { display: inline-block; min-width: 64px; font-weight: 700; } .bs .api { color: #7fb4ff; } .bs .wh { color: #7fe0b0; } .bs .bad { color: #ff9a8f; }
.bs details summary { cursor: pointer; } .bs pre { white-space: pre-wrap; word-break: break-word; color: #a9bddf; margin: 6px 0 0; max-height: 260px; overflow: auto; }
#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: #18232f; color: #fff; padding: 10px 16px; border-radius: 10px; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 90vw; }
#toast.on { opacity: 1; }
@media (max-width: 860px) { .wrap { grid-template-columns: 1fr; margin: 0 auto; padding: 0; } .phone { border-radius: 0; min-height: calc(100vh - 32px); border: 0; } .backstage { border-radius: 0; position: static; min-height: 0; max-height: none; } }
.switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 12px; background: #f5f9f9; border-bottom: 1px solid var(--line); }
.switch button { margin: 0; padding: 9px; font-size: 13px; background: #fff; color: var(--teal); border: 1px solid var(--line); }
.switch button.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.balance.biz { background: linear-gradient(135deg, #24335c, #3b5ba5); }
.actions.four { grid-template-columns: repeat(2, 1fr); }
.tx .act { display: block; margin-top: 4px; }
